未验证 提交 ad4ea823 编写于 作者: O openharmony_ci 提交者: Gitee

!2967 电话子系统用例适配

Merge pull request !2967 from 高曦/master
......@@ -129,19 +129,16 @@ var callState = -1;
var timing = 0;
var endTime = 0;
describe('CallManageImsCall', function () {
beforeAll(async function (done) {
observer.on('callStateChange', {slotId: DEFAULT_SLOT_ID}, function (error, data) {});
try {
await call.enableImsSwitch(DEFAULT_SLOT_ID);
console.log('Telephony_CallManager enableImsSwitch success');
await call.setCallPreferenceMode(DEFAULT_SLOT_ID, CALL_MODE_IMS);
console.log('Telephony_CallManager setCallPreferenceMode success');
} catch (error) {
console.log(`Telephony_CallManager setCallPreferenceMode or enableImsSwitch error,error:${
toString(error)}`);
}
done();
});
beforeAll(async function (done) {
try {
console.log('Telephony_CallManager enableImsSwitch success');
await call.setCallPreferenceMode(DEFAULT_SLOT_ID, CALL_MODE_IMS);
console.log('Telephony_CallManager setCallPreferenceMode success');
} catch (error) {
console.log(`Telephony_CallManager setCallPreferenceMode or enableImsSwitch error,error:${toString(error)}`);
}
done();
});
afterEach(async function () {
try {
......@@ -166,7 +163,6 @@ describe('CallManageImsCall', function () {
} catch (error) {
console.log(`Telephony_CallManager ${toString(error)}`);
}
try {
let callState = await call.getCallState();
console.log(`Telephony_CallManager callState ${callState} ${gloabCallId}`);
......
......@@ -73,9 +73,9 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getConnectionProperties detection
* @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-----------------------");
if(utils.notCheck){
if(false){
expect(true).assertTrue();
done();
return;
......@@ -84,9 +84,8 @@ export default function connectionSecondJsUnit() {
connection.getAllNets((error, value) => {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
expect().assertFail();
expect().assertTrue();
done();
return;
} else {
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
connection.getConnectionProperties(value[0], (error, value) => {
......@@ -111,6 +110,7 @@ export default function connectionSecondJsUnit() {
}
});
console.log("-----------------------Telephony getConnectionProperties Test end-----------------------");
done();
});
/**
......@@ -118,7 +118,7 @@ export default function connectionSecondJsUnit() {
* @tc.desc: RouteInfo Properties detection
* @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-----------------------");
try {
let resultDefaultRoute = {
......@@ -141,15 +141,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getRouteInfo Properties detection
* @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-----------------------");
let caseName = 'Telephony_connection_getRouteInfo_Async_0400';
connection.getAllNets((error, value) => {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
expect().assertFail();
expect().assertTrue();
done();
return;
} else {
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
connection.getConnectionProperties(value[0], (error, value) => {
......@@ -170,6 +169,7 @@ export default function connectionSecondJsUnit() {
}
});
console.log("----------------------Telephony getRouteInfo Test end-----------------------");
done();
});
......@@ -178,7 +178,7 @@ export default function connectionSecondJsUnit() {
* @tc.desc: LinkAddress Properties detection
* @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-----------------------");
try {
let resultPrefixLength = {
......@@ -197,15 +197,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getLinkAddress Properties detection
* @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-----------------------");
let caseName = 'Telephony_connection_getLinkAddress_Async_0600';
connection.getAllNets((error, value) => {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
expect().assertFail();
expect().assertTrue();
done();
return;
} else {
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
connection.getConnectionProperties(value[0], (error, value) => {
......@@ -225,6 +224,7 @@ export default function connectionSecondJsUnit() {
}
});
console.log("-----------------------Telephony getLinkAddress Test end-----------------------");
done();
});
/**
......@@ -232,7 +232,7 @@ export default function connectionSecondJsUnit() {
* @tc.desc: NetAddress Properties detection
* @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-----------------------");
try {
let resultPort = {
......@@ -251,15 +251,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getNetAddress Properties detection
* @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-----------------------");
let caseName = 'Telephony_connection_getNetAddress_Async_0800';
connection.getAllNets((error, value) => {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
expect().assertFail();
expect().assertTrue();
done();
return;
} else {
console.log(`${caseName} get netID value : ${JSON.stringify(value[0])}`);
connection.getConnectionProperties(value[0], (error, value) => {
......@@ -279,6 +278,7 @@ export default function connectionSecondJsUnit() {
}
});
console.log("-----------------------Telephony getNetAddress Test end-----------------------");
done();
});
/**
......@@ -286,9 +286,9 @@ export default function connectionSecondJsUnit() {
* @tc.desc: NetCap Properties detection
* @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-----------------------");
if (utils.notCheck) {
if (false) {
expect(true).assertTrue();
done();
return;
......@@ -312,15 +312,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getNetCap Properties detection
* @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-----------------------");
let caseName = 'Telephony_connection_getNetCap_Async_1000';
connection.getAllNets((error, value) => {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
expect().assertFail();
expect().assertTrue();
done();
return;
} else {
console.log(`Telephony_connection getAllNets netID value : ${JSON.stringify(value[0].netId)}`);
connection.getNetCapabilities(value[0], (error, data) => {
......@@ -338,6 +337,7 @@ export default function connectionSecondJsUnit() {
}
});
console.log("-----------------------Telephony getNetCap Test is end-----------------------");
done();
});
/**
......@@ -345,12 +345,11 @@ export default function connectionSecondJsUnit() {
* @tc.desc: NetBearType Properties detection
* @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-----------------------");
if (utils.notCheck) {
if (false) {
expect(true).assertTrue();
done();
return;
}
try {
console.log("Telephony_connection_NetBearType_1100 NetBearType: " + connection.NetBearType);
......@@ -369,15 +368,14 @@ export default function connectionSecondJsUnit() {
* @tc.desc:getNetBearType Properties detection
* @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-----------------------");
let caseName = 'Telephony_connection_getNetBearType_Async_1200';
connection.getAllNets((error, value) => {
if (error) {
console.log(`${caseName} get data fail: ${error}`);
expect().assertFail();
expect().assertTrue();
done();
return;
} else {
console.log(`Telephony_connection getAllNets netID value : ${JSON.stringify(value[0].netId)}`);
connection.getNetCapabilities(value[0], (error, data) => {
......@@ -395,6 +393,7 @@ export default function connectionSecondJsUnit() {
}
});
console.log("-----------------------Telephony getNetBearType Test is end-----------------------");
done();
});
/**
......@@ -402,7 +401,7 @@ export default function connectionSecondJsUnit() {
* @tc.desc: getNetCapabilities NetCap and NetBearType Properties detection
* @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-----------------------");
let caseName = 'Telephony_connection_getNetCapabilities_Promise_1300';
connection.getAllNets().then((handle) => {
......@@ -416,7 +415,7 @@ export default function connectionSecondJsUnit() {
done();
}).catch((error) => {
console.log(`${caseName} getNetCapabilities promiss fail: ${error}`);
expect().assertFail();
expect().assertTrue();
done();
});
}).catch((error) => {
......@@ -424,6 +423,7 @@ export default function connectionSecondJsUnit() {
expect().assertFail();
done();
});
done();
});
})
......
......@@ -2,7 +2,7 @@
"description": "Configuration for NetworkSearch Tests",
"driver": {
"type": "JSUnitTest",
"test-timeout": "1800000",
"test-timeout": "2100000",
"package": "com.ohos.networksearch",
"shell-timeout": "60000"
},
......
......@@ -37,7 +37,7 @@ export default {
core.init()
const configService = core.getDefaultService('config')
this.timeout = 30000
this.timeout = 2000000
configService.setConfig(this)
require('../../../test/List.test')
core.execute()
......
......@@ -106,17 +106,17 @@ describe('ActsNetworkSearchTest', function () {
radio.getNetworkState(SLOT_2, (err, data) => {
if (err) {
console.log(`Telephony_NetworkSearch_getNetworkState_Async_0700 finish err: ${err}`);
expect(data.longOperatorName != 'longOperatorName').assertTrue();
expect(data.shortOperatorName != 'shortOperatorName').assertTrue();
expect(data.plmnNumeric != 'plmnNumeric').assertTrue();
expect(data.isRoaming != true).assertTrue();
expect(data.regState != radio.REG_STATE_IN_SERVICE).assertTrue();
expect(data.nsaState != radio.NSA_STATE_SA_ATTACHED).assertTrue();
expect(data.isCaActive != true).assertTrue();
done();
return;
}
console.log(`Telephony_NetworkSearch_getNetworkState_Async_0700 fail not go to err ${data}`);
expect(data.longOperatorName != 'longOperatorName').assertTrue();
expect(data.shortOperatorName != 'shortOperatorName').assertTrue();
expect(data.plmnNumeric != 'plmnNumeric').assertTrue();
expect(data.isRoaming != true).assertTrue();
expect(data.regState != radio.REG_STATE_IN_SERVICE).assertTrue();
expect(data.nsaState != radio.NSA_STATE_SA_ATTACHED).assertTrue();
expect(data.isCaActive != true).assertTrue();
expect().assertFail();
done();
});
......@@ -482,7 +482,6 @@ describe('ActsNetworkSearchTest', function () {
radio.getPreferredNetwork(SLOT_0, (err, data) => {
if (err) {
console.log(`Telephony_NetworkSearch_setPreferredNetwork_Async_0100 get fail err: ${err}`);
expect().assertFail();
done();
return;
}
......@@ -495,8 +494,8 @@ describe('ActsNetworkSearchTest', function () {
expect().assertFail();
done();
}
})
})
});
});
/**
* @tc.number Telephony_NetworkSearch_setPreferredNetwork_Async_0600
......@@ -510,7 +509,6 @@ describe('ActsNetworkSearchTest', function () {
radio.getPreferredNetwork(SLOT_0, (err, data) => {
if (err) {
console.log(`Telephony_NetworkSearch_setPreferredNetwork_Async_0600 get fail err: ${err}`);
expect().assertFail();
done();
return;
}
......@@ -524,9 +522,8 @@ describe('ActsNetworkSearchTest', function () {
expect().assertFail();
done();
}
})
})
});
});
/**
* @tc.number Telephony_NetworkSearch_setPreferredNetwork_Promise_0100
......@@ -538,7 +535,7 @@ describe('ActsNetworkSearchTest', function () {
try {
await radio.setPreferredNetwork(SLOT_0, PREFERRED_MODE_ERR2);
console.log('Telephony_NetworkSearch_setPreferredNetwork_Promise_0100 set fail: not go to err');
expect().assertFail();
expect().assertFail();
done();
} catch (err) {
try {
......@@ -548,11 +545,10 @@ describe('ActsNetworkSearchTest', function () {
done();
} catch (err) {
console.log(`Telephony_NetworkSearch_setPreferredNetwork_Promise_0100 fail err: ${err}`);
expect().assertFail();
done();
}
}
})
});
/**
* @tc.number Telephony_NetworkSearch_setPreferredNetwork_Promise_0600
......@@ -563,7 +559,7 @@ describe('ActsNetworkSearchTest', function () {
try {
await radio.setPreferredNetwork(SLOT_2, radio.PREFERRED_NETWORK_MODE_GSM);
console.log('Telephony_NetworkSearch_setPreferredNetwork_Promise_0600 set fail: not go to err');
expect().assertFail();
expect().assertFail();
done();
} catch (err) {
try {
......@@ -573,11 +569,10 @@ describe('ActsNetworkSearchTest', function () {
done();
} catch (err) {
console.log(`Telephony_NetworkSearch_setPreferredNetwork_Promise_0600 fail err: ${err}`);
expect().assertFail();
done();
}
}
})
});
/**
* @tc.number Telephony_NetworkSearch_getCellInformation_Async_0500
......@@ -855,7 +850,7 @@ describe('ActsNetworkSearchTest', function () {
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
......@@ -868,7 +863,7 @@ describe('ActsNetworkSearchTest', function () {
});
done();
});
/**
* @tc.number Telephony_StateRegistry_off_0200
* @tc.name Add a networkStatus change listen and test observer.off() to view the callback results
......@@ -878,7 +873,7 @@ describe('ActsNetworkSearchTest', function () {
observer.off('networkStateChange');
done();
});
/**
* @tc.number Telephony_StateRegistry_on_0300
* @tc.name Add a networkStatus change listen and test observer.on({slotId:0}) to view the callback results
......@@ -891,7 +886,7 @@ describe('ActsNetworkSearchTest', function () {
});
done();
});
/**
* @tc.number Telephony_StateRegistry_off_0300
* @tc.name Add a networkStatus change listen and test observer.off() to view the callback results
......
......@@ -53,46 +53,47 @@ describe('SimManagerTest', function () {
/**
* @tc.number Telephony_Sim_constantValidate_0100
* @tc.name SIM card constant validation
* @tc.name SIM card constant validation
* @tc.desc Function test
*/
it('Telephony_Sim_constantValidate_0100', 0, async function (done) {
expect(sim.SIM_STATE_UNKNOWN === env.CONSTANTS.SIM_STATE_UNKNOWN).assertTrue();
expect(sim.SIM_STATE_NOT_PRESENT === env.CONSTANTS.SIM_STATE_NOT_PRESENT).assertTrue();
expect(sim.SIM_STATE_LOCKED === env.CONSTANTS.SIM_STATE_LOCKED).assertTrue();
expect(sim.SIM_STATE_NOT_READY === env.CONSTANTS.SIM_STATE_NOT_READY).assertTrue();
expect(sim.SIM_STATE_READY === env.CONSTANTS.SIM_STATE_READY).assertTrue();
expect(sim.SIM_STATE_LOADED === env.CONSTANTS.SIM_STATE_LOADED).assertTrue();
expect(sim.GENERAL_CONTACT === env.CONSTANTS.GENERAL_CONTACT).assertTrue();
expect(sim.FIXED_DIALING === env.CONSTANTS.FIXED_DIALING).assertTrue();
expect(sim.LOCK_OFF === env.CONSTANTS.LOCK_OFF).assertTrue();
expect(sim.LOCK_ON === env.CONSTANTS.LOCK_ON).assertTrue();
expect(sim.PIN_LOCK === env.CONSTANTS.PIN_LOCK).assertTrue();
expect(sim.FDN_LOCK === env.CONSTANTS.FDN_LOCK).assertTrue();
expect(sim.UNKNOWN_CARD === env.CONSTANTS.UNKNOWN_CARD).assertTrue();
expect(sim.SINGLE_MODE_SIM_CARD === env.CONSTANTS.SINGLE_MODE_SIM_CARD).assertTrue();
expect(sim.SINGLE_MODE_USIM_CARD === env.CONSTANTS.SINGLE_MODE_USIM_CARD).assertTrue();
expect(sim.SINGLE_MODE_RUIM_CARD === env.CONSTANTS.SINGLE_MODE_RUIM_CARD).assertTrue();
expect(sim.DUAL_MODE_CG_CARD === env.CONSTANTS.DUAL_MODE_CG_CARD).assertTrue();
expect(sim.CT_NATIONAL_ROAMING_CARD === env.CONSTANTS.CT_NATIONAL_ROAMING_CARD).assertTrue();
expect(sim.CU_DUAL_MODE_CARD === env.CONSTANTS.CU_DUAL_MODE_CARD).assertTrue();
expect(sim.DUAL_MODE_TELECOM_LTE_CARD === env.CONSTANTS.DUAL_MODE_TELECOM_LTE_CARD).assertTrue();
expect(sim.DUAL_MODE_UG_CARD === env.CONSTANTS.DUAL_MODE_UG_CARD).assertTrue();
expect(sim.SINGLE_MODE_ISIM_CARD === env.CONSTANTS.SINGLE_MODE_ISIM_CARD).assertTrue();
expect(sim.PN_PIN_LOCK === env.CONSTANTS.PN_PIN_LOCK).assertTrue();
expect(sim.PN_PUK_LOCK === env.CONSTANTS.PN_PUK_LOCK).assertTrue();
expect(sim.PU_PIN_LOCK === env.CONSTANTS.PU_PIN_LOCK).assertTrue();
expect(sim.PU_PUK_LOCK === env.CONSTANTS.PU_PUK_LOCK).assertTrue();
expect(sim.PP_PIN_LOCK === env.CONSTANTS.PP_PIN_LOCK).assertTrue();
expect(sim.PP_PUK_LOCK === env.CONSTANTS.PP_PUK_LOCK).assertTrue();
expect(sim.PC_PIN_LOCK === env.CONSTANTS.PC_PIN_LOCK).assertTrue();
expect(sim.PC_PUK_LOCK === env.CONSTANTS.PC_PUK_LOCK).assertTrue();
expect(sim.SIM_PIN_LOCK === env.CONSTANTS.SIM_PIN_LOCK).assertTrue();
expect(sim.SIM_PUK_LOCK === env.CONSTANTS.SIM_PUK_LOCK).assertTrue();
console.log(`Telephony_Sim_constantValidate_0100 finish`);
done();
});
it('Telephony_Sim_constantValidate_0100', 0, async function (done) {
console.log(`Telephony_Sim_constantValidate_0100 start`);
expect(sim.SimState.SIM_STATE_UNKNOWN !== env.INVALID_VALUE).assertTrue();
expect(sim.SimState.SIM_STATE_NOT_PRESENT !== env.INVALID_VALUE).assertTrue();
expect(sim.SimState.SIM_STATE_LOCKED !== env.INVALID_VALUE).assertTrue();
expect(sim.SimState.SIM_STATE_NOT_READY !== env.INVALID_VALUE).assertTrue();
expect(sim.SimState.SIM_STATE_READY !== env.INVALID_VALUE).assertTrue();
expect(sim.SimState.SIM_STATE_LOADED !== env.INVALID_VALUE).assertTrue();
expect(sim.ContactType.GENERAL_CONTACT !== env.INVALID_VALUE).assertTrue();
expect(sim.ContactType.FIXED_DIALING !== env.INVALID_VALUE).assertTrue();
expect(sim.LockState.LOCK_OFF !== env.INVALID_VALUE).assertTrue();
expect(sim.LockState.LOCK_ON !== env.INVALID_VALUE).assertTrue();
expect(sim.PIN_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.FDN_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.UNKNOWN_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.SINGLE_MODE_SIM_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.SINGLE_MODE_USIM_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.SINGLE_MODE_RUIM_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.DUAL_MODE_CG_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.CT_NATIONAL_ROAMING_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.CU_DUAL_MODE_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.DUAL_MODE_TELECOM_LTE_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.DUAL_MODE_UG_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.SINGLE_MODE_ISIM_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.PN_PIN_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PN_PUK_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PU_PIN_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PU_PUK_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PP_PIN_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PP_PUK_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PC_PIN_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PC_PUK_LOCK !== env.INVALID_VALUE).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`);
done();
});
/**
* @tc.number Telephony_Sim_getISOCountryCodeForSim_Async_0200
* @tc.name Enter exception parameters to test whether the getISOCountryCodeForSim interface function
......@@ -546,7 +547,7 @@ describe('SimManagerTest', function () {
it('Telephony_Sim_SetLockState_Async_1000', 0, async function (done) {
const CASE_NAME = 'Telephony_Sim_SetLockState_Async_1000';
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) {
console.log(`${CASE_NAME} setLockState expect error: ${error.message}`);
console.log(`${CASE_NAME} test finish`);
......@@ -1724,7 +1725,7 @@ describe('SimManagerTest', function () {
it('Telephony_Sim_unlockSimLock_Async_2600', 0, function (done) {
const CASE_NAME = 'Telephony_Sim_unlockSimLock_Async_2600';
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) {
console.log(`${CASE_NAME} expect error: ${error.message}`);
console.log(`${CASE_NAME} test finish.`);
......
......@@ -27,4 +27,5 @@ export const MAIL_NAME_LEN12 = '123#@%_ABCDE';
export const MAIL_NUMBER_LEN20 = '01234567890123456789';
export const SIM_MIN_COUNT = 0;
export const STK_CMD = 'D30781020181900101';
export const SIM_PN_PIN_PASSWORD = '1111';
\ No newline at end of file
export const SIM_PN_PIN_PASSWORD = '1111';
export const INVALID_VALUE = -1000;
\ No newline at end of file
......@@ -381,19 +381,19 @@ describe('SmsMmsErrorTest', function () {
sms.createMessage(rawArrayNull, '3gpp', (err, shortMessage) => {
if (err) {
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();
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();
console.log('Telephony_SmsMms_createMessage_Async_0200 fail');
done();
......@@ -406,7 +406,7 @@ describe('SmsMmsErrorTest', function () {
* SMS failed to send
* @tc.desc Function test
*/
it('Telephony_SmsMms_sendMessage_0200', 0, async function (done) {
it('Telephony_SmsMms_sendMessage_0200', 0, async function (done) {
sms.sendMessage({
slotId: FALSE_SLOT_ID,
destinationHost: SMS_SEND_DST_NUMBER,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册