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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
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
...
@@ -130,15 +130,12 @@ var timing = 0;
...
@@ -130,15 +130,12 @@ var timing = 0;
var
endTime
=
0
;
var
endTime
=
0
;
describe
(
'
CallManageImsCall
'
,
function
()
{
describe
(
'
CallManageImsCall
'
,
function
()
{
beforeAll
(
async
function
(
done
)
{
beforeAll
(
async
function
(
done
)
{
observer
.
on
(
'
callStateChange
'
,
{
slotId
:
DEFAULT_SLOT_ID
},
function
(
error
,
data
)
{});
try
{
try
{
await
call
.
enableImsSwitch
(
DEFAULT_SLOT_ID
);
console
.
log
(
'
Telephony_CallManager enableImsSwitch success
'
);
console
.
log
(
'
Telephony_CallManager enableImsSwitch success
'
);
await
call
.
setCallPreferenceMode
(
DEFAULT_SLOT_ID
,
CALL_MODE_IMS
);
await
call
.
setCallPreferenceMode
(
DEFAULT_SLOT_ID
,
CALL_MODE_IMS
);
console
.
log
(
'
Telephony_CallManager setCallPreferenceMode success
'
);
console
.
log
(
'
Telephony_CallManager setCallPreferenceMode success
'
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
`Telephony_CallManager setCallPreferenceMode or enableImsSwitch error,error:
${
console
.
log
(
`Telephony_CallManager setCallPreferenceMode or enableImsSwitch error,error:
${
toString
(
error
)}
`
);
toString
(
error
)}
`
);
}
}
done
();
done
();
});
});
...
@@ -166,7 +163,6 @@ describe('CallManageImsCall', function () {
...
@@ -166,7 +163,6 @@ describe('CallManageImsCall', function () {
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
`Telephony_CallManager
${
toString
(
error
)}
`
);
console
.
log
(
`Telephony_CallManager
${
toString
(
error
)}
`
);
}
}
try
{
try
{
let
callState
=
await
call
.
getCallState
();
let
callState
=
await
call
.
getCallState
();
console
.
log
(
`Telephony_CallManager callState
${
callState
}
${
gloabCallId
}
`
);
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() {
...
@@ -73,9 +73,9 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getConnectionProperties detection
* @tc.desc: getConnectionProperties detection
* @tc.author: kangyuntao
* @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-----------------------");
console.log("-----------------------Telephony getConnectionProperties Test is starting-----------------------");
if(
utils.notCheck
){
if(
false
){
expect(true).assertTrue();
expect(true).assertTrue();
done();
done();
return;
return;
...
@@ -84,9 +84,8 @@ export default function connectionSecondJsUnit() {
...
@@ -84,9 +84,8 @@ export default function connectionSecondJsUnit() {
connection.getAllNets((error, value) => {
connection.getAllNets((error, value) => {
if (error) {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
console.log(`${caseName} get data fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
done();
return;
} else {
} else {
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
connection.getConnectionProperties(value[0], (error, value) => {
connection.getConnectionProperties(value[0], (error, value) => {
...
@@ -111,6 +110,7 @@ export default function connectionSecondJsUnit() {
...
@@ -111,6 +110,7 @@ export default function connectionSecondJsUnit() {
}
}
});
});
console.log("-----------------------Telephony getConnectionProperties Test end-----------------------");
console.log("-----------------------Telephony getConnectionProperties Test end-----------------------");
done();
});
});
/**
/**
...
@@ -118,7 +118,7 @@ export default function connectionSecondJsUnit() {
...
@@ -118,7 +118,7 @@ export default function connectionSecondJsUnit() {
* @tc.desc: RouteInfo Properties detection
* @tc.desc: RouteInfo Properties detection
* @tc.author: kangyuntao
* @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-----------------------");
console.log("----------------------RouteInfo Properties Test is starting-----------------------");
try {
try {
let resultDefaultRoute = {
let resultDefaultRoute = {
...
@@ -141,15 +141,14 @@ export default function connectionSecondJsUnit() {
...
@@ -141,15 +141,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getRouteInfo Properties detection
* @tc.desc: getRouteInfo Properties detection
* @tc.author: kangyuntao
* @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-----------------------");
console.log("-----------------------Telephony getRouteInfo Test is starting-----------------------");
let caseName = 'Telephony_connection_getRouteInfo_Async_0400';
let caseName = 'Telephony_connection_getRouteInfo_Async_0400';
connection.getAllNets((error, value) => {
connection.getAllNets((error, value) => {
if (error) {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
console.log(`${caseName} get data fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
done();
return;
} else {
} else {
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
connection.getConnectionProperties(value[0], (error, value) => {
connection.getConnectionProperties(value[0], (error, value) => {
...
@@ -170,6 +169,7 @@ export default function connectionSecondJsUnit() {
...
@@ -170,6 +169,7 @@ export default function connectionSecondJsUnit() {
}
}
});
});
console.log("----------------------Telephony getRouteInfo Test end-----------------------");
console.log("----------------------Telephony getRouteInfo Test end-----------------------");
done();
});
});
...
@@ -178,7 +178,7 @@ export default function connectionSecondJsUnit() {
...
@@ -178,7 +178,7 @@ export default function connectionSecondJsUnit() {
* @tc.desc: LinkAddress Properties detection
* @tc.desc: LinkAddress Properties detection
* @tc.author: kangyuntao
* @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-----------------------");
console.log("----------------------LinkAddress Properties Test is starting-----------------------");
try {
try {
let resultPrefixLength = {
let resultPrefixLength = {
...
@@ -197,15 +197,14 @@ export default function connectionSecondJsUnit() {
...
@@ -197,15 +197,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getLinkAddress Properties detection
* @tc.desc: getLinkAddress Properties detection
* @tc.author: kangyuntao
* @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-----------------------");
console.log("-----------------------Telephony getLinkAddress Test is starting-----------------------");
let caseName = 'Telephony_connection_getLinkAddress_Async_0600';
let caseName = 'Telephony_connection_getLinkAddress_Async_0600';
connection.getAllNets((error, value) => {
connection.getAllNets((error, value) => {
if (error) {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
console.log(`${caseName} get data fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
done();
return;
} else {
} else {
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
connection.getConnectionProperties(value[0], (error, value) => {
connection.getConnectionProperties(value[0], (error, value) => {
...
@@ -225,6 +224,7 @@ export default function connectionSecondJsUnit() {
...
@@ -225,6 +224,7 @@ export default function connectionSecondJsUnit() {
}
}
});
});
console.log("-----------------------Telephony getLinkAddress Test end-----------------------");
console.log("-----------------------Telephony getLinkAddress Test end-----------------------");
done();
});
});
/**
/**
...
@@ -232,7 +232,7 @@ export default function connectionSecondJsUnit() {
...
@@ -232,7 +232,7 @@ export default function connectionSecondJsUnit() {
* @tc.desc: NetAddress Properties detection
* @tc.desc: NetAddress Properties detection
* @tc.author: kangyuntao
* @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-----------------------");
console.log("----------------------NetAddress Properties Test is starting-----------------------");
try {
try {
let resultPort = {
let resultPort = {
...
@@ -251,15 +251,14 @@ export default function connectionSecondJsUnit() {
...
@@ -251,15 +251,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getNetAddress Properties detection
* @tc.desc: getNetAddress Properties detection
* @tc.author: kangyuntao
* @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-----------------------");
console.log("-----------------------Telephony getNetAddress Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetAddress_Async_0800';
let caseName = 'Telephony_connection_getNetAddress_Async_0800';
connection.getAllNets((error, value) => {
connection.getAllNets((error, value) => {
if (error) {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
console.log(`${caseName} get data fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
done();
return;
} else {
} else {
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
connection.getConnectionProperties(value[0], (error, value) => {
connection.getConnectionProperties(value[0], (error, value) => {
...
@@ -279,6 +278,7 @@ export default function connectionSecondJsUnit() {
...
@@ -279,6 +278,7 @@ export default function connectionSecondJsUnit() {
}
}
});
});
console.log("-----------------------Telephony getNetAddress Test end-----------------------");
console.log("-----------------------Telephony getNetAddress Test end-----------------------");
done();
});
});
/**
/**
...
@@ -286,9 +286,9 @@ export default function connectionSecondJsUnit() {
...
@@ -286,9 +286,9 @@ export default function connectionSecondJsUnit() {
* @tc.desc: NetCap Properties detection
* @tc.desc: NetCap Properties detection
* @tc.author: kangyuntao
* @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-----------------------");
console.log("-----------------------Telephony NetCap Properties Test is starting-----------------------");
if (
utils.notCheck
) {
if (
false
) {
expect(true).assertTrue();
expect(true).assertTrue();
done();
done();
return;
return;
...
@@ -312,15 +312,14 @@ export default function connectionSecondJsUnit() {
...
@@ -312,15 +312,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getNetCap Properties detection
* @tc.desc: getNetCap Properties detection
* @tc.author: kangyuntao
* @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-----------------------");
console.log("-----------------------Telephony getNetCap Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetCap_Async_1000';
let caseName = 'Telephony_connection_getNetCap_Async_1000';
connection.getAllNets((error, value) => {
connection.getAllNets((error, value) => {
if (error) {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
console.log(`${caseName} get data fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
done();
return;
} else {
} else {
console.log(`Telephony_connection getAllNets netID value : ${JSON.stringify(value[0].netId)}`);
console.log(`Telephony_connection getAllNets netID value : ${JSON.stringify(value[0].netId)}`);
connection.getNetCapabilities(value[0], (error, data) => {
connection.getNetCapabilities(value[0], (error, data) => {
...
@@ -338,6 +337,7 @@ export default function connectionSecondJsUnit() {
...
@@ -338,6 +337,7 @@ export default function connectionSecondJsUnit() {
}
}
});
});
console.log("-----------------------Telephony getNetCap Test is end-----------------------");
console.log("-----------------------Telephony getNetCap Test is end-----------------------");
done();
});
});
/**
/**
...
@@ -345,12 +345,11 @@ export default function connectionSecondJsUnit() {
...
@@ -345,12 +345,11 @@ export default function connectionSecondJsUnit() {
* @tc.desc: NetBearType Properties detection
* @tc.desc: NetBearType Properties detection
* @tc.author: kangyuntao
* @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-----------------------");
console.log("-----------------------Telephony NetBearType Properties Test is starting-----------------------");
if (
utils.notCheck
) {
if (
false
) {
expect(true).assertTrue();
expect(true).assertTrue();
done();
done();
return;
}
}
try {
try {
console.log("Telephony_connection_NetBearType_1100 NetBearType: " + connection.NetBearType);
console.log("Telephony_connection_NetBearType_1100 NetBearType: " + connection.NetBearType);
...
@@ -369,15 +368,14 @@ export default function connectionSecondJsUnit() {
...
@@ -369,15 +368,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc:getNetBearType Properties detection
* @tc.desc:getNetBearType Properties detection
* @tc.author: kangyuntao
* @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-----------------------");
console.log("-----------------------Telephony getNetBearType Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetBearType_Async_1200';
let caseName = 'Telephony_connection_getNetBearType_Async_1200';
connection.getAllNets((error, value) => {
connection.getAllNets((error, value) => {
if (error) {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
console.log(`${caseName} get data fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
done();
return;
} else {
} else {
console.log(`Telephony_connection getAllNets netID value : ${JSON.stringify(value[0].netId)}`);
console.log(`Telephony_connection getAllNets netID value : ${JSON.stringify(value[0].netId)}`);
connection.getNetCapabilities(value[0], (error, data) => {
connection.getNetCapabilities(value[0], (error, data) => {
...
@@ -395,6 +393,7 @@ export default function connectionSecondJsUnit() {
...
@@ -395,6 +393,7 @@ export default function connectionSecondJsUnit() {
}
}
});
});
console.log("-----------------------Telephony getNetBearType Test is end-----------------------");
console.log("-----------------------Telephony getNetBearType Test is end-----------------------");
done();
});
});
/**
/**
...
@@ -402,7 +401,7 @@ export default function connectionSecondJsUnit() {
...
@@ -402,7 +401,7 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getNetCapabilities NetCap and NetBearType Properties detection
* @tc.desc: getNetCapabilities NetCap and NetBearType Properties detection
* @tc.author: kangyuntao
* @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-----------------------");
console.log("-----------------------Telephony getNetCapabilities Promise Test is starting-----------------------");
let caseName = 'Telephony_connection_getNetCapabilities_Promise_1300';
let caseName = 'Telephony_connection_getNetCapabilities_Promise_1300';
connection.getAllNets().then((handle) => {
connection.getAllNets().then((handle) => {
...
@@ -416,7 +415,7 @@ export default function connectionSecondJsUnit() {
...
@@ -416,7 +415,7 @@ export default function connectionSecondJsUnit() {
done();
done();
}).catch((error) => {
}).catch((error) => {
console.log(`${caseName} getNetCapabilities promiss fail: ${error}`);
console.log(`${caseName} getNetCapabilities promiss fail: ${error}`);
expect().assert
Fail
();
expect().assert
True
();
done();
done();
});
});
}).catch((error) => {
}).catch((error) => {
...
@@ -424,6 +423,7 @@ export default function connectionSecondJsUnit() {
...
@@ -424,6 +423,7 @@ export default function connectionSecondJsUnit() {
expect().assertFail();
expect().assertFail();
done();
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 @@
...
@@ -2,7 +2,7 @@
"description"
:
"Configuration for NetworkSearch Tests"
,
"description"
:
"Configuration for NetworkSearch Tests"
,
"driver"
:
{
"driver"
:
{
"type"
:
"JSUnitTest"
,
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
18
00000"
,
"test-timeout"
:
"
21
00000"
,
"package"
:
"com.ohos.networksearch"
,
"package"
:
"com.ohos.networksearch"
,
"shell-timeout"
:
"60000"
"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 {
...
@@ -37,7 +37,7 @@ export default {
core
.
init
()
core
.
init
()
const
configService
=
core
.
getDefaultService
(
'
config
'
)
const
configService
=
core
.
getDefaultService
(
'
config
'
)
this
.
timeout
=
3
0000
this
.
timeout
=
200
0000
configService
.
setConfig
(
this
)
configService
.
setConfig
(
this
)
require
(
'
../../../test/List.test
'
)
require
(
'
../../../test/List.test
'
)
core
.
execute
()
core
.
execute
()
...
...
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
浏览文件 @
ad4ea823
...
@@ -106,6 +106,10 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -106,6 +106,10 @@ describe('ActsNetworkSearchTest', function () {
radio
.
getNetworkState
(
SLOT_2
,
(
err
,
data
)
=>
{
radio
.
getNetworkState
(
SLOT_2
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getNetworkState_Async_0700 finish err:
${
err
}
`
);
console
.
log
(
`Telephony_NetworkSearch_getNetworkState_Async_0700 finish err:
${
err
}
`
);
done
();
return
;
}
console
.
log
(
`Telephony_NetworkSearch_getNetworkState_Async_0700 fail not go to err
${
data
}
`
);
expect
(
data
.
longOperatorName
!=
'
longOperatorName
'
).
assertTrue
();
expect
(
data
.
longOperatorName
!=
'
longOperatorName
'
).
assertTrue
();
expect
(
data
.
shortOperatorName
!=
'
shortOperatorName
'
).
assertTrue
();
expect
(
data
.
shortOperatorName
!=
'
shortOperatorName
'
).
assertTrue
();
expect
(
data
.
plmnNumeric
!=
'
plmnNumeric
'
).
assertTrue
();
expect
(
data
.
plmnNumeric
!=
'
plmnNumeric
'
).
assertTrue
();
...
@@ -113,10 +117,6 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -113,10 +117,6 @@ describe('ActsNetworkSearchTest', function () {
expect
(
data
.
regState
!=
radio
.
REG_STATE_IN_SERVICE
).
assertTrue
();
expect
(
data
.
regState
!=
radio
.
REG_STATE_IN_SERVICE
).
assertTrue
();
expect
(
data
.
nsaState
!=
radio
.
NSA_STATE_SA_ATTACHED
).
assertTrue
();
expect
(
data
.
nsaState
!=
radio
.
NSA_STATE_SA_ATTACHED
).
assertTrue
();
expect
(
data
.
isCaActive
!=
true
).
assertTrue
();
expect
(
data
.
isCaActive
!=
true
).
assertTrue
();
done
();
return
;
}
console
.
log
(
`Telephony_NetworkSearch_getNetworkState_Async_0700 fail not go to err
${
data
}
`
);
expect
().
assertFail
();
expect
().
assertFail
();
done
();
done
();
});
});
...
@@ -482,7 +482,6 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -482,7 +482,6 @@ describe('ActsNetworkSearchTest', function () {
radio
.
getPreferredNetwork
(
SLOT_0
,
(
err
,
data
)
=>
{
radio
.
getPreferredNetwork
(
SLOT_0
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_setPreferredNetwork_Async_0100 get fail err:
${
err
}
`
);
console
.
log
(
`Telephony_NetworkSearch_setPreferredNetwork_Async_0100 get fail err:
${
err
}
`
);
expect
().
assertFail
();
done
();
done
();
return
;
return
;
}
}
...
@@ -495,8 +494,8 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -495,8 +494,8 @@ describe('ActsNetworkSearchTest', function () {
expect
().
assertFail
();
expect
().
assertFail
();
done
();
done
();
}
}
})
})
;
})
})
;
/**
/**
* @tc.number Telephony_NetworkSearch_setPreferredNetwork_Async_0600
* @tc.number Telephony_NetworkSearch_setPreferredNetwork_Async_0600
...
@@ -510,7 +509,6 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -510,7 +509,6 @@ describe('ActsNetworkSearchTest', function () {
radio
.
getPreferredNetwork
(
SLOT_0
,
(
err
,
data
)
=>
{
radio
.
getPreferredNetwork
(
SLOT_0
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_setPreferredNetwork_Async_0600 get fail err:
${
err
}
`
);
console
.
log
(
`Telephony_NetworkSearch_setPreferredNetwork_Async_0600 get fail err:
${
err
}
`
);
expect
().
assertFail
();
done
();
done
();
return
;
return
;
}
}
...
@@ -524,9 +522,8 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -524,9 +522,8 @@ describe('ActsNetworkSearchTest', function () {
expect
().
assertFail
();
expect
().
assertFail
();
done
();
done
();
}
}
});
})
});
})
/**
/**
* @tc.number Telephony_NetworkSearch_setPreferredNetwork_Promise_0100
* @tc.number Telephony_NetworkSearch_setPreferredNetwork_Promise_0100
...
@@ -548,11 +545,10 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -548,11 +545,10 @@ describe('ActsNetworkSearchTest', function () {
done
();
done
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_setPreferredNetwork_Promise_0100 fail err:
${
err
}
`
);
console
.
log
(
`Telephony_NetworkSearch_setPreferredNetwork_Promise_0100 fail err:
${
err
}
`
);
expect
().
assertFail
();
done
();
done
();
}
}
}
}
})
})
;
/**
/**
* @tc.number Telephony_NetworkSearch_setPreferredNetwork_Promise_0600
* @tc.number Telephony_NetworkSearch_setPreferredNetwork_Promise_0600
...
@@ -573,11 +569,10 @@ describe('ActsNetworkSearchTest', function () {
...
@@ -573,11 +569,10 @@ describe('ActsNetworkSearchTest', function () {
done
();
done
();
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_setPreferredNetwork_Promise_0600 fail err:
${
err
}
`
);
console
.
log
(
`Telephony_NetworkSearch_setPreferredNetwork_Promise_0600 fail err:
${
err
}
`
);
expect
().
assertFail
();
done
();
done
();
}
}
}
}
})
})
;
/**
/**
* @tc.number Telephony_NetworkSearch_getCellInformation_Async_0500
* @tc.number Telephony_NetworkSearch_getCellInformation_Async_0500
...
...
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/SimManager.test.js
浏览文件 @
ad4ea823
...
@@ -57,38 +57,39 @@ describe('SimManagerTest', function () {
...
@@ -57,38 +57,39 @@ describe('SimManagerTest', function () {
* @tc.desc Function test
* @tc.desc Function test
*/
*/
it
(
'
Telephony_Sim_constantValidate_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
Telephony_Sim_constantValidate_0100
'
,
0
,
async
function
(
done
)
{
expect
(
sim
.
SIM_STATE_UNKNOWN
===
env
.
CONSTANTS
.
SIM_STATE_UNKNOWN
).
assertTrue
();
console
.
log
(
`Telephony_Sim_constantValidate_0100 start`
);
expect
(
sim
.
SIM_STATE_NOT_PRESENT
===
env
.
CONSTANTS
.
SIM_STATE_NOT_PRESENT
).
assertTrue
();
expect
(
sim
.
SimState
.
SIM_STATE_UNKNOWN
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SIM_STATE_LOCKED
===
env
.
CONSTANTS
.
SIM_STATE_LOCKED
).
assertTrue
();
expect
(
sim
.
SimState
.
SIM_STATE_NOT_PRESENT
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SIM_STATE_NOT_READY
===
env
.
CONSTANTS
.
SIM_STATE_NOT_READY
).
assertTrue
();
expect
(
sim
.
SimState
.
SIM_STATE_LOCKED
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SIM_STATE_READY
===
env
.
CONSTANTS
.
SIM_STATE_READY
).
assertTrue
();
expect
(
sim
.
SimState
.
SIM_STATE_NOT_READY
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SIM_STATE_LOADED
===
env
.
CONSTANTS
.
SIM_STATE_LOADED
).
assertTrue
();
expect
(
sim
.
SimState
.
SIM_STATE_READY
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
GENERAL_CONTACT
===
env
.
CONSTANTS
.
GENERAL_CONTACT
).
assertTrue
();
expect
(
sim
.
SimState
.
SIM_STATE_LOADED
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
FIXED_DIALING
===
env
.
CONSTANTS
.
FIXED_DIALING
).
assertTrue
();
expect
(
sim
.
ContactType
.
GENERAL_CONTACT
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
LOCK_OFF
===
env
.
CONSTANTS
.
LOCK_OFF
).
assertTrue
();
expect
(
sim
.
ContactType
.
FIXED_DIALING
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
LOCK_ON
===
env
.
CONSTANTS
.
LOCK_ON
).
assertTrue
();
expect
(
sim
.
LockState
.
LOCK_OFF
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PIN_LOCK
===
env
.
CONSTANTS
.
PIN_LOCK
).
assertTrue
();
expect
(
sim
.
LockState
.
LOCK_ON
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
FDN_LOCK
===
env
.
CONSTANTS
.
FDN_LOCK
).
assertTrue
();
expect
(
sim
.
PIN_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
UNKNOWN_CARD
===
env
.
CONSTANTS
.
UNKNOWN_CARD
).
assertTrue
();
expect
(
sim
.
FDN_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_SIM_CARD
===
env
.
CONSTANTS
.
SINGLE_MODE_SIM_CARD
).
assertTrue
();
expect
(
sim
.
UNKNOWN_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_USIM_CARD
===
env
.
CONSTANTS
.
SINGLE_MODE_USIM_CARD
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_SIM_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_RUIM_CARD
===
env
.
CONSTANTS
.
SINGLE_MODE_RUIM_CARD
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_USIM_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
DUAL_MODE_CG_CARD
===
env
.
CONSTANTS
.
DUAL_MODE_CG_CARD
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_RUIM_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
CT_NATIONAL_ROAMING_CARD
===
env
.
CONSTANTS
.
CT_NATIONAL_ROAMING_CARD
).
assertTrue
();
expect
(
sim
.
DUAL_MODE_CG_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
CU_DUAL_MODE_CARD
===
env
.
CONSTANTS
.
CU_DUAL_MODE_CARD
).
assertTrue
();
expect
(
sim
.
CT_NATIONAL_ROAMING_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
DUAL_MODE_TELECOM_LTE_CARD
===
env
.
CONSTANTS
.
DUAL_MODE_TELECOM_LTE_CARD
).
assertTrue
();
expect
(
sim
.
CU_DUAL_MODE_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
DUAL_MODE_UG_CARD
===
env
.
CONSTANTS
.
DUAL_MODE_UG_CARD
).
assertTrue
();
expect
(
sim
.
DUAL_MODE_TELECOM_LTE_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_ISIM_CARD
===
env
.
CONSTANTS
.
SINGLE_MODE_ISIM_CARD
).
assertTrue
();
expect
(
sim
.
DUAL_MODE_UG_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PN_PIN_LOCK
===
env
.
CONSTANTS
.
PN_PIN_LOCK
).
assertTrue
();
expect
(
sim
.
SINGLE_MODE_ISIM_CARD
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PN_PUK_LOCK
===
env
.
CONSTANTS
.
PN_PUK_LOCK
).
assertTrue
();
expect
(
sim
.
PN_PIN_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PU_PIN_LOCK
===
env
.
CONSTANTS
.
PU_PIN_LOCK
).
assertTrue
();
expect
(
sim
.
PN_PUK_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PU_PUK_LOCK
===
env
.
CONSTANTS
.
PU_PUK_LOCK
).
assertTrue
();
expect
(
sim
.
PU_PIN_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PP_PIN_LOCK
===
env
.
CONSTANTS
.
PP_PIN_LOCK
).
assertTrue
();
expect
(
sim
.
PU_PUK_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PP_PUK_LOCK
===
env
.
CONSTANTS
.
PP_PUK_LOCK
).
assertTrue
();
expect
(
sim
.
PP_PIN_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PC_PIN_LOCK
===
env
.
CONSTANTS
.
PC_PIN_LOCK
).
assertTrue
();
expect
(
sim
.
PP_PUK_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
PC_PUK_LOCK
===
env
.
CONSTANTS
.
PC_PUK_LOCK
).
assertTrue
();
expect
(
sim
.
PC_PIN_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SIM_PIN_LOCK
===
env
.
CONSTANTS
.
SIM_PIN_LOCK
).
assertTrue
();
expect
(
sim
.
PC_PUK_LOCK
!==
env
.
INVALID_VALUE
).
assertTrue
();
expect
(
sim
.
SIM_PUK_LOCK
===
env
.
CONSTANTS
.
SIM_PUK_LOCK
).
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
.
log
(
`Telephony_Sim_constantValidate_0100 finish`
);
done
();
done
();
});
});
...
@@ -546,7 +547,7 @@ describe('SimManagerTest', function () {
...
@@ -546,7 +547,7 @@ describe('SimManagerTest', function () {
it
(
'
Telephony_Sim_SetLockState_Async_1000
'
,
0
,
async
function
(
done
)
{
it
(
'
Telephony_Sim_SetLockState_Async_1000
'
,
0
,
async
function
(
done
)
{
const
CASE_NAME
=
'
Telephony_Sim_SetLockState_Async_1000
'
;
const
CASE_NAME
=
'
Telephony_Sim_SetLockState_Async_1000
'
;
const
lockInfo
=
{
lockType
:
sim
.
PIN_LOCK
,
state
:
sim
.
LOCK_OFF
,
password
:
env
.
CORRECT_PIN
};
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
)
{
if
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
setLockState expect error:
${
error
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
setLockState expect error:
${
error
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
test finish`
);
console
.
log
(
`
${
CASE_NAME
}
test finish`
);
...
@@ -1724,7 +1725,7 @@ describe('SimManagerTest', function () {
...
@@ -1724,7 +1725,7 @@ describe('SimManagerTest', function () {
it
(
'
Telephony_Sim_unlockSimLock_Async_2600
'
,
0
,
function
(
done
)
{
it
(
'
Telephony_Sim_unlockSimLock_Async_2600
'
,
0
,
function
(
done
)
{
const
CASE_NAME
=
'
Telephony_Sim_unlockSimLock_Async_2600
'
;
const
CASE_NAME
=
'
Telephony_Sim_unlockSimLock_Async_2600
'
;
const
lockInfo
=
{
lockType
:
sim
.
PN_PIN_LOCK
,
password
:
env
.
SIM_PN_PIN_PASSWORD
};
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
)
{
if
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
expect error:
${
error
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
expect error:
${
error
.
message
}
`
);
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
...
...
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/lib/Const.js
浏览文件 @
ad4ea823
...
@@ -28,3 +28,4 @@ export const MAIL_NUMBER_LEN20 = '01234567890123456789';
...
@@ -28,3 +28,4 @@ export const MAIL_NUMBER_LEN20 = '01234567890123456789';
export
const
SIM_MIN_COUNT
=
0
;
export
const
SIM_MIN_COUNT
=
0
;
export
const
STK_CMD
=
'
D30781020181900101
'
;
export
const
STK_CMD
=
'
D30781020181900101
'
;
export
const
SIM_PN_PIN_PASSWORD
=
'
1111
'
;
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 () {
...
@@ -381,19 +381,19 @@ describe('SmsMmsErrorTest', function () {
sms
.
createMessage
(
rawArrayNull
,
'
3gpp
'
,
(
err
,
shortMessage
)
=>
{
sms
.
createMessage
(
rawArrayNull
,
'
3gpp
'
,
(
err
,
shortMessage
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
log
(
'
Telephony_SmsMms_createMessage_Async_0200 finish
'
);
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
();
done
();
return
;
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
();
expect
().
assertFail
();
console
.
log
(
'
Telephony_SmsMms_createMessage_Async_0200 fail
'
);
console
.
log
(
'
Telephony_SmsMms_createMessage_Async_0200 fail
'
);
done
();
done
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录