Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
709f972d
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看板
未验证
提交
709f972d
编写于
7月 07, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 07, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4144 fail case update
Merge pull request !4144 from 高曦/master
上级
3c2923eb
8718bcab
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
107 addition
and
123 deletion
+107
-123
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
...errors/entry/src/main/js/test/NetworkSearchErrors.test.js
+47
-49
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
+60
-74
未找到文件。
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
浏览文件 @
709f972d
...
...
@@ -26,7 +26,7 @@ describe('ActsNetworkSearchTest', function () {
function
sleep
(
timeout
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
console
.
log
(
`Telephony_NetworkSearch_CellInformation sleep
${
timeout
}
ms`
);
console
.
info
(
`Telephony_NetworkSearch_CellInformation sleep
${
timeout
}
ms`
);
resolve
();
},
timeout
);
})
...
...
@@ -36,7 +36,7 @@ describe('ActsNetworkSearchTest', function () {
let
isOn
=
await
radio
.
isRadioOn
();
if
(
!
isOn
)
{
await
radio
.
turnOnRadio
();
console
.
log
(
'
Telephony_NetworkSearch_CellInformation turnOnRadio success
'
);
console
.
info
(
'
Telephony_NetworkSearch_CellInformation turnOnRadio success
'
);
await
sleep
(
5000
);
}
}
...
...
@@ -54,7 +54,6 @@ describe('ActsNetworkSearchTest', function () {
afterEach
(
async
function
()
{
try
{
expect
(
radio
.
RADIO_TECHNOLOGY_UNKNOWN
===
0
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_GSM
===
1
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_1XRTT
===
2
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_WCDMA
===
3
).
assertTrue
();
expect
(
radio
.
RADIO_TECHNOLOGY_HSPA
===
4
).
assertTrue
();
...
...
@@ -94,7 +93,7 @@ describe('ActsNetworkSearchTest', function () {
expect
(
radio
.
NETWORK_SELECTION_UNKNOWN
===
0
).
assertTrue
();
expect
(
radio
.
NETWORK_SELECTION_MANUAL
===
2
).
assertTrue
();
}
catch
(
error
)
{
console
.
log
(
`Telephony_NetworkSearch error`
);
console
.
info
(
`Telephony_NetworkSearch error`
);
}
});
...
...
@@ -106,11 +105,11 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getNetworkState_Async_0700
'
,
0
,
async
function
(
done
)
{
radio
.
getNetworkState
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getNetworkState_Async_0700 finish err:
${
err
}
`
);
console
.
info
(
`Telephony_NetworkSearch_getNetworkState_Async_0700 finish err:
${
err
}
`
);
done
();
return
;
}
console
.
log
(
`Telephony_NetworkSearch_getNetworkState_Async_0700 fail not go to err
${
data
}
`
);
console
.
info
(
`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
();
...
...
@@ -118,7 +117,6 @@ describe('ActsNetworkSearchTest', function () {
expect
(
data
.
regState
!=
radio
.
REG_STATE_IN_SERVICE
).
assertTrue
();
expect
(
data
.
nsaState
!=
radio
.
NSA_STATE_SA_ATTACHED
).
assertTrue
();
expect
(
data
.
isCaActive
!=
true
).
assertTrue
();
expect
(
data
.
isEmergency
!=
true
).
assertTrue
();
expect
().
assertFail
();
done
();
});
...
...
@@ -132,11 +130,11 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getRadioTech_Async_0400
'
,
0
,
async
function
(
done
)
{
radio
.
getRadioTech
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getRadioTech_Async_0400 finish err:
${
err
}
`
);
console
.
info
(
`Telephony_NetworkSearch_getRadioTech_Async_0400 finish err:
${
err
}
`
);
done
();
return
;
}
console
.
log
(
`Telephony_NetworkSearch_getRadioTech_Async_0400 fail not go to err
${
data
}
`
);
console
.
info
(
`Telephony_NetworkSearch_getRadioTech_Async_0400 fail not go to err
${
data
}
`
);
expect
().
assertFail
();
done
();
});
...
...
@@ -150,12 +148,12 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getSignalInformation_Async_0400
'
,
0
,
async
function
(
done
)
{
radio
.
getSignalInformation
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getSignalInformation_Async_0400 fail err:
${
err
}
`
);
expect
(
).
assertFail
(
);
console
.
info
(
`Telephony_NetworkSearch_getSignalInformation_Async_0400 fail err:
${
err
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
done
();
return
;
}
console
.
log
(
`Telephony_NetworkSearch_getSignalInformation_Async_0400 finish
data:
${
JSON
.
stringify
(
data
)}
`
);
console
.
info
(
`getSignalInformation_Async_0400
data:
${
JSON
.
stringify
(
data
)}
`
);
if
(
data
.
length
>
0
)
{
expect
(
data
[
0
].
signalLevel
!=
-
1
).
assertTrue
();
expect
(
data
[
0
].
signalType
!=
radio
.
NETWORK_TYPE_WCDMA
).
assertTrue
();
...
...
@@ -173,12 +171,12 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400
'
,
0
,
async
function
(
done
)
{
radio
.
getISOCountryCodeForNetwork
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 fail err:
${
err
}
`
);
expect
(
).
assertFail
(
);
console
.
info
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 fail err:
${
err
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
done
();
return
;
}
console
.
log
(
console
.
info
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 finish data:
${
JSON
.
stringify
(
data
)}
`
);
expect
(
data
.
length
===
0
).
assertTrue
();
done
();
...
...
@@ -193,12 +191,12 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400
'
,
0
,
async
function
(
done
)
{
try
{
let
data
=
await
radio
.
getISOCountryCodeForNetwork
(
SLOT_2
);
console
.
log
(
console
.
info
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 finish data:
${
JSON
.
stringify
(
data
)}
`
);
expect
(
data
.
length
===
0
).
assertTrue
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 fail err:
${
err
}
`
);
expect
(
).
assertFail
(
);
console
.
info
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 fail err:
${
err
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
done
();
return
;
}
...
...
@@ -213,10 +211,10 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Async_0500
'
,
0
,
async
function
(
done
)
{
radio
.
getNetworkSelectionMode
(
SLOT_2
,
(
err
,
res
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getNetworkSelectionMode_Async_0500 err:
${
err
}
`
);
console
.
info
(
`Telephony_NetworkSearch_getNetworkSelectionMode_Async_0500 err:
${
err
}
`
);
done
();
}
else
{
console
.
log
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Async_0500 fail not go to err
'
);
console
.
info
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Async_0500 fail not go to err
'
);
expect
().
assertFail
();
done
();
}
...
...
@@ -232,10 +230,10 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500
'
,
0
,
async
function
(
done
)
{
try
{
await
radio
.
getNetworkSelectionMode
(
SLOT_2
);
console
.
log
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500 fail not go to err
'
);
console
.
info
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500 fail not go to err
'
);
expect
().
assertFail
();
}
catch
(
err
)
{
console
.
log
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500 finish
'
);
console
.
info
(
'
Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500 finish
'
);
done
();
return
;
}
...
...
@@ -254,10 +252,10 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getNetworkState_Promise_0700
'
,
0
,
async
function
(
done
)
{
try
{
await
radio
.
getNetworkState
(
SLOT_2
);
console
.
log
(
'
Telephony_NetworkSearch_getNetworkState_Promise_0700 fail not go to err
'
);
console
.
info
(
'
Telephony_NetworkSearch_getNetworkState_Promise_0700 fail not go to err
'
);
expect
().
assertFail
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getNetworkState_Promise_0700 finish err:
${
err
}
`
);
console
.
info
(
`Telephony_NetworkSearch_getNetworkState_Promise_0700 finish err:
${
err
}
`
);
done
();
return
;
}
...
...
@@ -272,10 +270,10 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getRadioTech_Promise_0400
'
,
0
,
async
function
(
done
)
{
try
{
await
radio
.
getRadioTech
(
SLOT_2
);
console
.
log
(
'
Telephony_NetworkSearch_getRadioTech_Promise_0400 fail not go to err
'
);
console
.
info
(
'
Telephony_NetworkSearch_getRadioTech_Promise_0400 fail not go to err
'
);
expect
().
assertFail
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getRadioTech_Promise_0400 finish err:
${
err
}
`
);
console
.
info
(
`Telephony_NetworkSearch_getRadioTech_Promise_0400 finish err:
${
err
}
`
);
done
();
return
;
}
...
...
@@ -290,12 +288,12 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getSignalInformation_Promise_0400
'
,
0
,
async
function
(
done
)
{
try
{
let
data
=
await
radio
.
getSignalInformation
(
SLOT_2
);
console
.
log
(
console
.
info
(
`Telephony_NetworkSearch_getSignalInformation_Promise_0400 finish data:
${
JSON
.
stringify
(
data
)}
`
);
expect
(
data
.
length
===
0
).
assertTrue
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getSignalInformation_Promise_0400 fail err:
${
err
}
`
);
expect
(
).
assertFail
(
);
console
.
info
(
`Telephony_NetworkSearch_getSignalInformation_Promise_0400 fail err:
${
err
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
done
();
return
;
}
...
...
@@ -310,12 +308,12 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getOperatorName_Async_0400
'
,
0
,
async
function
(
done
)
{
radio
.
getOperatorName
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Async_0400 fail err:
${
err
}
`
);
expect
(
).
assertFail
(
);
console
.
info
(
`Telephony_NetworkSearch_getOperatorName_Async_0400 fail err:
${
err
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
done
();
return
;
}
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Async_0400 finish data:
${
data
}
`
);
console
.
info
(
`Telephony_NetworkSearch_getOperatorName_Async_0400 finish data:
${
data
}
`
);
expect
(
data
===
''
).
assertTrue
();
done
();
})
...
...
@@ -329,12 +327,12 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getOperatorName_Promise_0400
'
,
0
,
async
function
(
done
)
{
try
{
let
data
=
await
radio
.
getOperatorName
(
SLOT_2
);
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Promise_0400 finish data:
${
data
}
`
);
console
.
info
(
`Telephony_NetworkSearch_getOperatorName_Promise_0400 finish data:
${
data
}
`
);
expect
(
data
===
''
).
assertTrue
();
done
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Promise_0400 fail err:
${
err
}
`
);
expect
(
).
assertFail
(
);
console
.
info
(
`Telephony_NetworkSearch_getOperatorName_Promise_0400 fail err:
${
err
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
202
"
);
done
();
}
})
...
...
@@ -347,12 +345,12 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getOperatorName_Async_0500
'
,
0
,
async
function
(
done
)
{
radio
.
getOperatorName
(
0
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Async_0500 fail err:
${
err
}
`
);
console
.
info
(
`Telephony_NetworkSearch_getOperatorName_Async_0500 fail err:
${
err
}
`
);
expect
().
assertFail
();
done
();
return
;
}
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Async_0500 finish data:
${
data
}
`
);
console
.
info
(
`Telephony_NetworkSearch_getOperatorName_Async_0500 finish data:
${
data
}
`
);
expect
(
true
).
assertTrue
();
done
();
})
...
...
@@ -366,11 +364,11 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getOperatorName_Promise_0500
'
,
0
,
async
function
(
done
)
{
try
{
let
data
=
await
radio
.
getOperatorName
(
0
);
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Promise_0500 finish data:
${
data
}
`
);
console
.
info
(
`Telephony_NetworkSearch_getOperatorName_Promise_0500 finish data:
${
data
}
`
);
expect
(
true
).
assertTrue
();
done
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Promise_0500 fail err:
${
err
}
`
);
console
.
info
(
`Telephony_NetworkSearch_getOperatorName_Promise_0500 fail err:
${
err
}
`
);
expect
().
assertFail
();
done
();
}
...
...
@@ -384,11 +382,11 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_isRadioOn_Async_0200
'
,
0
,
async
function
(
done
)
{
radio
.
isRadioOn
((
err
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_isRadioOn_Async_0200 fail:
${
err
}
`
);
console
.
info
(
`Telephony_NetworkSearch_isRadioOn_Async_0200 fail:
${
err
}
`
);
done
();
return
;
}
console
.
log
(
'
Telephony_NetworkSearch_isRadioOn_Async_0200 finish
'
);
console
.
info
(
'
Telephony_NetworkSearch_isRadioOn_Async_0200 finish
'
);
done
();
});
});
...
...
@@ -401,10 +399,10 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_isRadioOn_Promise_0200
'
,
0
,
async
function
(
done
)
{
try
{
await
radio
.
isRadioOn
();
console
.
log
(
'
Telephony_NetworkSearch_isRadioOn_Promise_0200 success
'
);
console
.
info
(
'
Telephony_NetworkSearch_isRadioOn_Promise_0200 success
'
);
done
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_isRadioOn_Promise_0200 fail
${
err
}
`
);
console
.
info
(
`Telephony_NetworkSearch_isRadioOn_Promise_0200 fail
${
err
}
`
);
done
();
}
});
...
...
@@ -417,11 +415,11 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_isRadioOn_Async_0300
'
,
0
,
async
function
(
done
)
{
radio
.
isRadioOn
(
0
,
(
err
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_isRadioOn_Async_0300 fail:
${
err
}
`
);
console
.
info
(
`Telephony_NetworkSearch_isRadioOn_Async_0300 fail:
${
err
}
`
);
done
();
return
;
}
console
.
log
(
'
Telephony_NetworkSearch_isRadioOn_Async_0300 finish
'
);
console
.
info
(
'
Telephony_NetworkSearch_isRadioOn_Async_0300 finish
'
);
done
();
});
});
...
...
@@ -434,10 +432,10 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_isRadioOn_Promise_0300
'
,
0
,
async
function
(
done
)
{
try
{
await
radio
.
isRadioOn
(
0
);
console
.
log
(
'
Telephony_NetworkSearch_isRadioOn_Promise_0300 success
'
);
console
.
info
(
'
Telephony_NetworkSearch_isRadioOn_Promise_0300 success
'
);
done
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_isRadioOn_Promise_0300 fail
${
err
}
`
);
console
.
info
(
`Telephony_NetworkSearch_isRadioOn_Promise_0300 fail
${
err
}
`
);
done
();
}
});
...
...
@@ -449,7 +447,7 @@ describe('ActsNetworkSearchTest', function () {
*/
it
(
'
Telephony_StateRegistry_on_0200
'
,
0
,
async
function
(
done
)
{
observer
.
on
(
'
networkStateChange
'
,
{
slotId
:
SLOT_0
},
(
networkState
)
=>
{
console
.
log
(
`Telephony_StateRegistry_on_0200 networkStateChanged data:
${
JSON
.
stringify
(
networkState
)}
`
);
console
.
info
(
`Telephony_StateRegistry_on_0200 networkStateChanged data:
${
JSON
.
stringify
(
networkState
)}
`
);
done
();
});
done
();
...
...
@@ -472,7 +470,7 @@ describe('ActsNetworkSearchTest', function () {
*/
it
(
'
Telephony_StateRegistry_on_0300
'
,
0
,
async
function
(
done
)
{
observer
.
on
(
'
signalInfoChange
'
,
{
slotId
:
SLOT_0
},
(
networkState
)
=>
{
console
.
log
(
`Telephony_StateRegistry_on_0200 networkStateChanged data:
${
JSON
.
stringify
(
networkState
)}
`
);
console
.
info
(
`Telephony_StateRegistry_on_0200 networkStateChanged data:
${
JSON
.
stringify
(
networkState
)}
`
);
done
();
});
done
();
...
...
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/SimManager.test.js
浏览文件 @
709f972d
...
...
@@ -47,7 +47,7 @@ describe('SimManagerTest', function () {
expect
(
lockStatusResponse
.
result
===
RES_RESULT
).
assertTrue
();
expect
(
lockStatusResponse
.
remain
===
RES_REMAIN
).
assertTrue
();
}
catch
(
error
)
{
console
.
log
(
`Telephony_Sim error`
);
console
.
info
(
`Telephony_Sim error`
);
}
});
...
...
@@ -57,7 +57,7 @@ describe('SimManagerTest', function () {
* @tc.desc Function test
*/
it
(
'
Telephony_Sim_constantValidate_0100
'
,
0
,
async
function
(
done
)
{
console
.
log
(
`Telephony_Sim_constantValidate_0100 start`
);
console
.
info
(
`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
();
...
...
@@ -90,7 +90,7 @@ describe('SimManagerTest', function () {
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`
);
console
.
info
(
`Telephony_Sim_constantValidate_0100 finish`
);
done
();
});
...
...
@@ -104,13 +104,13 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_getISOCountryCodeForSim_Async_0200
'
;
sim
.
getISOCountryCodeForSim
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
finish`
);
console
.
info
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
info
(
`
${
CASE_NAME
}
finish`
);
done
();
return
;
}
expect
().
assertFail
();
console
.
log
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
console
.
info
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
done
();
});
});
...
...
@@ -126,13 +126,13 @@ describe('SimManagerTest', function () {
try
{
var
data
=
await
sim
.
getISOCountryCodeForSim
(
env
.
SLOTID2
);
}
catch
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
finish`
);
console
.
info
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
info
(
`
${
CASE_NAME
}
finish`
);
done
();
return
;
}
expect
().
assertFail
();
console
.
log
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
console
.
info
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
done
();
});
...
...
@@ -146,13 +146,13 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_getSimOperatorNumeric_Async_0200
'
;
sim
.
getSimOperatorNumeric
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
finish`
);
console
.
info
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
info
(
`
${
CASE_NAME
}
finish`
);
done
();
return
;
}
expect
().
assertFail
();
console
.
log
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
console
.
info
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
done
();
});
});
...
...
@@ -168,13 +168,13 @@ describe('SimManagerTest', function () {
try
{
var
data
=
await
sim
.
getSimOperatorNumeric
(
env
.
SLOTID2
);
}
catch
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
finish`
);
console
.
info
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
info
(
`
${
CASE_NAME
}
finish`
);
done
();
return
;
}
expect
().
assertFail
();
console
.
log
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
console
.
info
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
done
();
});
...
...
@@ -187,13 +187,13 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_getSimSpn_Async_0200
'
;
sim
.
getSimSpn
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
fail:
${
err
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
finish`
);
console
.
info
(
`
${
CASE_NAME
}
fail:
${
err
.
message
}
`
);
console
.
info
(
`
${
CASE_NAME
}
finish`
);
done
();
return
;
}
expect
().
assertFail
();
console
.
log
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
console
.
info
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
done
();
});
});
...
...
@@ -208,13 +208,13 @@ describe('SimManagerTest', function () {
try
{
var
data
=
await
sim
.
getSimSpn
(
env
.
SLOTID2
);
}
catch
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
finish`
);
console
.
info
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
info
(
`
${
CASE_NAME
}
finish`
);
done
();
return
;
}
expect
().
assertFail
();
console
.
log
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
console
.
info
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
done
();
});
...
...
@@ -227,13 +227,13 @@ describe('SimManagerTest', function () {
sim
.
getSimState
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
const
CASE_NAME
=
'
Telephony_Sim_getSimState_Async_0200
'
;
if
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
finish`
);
console
.
info
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
info
(
`
${
CASE_NAME
}
finish`
);
done
();
return
;
}
expect
().
assertFail
();
console
.
log
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
console
.
info
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
done
();
});
});
...
...
@@ -248,13 +248,13 @@ describe('SimManagerTest', function () {
try
{
var
data
=
await
sim
.
getSimState
(
env
.
SLOTID2
);
}
catch
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
finish`
);
console
.
info
(
`
${
CASE_NAME
}
expect err:
${
err
.
message
}
`
);
console
.
info
(
`
${
CASE_NAME
}
finish`
);
done
();
return
;
}
expect
().
assertFail
();
console
.
log
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
console
.
info
(
`
${
CASE_NAME
}
fail, data =
${
data
}
`
);
done
();
});
...
...
@@ -265,18 +265,12 @@ describe('SimManagerTest', function () {
* @tc.desc Function test
*/
it
(
'
Telephony_Sim_isSimActive_Async_0700
'
,
0
,
async
function
(
done
)
{
const
CASE_NAME
=
'
Telephony_Sim_isSimActive_Async_0700
'
;
sim
.
isSimActive
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
expect
().
assertFail
();
const
CASE_NAME
=
'
Telephony_Sim_isSimActive_Async_0700
'
;
sim
.
isSimActive
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
console
.
info
(
"
isSimActive async err info :
"
+
JSON
.
stringify
(
err
)
+
"
data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
done
();
return
;
}
expect
(
data
).
assertFalse
();
console
.
log
(
`
${
CASE_NAME
}
finish`
);
done
();
});
});
});
/**
...
...
@@ -287,17 +281,16 @@ describe('SimManagerTest', function () {
*/
it
(
'
Telephony_Sim_isSimActive_Promise_0700
'
,
0
,
async
function
(
done
)
{
const
CASE_NAME
=
'
Telephony_Sim_isSimActive_Promise_0700
'
;
try
{
let
data
=
await
sim
.
isSimActive
(
env
.
SLOTID2
);
let
promise
=
sim
.
isSimActive
(
env
.
SLOTID2
);
promise
.
then
(
data
=>
{
console
.
log
(
`isSimActive success, promise: data->
${
JSON
.
stringify
(
data
)}
`
);
expect
(
data
).
assertFalse
();
}
catch
(
err
)
{
console
.
log
(
`
${
CASE_NAME
}
isSimActive fail, err:
${
err
.
message
}
`
);
expect
().
assertFail
();
done
();
return
;
}
console
.
log
(
`
${
CASE_NAME
}
finish`
);
done
();
}).
catch
(
err
=>
{
console
.
info
(
"
isSimActive promise err info :
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
done
();
});
});
/**
...
...
@@ -310,14 +303,12 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_hasSimCard_Async_0600
'
;
sim
.
hasSimCard
(
env
.
SLOTID2
,
(
err
,
data
)
=>
{
if
(
err
)
{
expect
(
).
assertFail
(
);
console
.
log
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
console
.
info
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
done
();
return
;
}
expect
(
data
).
assertFalse
();
console
.
log
(
`
${
CASE_NAME
}
finish`
);
done
();
console
.
info
(
`
${
CASE_NAME
}
finish`
);
});
});
...
...
@@ -331,15 +322,13 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_hasSimCard_Promise_0600
'
;
try
{
let
data
=
await
sim
.
hasSimCard
(
env
.
SLOTID2
);
expect
(
data
).
assertFalse
();
}
catch
(
err
)
{
expect
(
).
assertFail
(
);
console
.
log
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
console
.
info
(
`
${
CASE_NAME
}
fail, err:
${
err
.
message
}
`
);
done
();
return
;
}
console
.
log
(
`
${
CASE_NAME
}
finish`
);
done
();
console
.
info
(
`
${
CASE_NAME
}
finish`
);
});
/**
...
...
@@ -351,7 +340,7 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_getMaxSimCount_0100
'
;
let
simCount
=
sim
.
getMaxSimCount
();
expect
(
simCount
>
env
.
SIM_MIN_COUNT
).
assertTrue
();
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
console
.
info
(
`
${
CASE_NAME
}
test finish.`
);
done
();
});
...
...
@@ -363,16 +352,14 @@ describe('SimManagerTest', function () {
*/
it
(
'
Telephony_Sim_GetCardType_Async_0400
'
,
0
,
function
(
done
)
{
const
CASE_NAME
=
'
Telephony_Sim_GetCardType_Async_0400
'
;
sim
.
getCardType
(
env
.
SLOTID2
,
(
err
or
,
cardType
)
=>
{
if
(
err
or
)
{
console
.
log
(
`
${
CASE_NAME
}
GetCardType error:
${
erro
r
.
message
}
`
);
expect
(
).
assertFail
(
);
sim
.
getCardType
(
env
.
SLOTID2
,
(
err
,
cardType
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
CASE_NAME
}
GetCardType error:
${
er
r
.
message
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
done
();
return
;
}
expect
(
cardType
===
sim
.
UNKNOWN_CARD
).
assertTrue
();
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
done
();
console
.
info
(
`
${
CASE_NAME
}
test finish.`
);
});
});
...
...
@@ -386,11 +373,10 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_GetCardType_Promise_0400
'
;
try
{
const
cardType
=
await
sim
.
getCardType
(
env
.
SLOTID2
);
expect
(
cardType
===
sim
.
UNKNOWN_CARD
).
assertTrue
();
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
}
catch
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
GetCardType error:
${
error
.
message
}
`
);
expect
().
assertFail
();
console
.
info
(
`
${
CASE_NAME
}
test finish.`
);
}
catch
(
err
)
{
console
.
info
(
`
${
CASE_NAME
}
GetCardType error:
${
err
.
message
}
`
);
expect
(
err
.
code
).
assertEqual
(
"
-1
"
);
}
done
();
});
...
...
@@ -405,13 +391,13 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_hasOperatorPrivileges_Async_0400
'
;
sim
.
hasOperatorPrivileges
(
env
.
SLOTID2
,
(
error
,
result
)
=>
{
if
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
hasOperatorPrivileges error:
${
error
.
message
}
`
);
console
.
info
(
`
${
CASE_NAME
}
hasOperatorPrivileges error:
${
error
.
message
}
`
);
expect
().
assertFail
();
done
();
return
;
}
expect
(
result
).
assertFalse
();
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
console
.
info
(
`
${
CASE_NAME
}
test finish.`
);
done
();
});
});
...
...
@@ -427,9 +413,9 @@ describe('SimManagerTest', function () {
try
{
const
result
=
await
sim
.
hasOperatorPrivileges
(
env
.
SLOTID2
);
expect
(
result
).
assertFalse
();
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
console
.
info
(
`
${
CASE_NAME
}
test finish.`
);
}
catch
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
hasOperatorPrivileges error:
${
error
.
message
}
`
);
console
.
info
(
`
${
CASE_NAME
}
hasOperatorPrivileges error:
${
error
.
message
}
`
);
expect
().
assertFail
();
}
done
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录