Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
28b808e3
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看板
提交
28b808e3
编写于
5月 21, 2022
作者:
B
bayanxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add test cases
Signed-off-by:
N
bayanxing
<
bayanxing@kaihongdigi.com
>
上级
08f0140d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
153 addition
and
1 deletion
+153
-1
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
+79
-0
telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/SmsMmsJsunit.test.ets
...entry/src/main/ets/MainAbility/test/SmsMmsJsunit.test.ets
+34
-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
+40
-0
未找到文件。
telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/CallManageAll.test.js
浏览文件 @
28b808e3
...
...
@@ -862,6 +862,48 @@ describe('CallManageImsCall', function () {
}
});
/**
* @tc.number Telephony_CallManager_formatPhoneNumber_Async_0120
* @tc.name PhoneNumber is 13900000000, options: CN, Call formatPhoneNumber() to format the number.
* The return value is 10 000 000 0000
* @tc.desc Function test
*/
it
(
'
Telephony_CallManager_formatPhoneNumber_Async_0120
'
,
0
,
async
function
(
done
)
{
let
numberFormatOptions
=
new
NumberFormatOptions
(
'
CN
'
);
call
.
formatPhoneNumber
(
'
13900000000
'
,
numberFormatOptions
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_CallManager_formatPhoneNumber_Async_0120 err =
${
err
.
message
}
`
);
console
.
log
(
'
Telephony_CallManager_formatPhoneNumber_Async_0120 fail
'
);
expect
().
assertFail
();
done
();
return
;
}
expect
(
data
===
'
139 0000 0000"
'
).
assertTrue
();
console
.
log
(
`Telephony_CallManager_formatPhoneNumber_Async_0120 finish data =
${
data
}
`
);
done
();
});
});
/**
* @tc.number Telephony_CallManager_formatPhoneNumber_Promise_0120
* @tc.name PhoneNumber is 13900000000, options: US, Call formatPhoneNumber() to format the number.
* The return value is 200 0000
* @tc.desc Function test
*/
it
(
'
Telephony_CallManager_formatPhoneNumber_Promise_0120
'
,
0
,
async
function
(
done
)
{
let
numberFormatOptions
=
new
NumberFormatOptions
(
'
US
'
);
try
{
var
data
=
await
call
.
formatPhoneNumber
(
'
13900000000
'
,
numberFormatOptions
);
expect
(
data
===
'
1 390-000-0000
'
).
assertTrue
();
console
.
log
(
`Telephony_CallManager_formatPhoneNumber_Promise_0120 finish data =
${
data
}
`
);
done
();
}
catch
(
err
)
{
console
.
log
(
'
Telephony_CallManager_formatPhoneNumber_Promise_0120 fail
'
);
expect
().
assertFail
();
done
();
}
});
/**
* @tc.number Telephony_CallManager_formatPhoneNumberToE164_Async_0100
* @tc.name PhoneNumber is 010-0000-0000, options: CN, call formatPhoneNumberToE164() to format the number,
...
...
@@ -942,4 +984,41 @@ describe('CallManageImsCall', function () {
done
();
}
});
/**
* @tc.number Telephony_CallManager_isEmergencyPhoneNumber_Async_1400
* @tc.name PhoneNumber: 110, no options. Call isEmergencyPhoneNumber() to check whether it is an emergency
* number. The return value is false
* @tc.desc Function test
*/
it
(
'
Telephony_CallManager_isEmergencyPhoneNumber_Async_1400
'
,
0
,
async
function
(
done
)
{
call
.
isEmergencyPhoneNumber
(
'
110
'
,
(
err
)
=>
{
if
(
err
)
{
console
.
log
(
`Telephony_CallManager_isEmergencyPhoneNumber_Async_1400 finish err =
${
err
}
`
);
done
();
return
;
}
expect
().
assertFail
();
console
.
log
(
'
Telephony_CallManager_isEmergencyPhoneNumber_Async_1400 fail
'
);
done
();
});
});
/**
* @tc.number Telephony_CallManager_isEmergencyPhoneNumber_Promise_1400
* @tc.name PhoneNumber: 120, no options. Call isEmergencyPhoneNumber() to check whether it is an emergency
* number. The return value is false
* @tc.desc Function test
*/
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
'
);
done
();
}
catch
(
err
)
{
console
.
log
(
`Telephony_CallManager_isEmergencyPhoneNumber_Promise_1400 finish err =
${
err
}
`
);
done
();
}
});
});
\ No newline at end of file
telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/SmsMmsJsunit.test.ets
浏览文件 @
28b808e3
...
...
@@ -73,7 +73,40 @@ export default function smsUiJsunit() {
});
});
/*
* @tc.number Telephony_SmsMms_createMessage_Promise_0100
* @tc.name Call interface CreateMessage,
* pass in the PDU(rawArray) in line with the coding specification, the specification is 3GPP,
* shortMessage Don't empty
* @tc.desc Function test
*/
it('Telephony_SmsMms_createMessage_Promise_0100', 0, async function (done) {
if (true) {
expect(true).assertTrue();
done();
return;
}
sms.createMessage(rawArray, '3gpp').then(shortMessage => {
expect(shortMessage.visibleMessageBody === MESSAGEBODY).assertTrue();
expect(shortMessage.visibleRawAddress.length === ADDR_LENGTH).assertTrue();
expect(shortMessage.messageClass === sms.FORWARD_MESSAGE).assertTrue();
expect(shortMessage.protocolId === 0).assertTrue();
expect(shortMessage.scAddress.length === ADDR_LENGTH).assertTrue();
expect(shortMessage.scTimestamp === SC_TIMESTAMP).assertTrue();
expect(shortMessage.isReplaceMessage).assertFalse();
expect(shortMessage.hasReplyPath).assertFalse();
expect(shortMessage.pdu.length > 0).assertTrue();
expect(shortMessage.status === 0).assertTrue();
expect(shortMessage.isSmsStatusReportMessage).assertTrue();
console.log('Telephony_SmsMms_createMessage_Promise_0100 finish');
done();
}).catch(err => {
expect().assertFail();
console.log('Telephony_SmsMms_createMessage_Promise_0100 fail');
done();
return;
});
});
/*
...
...
telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/SimManager.test.js
浏览文件 @
28b808e3
...
...
@@ -511,4 +511,44 @@ describe('SimManagerTest', function () {
}
done
();
});
/**
* @tc.number Telephony_Sim_getDefaultVoiceSlotld_Async_0400
* @tc.name Test getDefaultVoiceSlotld interface,
* check the callback result
* @tc.desc Function test
*/
it
(
'
Telephony_Sim_getDefaultVoiceSlotld_Async_0400
'
,
0
,
function
(
done
)
{
const
CASE_NAME
=
'
Telephony_Sim_getDefaultVoiceSlotld_Async_0400
'
;
sim
.
getDefaultVoiceSlotld
((
error
,
result
)
=>
{
if
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
getDefaultVoiceSlotld error:
${
error
.
message
}
`
);
expect
().
assertFail
();
done
();
return
;
}
expect
(
result
).
assertFalse
();
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
done
();
});
});
/**
* @tc.number Telephony_Sim_getDefaultVoiceSlotld_Promise_0400
* @tc.name Test getDefaultVoiceSlotld interface,
* check the returned result
* @tc.desc Function test
*/
it
(
'
Telephony_Sim_getDefaultVoiceSlotld_Promise_0400
'
,
0
,
async
function
(
done
)
{
const
CASE_NAME
=
'
Telephony_Sim_getDefaultVoiceSlotld_Promise_0400
'
;
try
{
const
result
=
await
sim
.
getDefaultVoiceSlotld
();
expect
(
result
).
assertFalse
();
console
.
log
(
`
${
CASE_NAME
}
test finish.`
);
}
catch
(
error
)
{
console
.
log
(
`
${
CASE_NAME
}
getDefaultVoiceSlotld error:
${
error
.
message
}
`
);
expect
().
assertFail
();
}
done
();
});
})
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录