diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/CallJsunit.test.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/CallJsunit.test.ets index 6b2cf72ca59b24cf6be7884f951b1e949d79c9ed..45164fe4baf0a1d1d02d30ea58cf196acff426d0 100644 --- a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/CallJsunit.test.ets +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/CallJsunit.test.ets @@ -44,67 +44,6 @@ export default function callJsunit(){ describe('callTest', function(){ console.log("==========> call Test start ==========>"); - - /** - * @tc.number Telephony_Call_Call_MakeCall_0100 - * @tc.name Make a call. - * @tc.desc Function test - */ - it("Telephony_Call_Call_MakeCall_0100",0,async function(done){ - let caseName:string = "Telephony_Call_Call_MakeCall_0100"; - console.log(`==========> ${caseName} Test start ==========>`); - try{ - let telNumber = ""; - call.makeCall(telNumber,(error) => { - if(error){ - console.log(`${caseName} fail,case success,error:${toString(error)}`); - expect(true).assertTrue(); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} success,case fail`); - done(); - }); - }catch(err){ - console.log(`${caseName} fail,case success,error:${toString(err)}`); - expect(true).assertTrue(); - done(); - return; - } - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_Call_MakeCall_0200 - * @tc.name Makes a call. - * @tc.desc Function test - */ - it("Telephony_Call_Call_MakeCall_0200",0,async function(done){ - let caseName:string = "Telephony_Call_Call_MakeCall_0200"; - console.log(`==========> ${caseName} Test start ==========>`); - let telNumber = ""; - try{ - call.makeCall(telNumber).then(()=>{ - console.log(`${caseName} success,case fail`); - done(); - }).catch(error =>{ - console.log(`${caseName} fail,case success,error:${toString(error)}`); - expect(true).assertTrue(); - done(); - return; - }); - }catch(err){ - console.log(`${caseName} fail,case success,error:${toString(err)}`); - expect(true).assertTrue(); - done(); - return; - } - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - /** * @tc.number Telephony_Call_HasVoiceCapability_HasVoiceCapability * @tc.name Checks whether a device supports voice calls. @@ -497,6 +436,65 @@ export default function callJsunit(){ done(); }); + /** + * @tc.number Telephony_Call_Call_MakeCall_0100 + * @tc.name Make a call. + * @tc.desc Function test + */ + it("Telephony_Call_Call_MakeCall_0100",0,async function(done){ + let caseName:string = "Telephony_Call_Call_MakeCall_0100"; + console.log(`==========> ${caseName} Test start ==========>`); + try{ + let telNumber = ""; + call.makeCall(telNumber,(error) => { + if(error){ + console.log(`${caseName} fail,case success,error:${toString(error)}`); + expect(true).assertTrue(); + done(); + return; + } + expect().assertFail(); + console.log(`${caseName} success,case fail`); + done(); + }); + }catch(err){ + console.log(`${caseName} fail,case success,error:${toString(err)}`); + expect(true).assertTrue(); + done(); + return; + } + console.log(`==========> ${caseName} Test end ==========>`); + done(); + }); + + /** + * @tc.number Telephony_Call_Call_MakeCall_0200 + * @tc.name Makes a call. + * @tc.desc Function test + */ + it("Telephony_Call_Call_MakeCall_0200",0,async function(done){ + let caseName:string = "Telephony_Call_Call_MakeCall_0200"; + console.log(`==========> ${caseName} Test start ==========>`); + let telNumber = ""; + try{ + call.makeCall(telNumber).then(()=>{ + console.log(`${caseName} success,case fail`); + done(); + }).catch(error =>{ + console.log(`${caseName} fail,case success,error:${toString(error)}`); + expect(true).assertTrue(); + done(); + return; + }); + }catch(err){ + console.log(`${caseName} fail,case success,error:${toString(err)}`); + expect(true).assertTrue(); + done(); + return; + } + console.log(`==========> ${caseName} Test end ==========>`); + done(); + }); }); } diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/List.test.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/List.test.ets index 93fe7b42cac91935af3ee34e299932965367d8f9..77cb733449ee6b978cd72086784b6def46d93484 100644 --- a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/List.test.ets +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/List.test.ets @@ -24,9 +24,9 @@ import dataJsunit from './DataJsunit.test.ets'; export default function testsuite() { //other dataJsunit(); - callJsunit(); smsUiJsunit(); convertOptionsJsunit(); radioJsunit(); radioSecondJsunit(); + callJsunit(); } \ No newline at end of file