提交 3aa77e49 编写于 作者: B bayanxing

fix telephony test case error

Signed-off-by: Nbayanxing <bayanxing@kaihongdigi.com>
上级 a4cf0673
......@@ -863,42 +863,42 @@ describe('CallManageImsCall', function () {
});
/**
* @tc.number Telephony_CallManager_formatPhoneNumber_Async_0120
* @tc.number Telephony_CallManager_formatPhoneNumber_Async_0200
* @tc.name PhoneNumber is 13900000000, options: CN, Call formatPhoneNumber() to format the number.
* The return value is 10 000 000 0000
* The return value is 139 0000 0000
* @tc.desc Function test
*/
it('Telephony_CallManager_formatPhoneNumber_Async_0120', 0, async function (done) {
it('Telephony_CallManager_formatPhoneNumber_Async_0200', 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');
console.log(`Telephony_CallManager_formatPhoneNumber_Async_0200 err = ${err.message}`);
console.log('Telephony_CallManager_formatPhoneNumber_Async_0200 fail');
expect().assertFail();
done();
return;
}
expect(data === '139 0000 0000"').assertTrue();
console.log(`Telephony_CallManager_formatPhoneNumber_Async_0120 finish data = ${data}`);
expect(data === '139 0000 0000').assertTrue();
console.log(`Telephony_CallManager_formatPhoneNumber_Async_0200 finish data = ${data}`);
done();
});
});
/**
* @tc.number Telephony_CallManager_formatPhoneNumber_Promise_0120
* @tc.number Telephony_CallManager_formatPhoneNumber_Promise_0200
* @tc.name PhoneNumber is 13900000000, options: US, Call formatPhoneNumber() to format the number.
* The return value is 200 0000
* The return value is '1 390-000-0000'
* @tc.desc Function test
*/
it('Telephony_CallManager_formatPhoneNumber_Promise_0120', 0, async function (done) {
it('Telephony_CallManager_formatPhoneNumber_Promise_0200', 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}`);
console.log(`Telephony_CallManager_formatPhoneNumber_Promise_0200 finish data = ${data}`);
done();
} catch (err) {
console.log('Telephony_CallManager_formatPhoneNumber_Promise_0120 fail');
console.log('Telephony_CallManager_formatPhoneNumber_Promise_0200 fail');
expect().assertFail();
done();
}
......
......@@ -238,6 +238,11 @@ export default function radioSecondJsunit() {
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_getNetworkSelectionMode_Async_0600', 0, async function (done) {
if (utils.notCheck) {
expect(true).assertTrue();
done();
return;
}
radio.getNetworkSelectionMode(0, (err, res) => {
if (err) {
console.log(`Telephony_NetworkSearch_getNetworkSelectionMode_Async_0600 err: ${err}`);
......@@ -258,12 +263,17 @@ export default function radioSecondJsunit() {
* @tc.desc Function test
*/
it('Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0600', 0, async function (done) {
if (utils.notCheck) {
expect(true).assertTrue();
done();
return;
}
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');
console.log('Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0600 fail: ${err}');
expect().assertFail();
done();
return;
......@@ -296,7 +306,7 @@ export default function radioSecondJsunit() {
* @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) {
it('Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0500', 0, async function (done) {
try {
let data = await radio.getISOCountryCodeForNetwork(0);
console.log(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册