Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
3d2a42fb
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看板
未验证
提交
3d2a42fb
编写于
2月 14, 2023
作者:
O
openharmony_ci
提交者:
Gitee
2月 14, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7391 电话用例整改
Merge pull request !7391 from zhangfuzhi/master
上级
7eff744c
699eda1c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
25 addition
and
26 deletion
+25
-26
telephony/telephonyjstest/network_search/network_search_errors/src/main/js/test/NetworkSearchErrors.test.js
...earch_errors/src/main/js/test/NetworkSearchErrors.test.js
+25
-26
未找到文件。
telephony/telephonyjstest/network_search/network_search_errors/src/main/js/test/NetworkSearchErrors.test.js
浏览文件 @
3d2a42fb
...
@@ -144,12 +144,12 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -144,12 +144,12 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getSignalInformation_Async_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
Telephony_NetworkSearch_getSignalInformation_Async_0400
'
,
0
,
async
function
(
done
)
{
radio
.
getSignalInformation
(
SLOT_2
,
(
err
,
data
)
=>
{
radio
.
getSignalInformation
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
info
(
`Telephony_NetworkSearch_getSignalInformation_Async_0400 fail err:
${
err
}
`
);
console
.
info
(
'
Telephony_NetworkSearch_getSignalInformation_Async_0400 fail err:
'
+
JSON
.
stringify
(
err
)
);
expect
(
err
.
code
).
assertEqual
(
202
);
expect
(
err
.
code
).
assertEqual
(
8300001
);
done
();
done
();
return
;
return
;
}
}
console
.
info
(
`getSignalInformation_Async_0400 data:
${
JSON
.
stringify
(
data
)}
`
);
console
.
info
(
'
getSignalInformation_Async_0400 data:
'
+
JSON
.
stringify
(
data
)
);
if
(
data
.
length
>
0
)
{
if
(
data
.
length
>
0
)
{
expect
(
data
[
0
].
signalLevel
!=
-
1
).
assertTrue
();
expect
(
data
[
0
].
signalLevel
!=
-
1
).
assertTrue
();
expect
(
data
[
0
].
signalType
!=
radio
.
NETWORK_TYPE_WCDMA
).
assertTrue
();
expect
(
data
[
0
].
signalType
!=
radio
.
NETWORK_TYPE_WCDMA
).
assertTrue
();
...
@@ -167,13 +167,13 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -167,13 +167,13 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400
'
,
0
,
async
function
(
done
)
{
radio
.
getISOCountryCodeForNetwork
(
SLOT_2
,
(
err
,
data
)
=>
{
radio
.
getISOCountryCodeForNetwork
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
info
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 fail err:
${
err
}
`
);
console
.
info
(
'
Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 fail err:
'
+
JSON
.
stringify
(
err
)
);
expect
(
err
.
code
).
assertEqual
(
202
);
expect
(
err
.
code
).
assertEqual
(
8300001
);
done
();
done
();
return
;
return
;
}
}
console
.
info
(
console
.
info
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 finish data:
${
JSON
.
stringify
(
data
)}
`
);
'
Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 finish data:
'
+
JSON
.
stringify
(
data
)
);
expect
(
data
.
length
===
0
).
assertTrue
();
expect
(
data
.
length
===
0
).
assertTrue
();
done
();
done
();
});
});
...
@@ -188,12 +188,12 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -188,12 +188,12 @@ describe('ActsNetworkSearchTest', function () {
try
{
try
{
let
data
=
await
radio
.
getISOCountryCodeForNetwork
(
SLOT_2
);
let
data
=
await
radio
.
getISOCountryCodeForNetwork
(
SLOT_2
);
console
.
info
(
console
.
info
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 finish data:
${
JSON
.
stringify
(
data
)}
`
);
'
Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 finish data:
'
+
JSON
.
stringify
(
data
)
);
expect
(
data
.
length
===
0
).
assertTrue
();
expect
(
data
.
length
===
0
).
assertTrue
();
done
();
done
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
info
(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 fail err:
${
err
}
`
);
console
.
info
(
'
Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 fail err:
'
+
JSON
.
stringify
(
err
)
);
expect
(
err
.
code
).
assertEqual
(
202
);
expect
(
err
.
code
).
assertEqual
(
8300001
);
done
();
done
();
return
;
return
;
}
}
...
@@ -285,11 +285,11 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -285,11 +285,11 @@ describe('ActsNetworkSearchTest', function () {
try
{
try
{
let
data
=
await
radio
.
getSignalInformation
(
SLOT_2
);
let
data
=
await
radio
.
getSignalInformation
(
SLOT_2
);
console
.
info
(
console
.
info
(
`Telephony_NetworkSearch_getSignalInformation_Promise_0400 finish data:
${
JSON
.
stringify
(
data
)}
`
);
'
Telephony_NetworkSearch_getSignalInformation_Promise_0400 finish data:
'
+
JSON
.
stringify
(
data
)
);
expect
(
data
.
length
===
0
).
assertTrue
();
expect
(
data
.
length
===
0
).
assertTrue
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
info
(
`Telephony_NetworkSearch_getSignalInformation_Promise_0400 fail err:
${
err
}
`
);
console
.
info
(
'
Telephony_NetworkSearch_getSignalInformation_Promise_0400 fail err:
'
+
JSON
.
stringify
(
err
)
);
expect
(
err
.
code
).
assertEqual
(
202
);
expect
(
err
.
code
).
assertEqual
(
8300001
);
done
();
done
();
return
;
return
;
}
}
...
@@ -304,12 +304,12 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -304,12 +304,12 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getOperatorName_Async_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
Telephony_NetworkSearch_getOperatorName_Async_0400
'
,
0
,
async
function
(
done
)
{
radio
.
getOperatorName
(
SLOT_2
,
(
err
,
data
)
=>
{
radio
.
getOperatorName
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
info
(
`Telephony_NetworkSearch_getOperatorName_Async_0400 fail err:
${
err
}
`
);
console
.
info
(
'
Telephony_NetworkSearch_getOperatorName_Async_0400 fail err:
'
+
JSON
.
stringify
(
err
)
);
expect
(
err
.
code
).
assertEqual
(
202
);
expect
(
err
.
code
).
assertEqual
(
8300001
);
done
();
done
();
return
;
return
;
}
}
console
.
info
(
`Telephony_NetworkSearch_getOperatorName_Async_0400 finish data:
${
data
}
`
);
console
.
info
(
'
Telephony_NetworkSearch_getOperatorName_Async_0400 finish data:
'
+
data
);
expect
(
data
===
''
).
assertTrue
();
expect
(
data
===
''
).
assertTrue
();
done
();
done
();
})
})
...
@@ -323,12 +323,12 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -323,12 +323,12 @@ describe('ActsNetworkSearchTest', function () {
it
(
'
Telephony_NetworkSearch_getOperatorName_Promise_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
Telephony_NetworkSearch_getOperatorName_Promise_0400
'
,
0
,
async
function
(
done
)
{
try
{
try
{
let
data
=
await
radio
.
getOperatorName
(
SLOT_2
);
let
data
=
await
radio
.
getOperatorName
(
SLOT_2
);
console
.
info
(
`Telephony_NetworkSearch_getOperatorName_Promise_0400 finish data:
${
data
}
`
);
console
.
info
(
'
Telephony_NetworkSearch_getOperatorName_Promise_0400 finish data:
'
+
data
);
expect
(
data
===
''
).
assertTrue
();
expect
(
data
===
''
).
assertTrue
();
done
();
done
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
info
(
`Telephony_NetworkSearch_getOperatorName_Promise_0400 fail err:
${
err
}
`
);
console
.
info
(
'
Telephony_NetworkSearch_getOperatorName_Promise_0400 fail err:
'
+
JSON
.
stringify
(
err
)
);
expect
(
err
.
code
).
assertEqual
(
202
);
expect
(
err
.
code
).
assertEqual
(
8300001
);
done
();
done
();
}
}
})
})
...
@@ -379,6 +379,7 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -379,6 +379,7 @@ describe('ActsNetworkSearchTest', function () {
radio
.
isRadioOn
((
err
,
data
)
=>
{
radio
.
isRadioOn
((
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
'
When the device has no modem, the interface reports an error
'
+
JSON
.
stringify
(
err
));
console
.
error
(
'
When the device has no modem, the interface reports an error
'
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
8300000
);
done
();
done
();
return
;
return
;
}
}
...
@@ -395,12 +396,10 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -395,12 +396,10 @@ describe('ActsNetworkSearchTest', function () {
*/
*/
it
(
'
Telephony_NetworkSearch_isRadioOn_Promise_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
Telephony_NetworkSearch_isRadioOn_Promise_0200
'
,
0
,
async
function
(
done
)
{
try
{
try
{
let
data
=
await
radio
.
isRadioOn
();
await
radio
.
isRadioOn
();
console
.
info
(
'
Telephony_NetworkSearch_isRadioOn_Promise_0200 finish
'
+
JSON
.
stringify
(
data
));
expect
(
data
==
true
).
assertTrue
();
done
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
error
(
'
When the device has no modem, the interface reports an error
'
+
JSON
.
stringify
(
err
));
console
.
error
(
'
When the device has no modem, the interface reports an error
'
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
8300000
);
done
();
done
();
}
}
});
});
...
@@ -411,13 +410,14 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -411,13 +410,14 @@ describe('ActsNetworkSearchTest', function () {
* @tc.desc Test isRadioOn api by callback.
* @tc.desc Test isRadioOn api by callback.
*/
*/
it
(
'
Telephony_NetworkSearch_isRadioOn_Async_0300
'
,
0
,
async
function
(
done
)
{
it
(
'
Telephony_NetworkSearch_isRadioOn_Async_0300
'
,
0
,
async
function
(
done
)
{
radio
.
isRadioOn
(
0
,
(
err
,
data
)
=>
{
radio
.
isRadioOn
(
0
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
'
When the device has no modem, the interface reports an error
'
+
JSON
.
stringify
(
err
));
console
.
error
(
'
When the device has no modem, the interface reports an error
'
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
8300000
);
done
();
done
();
return
;
return
;
}
}
console
.
info
(
'
Telephony_NetworkSearch_isRadioOn_Async_0300 finish
'
+
JSON
.
stringify
(
data
)
);
console
.
info
(
'
Telephony_NetworkSearch_isRadioOn_Async_0300 finish
'
+
data
);
expect
(
data
==
true
).
assertTrue
();
expect
(
data
==
true
).
assertTrue
();
done
();
done
();
});
});
...
@@ -432,10 +432,9 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -432,10 +432,9 @@ describe('ActsNetworkSearchTest', function () {
try
{
try
{
let
data
=
await
radio
.
isRadioOn
(
0
);
let
data
=
await
radio
.
isRadioOn
(
0
);
console
.
info
(
'
Telephony_NetworkSearch_isRadioOn_Promise_0300 finish
'
+
JSON
.
stringify
(
data
));
console
.
info
(
'
Telephony_NetworkSearch_isRadioOn_Promise_0300 finish
'
+
JSON
.
stringify
(
data
));
expect
(
data
==
true
).
assertTrue
();
done
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
error
(
'
When the device has no modem, the interface reports an error
'
+
JSON
.
stringify
(
err
));
console
.
error
(
'
When the device has no modem, the interface reports an error
'
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
8300000
);
done
();
done
();
}
}
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录