Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ad4ea823
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
ad4ea823
编写于
4月 11, 2022
作者:
O
openharmony_ci
提交者:
Gitee
4月 11, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2967 电话子系统用例适配
Merge pull request !2967 from 高曦/master
上级
2c3b7b1e
34d88ef6
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
469 addition
and
449 deletion
+469
-449
telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/CallManageAll.test.js
...er_ims2_call/entry/src/main/js/test/CallManageAll.test.js
+10
-14
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/ConnectionJsunit.test.ets
...y/src/main/ets/MainAbility/test/ConnectionJsunit.test.ets
+71
-70
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/ConnectionSecondJsUnit.test.ets
...main/ets/MainAbility/test/ConnectionSecondJsUnit.test.ets
+29
-29
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/SocketJsunit.test.ets
...entry/src/main/ets/MainAbility/test/SocketJsunit.test.ets
+284
-258
telephony/telephonyjstest/network_search/network_search_errors/Test.json
...honyjstest/network_search/network_search_errors/Test.json
+1
-1
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/default/pages/index/index.js
...rch_errors/entry/src/main/js/default/pages/index/index.js
+1
-1
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
...errors/entry/src/main/js/test/NetworkSearchErrors.test.js
+19
-24
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/SimManager.test.js
...r_function_test/entry/src/main/js/test/SimManager.test.js
+41
-40
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/lib/Const.js
...manager_function_test/entry/src/main/js/test/lib/Const.js
+2
-1
telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/test/SmsMmsError.test.js
.../sms_mms_error/entry/src/main/js/test/SmsMmsError.test.js
+11
-11
未找到文件。
telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/CallManageAll.test.js
浏览文件 @
ad4ea823
...
...
@@ -129,19 +129,16 @@ var callState = -1;
var
timing
=
0
;
var
endTime
=
0
;
describe
(
'
CallManageImsCall
'
,
function
()
{
beforeAll
(
async
function
(
done
)
{
observer
.
on
(
'
callStateChange
'
,
{
slotId
:
DEFAULT_SLOT_ID
},
function
(
error
,
data
)
{});
try
{
await
call
.
enableImsSwitch
(
DEFAULT_SLOT_ID
);
console
.
log
(
'
Telephony_CallManager enableImsSwitch success
'
);
await
call
.
setCallPreferenceMode
(
DEFAULT_SLOT_ID
,
CALL_MODE_IMS
);
console
.
log
(
'
Telephony_CallManager setCallPreferenceMode success
'
);
}
catch
(
error
)
{
console
.
log
(
`Telephony_CallManager setCallPreferenceMode or enableImsSwitch error,error:
${
toString
(
error
)}
`
);
}
done
();
});
beforeAll
(
async
function
(
done
)
{
try
{
console
.
log
(
'
Telephony_CallManager enableImsSwitch success
'
);
await
call
.
setCallPreferenceMode
(
DEFAULT_SLOT_ID
,
CALL_MODE_IMS
);
console
.
log
(
'
Telephony_CallManager setCallPreferenceMode success
'
);
}
catch
(
error
)
{
console
.
log
(
`Telephony_CallManager setCallPreferenceMode or enableImsSwitch error,error:
${
toString
(
error
)}
`
);
}
done
();
});
afterEach
(
async
function
()
{
try
{
...
...
@@ -166,7 +163,6 @@ describe('CallManageImsCall', function () {
}
catch
(
error
)
{
console
.
log
(
`Telephony_CallManager
${
toString
(
error
)}
`
);
}
try
{
let
callState
=
await
call
.
getCallState
();
console
.
log
(
`Telephony_CallManager callState
${
callState
}
${
gloabCallId
}
`
);
...
...
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/ConnectionJsunit.test.ets
浏览文件 @
ad4ea823
此差异已折叠。
点击以展开。
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/ConnectionSecondJsUnit.test.ets
浏览文件 @
ad4ea823
...
...
@@ -73,9 +73,9 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getConnectionProperties detection
* @tc.author: kangyuntao
*/
it('Telephony_connection_getConnectionProperties_Async_0200', 0,
async
function (done) {
it('Telephony_connection_getConnectionProperties_Async_0200', 0, function (done) {
console.log("-----------------------Telephony getConnectionProperties Test is starting-----------------------");
if(
utils.notCheck
){
if(
false
){
expect(true).assertTrue();
done();
return;
...
...
@@ -84,9 +84,8 @@ export default function connectionSecondJsUnit() {
connection.getAllNets((error, value) => {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
return;
} else {
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
connection.getConnectionProperties(value[0], (error, value) => {
...
...
@@ -111,6 +110,7 @@ export default function connectionSecondJsUnit() {
}
});
console.log("-----------------------Telephony getConnectionProperties Test end-----------------------");
done();
});
/**
...
...
@@ -118,7 +118,7 @@ export default function connectionSecondJsUnit() {
* @tc.desc: RouteInfo Properties detection
* @tc.author: kangyuntao
*/
it("Telephony_connection_RouteInfo_0300", 0,
async
function (done) {
it("Telephony_connection_RouteInfo_0300", 0, function (done) {
console.log("----------------------RouteInfo Properties Test is starting-----------------------");
try {
let resultDefaultRoute = {
...
...
@@ -141,15 +141,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getRouteInfo Properties detection
* @tc.author: kangyuntao
*/
it('Telephony_connection_getRouteInfo_Async_0400', 0,
async
function (done) {
it('Telephony_connection_getRouteInfo_Async_0400', 0, function (done) {
console.log("-----------------------Telephony getRouteInfo Test is starting-----------------------");
let caseName = 'Telephony_connection_getRouteInfo_Async_0400';
connection.getAllNets((error, value) => {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
return;
} else {
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
connection.getConnectionProperties(value[0], (error, value) => {
...
...
@@ -170,6 +169,7 @@ export default function connectionSecondJsUnit() {
}
});
console.log("----------------------Telephony getRouteInfo Test end-----------------------");
done();
});
...
...
@@ -178,7 +178,7 @@ export default function connectionSecondJsUnit() {
* @tc.desc: LinkAddress Properties detection
* @tc.author: kangyuntao
*/
it("Telephony_connection_LinkAddress_0500", 0,
async
function (done) {
it("Telephony_connection_LinkAddress_0500", 0, function (done) {
console.log("----------------------LinkAddress Properties Test is starting-----------------------");
try {
let resultPrefixLength = {
...
...
@@ -197,15 +197,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getLinkAddress Properties detection
* @tc.author: kangyuntao
*/
it('Telephony_connection_getLinkAddress_Async_0600', 0,
async
function (done) {
it('Telephony_connection_getLinkAddress_Async_0600', 0, function (done) {
console.log("-----------------------Telephony getLinkAddress Test is starting-----------------------");
let caseName = 'Telephony_connection_getLinkAddress_Async_0600';
connection.getAllNets((error, value) => {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
return;
} else {
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
connection.getConnectionProperties(value[0], (error, value) => {
...
...
@@ -225,6 +224,7 @@ export default function connectionSecondJsUnit() {
}
});
console.log("-----------------------Telephony getLinkAddress Test end-----------------------");
done();
});
/**
...
...
@@ -232,7 +232,7 @@ export default function connectionSecondJsUnit() {
* @tc.desc: NetAddress Properties detection
* @tc.author: kangyuntao
*/
it("Telephony_connection_NetAddress_0700", 0,
async
function (done) {
it("Telephony_connection_NetAddress_0700", 0, function (done) {
console.log("----------------------NetAddress Properties Test is starting-----------------------");
try {
let resultPort = {
...
...
@@ -251,15 +251,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getNetAddress Properties detection
* @tc.author: kangyuntao
*/
it('Telephony_connection_getNetAddress_Async_0800', 0,
async
function (done) {
it('Telephony_connection_getNetAddress_Async_0800', 0, function (done) {
console.log("-----------------------Telephony getNetAddress Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetAddress_Async_0800';
connection.getAllNets((error, value) => {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
return;
} else {
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
connection.getConnectionProperties(value[0], (error, value) => {
...
...
@@ -279,6 +278,7 @@ export default function connectionSecondJsUnit() {
}
});
console.log("-----------------------Telephony getNetAddress Test end-----------------------");
done();
});
/**
...
...
@@ -286,9 +286,9 @@ export default function connectionSecondJsUnit() {
* @tc.desc: NetCap Properties detection
* @tc.author: kangyuntao
*/
it("Telephony_connection_NetCap_0900", 0,
async
function (done) {
it("Telephony_connection_NetCap_0900", 0, function (done) {
console.log("-----------------------Telephony NetCap Properties Test is starting-----------------------");
if (
utils.notCheck
) {
if (
false
) {
expect(true).assertTrue();
done();
return;
...
...
@@ -312,15 +312,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getNetCap Properties detection
* @tc.author: kangyuntao
*/
it('Telephony_connection_getNetCap_Async_1000', 0,
async
function (done) {
it('Telephony_connection_getNetCap_Async_1000', 0, function (done) {
console.log("-----------------------Telephony getNetCap Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetCap_Async_1000';
connection.getAllNets((error, value) => {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
return;
} else {
console.log(`Telephony_connection getAllNets netID value : ${JSON.stringify(value[0].netId)}`);
connection.getNetCapabilities(value[0], (error, data) => {
...
...
@@ -338,6 +337,7 @@ export default function connectionSecondJsUnit() {
}
});
console.log("-----------------------Telephony getNetCap Test is end-----------------------");
done();
});
/**
...
...
@@ -345,12 +345,11 @@ export default function connectionSecondJsUnit() {
* @tc.desc: NetBearType Properties detection
* @tc.author: kangyuntao
*/
it("Telephony_connection_NetBearType_1100", 0,
async
function (done) {
it("Telephony_connection_NetBearType_1100", 0, function (done) {
console.log("-----------------------Telephony NetBearType Properties Test is starting-----------------------");
if (
utils.notCheck
) {
if (
false
) {
expect(true).assertTrue();
done();
return;
}
try {
console.log("Telephony_connection_NetBearType_1100 NetBearType: " + connection.NetBearType);
...
...
@@ -369,15 +368,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc:getNetBearType Properties detection
* @tc.author: kangyuntao
*/
it('Telephony_connection_getNetBearType_Async_1200', 0,
async
function (done) {
it('Telephony_connection_getNetBearType_Async_1200', 0, function (done) {
console.log("-----------------------Telephony getNetBearType Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetBearType_Async_1200';
connection.getAllNets((error, value) => {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
return;
} else {
console.log(`Telephony_connection getAllNets netID value : ${JSON.stringify(value[0].netId)}`);
connection.getNetCapabilities(value[0], (error, data) => {
...
...
@@ -395,6 +393,7 @@ export default function connectionSecondJsUnit() {
}
});
console.log("-----------------------Telephony getNetBearType Test is end-----------------------");
done();
});
/**
...
...
@@ -402,7 +401,7 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getNetCapabilities NetCap and NetBearType Properties detection
* @tc.author: kangyuntao
*/
it('Telephony_connection_getNetCapabilities_Promise_1300', 0,
async
function (done) {
it('Telephony_connection_getNetCapabilities_Promise_1300', 0, function (done) {
console.log("-----------------------Telephony getNetCapabilities Promise Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetCapabilities_Promise_1300';
connection.getAllNets().then((handle) => {
...
...
@@ -416,7 +415,7 @@ export default function connectionSecondJsUnit() {
done();
}).catch((error) => {
console.log(`${caseName} getNetCapabilities promiss fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
});
}).catch((error) => {
...
...
@@ -424,6 +423,7 @@ export default function connectionSecondJsUnit() {
expect().assertFail();
done();
});
done();
});
})
...
...
telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/SocketJsunit.test.ets
浏览文件 @
ad4ea823
此差异已折叠。
点击以展开。
telephony/telephonyjstest/network_search/network_search_errors/Test.json
浏览文件 @
ad4ea823
...
...
@@ -2,7 +2,7 @@
"description"
:
"Configuration for NetworkSearch Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
18
00000"
,
"test-timeout"
:
"
21
00000"
,
"package"
:
"com.ohos.networksearch"
,
"shell-timeout"
:
"60000"
},
...
...
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/default/pages/index/index.js
浏览文件 @
ad4ea823
...
...
@@ -37,7 +37,7 @@ export default {
core
.
init
()
const
configService
=
core
.
getDefaultService
(
'
config
'
)
this
.
timeout
=
3
0000
this
.
timeout
=
200
0000
configService
.
setConfig
(
this
)
require
(
'
../../../test/List.test
'
)
core
.
execute
()
...
...
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
浏览文件 @
ad4ea823
...
...
@@ -106,17 +106,17 @@ describe('ActsNetworkSearchTest', function () {
radio
.
getNetworkState
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getNetworkState_Async_0700 finish err:
${
err
}
`
);
expect
(
data
.
longOperatorName
!=
'
longOperatorName
'
).
assertTrue
();
expect
(
data
.
shortOperatorName
!=
'
shortOperatorName
'
).
assertTrue
();
expect
(
data
.
plmnNumeric
!=
'
plmnNumeric
'
).
assertTrue
();
expect
(
data
.
isRoaming
!=
true
).
assertTrue
();
expect
(
data
.
regState
!=
radio
.
REG_STATE_IN_SERVICE
).
assertTrue
();
expect
(
data
.
nsaState
!=
radio
.
NSA_STATE_SA_ATTACHED
).
assertTrue
();
expect
(
data
.
isCaActive
!=
true
).
assertTrue
();
done
();
return
;
}
console
.
log
(
`Telephony_NetworkSearch_getNetworkState_Async_0700 fail not go to err
${
data
}
`
);
expect
(
data
.
longOperatorName
!=
'
longOperatorName
'
).
assertTrue
();
expect
(
data
.
shortOperatorName
!=
'
shortOperatorName
'
).
assertTrue
();
expect
(
data
.
plmnNumeric
!=
'
plmnNumeric
'
).
assertTrue
();
expect
(
data
.
isRoaming
!=
true
).
assertTrue
();
expect
(
data
.
regState
!=
radio
.
REG_STATE_IN_SERVICE
).
assertTrue
();
expect
(
data
.
nsaState
!=
radio
.
NSA_STATE_SA_ATTACHED
).
assertTrue
();
expect
(
data
.
isCaActive
!=
true
).
assertTrue
();
expect
().
assertFail
();
done
();
});
...
...
@@ -482,7 +482,6 @@ describe('ActsNetworkSearchTest', function () {
radio
.
getPreferredNetwork
(
SLOT_0
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_setPreferredNetwork_Async_0100 get fail err:
${
err
}
`
);
expect
().
assertFail
();
done
();
return
;
}
...
...
@@ -495,8 +494,8 @@ describe('ActsNetworkSearchTest', function () {
expect
().
assertFail
();
done
();
}
})
})
})
;
})
;
/**
* @tc.number Telephony_NetworkSearch_setPreferredNetwork_Async_0600
...
...
@@ -510,7 +509,6 @@ describe('ActsNetworkSearchTest', function () {
radio
.
getPreferredNetwork
(
SLOT_0
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_setPreferredNetwork_Async_0600 get fail err:
${
err
}
`
);
expect
().
assertFail
();
done
();
return
;
}
...
...
@@ -524,9 +522,8 @@ describe('ActsNetworkSearchTest', function () {
expect
().
assertFail
();
done
();
}
})
})
});
});
/**
* @tc.number Telephony_NetworkSearch_setPreferredNetwork_Promise_0100
...
...
@@ -538,7 +535,7 @@ describe('ActsNetworkSearchTest', function () {
try
{
await
radio
.
setPreferredNetwork
(
SLOT_0
,
PREFERRED_MODE_ERR2
);
console
.
log
(
'
Telephony_NetworkSearch_setPreferredNetwork_Promise_0100 set fail: not go to err
'
);
expect
().
assertFail
();
expect
().
assertFail
();
done
();
}
catch
(
err
)
{
try
{
...
...
@@ -548,11 +545,10 @@ describe('ActsNetworkSearchTest', function () {
done
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_setPreferredNetwork_Promise_0100 fail err:
${
err
}
`
);
expect
().
assertFail
();
done
();
}
}
})
})
;
/**
* @tc.number Telephony_NetworkSearch_setPreferredNetwork_Promise_0600
...
...
@@ -563,7 +559,7 @@ describe('ActsNetworkSearchTest', function () {
try
{
await
radio
.
setPreferredNetwork
(
SLOT_2
,
radio
.
PREFERRED_NETWORK_MODE_GSM
);
console
.
log
(
'
Telephony_NetworkSearch_setPreferredNetwork_Promise_0600 set fail: not go to err
'
);
expect
().
assertFail
();
expect
().
assertFail
();
done
();
}
catch
(
err
)
{
try
{
...
...
@@ -573,11 +569,10 @@ describe('ActsNetworkSearchTest', function () {
done
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_setPreferredNetwork_Promise_0600 fail err:
${
err
}
`
);
expect
().
assertFail
();
done
();
}
}
})
})
;
/**
* @tc.number Telephony_NetworkSearch_getCellInformation_Async_0500
...
...
@@ -855,7 +850,7 @@ describe('ActsNetworkSearchTest', function () {
done
();
}
});
/**
* @tc.number Telephony_StateRegistry_on_0200
* @tc.name Add a networkStatus change listen and test observer.on({slotId:0}) to view the callback results
...
...
@@ -868,7 +863,7 @@ describe('ActsNetworkSearchTest', function () {
});
done
();
});
/**
* @tc.number Telephony_StateRegistry_off_0200
* @tc.name Add a networkStatus change listen and test observer.off() to view the callback results
...
...
@@ -878,7 +873,7 @@ describe('ActsNetworkSearchTest', function () {
observer
.
off
(
'
networkStateChange
'
);
done
();
});
/**
* @tc.number Telephony_StateRegistry_on_0300
* @tc.name Add a networkStatus change listen and test observer.on({slotId:0}) to view the callback results
...
...
@@ -891,7 +886,7 @@ describe('ActsNetworkSearchTest', function () {
});
done
();
});
/**
* @tc.number Telephony_StateRegistry_off_0300
* @tc.name Add a networkStatus change listen and test observer.off() to view the callback results
...
...
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/SimManager.test.js
浏览文件 @
ad4ea823
...
...
@@ -53,46 +53,47 @@ describe('SimManagerTest', function () {
/**
* @tc.number Telephony_Sim_constantValidate_0100
* @tc.name SIM card constant validation
* @tc.name SIM card constant validation
* @tc.desc Function test
*/
it
(
'
Telephony_Sim_constantValidate_0100
'
,
0
,
async
function
(
done
)
{
expect
(
sim
.
SIM_STATE_UNKNOWN
===
env
.
CONSTANTS
.
SIM_STATE_UNKNOWN
).
assertTrue
();
expect
(
sim
.
SIM_STATE_NOT_PRESENT
===
env
.
CONSTANTS
.
SIM_STATE_NOT_PRESENT
).
assertTrue
();
expect
(
sim
.
SIM_STATE_LOCKED
===
env
.
CONSTANTS
.
SIM_STATE_LOCKED
).
assertTrue
();
expect
(
sim
.
SIM_STATE_NOT_READY
===
env
.
CONSTANTS
.
SIM_STATE_NOT_READY
).
assertTrue
();
expect
(
sim
.
SIM_STATE_READY
===
env
.
CONSTANTS
.
SIM_STATE_READY
).
assertTrue
();
expect
(
sim
.
SIM_STATE_LOADED
===
env
.
CONSTANTS
.
SIM_STATE_LOADED
).
assertTrue
();
expect
(
sim
.
GENERAL_CONTACT
===
env
.
CONSTANTS
.
GENERAL_CONTACT
).
assertTrue
();
expect
(
sim
.
FIXED_DIALING
===
env
.
CONSTANTS
.
FIXED_DIALING
).
assertTrue
();
expect
(
sim
.
LOCK_OFF
===
env
.
CONSTANTS
.
LOCK_OFF
).
assertTrue
();
expect
(
sim
.
LOCK_ON
===
env
.
CONSTANTS
.
LOCK_ON
).
assertTrue
();
expect
(
sim
.
PIN_LOCK
===
env
.
CONSTANTS
.
PIN_LOCK
).
assertTrue
();
expect
(
sim
.
FDN_LOCK
===
env
.
CONSTANTS
.
FDN_LOCK
).
assertTrue
();
expect
(
sim
.
UNKNOWN_CARD
===
env
.
CONSTANTS
.
UNKNOWN_CARD
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_SIM_CARD
===
env
.
CONSTANTS
.
SINGLE_MODE_SIM_CARD
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_USIM_CARD
===
env
.
CONSTANTS
.
SINGLE_MODE_USIM_CARD
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_RUIM_CARD
===
env
.
CONSTANTS
.
SINGLE_MODE_RUIM_CARD
).
assertTrue
();
expect
(
sim
.
DUAL_MODE_CG_CARD
===
env
.
CONSTANTS
.
DUAL_MODE_CG_CARD
).
assertTrue
();
expect
(
sim
.
CT_NATIONAL_ROAMING_CARD
===
env
.
CONSTANTS
.
CT_NATIONAL_ROAMING_CARD
).
assertTrue
();
expect
(
sim
.
CU_DUAL_MODE_CARD
===
env
.
CONSTANTS
.
CU_DUAL_MODE_CARD
).
assertTrue
();
expect
(
sim
.
DUAL_MODE_TELECOM_LTE_CARD
===
env
.
CONSTANTS
.
DUAL_MODE_TELECOM_LTE_CARD
).
assertTrue
();
expect
(
sim
.
DUAL_MODE_UG_CARD
===
env
.
CONSTANTS
.
DUAL_MODE_UG_CARD
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_ISIM_CARD
===
env
.
CONSTANTS
.
SINGLE_MODE_ISIM_CARD
).
assertTrue
();
expect
(
sim
.
PN_PIN_LOCK
===
env
.
CONSTANTS
.
PN_PIN_LOCK
).
assertTrue
();
expect
(
sim
.
PN_PUK_LOCK
===
env
.
CONSTANTS
.
PN_PUK_LOCK
).
assertTrue
();
expect
(
sim
.
PU_PIN_LOCK
===
env
.
CONSTANTS
.
PU_PIN_LOCK
).
assertTrue
();
expect
(
sim
.
PU_PUK_LOCK
===
env
.
CONSTANTS
.
PU_PUK_LOCK
).
assertTrue
();
expect
(
sim
.
PP_PIN_LOCK
===
env
.
CONSTANTS
.
PP_PIN_LOCK
).
assertTrue
();
expect
(
sim
.
PP_PUK_LOCK
===
env
.
CONSTANTS
.
PP_PUK_LOCK
).
assertTrue
();
expect
(
sim
.
PC_PIN_LOCK
===
env
.
CONSTANTS
.
PC_PIN_LOCK
).
assertTrue
();
expect
(
sim
.
PC_PUK_LOCK
===
env
.
CONSTANTS
.
PC_PUK_LOCK
).
assertTrue
();
expect
(
sim
.
SIM_PIN_LOCK
===
env
.
CONSTANTS
.
SIM_PIN_LOCK
).
assertTrue
();
expect
(
sim
.
SIM_PUK_LOCK
===
env
.
CONSTANTS
.
SIM_PUK_LOCK
).
assertTrue
();
console
.
log
(
`Telephony_Sim_constantValidate_0100 finish`
);
done
();
});
it
(
'
Telephony_Sim_constantValidate_0100
'
,
0
,
async
function
(
done
)
{
console
.
log
(
`Telephony_Sim_constantValidate_0100 start`
);
expect
(
sim
.
SimState
.
SIM_STATE_UNKNOWN
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SimState
.
SIM_STATE_NOT_PRESENT
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SimState
.
SIM_STATE_LOCKED
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SimState
.
SIM_STATE_NOT_READY
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SimState
.
SIM_STATE_READY
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SimState
.
SIM_STATE_LOADED
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
ContactType
.
GENERAL_CONTACT
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
ContactType
.
FIXED_DIALING
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
LockState
.
LOCK_OFF
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
LockState
.
LOCK_ON
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PIN_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
FDN_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
UNKNOWN_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_SIM_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_USIM_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_RUIM_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
DUAL_MODE_CG_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
CT_NATIONAL_ROAMING_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
CU_DUAL_MODE_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
DUAL_MODE_TELECOM_LTE_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
DUAL_MODE_UG_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_ISIM_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PN_PIN_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PN_PUK_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PU_PIN_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PU_PUK_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PP_PIN_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PP_PUK_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PC_PIN_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PC_PUK_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SIM_PIN_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SIM_PUK_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
console
.
log
(
`Telephony_Sim_constantValidate_0100 finish`
);
done
();
});
/**
* @tc.number Telephony_Sim_getISOCountryCodeForSim_Async_0200
* @tc.name Enter exception parameters to test whether the getISOCountryCodeForSim interface function
...
...
@@ -546,7 +547,7 @@ describe('SimManagerTest', function () {
it
(
'
Telephony_Sim_SetLockState_Async_1000
'
,
0
,
async
function
(
done
)
{
const
CASE_NAME
=
'
Telephony_Sim_SetLockState_Async_1000
'
;
const
lockInfo
=
{
lockType
:
sim
.
PIN_LOCK
,
state
:
sim
.
LOCK_OFF
,
password
:
env
.
CORRECT_PIN
};
sim
.
setLockState
(
env
.
SLOTID2
,
lockInfo
,
error
=>
{
sim
.
setLockState
(
env
.
SLOTID2
,
lockInfo
,
(
error
)
=>
{
if
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
setLockState expect error:
${
error
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
test finish`
);
...
...
@@ -1724,7 +1725,7 @@ describe('SimManagerTest', function () {
it
(
'
Telephony_Sim_unlockSimLock_Async_2600
'
,
0
,
function
(
done
)
{
const
CASE_NAME
=
'
Telephony_Sim_unlockSimLock_Async_2600
'
;
const
lockInfo
=
{
lockType
:
sim
.
PN_PIN_LOCK
,
password
:
env
.
SIM_PN_PIN_PASSWORD
};
sim
.
unlockSimLock
(
env
.
SLOTID2
,
lockInfo
,
async
(
error
)
=>
{
sim
.
unlockSimLock
(
env
.
SLOTID2
,
lockInfo
,
(
error
)
=>
{
if
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
expect error:
${
error
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
...
...
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/lib/Const.js
浏览文件 @
ad4ea823
...
...
@@ -27,4 +27,5 @@ export const MAIL_NAME_LEN12 = '123#@%_ABCDE';
export
const
MAIL_NUMBER_LEN20
=
'
01234567890123456789
'
;
export
const
SIM_MIN_COUNT
=
0
;
export
const
STK_CMD
=
'
D30781020181900101
'
;
export
const
SIM_PN_PIN_PASSWORD
=
'
1111
'
;
\ No newline at end of file
export
const
SIM_PN_PIN_PASSWORD
=
'
1111
'
;
export
const
INVALID_VALUE
=
-
1000
;
\ No newline at end of file
telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/test/SmsMmsError.test.js
浏览文件 @
ad4ea823
...
...
@@ -381,19 +381,19 @@ describe('SmsMmsErrorTest', function () {
sms
.
createMessage
(
rawArrayNull
,
'
3gpp
'
,
(
err
,
shortMessage
)
=>
{
if
(
err
)
{
console
.
log
(
'
Telephony_SmsMms_createMessage_Async_0200 finish
'
);
except
(
shortMessage
.
visibleMessageBody
!=
'
visibleMessageBody
'
).
assertTrue
();
except
(
shortMessage
.
visibleRawAddress
!=
'
visibleRawAddress
'
).
assertTrue
();
except
(
shortMessage
.
messageClass
!=
'
sms.FORWARD_MESSAGE
'
).
assertTrue
();
except
(
shortMessage
.
protocolId
!=
-
1
).
assertTrue
();
except
(
shortMessage
.
scAddress
!=
'
scAddress
'
).
assertTrue
();
except
(
shortMessage
.
scTimestamp
!=
-
1
).
assertTrue
();
except
(
shortMessage
.
isReplaceMessage
!=
true
).
assertTrue
();
except
(
shortMessage
.
hasReplyPath
!=
true
).
assertTrue
();
except
(
shortMessage
.
status
!=
-
1
).
assertTrue
();
except
(
shortMessage
.
isSmsStatusReportMessage
!=
true
).
assertTrue
();
done
();
return
;
}
expect
(
shortMessage
.
visibleMessageBody
!=
'
visibleMessageBody
'
).
assertTrue
();
expect
(
shortMessage
.
visibleRawAddress
!=
'
visibleRawAddress
'
).
assertTrue
();
expect
(
shortMessage
.
messageClass
!=
'
sms.FORWARD_MESSAGE
'
).
assertTrue
();
expect
(
shortMessage
.
protocolId
!=
-
1
).
assertTrue
();
expect
(
shortMessage
.
scAddress
!=
'
scAddress
'
).
assertTrue
();
expect
(
shortMessage
.
scTimestamp
!=
-
1
).
assertTrue
();
expect
(
shortMessage
.
isReplaceMessage
!=
true
).
assertTrue
();
expect
(
shortMessage
.
hasReplyPath
!=
true
).
assertTrue
();
expect
(
shortMessage
.
status
!=
-
1
).
assertTrue
();
expect
(
shortMessage
.
isSmsStatusReportMessage
!=
true
).
assertTrue
();
expect
().
assertFail
();
console
.
log
(
'
Telephony_SmsMms_createMessage_Async_0200 fail
'
);
done
();
...
...
@@ -406,7 +406,7 @@ describe('SmsMmsErrorTest', function () {
* SMS failed to send
* @tc.desc Function test
*/
it
(
'
Telephony_SmsMms_sendMessage_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
Telephony_SmsMms_sendMessage_0200
'
,
0
,
async
function
(
done
)
{
sms
.
sendMessage
({
slotId
:
FALSE_SLOT_ID
,
destinationHost
:
SMS_SEND_DST_NUMBER
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录