Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
49f00356
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看板
提交
49f00356
编写于
5月 23, 2022
作者:
B
bayanxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add test cases
Signed-off-by:
N
bayanxing
<
bayanxing@kaihongdigi.com
>
上级
af697fea
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
327 addition
and
9 deletion
+327
-9
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
+6
-4
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
...errors/entry/src/main/js/test/NetworkSearchErrors.test.js
+70
-1
telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/RadioJsunit.test.ets
.../entry/src/main/ets/MainAbility/test/RadioJsunit.test.ets
+24
-1
telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/RadioSecondJsunit.test.ets
.../src/main/ets/MainAbility/test/RadioSecondJsunit.test.ets
+225
-1
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
+2
-2
未找到文件。
telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/CallManageAll.test.js
浏览文件 @
49f00356
...
...
@@ -995,11 +995,12 @@ describe('CallManageImsCall', function () {
call
.
isEmergencyPhoneNumber
(
'
110
'
,
(
err
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_CallManager_isEmergencyPhoneNumber_Async_1400 finish err =
${
err
}
`
);
expect
().
assertFail
();
done
();
return
;
}
expect
(
).
assertFail
();
console
.
log
(
'
Telephony_CallManager_isEmergencyPhoneNumber_Async_1400
fail
'
);
expect
(
true
).
assertTrue
();
console
.
log
(
'
Telephony_CallManager_isEmergencyPhoneNumber_Async_1400
PASSED
'
);
done
();
});
});
...
...
@@ -1013,11 +1014,12 @@ describe('CallManageImsCall', function () {
it
(
'
Telephony_CallManager_isEmergencyPhoneNumber_Promise_1400
'
,
0
,
async
function
(
done
)
{
try
{
var
data
=
await
call
.
isEmergencyPhoneNumber
(
'
120
'
);
expect
(
).
assertFail
();
console
.
log
(
'
Telephony_CallManager_isEmergencyPhoneNumber_Promise_1400
fail
'
);
expect
(
true
).
assertTrue
();
console
.
log
(
'
Telephony_CallManager_isEmergencyPhoneNumber_Promise_1400
PASSED
'
);
done
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_CallManager_isEmergencyPhoneNumber_Promise_1400 finish err =
${
err
}
`
);
expect
().
assertFail
();
done
();
}
});
...
...
telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js
浏览文件 @
49f00356
...
...
@@ -337,7 +337,43 @@ describe('ActsNetworkSearchTest', function () {
}
})
/**
* @tc.number Telephony_NetworkSearch_getOperatorName_Async_0500
* @tc.name Verify the abnormal input of "slotId", test getOperatorName() to view the callback result
* @tc.desc Function test
*/
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
}
`
);
expect
().
assertFail
();
done
();
return
;
}
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Async_0500 finish data:
${
data
}
`
);
expect
(
true
).
assertTrue
();
done
();
})
})
/**
* @tc.number Telephony_NetworkSearch_getOperatorName_Promise_0500
* @tc.name Verify the abnormal input of "slotId", test getOperatorName() to view the callback result
* @tc.desc Function test
*/
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
}
`
);
expect
(
true
).
assertTrue
();
done
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_getOperatorName_Promise_0500 fail err:
${
err
}
`
);
expect
().
assertFail
();
done
();
}
})
/**
* @tc.number Telephony_NetworkSearch_isRadioOn_Async_0200
* @tc.name Test The function isRadioOn
...
...
@@ -371,6 +407,39 @@ describe('ActsNetworkSearchTest', function () {
}
});
/**
* @tc.number Telephony_NetworkSearch_isRadioOn_Async_0300
* @tc.name Test The function isRadioOn
* @tc.desc Function test
*/
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
}
`
);
done
();
return
;
}
console
.
log
(
'
Telephony_NetworkSearch_isRadioOn_Async_0300 finish
'
);
done
();
});
});
/**
* @tc.number Telephony_NetworkSearch_isRadioOn_Promise_0300
* @tc.name Test The function isRadioOn
* @tc.desc Function test
*/
it
(
'
Telephony_NetworkSearch_isRadioOn_Promise_0300
'
,
0
,
async
function
(
done
)
{
try
{
await
radio
.
isRadioOn
(
0
);
console
.
log
(
'
Telephony_NetworkSearch_isRadioOn_Promise_0300 success
'
);
done
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_NetworkSearch_isRadioOn_Promise_0300 fail
${
err
}
`
);
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
...
...
telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/RadioJsunit.test.ets
浏览文件 @
49f00356
...
...
@@ -49,7 +49,30 @@ export default function radioJsunit() {
});
});
/**
* @tc.number Telephony_NetworkSearch_getPrimarySlotId_Promise_0200
* @tc.name Test getPrimarySlotId() to check the callback result
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_getPrimarySlotId_Promise_0200', 0, async function (done) {
if(utils.notCheck){
done();
return;
}
try {
let data = await radio.getPrimarySlotId();
console.log(Telephony_NetworkSearch_getPrimarySlotId_Promise_0200 pass data: ${data}`);
expect(true).assertTrue();
} catch (err) {
console.log(`Telephony_NetworkSearch_getPrimarySlotId_Promise_0200 fail err: ${err}`);
expect().assertFail();
done();
return;
}
done();
});
/**
* @tc.number Telephony_NetworkSearch_isNrSupported_Promise_0400
* @tc.name Test The function setPrimarySlotId(0)
...
...
telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/RadioSecondJsunit.test.ets
浏览文件 @
49f00356
...
...
@@ -100,6 +100,76 @@ export default function radioSecondJsunit() {
});
})
/**
* @tc.number Telephony_NetworkSearch_NetworkState_Promise_0100
* @tc.name Test getNetworkState() to check the callback result
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_NetworkState_Promise_0100', 0, async function (done) {
if (utils.notCheck) {
expect(true).assertTrue();
done();
return;
}
try {
const result = await radio.getNetworkState();
expect(true).assertTrue();
console.log(`Telephony_NetworkSearch_NetworkState_Promise_0100 test finish.`);
} catch (error) {
console.log(`Telephony_NetworkSearch_NetworkState_Promise_0100 error: ${error.message}`);
expect().assertFail();
}
done();
})
/**
* @tc.number Telephony_NetworkSearch_NetworkState_Async_0200
* @tc.name Test getNetworkState() , slotId is 0, to check the callback result
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_NetworkState_Async_0200', 0, async function (done) {
if (utils.notCheck) {
expect(true).assertTrue();
done();
return;
}
radio.getNetworkState(0, (err, data) => {
if (err) {
console.log(`Telephony_NetworkSearch_NetworkState_Async_0200 get fail err: ${err}`);
expect().assertFail();
done();
return;
}
console.log(`Telephony_NetworkSearch_NetworkState_Async_0200 end data: ${JSON.stringify(data)}`);
expect(true).assertTrue();
done();
return;
});
})
/**
* @tc.number Telephony_NetworkSearch_NetworkState_Promise_0200
* @tc.name Test getNetworkState() , slotId is 0, to check the callback result
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_NetworkState_Promise_0200', 0, async function (done) {
if (utils.notCheck) {
expect(true).assertTrue();
done();
return;
}
try {
const result = await radio.getNetworkState(0);
expect(true).assertTrue();
console.log(`Telephony_NetworkSearch_NetworkState_Promise_0200 test finish.`);
} catch (error) {
console.log(`Telephony_NetworkSearch_NetworkState_Promise_0200 error: ${error.message}`);
expect().assertFail();
}
done();
})
/**
* @tc.number Telephony_Radio_CdmaCellInformation_sid_0100
* @tc.name sid
...
...
@@ -124,8 +194,162 @@ export default function radioSecondJsunit() {
console.log("-----------------------Telephony_Radio_CdmaCellInformation_sid_0100 end-----------------------");
})
/**
* @tc.number Telephony_NetworkSearch_getRadioTech_Async_0500
* @tc.name SlotId parameter input is 0, test getRadioTech() query function
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_getRadioTech_Async_0500', 0, async function (done) {
radio.getRadioTech(0, (err, data) => {
if (err) {
console.log(`Telephony_NetworkSearch_getRadioTech_Async_0500 fail err: ${err}`);
expect().assertFail();
done();
return;
}
console.log(`Telephony_NetworkSearch_getRadioTech_Async_0500 success ${data}`);
expect(true).assertTrue();
done();
});
});
/**
* @tc.number Telephony_NetworkSearch_getRadioTech_Promise_0500
* @tc.name SlotId parameter input is 0, test getRadioTech() query function
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_getRadioTech_Promise_0500', 0, async function (done) {
try {
let data = await radio.getRadioTech(0);
console.log('Telephony_NetworkSearch_getRadioTech_Promise_0500 success');
expect(true).assertTrue();
} catch (err) {
console.log(`Telephony_NetworkSearch_getRadioTech_Promise_0500 fail err: ${err}`);
expect().assertFail();
done();
return;
}
done();
});
/**
* @tc.number Telephony_NetworkSearch_getNetworkSelectionMode_Async_0600
* @tc.name SlotId parameter input is 0, test getNetworkSelectionMode() query function go to the error
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_getNetworkSelectionMode_Async_0600', 0, async function (done) {
radio.getNetworkSelectionMode(0, (err, res) => {
if (err) {
console.log(`Telephony_NetworkSearch_getNetworkSelectionMode_Async_0600 err: ${err}`);
expect().assertFail();
done();
} else {
console.log('Telephony_NetworkSearch_getNetworkSelectionMode_Async_0600 pass ${res}');
expect(true).assertTrue();
done();
}
});
});
/**
* @tc.number Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0600
* @tc.name SlotId parameter input is 0, test getNetworkSelectionMode() query function go to the error
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0600', 0, async function (done) {
try {
await radio.getNetworkSelectionMode(0);
console.log('Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0600 pass');
expect(true).assertTrue();
} catch (err) {
console.log('Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0600 fail');
expect().assertFail();
done();
return;
}
done();
});
/**
* @tc.number Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0500
* @tc.name SlotId parameter input is 0, test getISOCountryCodeForNetwork() query function
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0500', 0, async function (done) {
radio.getISOCountryCodeForNetwork(0, (err, data) => {
if (err) {
console.log(`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0500 fail err: ${err}`);
expect().assertFail();
done();
return;
}
console.log(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0500 finish data: ${JSON.stringify(data)}`);
expect(true).assertTrue();
done();
});
});
/**
* @tc.number Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0500
* @tc.name SlotId parameter input is 0, test getISOCountryCodeForNetwork() query function
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400', 0, async function (done) {
try {
let data = await radio.getISOCountryCodeForNetwork(0);
console.log(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0500 finish data:${JSON.stringify(data)}`);
expect(true).assertTrue();
} catch (err) {
console.log(`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0500 fail err: ${err}`);
expect().assertFail();
done();
return;
}
done();
});
/**
* @tc.number Telephony_NetworkSearch_getSignalInformation_Async_0500
* @tc.name SlotId parameter input is 0, test getSignalInformation() query function go to the error
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_getSignalInformation_Async_0500', 0, async function (done) {
radio.getSignalInformation(0, (err, data) => {
if (err) {
console.log(`Telephony_NetworkSearch_getSignalInformation_Async_0500 fail err: ${err}`);
expect().assertFail();
done();
return;
}
console.log(`Telephony_NetworkSearch_getSignalInformation_Async_0500 finish data: ${JSON.stringify(data)}`);
expect(true).assertTrue();
done();
});
});
/**
* @tc.number Telephony_NetworkSearch_getSignalInformation_Promise_0500
* @tc.name SlotId parameter input is -1, test getSignalInformation() query function return the datalength is 0
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_getSignalInformation_Promise_0500', 0, async function (done) {
try {
let data = await radio.getSignalInformation(0);
console.log(
`Telephony_NetworkSearch_getSignalInformation_Promise_0500 pass data: ${JSON.stringify(data)}`);
expect(true).assertTrue();
} catch (err) {
console.log(`Telephony_NetworkSearch_getSignalInformation_Promise_0500 fail err: ${err}`);
expect().assertFail();
done();
return;
}
done();
});
console.log("************* radio Test end*************");
function assertCellInformation(data) {
expect(data !== '' && data != undefined && data != null).assertTrue();
...
...
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/SimManager.test.js
浏览文件 @
49f00356
...
...
@@ -527,7 +527,7 @@ describe('SimManagerTest', function () {
done
();
return
;
}
expect
(
result
).
assertFals
e
();
expect
(
true
).
assertTru
e
();
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
done
();
});
...
...
@@ -543,7 +543,7 @@ describe('SimManagerTest', function () {
const
CASE_NAME
=
'
Telephony_Sim_getDefaultVoiceSlotld_Promise_0400
'
;
try
{
const
result
=
await
sim
.
getDefaultVoiceSlotld
();
expect
(
result
).
assertFals
e
();
expect
(
true
).
assertTru
e
();
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
}
catch
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
getDefaultVoiceSlotld error:
${
error
.
message
}
`
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录