From f6ef3c7e233b4c536459c344a704ca19dc2bb9fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=9B=A6?= Date: Wed, 27 Apr 2022 18:27:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E8=AF=9D=E7=B3=BB=E7=BB=9Fapi?= =?UTF-8?q?=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 高曦 --- telephony/telephonyjstest/BUILD.gn | 3 +- .../src/main/js/test/CallManageAll.test.js | 2034 +++-------------- .../entry/src/main/config.json | 2 +- .../main/js/test/CellularDataAbnorma.test.js | 187 +- .../entry/src/main/config.json | 2 +- .../test/HttpRequestJsunit.test.ets | 3 - .../test/HttpRequestOptionsJsunit.test.ets | 18 - .../test/HttpResponseJsunit.test.ets | 8 - .../test/RequestMethodJsunit.test.ets | 5 - .../test/ResponseCodeJsunit.test.ets | 3 - .../entry/src/main/config.json | 2 +- .../test/ConnectionJsunit.test.ets | 74 - .../main/ets/MainAbility/test/List.test.ets | 4 +- .../entry/src/main/config.json | 2 +- .../main/js/test/NetworkSearchErrors.test.js | 486 +--- .../ets/MainAbility/test/SimJsunit.test.ets | 168 -- .../MainAbility/test/SmsMmsJsunit.test.ets | 928 -------- .../{new_add => observer}/BUILD.gn | 4 +- telephony/telephonyjstest/observer/Test.json | 18 + .../entry/src/main/config.json | 4 +- .../entry/src/main/ets/MainAbility/app.ets | 0 .../src/main/ets/MainAbility/pages/Badge.ets | 0 .../src/main/ets/MainAbility/pages/Blank.ets | 0 .../src/main/ets/MainAbility/pages/Button.ets | 0 .../src/main/ets/MainAbility/pages/Column.ets | 0 .../ets/MainAbility/pages/ColumnSplit.ets | 0 .../main/ets/MainAbility/pages/Counter.ets | 0 .../main/ets/MainAbility/pages/DataPanel.ets | 0 .../main/ets/MainAbility/pages/Divider.ets | 0 .../src/main/ets/MainAbility/pages/Flex.ets | 0 .../ets/MainAbility/pages/GridContainer.ets | 0 .../src/main/ets/MainAbility/pages/Image.ets | 0 .../main/ets/MainAbility/pages/Navigator.ets | 0 .../src/main/ets/MainAbility/pages/Panel.ets | 0 .../main/ets/MainAbility/pages/Progress.ets | 0 .../src/main/ets/MainAbility/pages/Qrcode.ets | 0 .../src/main/ets/MainAbility/pages/Rating.ets | 0 .../main/ets/MainAbility/pages/RowSplit.ets | 0 .../src/main/ets/MainAbility/pages/Scroll.ets | 0 .../src/main/ets/MainAbility/pages/Slider.ets | 0 .../src/main/ets/MainAbility/pages/Span.ets | 0 .../src/main/ets/MainAbility/pages/Stack.ets | 0 .../src/main/ets/MainAbility/pages/Text.ets | 0 .../src/main/ets/MainAbility/pages/index.ets | 0 .../main/ets/MainAbility/test/List.test.ets | 24 + .../MainAbility/test/ObserverJsunit.test.ets | 53 +- .../src/main/ets/MainAbility/test/Utils.ets | 0 .../main/ets/MainAbility/test/lib/Const.js | 0 .../main/resources/base/element/string.json | 0 .../src/main/resources/base/media/icon.png | Bin .../entry/src/main/resources/rawfile/hand.png | Bin .../entry/src/main/resources/rawfile/icon.png | Bin .../src/main/resources/rawfile/images.jpg | Bin .../src/main/resources/rawfile/person.png | Bin .../src/main/resources/rawfile/star-1-1.png | Bin .../src/main/resources/rawfile/star-1-2.png | Bin .../src/main/resources/rawfile/star-1-3.png | Bin .../src/main/resources/rawfile/video/show.mp4 | 0 .../signature/openharmony_sx.p7b | Bin .../telephonyjstest/radiostatistic/BUILD.gn | 32 + .../{new_add => radiostatistic}/Test.json | 4 +- .../radiostatistic/entry/src/main/config.json | 139 ++ .../entry/src/main/ets/MainAbility/app.ets | 23 + .../src/main/ets/MainAbility/pages/Badge.ets | 95 + .../src/main/ets/MainAbility/pages/Blank.ets | 47 + .../src/main/ets/MainAbility/pages/Button.ets | 70 + .../src/main/ets/MainAbility/pages/Column.ets | 51 + .../ets/MainAbility/pages/ColumnSplit.ets | 70 + .../main/ets/MainAbility/pages/Counter.ets | 51 + .../main/ets/MainAbility/pages/DataPanel.ets | 69 + .../main/ets/MainAbility/pages/Divider.ets | 71 + .../src/main/ets/MainAbility/pages/Flex.ets | 135 ++ .../ets/MainAbility/pages/GridContainer.ets | 170 ++ .../src/main/ets/MainAbility/pages/Image.ets | 90 + .../main/ets/MainAbility/pages/Navigator.ets | 60 + .../src/main/ets/MainAbility/pages/Panel.ets | 96 + .../main/ets/MainAbility/pages/Progress.ets | 76 + .../src/main/ets/MainAbility/pages/Qrcode.ets | 44 + .../src/main/ets/MainAbility/pages/Rating.ets | 63 + .../main/ets/MainAbility/pages/RowSplit.ets | 78 + .../src/main/ets/MainAbility/pages/Scroll.ets | 200 ++ .../src/main/ets/MainAbility/pages/Slider.ets | 82 + .../src/main/ets/MainAbility/pages/Span.ets | 64 + .../src/main/ets/MainAbility/pages/Stack.ets | 103 + .../src/main/ets/MainAbility/pages/Text.ets | 237 ++ .../src/main/ets/MainAbility/pages/index.ets | 65 + .../ets/MainAbility/test/CallJsunit.test.ets | 358 +-- .../test/ConvertOptionsJsunit.test.ets | 158 +- .../ets/MainAbility/test/DataJsunit.test.ets | 0 .../main/ets/MainAbility/test/List.test.ets | 4 - .../ets/MainAbility/test/RadioJsunit.test.ets | 88 +- .../test/RadioSecondJsunit.test.ets | 105 +- .../MainAbility/test/SmsMmsJsunit.test.ets | 160 ++ .../test/StatisticsJsunit.test.ets | 40 +- .../src/main/ets/MainAbility/test/Utils.ets | 119 + .../main/ets/MainAbility/test/lib/Const.js | 36 + .../main/resources/base/element/string.json | 12 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../entry/src/main/resources/rawfile/hand.png | Bin 0 -> 976 bytes .../entry/src/main/resources/rawfile/icon.png | Bin 0 -> 6790 bytes .../src/main/resources/rawfile/images.jpg | Bin 0 -> 3377 bytes .../src/main/resources/rawfile/person.png | Bin 0 -> 1636 bytes .../src/main/resources/rawfile/star-1-1.png | Bin 0 -> 5326 bytes .../src/main/resources/rawfile/star-1-2.png | Bin 0 -> 8295 bytes .../src/main/resources/rawfile/star-1-3.png | Bin 0 -> 5545 bytes .../src/main/resources/rawfile/video/show.mp4 | 0 .../signature/openharmony_sx.p7b | Bin 0 -> 3443 bytes .../entry/src/main/js/test/SimManager.test.js | 1435 +----------- .../src/main/js/test/SmsMmsError.test.js | 780 +------ 109 files changed, 3120 insertions(+), 6492 deletions(-) delete mode 100644 telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/SimJsunit.test.ets delete mode 100644 telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/SmsMmsJsunit.test.ets rename telephony/telephonyjstest/{new_add => observer}/BUILD.gn (93%) create mode 100644 telephony/telephonyjstest/observer/Test.json rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/config.json (97%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/app.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Badge.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Blank.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Button.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Column.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/ColumnSplit.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Counter.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/DataPanel.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Divider.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Flex.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/GridContainer.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Image.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Navigator.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Panel.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Progress.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Qrcode.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Rating.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/RowSplit.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Scroll.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Slider.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Span.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Stack.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/Text.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/pages/index.ets (100%) create mode 100644 telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/test/List.test.ets rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/test/ObserverJsunit.test.ets (93%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/test/Utils.ets (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/ets/MainAbility/test/lib/Const.js (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/resources/base/element/string.json (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/resources/base/media/icon.png (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/resources/rawfile/hand.png (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/resources/rawfile/icon.png (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/resources/rawfile/images.jpg (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/resources/rawfile/person.png (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/resources/rawfile/star-1-1.png (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/resources/rawfile/star-1-2.png (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/resources/rawfile/star-1-3.png (100%) rename telephony/telephonyjstest/{new_add => observer}/entry/src/main/resources/rawfile/video/show.mp4 (100%) rename telephony/telephonyjstest/{new_add => observer}/signature/openharmony_sx.p7b (100%) create mode 100644 telephony/telephonyjstest/radiostatistic/BUILD.gn rename telephony/telephonyjstest/{new_add => radiostatistic}/Test.json (78%) create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/config.json create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/app.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Badge.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Blank.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Button.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Column.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/ColumnSplit.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Counter.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/DataPanel.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Divider.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Flex.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/GridContainer.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Image.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Navigator.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Panel.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Progress.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Qrcode.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Rating.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/RowSplit.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Scroll.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Slider.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Span.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Stack.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Text.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/index.ets rename telephony/telephonyjstest/{new_add => radiostatistic}/entry/src/main/ets/MainAbility/test/CallJsunit.test.ets (61%) rename telephony/telephonyjstest/{new_add => radiostatistic}/entry/src/main/ets/MainAbility/test/ConvertOptionsJsunit.test.ets (88%) rename telephony/telephonyjstest/{new_add => radiostatistic}/entry/src/main/ets/MainAbility/test/DataJsunit.test.ets (100%) rename telephony/telephonyjstest/{new_add => radiostatistic}/entry/src/main/ets/MainAbility/test/List.test.ets (89%) rename telephony/telephonyjstest/{new_add => radiostatistic}/entry/src/main/ets/MainAbility/test/RadioJsunit.test.ets (76%) rename telephony/telephonyjstest/{new_add => radiostatistic}/entry/src/main/ets/MainAbility/test/RadioSecondJsunit.test.ets (68%) create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/SmsMmsJsunit.test.ets rename telephony/telephonyjstest/{new_add => radiostatistic}/entry/src/main/ets/MainAbility/test/StatisticsJsunit.test.ets (97%) create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/Utils.ets create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/lib/Const.js create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/resources/base/element/string.json create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/resources/base/media/icon.png create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/resources/rawfile/hand.png create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/resources/rawfile/icon.png create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/resources/rawfile/images.jpg create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/resources/rawfile/person.png create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/resources/rawfile/star-1-1.png create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/resources/rawfile/star-1-2.png create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/resources/rawfile/star-1-3.png create mode 100644 telephony/telephonyjstest/radiostatistic/entry/src/main/resources/rawfile/video/show.mp4 create mode 100644 telephony/telephonyjstest/radiostatistic/signature/openharmony_sx.p7b diff --git a/telephony/telephonyjstest/BUILD.gn b/telephony/telephonyjstest/BUILD.gn index f1aa3363f..6593a125f 100644 --- a/telephony/telephonyjstest/BUILD.gn +++ b/telephony/telephonyjstest/BUILD.gn @@ -23,7 +23,8 @@ group("telephonyjstest") { "netmanager_http:ActsNetManagerHttpEtsTest", "netmanager_socket:ActsNetManagerSocketEtsTest", "network_search:network_search", - "new_add:ActsNewAddEtsTest", + "observer:ActsObserverEtsTest", + "radiostatistic:ActsRadiostatisticEtsTest", "sim:sim", "sms_mms:sms_mms", ] diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/CallManageAll.test.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/CallManageAll.test.js index b4782c54a..294c25845 100644 --- a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/CallManageAll.test.js +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/CallManageAll.test.js @@ -183,126 +183,7 @@ describe('CallManageImsCall', function () { callDetailsChangeOff(); console.log('Telephony_CallManager all 54 case is over for callmanager CallManageImsCall'); }); - - /** - * @tc.number Telephony_CallManager_IMS_combineConference_Async_0100 - * @tc.name Run the function combineConference by args callId CALL_ID_NOT_EXIST by callback, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_combineConference_Async_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_combineConference_Async_0100'; - call.combineConference(CALL_ID_NOT_EXIST, (error, data) => { - if (error) { - console.log(`${caseName} combineConference ${CALL_ID_NOT_EXIST} error,case success,error:${ - toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} combineConference success,case failed,data:${toString(data)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_combineConference_Promise_0100 - * @tc.name Run the function combineConference by args callId CALL_ID_NOT_EXIST by promise, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_combineConference_Promise_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_combineConference_Promise_0100'; - call.combineConference(CALL_ID_NOT_EXIST).then(data => { - expect().assertFail(); - console.log(`${caseName} combineConference success,case failed,data:${toString(data)}`); - done(); - }).catch(error => { - console.log(`${caseName} combineConference ${CALL_ID_NOT_EXIST} error,case success,error:${ - toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_separateConference_Async_0100 - * @tc.name Run the function separateConference by args callId CALL_ID_NOT_EXIST by callback, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_separateConference_Async_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_separateConference_Async_0100'; - call.separateConference(CALL_ID_NOT_EXIST, (error, data) => { - if (error) { - console.log(`${caseName} separateConference ${CALL_ID_NOT_EXIST} error,case success,error:${ - toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} separateConference success,case failed,data:${toString(data)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_separateConference_Promise_0100 - * @tc.name Run the function separateConference by args callId CALL_ID_NOT_EXIST by promise, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_separateConference_Promise_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_separateConference_Promise_0100'; - call.separateConference(CALL_ID_NOT_EXIST).then(data => { - expect().assertFail(); - console.log(`${caseName} separateConference success,case failed,data:${toString(data)}`); - done(); - }).catch(error => { - console.log(`${caseName} separateConference ${CALL_ID_NOT_EXIST} error,case success,error:${ - toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_joinConference_Async_0100 - * @tc.name Run the function joinConference by args mainCallId CALL_ID_NOT_EXIST, - * callNumberList PHONE_LIST2 by callback,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_joinConference_Async_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_joinConference_Async_0100'; - call.joinConference(CALL_ID_NOT_EXIST, PHONE_LIST2, (error, data) => { - if (error) { - console.log(`${caseName} joinConference ${CALL_ID_NOT_EXIST} error,case success,error:${ - toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} joinConference success,case failed,data:${toString(data)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_joinConference_Promise_0100 - * @tc.name Run the function joinConference by args mainCallId CALL_ID_NOT_EXIST, - * callNumberList PHONE_LIST2 by promise,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_joinConference_Promise_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_joinConference_Promise_0100'; - call.joinConference(CALL_ID_NOT_EXIST, PHONE_LIST2).then(data => { - expect().assertFail(); - console.log(`${caseName} joinConference success,case failed,data:${toString(data)}`); - done(); - }).catch(error => { - console.log(`${caseName} joinConference ${CALL_ID_NOT_EXIST} error,case success,error:${toString(error)}`); - done(); - }); - }); - + /** * @tc.number Telephony_CallManager_IMS_enableLteEnhanceMode_Async_0400 * @tc.name Run the function enableLteEnhanceMode by args slotId SLOT_ID_INVALID, @@ -491,1083 +372,175 @@ describe('CallManageImsCall', function () { }); }); - /** - * @tc.number Telephony_CallManager_IMS_updateImsCallMode_Async_0700 - * @tc.name Run function updateImsCallMode by args callId CALL_ID_NOT_EXIST, - * mode CALL_MODE_SEND_RECEIVE by callback,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_updateImsCallMode_Async_0700', 0, async function (done) { - let caseName = 'Telephony_CallManager_IMS_updateImsCallMode_Async_0700'; - call.updateImsCallMode(CALL_ID_NOT_EXIST, CALL_MODE_SEND_RECEIVE, (error, data) => { - if (error) { - console.log(`${caseName} updateImsCallMode2 error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} updateImsCallMode2 success,case failed,data:${toString(data)}`); - done(); - }); - }); /** - * @tc.number Telephony_CallManager_IMS_updateImsCallMode_Promise_0700 - * @tc.name Run function updateImsCallMode by args callId CALL_ID_NOT_EXIST, - * mode CALL_MODE_SEND_RECEIVE by promise, - * the function return error + * @tc.number Telephony_CallManager_controlCamera_Async_0200 + * @tc.name Dial a call and after answering the call,run function controlCamera by + * args cameraId CARMER_ID_NOT_EXIT by callback, + * the callback function return error * @tc.desc Function test */ - it('Telephony_CallManager_IMS_updateImsCallMode_Promise_0700', 0, async function (done) { - let caseName = 'Telephony_CallManager_IMS_updateImsCallMode_Promise_0700'; - call.updateImsCallMode(CALL_ID_NOT_EXIST, CALL_MODE_SEND_RECEIVE).then(data => { - expect().assertFail(); - console.log(`${caseName} updateImsCallMode success,case failed,data:${toString(data)}`); - done(); + it('Telephony_CallManager_controlCamera_Async_0200', 0, function (done) { + let caseName = 'Telephony_CallManager_controlCamera_Async_0200'; + scenceInCalling({ + caseName:caseName, + phoneNumber:AUTO_ACCEPT_NUMBER2, + checkState:CALL_STATUS_DIALING + }).then(data => { + callId = data.callId; + let cameraId = CARMER_ID_NOT_EXIT; + call.controlCamera(cameraId, (error) => { + if (error) { + console.log(`${caseName} error,case success,error:${toString(error)}`); + hangupCall2(caseName, done, callId); + return; + } + console.log(`${caseName} case failed`); + expect().assertFail(); + hangupCall2(caseName, done, callId); + }); }).catch(error => { - console.log(`${caseName} updateImsCallMode error,case success,error:${toString(error)}`); + console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); done(); }); }); /** - * @tc.number Telephony_CallManager_IMS_holdCall_Async_0100 - * @tc.name Run the function holdCall by args callId CALL_ID_NOT_EXIST by callback,the function return error + * @tc.number Telephony_CallManager_controlCamera_Promise_0200 + * @tc.name Dial a call and after answering the call,run function controlCamera by args cameraId + * CARMER_ID_NOT_EXIT by promise,the function return error * @tc.desc Function test */ - it('Telephony_CallManager_IMS_holdCall_Async_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_holdCall_Async_0100'; - call.holdCall(CALL_ID_NOT_EXIST, (error, data) => { - if (error) { - console.log(`${caseName} holdCall ${CALL_ID_NOT_EXIST} error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} holdCall success,case failed,data:${toString(data)}`); + it('Telephony_CallManager_controlCamera_Promise_0200', 0, async function (done) { + let caseName = 'Telephony_CallManager_controlCamera_Promise_0200'; + let cameraId = CARMER_ID_NOT_EXIT; + try { + let data = await scenceInCalling({ + caseName:caseName, + phoneNumber:AUTO_ACCEPT_NUMBER2, + checkState:CALL_STATUS_DIALING + }); + callId = data.callId; + } catch (error) { + console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); done(); - }); + return; + } + try { + await call.controlCamera(cameraId); + console.log(`${caseName} case failed`); + expect().assertFail(); + } catch (err) { + console.log(`${caseName} case success. error:${toString(err)}`); + } + hangupCall2(caseName, done, callId); }); /** - * @tc.number Telephony_CallManager_IMS_holdCall_Promise_0100 - * @tc.name Run the function holdCall by args callId CALL_ID_NOT_EXIST by promise,the function return error + * @tc.number Telephony_CallManager_setPreviewWindow_Async_0300 + * @tc.name Dial a call and after answering the call,run function setPreviewWindow by args + * x POS_700,y POS_10,z POS_Z_ERROR,width POS_LENGTH_300,height POS_LENGTH_600 by callback, + * the callback function return error * @tc.desc Function test */ - it('Telephony_CallManager_IMS_holdCall_Promise_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_holdCall_Promise_0100'; - call.holdCall(CALL_ID_NOT_EXIST).then(data => { - expect().assertFail(); - console.log(`${caseName} holdCall success,case failed,data:${toString(data)}`); - done(); + it('Telephony_CallManager_setPreviewWindow_Async_0300', 0, function (done) { + let caseName = 'Telephony_CallManager_setPreviewWindow_Async_0300'; + scenceInCalling({ + caseName:caseName, + phoneNumber:AUTO_ACCEPT_NUMBER, + checkState:CALL_STATUS_DIALING + }).then(data => { + callId = data.callId; + let info = {x: POS_700, y: POS_10, z: POS_Z_ERROR, width: POS_LENGTH_300, height: POS_LENGTH_600}; + call.setPreviewWindow(info, (error) => { + if (error) { + console.log(`${caseName} error,case success,error:${toString(error)}`); + hangupCall2(caseName, done, callId); + return; + } + console.log(`${caseName} case faild`); + expect().assertFail(); + hangupCall2(caseName, done, callId); + }); }).catch(error => { - console.log(`${caseName} holdCall ${CALL_ID_NOT_EXIST} error,case success,error:${toString(error)}`); + console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); done(); }); }); /** - * @tc.number Telephony_CallManager_IMS_unHoldCall_Async_0100 - * @tc.name Run the function unHoldCall by args callId CALL_ID_NOT_EXIST by callback,the function return error + * @tc.number Telephony_CallManager_setPreviewWindow_Promise_0300 + * @tc.name Dial a call and after answering the call,run function setPreviewWindow by args + * x POS_700,y POS_10,z POS_Z_ERROR,width POS_LENGTH_300,height POS_LENGTH_600 by promise, + * the function return error * @tc.desc Function test */ - it('Telephony_CallManager_IMS_unHoldCall_Async_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_unHoldCall_Async_0100'; - call.unHoldCall(CALL_ID_NOT_EXIST, (error, data) => { - if (error) { - console.log(`${caseName} unHoldCall ${CALL_ID_NOT_EXIST} error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} unHoldCall success,case failed,data:${toString(data)}`); + it('Telephony_CallManager_setPreviewWindow_Promise_0300', 0, async function (done) { + let caseName = 'Telephony_CallManager_setPreviewWindow_Promise_0300'; + try { + let data = await scenceInCalling({ + caseName:caseName, + phoneNumber:AUTO_ACCEPT_NUMBER, + checkState:CALL_STATUS_DIALING + }); + callId = data.callId; + } catch (error) { + console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_unHoldCall_Promise_0100 - * @tc.name Run the function unHoldCall by args callId CALL_ID_NOT_EXIST by promise,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_unHoldCall_Promise_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_unHoldCall_Promise_0100'; - call.unHoldCall(CALL_ID_NOT_EXIST).then(data => { + return; + } + try { + let info = {x: POS_700, y: POS_10, z: POS_Z_ERROR, width: POS_LENGTH_300, height: POS_LENGTH_600}; + await call.setPreviewWindow(info); + console.log(`${caseName} case faild`); expect().assertFail(); - console.log(`${caseName} unHoldCall success,case failed,data:${toString(data)}`); - done(); - }).catch(error => { - console.log(`${caseName} unHoldCall ${CALL_ID_NOT_EXIST} error,case success,error:${toString(error)}`); - done(); - }); + } catch (error) { + console.log(`${caseName} error,case success,error:${toString(error)}`); + } + hangupCall2(caseName, done, callId); }); /** - * @tc.number Telephony_CallManager_IMS_switchCall_Async_0100 - * @tc.name Run the function switchCall by args callId CALL_ID_NOT_EXIST by callback,the function return error + * @tc.number Telephony_CallManager_setDisplayWindow_Async_0300 + * @tc.name Dial a call and after answering the call,run function setDisplayWindow by args + * x POS_700,y POS_10,z POS_Z_ERROR,width POS_LENGTH_300,height POS_LENGTH_600 by callback, + * the callback function return error * @tc.desc Function test */ - it('Telephony_CallManager_IMS_switchCall_Async_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_switchCall_Async_0100'; - call.switchCall(CALL_ID_NOT_EXIST, (error, data) => { - if (error) { - console.log(`${caseName} switchCall ${CALL_ID_NOT_EXIST} error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} switchCall ${CALL_ID_NOT_EXIST} success,case failed,data:${toString(data)}`); + it('Telephony_CallManager_setDisplayWindow_Async_0300', 0, async function (done) { + let caseName = 'Telephony_CallManager_setDisplayWindow_Async_0300'; + try { + let data = await scenceInCalling({ + caseName:caseName, + phoneNumber:AUTO_ACCEPT_NUMBER, + checkState:CALL_STATUS_DIALING + }); + callId = data.callId; + } catch (error) { + console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_switchCall_Promise_0100 - * @tc.name Run the function switchCall by args callId CALL_ID_NOT_EXIST by promise,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_switchCall_Promise_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_switchCall_Promise_0100'; - call.switchCall(CALL_ID_NOT_EXIST).then(data => { + return; + } + try { + let info = {x: POS_700, y: POS_10, z: POS_Z_ERROR, width: POS_LENGTH_300, height: POS_LENGTH_600}; + await call.setDisplayWindow(info); + console.log(`${caseName} case faild`); expect().assertFail(); - console.log(`${caseName} switchCall ${CALL_ID_NOT_EXIST} success,case failed,data:${toString(data)}`); - done(); - }).catch(error => { - console.log(`${caseName} switchCall ${CALL_ID_NOT_EXIST} error,case success,error:${toString(error)}`); - done(); - }); + } catch (error) { + console.log(`${caseName} error,case success,error:${toString(error)}`); + } + hangupCall2(caseName, done, callId); }); /** - * @tc.number Telephony_CallManager_IMS_USSD_dial_Async_0600 - * @tc.name Run the function dial by args phoneNumber COMMAND_CALL_ERROR options - * {accountId:DEFAULT_SLOT_ID,videoState:MEDIA_TYPE_VOICE,dialScene:DIAL_SCENCE_CALL_PRIVILEGED, - * dialType:DIAL_CARRIER_TYPE} by callback,the function return true + * @tc.number Telephony_CallManager_setDisplayWindow_Promise_0300 + * @tc.name Dial a call and after answering the call,run function setDisplayWindow by args + * x POS_700,y POS_10,z POS_Z_ERROR,width POS_LENGTH_300,height POS_LENGTH_600 by promise, + * the function return error * @tc.desc Function test */ - it('Telephony_CallManager_IMS_USSD_dial_Async_0600', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_USSD_dial_Async_0600'; - call.dial(COMMAND_CALL_ERROR, {accountId:DEFAULT_SLOT_ID, videoState:MEDIA_TYPE_VOICE, - dialScene:DIAL_SCENCE_CALL_PRIVILEGED, dialType:DIAL_CARRIER_TYPE}, (error, data) => { - if (error) { - expect().assertFail(); - console.log(`${caseName} dial error,case failed,error:${toString(error)}`); - done(); - return; - } - expect(data).assertTrue(); - console.log(`${caseName} dial success,case ${data === true ? 'success' : - 'failed'},data:${toString(data)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_USSD_dial_Promise_0600 - * @tc.name Run the function dial by args phoneNumber COMMAND_CALL_ERROR4 options - * {accountId:DEFAULT_SLOT_ID,videoState:MEDIA_TYPE_VOICE,dialScene:DIAL_SCENCE_CALL_PRIVILEGED, - * dialType:DIAL_CARRIER_TYPE} by promise,the function return true - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_USSD_dial_Promise_0600', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_USSD_dial_Promise_0600'; - call.dial(COMMAND_CALL_ERROR4, {accountId:DEFAULT_SLOT_ID, videoState:MEDIA_TYPE_VOICE, - dialScene:DIAL_SCENCE_CALL_PRIVILEGED, dialType:DIAL_CARRIER_TYPE}).then(data => { - expect(data).assertTrue(); - console.log(`${caseName} dial success,case ${data === true ? 'success' : 'failed'},data:${toString(data)}`); - done(); - }).catch(error => { - expect().assertFail(); - console.log(`${caseName} dial error,case failed,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_enableImsSwitch_Async_0400 - * @tc.name Run the function enableImsSwitch by args callId SLOT_ID_INVALID by callback,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_enableImsSwitch_Async_0400', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_enableImsSwitch_Async_0400'; - call.enableImsSwitch(SLOT_ID_INVALID, (error, data) => { - if (error) { - console.log(`${caseName} enableImsSwitch error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} enableImsSwitch success,case failed,data:${toString(data)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_enableImsSwitch_Promise_0400 - * @tc.name Run the function enableImsSwitch by args callId SLOT_ID_INVALID by promise,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_enableImsSwitch_Promise_0400', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_enableImsSwitch_Promise_0400'; - call.enableImsSwitch(SLOT_ID_INVALID).then(data => { - expect().assertFail(); - console.log(`${caseName} enableImsSwitch success,case failed,data:${toString(data)}`); - done(); - }).catch(error => { - console.log(`${caseName} enableImsSwitch error,case success,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_disableImsSwitch_Async_0600 - * @tc.name Run the function disableImsSwitch by args callId SLOT_ID_INVALID by callback, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_disableImsSwitch_Async_0600', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_disableImsSwitch_Async_0600'; - call.disableImsSwitch(SLOT_ID_INVALID, (error, data) => { - if (error) { - console.log(`${caseName} disableImsSwitch error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} disableImsSwitch success,case failed,data:${toString(data)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_disableImsSwitch_Promise_0600 - * @tc.name Run the function disableImsSwitch by args callId SLOT_ID_INVALID by promise,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_disableImsSwitch_Promise_0600', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_disableImsSwitch_Promise_0600'; - call.disableImsSwitch(SLOT_ID_INVALID).then(data => { - expect().assertFail(); - console.log(`${caseName} disableImsSwitch success,case failed,data:${toString(data)}`); - done(); - }).catch(error => { - console.log(`${caseName} disableImsSwitch error,case success,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_isImsSwitchEnabled_Async_0500 - * @tc.name Run the function isImsSwitchEnabled by args callId SLOT_ID_INVALID by callback, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_isImsSwitchEnabled_Async_0500', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_isImsSwitchEnabled_Async_0500'; - call.isImsSwitchEnabled(SLOT_ID_INVALID, (error, data) => { - if (error) { - console.log(`${caseName} isImsSwitchEnabled error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} isImsSwitchEnabled success,case failed,data:${toString(data)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_isImsSwitchEnabled_Promise_0500 - * @tc.name Run the function isImsSwitchEnabled by args callId SLOT_ID_INVALID by promise, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_isImsSwitchEnabled_Promise_0500', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_isImsSwitchEnabled_Promise_0500'; - call.isImsSwitchEnabled(SLOT_ID_INVALID).then(data => { - expect().assertFail(); - console.log(`${caseName} isImsSwitchEnabled success,case failed,data:${toString(data)}`); - done(); - }).catch(error => { - console.log(`${caseName} isImsSwitchEnabled error,case success,error:${toString(error)}`); - done(); - }); - }); - - - /** - * @tc.number Telephony_CallManager_IMS_setCallTransfer_Async_1300 - * @tc.name Run function setCallTransfer by args slotId SLOT_ID_INVALID,settingType CALL_TRANSFER_DISABLE, - * type TRANSFER_TYPE_NO_REPLY,transferNum PHONE_NUMBER_LENGTH_11 by callback, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_setCallTransfer_Async_1300', 0, async function (done) { - let caseName = 'Telephony_CallManager_IMS_setCallTransfer_Async_1300'; - call.setCallTransfer(SLOT_ID_INVALID, { - settingType:CALL_TRANSFER_DISABLE, - type:TRANSFER_TYPE_NO_REPLY, - transferNum:PHONE_NUMBER_LENGTH_11 - }, (error, data) => { - if (error) { - console.log(`${caseName} case success, error:${toString(error)}`); - done(); - return; - } - console.log(`${caseName} case failed,data:${toString(data)}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_setCallTransfer_Promise_1300 - * @tc.name Run function setCallTransfer by args slotId SLOT_ID_INVALID,settingType CALL_TRANSFER_DISABLE, - * type TRANSFER_TYPE_UNCONDITIONAL,transferNum PHONE_NUMBER_AREA_LAND by promise, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_setCallTransfer_Promise_1300', 0, async function (done) { - let caseName = 'Telephony_CallManager_IMS_setCallTransfer_Promise_1300'; - try { - let data = await call.setCallTransfer(SLOT_ID_INVALID, { - settingType:CALL_TRANSFER_DISABLE, - type:TRANSFER_TYPE_UNCONDITIONAL, - transferNum:PHONE_NUMBER_AREA_LAND - }); - console.log(`${caseName} case failed,data:${toString(data)}`); - expect().assertFail(); - } catch (err) { - console.log(`${caseName} case success, err:${toString(err)}`); - } - done(); - }); - - /** - * @tc.number Telephony_CallManager_IMS_getCallTransferInfo_Async_1500 - * @tc.name Run function getCallTransferInfo by args slotId SLOT_ID_INVALID, - * type TRANSFER_TYPE_UNCONDITIONAL by callback, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_getCallTransferInfo_Async_1500', 0, async function (done) { - let caseName = 'Telephony_CallManager_IMS_getCallTransferInfo_Async_1500'; - call.getCallTransferInfo(SLOT_ID_INVALID, TRANSFER_TYPE_UNCONDITIONAL, (error, data) => { - if (error) { - console.log(`${caseName} getCallTransferInfo error, case success. error:${toString(error)}`); - done(); - return; - } - console.log(`${caseName} getCallTransferInfo success,case failed,data:${toString(data)}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_getCallTransferInfo_Promise_1500 - * @tc.name Run function getCallTransferInfo by args slotId SLOT_ID_INVALID, - * type TRANSFER_TYPE_NOT_REACHABLE by promise, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_getCallTransferInfo_Promise_1500', 0, async function (done) { - let caseName = 'Telephony_CallManager_IMS_getCallTransferInfo_Promise_1500'; - try { - var data = await call.getCallTransferInfo(SLOT_ID_INVALID, TRANSFER_TYPE_NOT_REACHABLE); - console.log(`${caseName} case failed,data:${toString(data)}`); - expect().assertFail(); - } catch (err) { - console.log(`${caseName} case success. error:${toString(err)}`); - } - done(); - }); - - /** - * @tc.number Telephony_CallManager_IMS_setCallWaiting_Async_0700 - * @tc.name Run the function setCallWaiting by args slotId SLOT_ID_INVALID activate true by callback to open, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_setCallWaiting_Async_0700', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_setCallWaiting_Async_0700'; - call.setCallWaiting(SLOT_ID_INVALID, true, (error, data) => { - if (error) { - console.log(`${caseName} setCallWaiting error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} setCallWaiting success,case failed,data:${toString(data)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_setCallWaiting_Promise_0700 - * @tc.name Run the function setCallWaiting by args slotId SLOT_ID_INVALID activate true by promise to open, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_setCallWaiting_Promise_0700', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_setCallWaiting_Promise_0700'; - call.setCallWaiting(SLOT_ID_INVALID, true).then(data => { - expect().assertFail(); - console.log(`${caseName} setCallWaiting success,case failed,data:${toString(data)}`); - done(); - }).catch(error => { - console.log(`${caseName} setCallWaiting error,case success,error:${toString(error)}`); - done(); - }); - }); - - - /** - * @tc.number Telephony_CallManager_IMS_setCallRestriction_Async_1200 - * @tc.name Run function setCallRestriction by callback - * by arg slotId SLOT_ID_INVALID type RESTRICTION_TYPE_ALL_INCOMING password RIGHT_PASSWORD - * mode RESTRICTION_MODE_ACTIVATION,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_setCallRestriction_Async_1200', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_setCallRestriction_Async_1200'; - call.setCallRestriction(SLOT_ID_INVALID, { - type:RESTRICTION_TYPE_ALL_INCOMING, - password:RIGHT_PASSWORD, - mode:RESTRICTION_MODE_ACTIVATION - }, (error, data) => { - if (error) { - console.log(`${caseName} success,case ${error ? 'success' : 'failed'},error:${toString(error)}`); - expect(!!error).assertTrue(); - done(); - return; - } - console.log(`${caseName} error,case failed,data:${toString(data)}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_setCallRestriction_Promise_1200 - * @tc.name Run function setCallRestriction by promise - * by arg slotId SLOT_ID_INVALID type RESTRICTION_TYPE_ALL_INCOMING password RIGHT_PASSWORD - * mode RESTRICTION_MODE_ACTIVATION,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_setCallRestriction_Promise_1200', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_setCallRestriction_Promise_1200'; - call.setCallRestriction(SLOT_ID_INVALID, { - type:RESTRICTION_TYPE_ALL_INCOMING, - password:RIGHT_PASSWORD, - mode:RESTRICTION_MODE_ACTIVATION - }) - .then(data => { - console.log(`${caseName} error,case failed,data:${toString(data)}`); - expect().assertFail(); - done(); - }) - .catch((error) => { - console.log(`${caseName} success,case ${error ? 'success' : 'failed'},error:${toString(error)}`); - expect(!!error).assertTrue(); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_getCallRestrictionStatus_Async_1100 - * @tc.name Run function getCallRestrictionStatus by callback by arg slotId - * that is SLOT_ID_INVALID CallRestrictionType RESTRICTION_TYPE_ROAMING_INCOMING , - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_getCallRestrictionStatus_Async_1100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_getCallRestrictionStatus_Async_1100'; - call.getCallRestrictionStatus(SLOT_ID_INVALID, RESTRICTION_TYPE_ROAMING_INCOMING, (error, data) => { - if (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - return; - } - console.log(`${caseName} success,case faild,data:${toString(data)}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_getCallRestrictionStatus_Promise_1100 - * @tc.name Run function getCallRestrictionStatus by promise by arg slotId (that is at SLOT_ID_INVALID) - * CallRestrictionType RESTRICTION_TYPE_ROAMING_INCOMING , - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_getCallRestrictionStatus_Promise_1100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_getCallRestrictionStatus_Promise_1100'; - call.getCallRestrictionStatus(SLOT_ID_INVALID, RESTRICTION_TYPE_ROAMING_INCOMING) - .then(data => { - console.log(`${caseName} success,case failed,data:${toString(data)}`); - expect().assertFail(); - done(); - }) - .catch(error => { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_getCallWaitingStatus_Async_0500 - * @tc.name Run the function getCallWaitingStatus by args slotId SLOT_ID_INVALID by callback, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_getCallWaitingStatus_Async_0500', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_getCallWaitingStatus_Async_0500'; - call.getCallWaitingStatus(SLOT_ID_INVALID, (error, data) => { - if (error) { - console.log(`${caseName} getCallWaitingStatus error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} getCallWaitingStatus success,case failed,data:${toString(data)}`); - done(); - }); - }); - - - /** - * @tc.number Telephony_CallManager_IMS_getCallWaitingStatus_Promise_0500 - * @tc.name Run the function getCallWaitingStatus by args slotId SLOT_ID_INVALID by promise, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_getCallWaitingStatus_Promise_0500', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_getCallWaitingStatus_Promise_0500'; - call.getCallWaitingStatus(SLOT_ID_INVALID).then(data => { - expect().assertFail(); - console.log(`${caseName} getCallWaitingStatus success,case failed,data:${toString(data)}`); - done(); - }).catch(error => { - console.log(`${caseName} getCallWaitingStatus error,case success,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_controlCamera_Async_0200 - * @tc.name Dial a call and after answering the call,run function controlCamera by - * args cameraId CARMER_ID_NOT_EXIT by callback, - * the callback function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_controlCamera_Async_0200', 0, function (done) { - let caseName = 'Telephony_CallManager_controlCamera_Async_0200'; - scenceInCalling({ - caseName:caseName, - phoneNumber:AUTO_ACCEPT_NUMBER2, - checkState:CALL_STATUS_DIALING - }).then(data => { - callId = data.callId; - let cameraId = CARMER_ID_NOT_EXIT; - call.controlCamera(cameraId, (error) => { - if (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - hangupCall2(caseName, done, callId); - return; - } - console.log(`${caseName} case failed`); - expect().assertFail(); - hangupCall2(caseName, done, callId); - }); - }).catch(error => { - console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_controlCamera_Promise_0200 - * @tc.name Dial a call and after answering the call,run function controlCamera by args cameraId - * CARMER_ID_NOT_EXIT by promise,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_controlCamera_Promise_0200', 0, async function (done) { - let caseName = 'Telephony_CallManager_controlCamera_Promise_0200'; - let cameraId = CARMER_ID_NOT_EXIT; - try { - let data = await scenceInCalling({ - caseName:caseName, - phoneNumber:AUTO_ACCEPT_NUMBER2, - checkState:CALL_STATUS_DIALING - }); - callId = data.callId; - } catch (error) { - console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); - done(); - return; - } - try { - await call.controlCamera(cameraId); - console.log(`${caseName} case failed`); - expect().assertFail(); - } catch (err) { - console.log(`${caseName} case success. error:${toString(err)}`); - } - hangupCall2(caseName, done, callId); - }); - - /** - * @tc.number Telephony_CallManager_setPreviewWindow_Async_0300 - * @tc.name Dial a call and after answering the call,run function setPreviewWindow by args - * x POS_700,y POS_10,z POS_Z_ERROR,width POS_LENGTH_300,height POS_LENGTH_600 by callback, - * the callback function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setPreviewWindow_Async_0300', 0, function (done) { - let caseName = 'Telephony_CallManager_setPreviewWindow_Async_0300'; - scenceInCalling({ - caseName:caseName, - phoneNumber:AUTO_ACCEPT_NUMBER, - checkState:CALL_STATUS_DIALING - }).then(data => { - callId = data.callId; - let info = {x: POS_700, y: POS_10, z: POS_Z_ERROR, width: POS_LENGTH_300, height: POS_LENGTH_600}; - call.setPreviewWindow(info, (error) => { - if (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - hangupCall2(caseName, done, callId); - return; - } - console.log(`${caseName} case faild`); - expect().assertFail(); - hangupCall2(caseName, done, callId); - }); - }).catch(error => { - console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_setPreviewWindow_Promise_0300 - * @tc.name Dial a call and after answering the call,run function setPreviewWindow by args - * x POS_700,y POS_10,z POS_Z_ERROR,width POS_LENGTH_300,height POS_LENGTH_600 by promise, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setPreviewWindow_Promise_0300', 0, async function (done) { - let caseName = 'Telephony_CallManager_setPreviewWindow_Promise_0300'; - try { - let data = await scenceInCalling({ - caseName:caseName, - phoneNumber:AUTO_ACCEPT_NUMBER, - checkState:CALL_STATUS_DIALING - }); - callId = data.callId; - } catch (error) { - console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); - done(); - return; - } - try { - let info = {x: POS_700, y: POS_10, z: POS_Z_ERROR, width: POS_LENGTH_300, height: POS_LENGTH_600}; - await call.setPreviewWindow(info); - console.log(`${caseName} case faild`); - expect().assertFail(); - } catch (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - } - hangupCall2(caseName, done, callId); - }); - - /** - * @tc.number Telephony_CallManager_setDisplayWindow_Async_0300 - * @tc.name Dial a call and after answering the call,run function setDisplayWindow by args - * x POS_700,y POS_10,z POS_Z_ERROR,width POS_LENGTH_300,height POS_LENGTH_600 by callback, - * the callback function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setDisplayWindow_Async_0300', 0, async function (done) { - let caseName = 'Telephony_CallManager_setDisplayWindow_Async_0300'; - try { - let data = await scenceInCalling({ - caseName:caseName, - phoneNumber:AUTO_ACCEPT_NUMBER, - checkState:CALL_STATUS_DIALING - }); - callId = data.callId; - } catch (error) { - console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); - done(); - return; - } - try { - let info = {x: POS_700, y: POS_10, z: POS_Z_ERROR, width: POS_LENGTH_300, height: POS_LENGTH_600}; - await call.setDisplayWindow(info); - console.log(`${caseName} case faild`); - expect().assertFail(); - } catch (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - } - hangupCall2(caseName, done, callId); - }); - - /** - * @tc.number Telephony_CallManager_setDisplayWindow_Promise_0300 - * @tc.name Dial a call and after answering the call,run function setDisplayWindow by args - * x POS_700,y POS_10,z POS_Z_ERROR,width POS_LENGTH_300,height POS_LENGTH_600 by promise, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setDisplayWindow_Promise_0300', 0, async function (done) { - let caseName = 'Telephony_CallManager_setDisplayWindow_Promise_0300'; - try { - let data = await scenceInCalling({ - caseName:caseName, - phoneNumber:AUTO_ACCEPT_NUMBER, - checkState:CALL_STATUS_DIALING - }); - callId = data.callId; - } catch (error) { - console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); - done(); - return; - } - try { - let info = {x: POS_700, y: POS_10, z: POS_Z_ERROR, width: POS_LENGTH_300, height: POS_LENGTH_600}; - await call.setDisplayWindow(info); - console.log(`${caseName} case faild`); - expect().assertFail(); - } catch (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - } - hangupCall2(caseName, done, callId); - }); - - /** - * @tc.number Telephony_CallManager_setCameraZoom_Async_0400 - * @tc.name Dial a call and after answering the call,run function setCameraZoom by args - * zoomRatio ZOOM_RATIO_MINUS_1_0 by callback,the callback function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setCameraZoom_Async_0400', 0, function (done) { - let caseName = 'Telephony_CallManager_setCameraZoom_Async_0400'; - scenceInCalling({ - caseName:caseName, - phoneNumber:AUTO_ACCEPT_NUMBER2, - checkState:CALL_STATUS_DIALING - }).then(data => { - callId = data.callId; - call.setCameraZoom(ZOOM_RATIO_MINUS_1_0, (error) => { - if (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - hangupCall2(caseName, done, callId); - return; - } - console.log(`${caseName} case failed`); - expect().assertFail(); - hangupCall2(caseName, done, callId); - }); - }).catch(error => { - console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_setCameraZoom_Promise_0400 - * @tc.name Dial a call and after answering the call,run function setCameraZoom by args - * zoomRatio ZOOM_RATIO_MINUS_1_0 by promise,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setCameraZoom_Promise_0400', 0, async function (done) { - let caseName = 'Telephony_CallManager_setCameraZoom_Promise_0400'; - try { - let data = await scenceInCalling({ - caseName:caseName, - phoneNumber:AUTO_ACCEPT_NUMBER, - checkState:CALL_STATUS_DIALING - }); - callId = data.callId; - } catch (error) { - console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); - done(); - return; - } - try { - await call.setCameraZoom(ZOOM_RATIO_MINUS_1_0); - console.log(`${caseName} case failed`); - expect().assertFail(); - } catch (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - } - hangupCall2(caseName, done, callId); - }); - - /** - * @tc.number Telephony_CallManager_setPausePicture_Async_0500 - * @tc.name Dial a call and after answering the call,run function setPausePicture by args - * path IMAGE_LOCAL_ERROR_PATH by callback,the callback function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setPausePicture_Async_0500', 0, function (done) { - let caseName = 'Telephony_CallManager_setPausePicture_Async_0500'; - scenceInCalling({ - caseName:caseName, - phoneNumber:AUTO_ACCEPT_NUMBER, - checkState:CALL_STATUS_DIALING - }).then(data => { - callId = data.callId; - call.setPausePicture(IMAGE_LOCAL_ERROR_PATH, (error) => { - if (error) { - console.log(`${caseName} case success,error:${toString(error)}`); - hangupCall2(caseName, done, callId); - return; - } - console.log(`${caseName} success,case failed`); - hangupCall2(caseName, done, callId); - }); - }).catch(error => { - console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_setPausePicture_Promise_0500 - * @tc.name Dial a call and after answering the call,run function setPausePicture - * by args path IMAGE_LOCAL_ERROR_PATH by promise, - * the callback function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setPausePicture_Promise_0500', 0, async function (done) { - let caseName = 'Telephony_CallManager_setPausePicture_Promise_0500'; - try { - let data = await scenceInCalling({ - caseName:caseName, - phoneNumber:AUTO_ACCEPT_NUMBER, - checkState:CALL_STATUS_DIALING - }); - callId = data.callId; - } catch (error) { - console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); - done(); - return; - } - try { - await call.setPausePicture(IMAGE_LOCAL_ERROR_PATH); - console.log(`${caseName} success,case failed`); - } catch (error) { - console.log(`${caseName} case success,error:${toString(error)}`); - } - hangupCall2(caseName, done, callId); - }); - - /** - * @tc.number Telephony_CallManager_setDeviceDirection_Async_0500 - * @tc.name Dial a call and after answering the call,run function setDeviceDirection - * by args rotation ROTATION_MINUS_1 by callback,the callback function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setDeviceDirection_Async_0500', 0, function (done) { - let caseName = 'Telephony_CallManager_setDeviceDirection_Async_0500'; - scenceInCalling({ - caseName:caseName, - phoneNumber:AUTO_ACCEPT_NUMBER, - checkState:CALL_STATUS_DIALING - }).then(data => { - callId = data.callId; - call.setDeviceDirection(ROTATION_MINUS_1, (error) => { - if (error) { - console.log(`${caseName} success, case success`); - hangupCall2(caseName, done, callId); - return; - } - console.log(`${caseName} error,case failed,error:${toString(error)}`); - expect().assertFail(); - hangupCall2(caseName, done, callId); - }); - }).catch(error => { - console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_setDeviceDirection_Promise_0500 - * @tc.name Dial a call and after answering the call,run function setDeviceDirection - * by args rotation ROTATION_MINUS_1 by promise,the callback function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setDeviceDirection_Promise_0500', 0, async function (done) { - let caseName = 'Telephony_CallManager_setDeviceDirection_Promise_0500'; - try { - let data = await scenceInCalling({ - caseName:caseName, - phoneNumber:AUTO_ACCEPT_NUMBER2, - checkState:CALL_STATUS_DIALING - }); - callId = data.callId; - } catch (error) { - console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); - done(); - return; - } - try { - await call.setDeviceDirection(ROTATION_MINUS_1); - console.log(`${caseName} success,case error`); - expect().assertFail(); - } catch (error) { - console.log(`${caseName} case success,error:${toString(error)}`); - } - hangupCall2(caseName, done, callId); - }); - - /** - * @tc.number Telephony_CallManager_IMS_dial_Async_0600 - * @tc.name Dial a call by function dial by args phoneNumber NULL_PHONE_NUMBER options - * {accountId: DEFAULT_SLOT_ID, videoState: MEDIA_TYPE_VOICE, dialScene: DIAL_SCENCE_CALL_PRIVILEGED, - * dialType:DIAL_CARRIER_TYPE} by callback,the callback function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_dial_Async_0600', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_dial_Async_0600'; - let flag = true; - reachState(caseName, CALL_STATUS_DIALING, '', false).then(data => { - callId = data.callId; - console.log(`${caseName} reachState success,case failed,data:${toString(data)}`); - expect().assertFail(); - hangupCall2(caseName, done, callId); - }).catch(error => { - console.log(`${caseName} reachState error,case ${flag ? 'success' : 'failed'},error:${toString(error)}`); - expect(flag).assertTrue(); - done(); - }); - let obj = {accountId: DEFAULT_SLOT_ID, videoState: MEDIA_TYPE_VOICE, - dialScene: DIAL_SCENCE_CALL_PRIVILEGED, dialType:DIAL_CARRIER_TYPE}; - call.dial(NULL_PHONE_NUMBER, obj, (error, data) => { - if (error) { - console.log(`${caseName} dial error,error:${toString(error)}`); - flag = true; - return; - } - flag = false; - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_dial_Promise_0100 - * @tc.name Dial a call by function dial by args phoneNumber PHONE_NUMBER_LONG by promise, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_dial_Promise_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_dial_Promise_0100'; - let flag = true; - reachState(caseName, CALL_STATUS_DIALING, '', false).then(data => { - callId = data.callId; - console.log(`${caseName} reachState success,case failed,data:${toString(data)}`); - expect().assertFail(); - hangupCall2(caseName, done, callId); - }).catch(error => { - console.log(`${caseName} reachState error,case ${flag ? 'success' : 'failed'},error:${toString(error)}`); - expect(flag).assertTrue(); - done(); - }); - call.dial(PHONE_NUMBER_LONG).then(data => { - flag = false; - }).catch(error => { - console.log(`${caseName} dial error,error:${toString(error)}`); - flag = true; - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_answer_Async_0100 - * @tc.name Run function answer by args callId BOUNDARY_NUMBER_INT by callback, - * the callback function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_answer_Async_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_answer_Async_0100'; - call.answer(BOUNDARY_NUMBER_INT, (error) => { - if (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} success,case failed`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_answer_Promise_0100 - * @tc.name Run function answer by args callId CALL_ID_NOT_EXIST by promise, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_answer_Promise_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_answer_Promise_0100'; - call.answer(CALL_ID_NOT_EXIST).then(() => { - expect().assertFail(); - console.log(`${caseName} success,case failed`); - done(); - }).catch(error => { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_reject_Async_0100 - * @tc.name Run function reject by args callId BOUNDARY_NUMBER_INT by callback, - * the callback function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_reject_Async_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_reject_Async_0100'; - call.reject(BOUNDARY_NUMBER_INT, (error) => { - if (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} success,case failed`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_reject_Promise_0100 - * @tc.name Run function reject by args callId CALL_ID_NOT_EXIST by promise, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_reject_Promise_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_reject_Promise_0100'; - call.reject(CALL_ID_NOT_EXIST).then(() => { - expect().assertFail(); - console.log(`${caseName} success,case failed`); - done(); - }).catch(error => { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_reject_Promise_0400 - * @tc.name Test the function runs 10 times, stability test - * @tc.desc Function test - */ - it('Telephony_CallManager_reject_Promise_0400', 0, async function (done) { - let caseName = 'Telephony_CallManager_reject_Promise_0400'; - let callId = null; + it('Telephony_CallManager_setDisplayWindow_Promise_0300', 0, async function (done) { + let caseName = 'Telephony_CallManager_setDisplayWindow_Promise_0300'; try { let data = await scenceInCalling({ caseName:caseName, @@ -1575,130 +548,45 @@ describe('CallManageImsCall', function () { checkState:CALL_STATUS_DIALING }); callId = data.callId; - try { - data = await call.reject(callId, new RejectMessageOptions(REJECT_MESSAGE_STR)); - console.log(`${caseName} reject success,case failed,data:${toString(data)}`); - done(); - } catch (err) { - console.log(`${caseName} reject error,case success,err:${toString(err)}`); - done(); - } } catch (error) { - console.log(`${caseName} scenceInCalling error,case failed,error:${toString(error)}`); + console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); done(); + return; } - }); - - /** - * @tc.number Telephony_CallManager_reject_Async_0400 - * @tc.name Test the function runs 10 times, stability test - * @tc.desc Function test - */ - it('Telephony_CallManager_reject_Async_0400', 0, async function (done) { - let caseName = 'Telephony_CallManager_reject_Async_0400'; - let callId = null; try { - let data = await scenceInCalling({ - caseName:caseName, - phoneNumber:AUTO_ACCEPT_NUMBER, - checkState:CALL_STATUS_DIALING - }); - callId = data.callId; - call.reject(callId, new RejectMessageOptions(REJECT_MESSAGE_NUM), (err, data) => { - if (err) { - console.log(`${caseName} reject error,case success,err:${toString(err)}`); - done(); - return; - } - console.log(`${caseName} reject success,case failed,data:${toString(data)}`); - done(); - }); - } catch (error) { - console.log(`${caseName} scenceInCalling error,case failed,error:${toString(error)}`); - done(); - } - }); - - /** - * @tc.number Telephony_CallManager_IMS_hangup_Async_0100 - * @tc.name Run function hangup by args callId BOUNDARY_NUMBER_INT by callback, - * the callback function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_hangup_Async_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_hangup_Async_0100'; - call.hangup(BOUNDARY_NUMBER_INT, (error) => { - if (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} success,case failed`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_hangup_Promise_0100 - * @tc.name Run function hangup by args callId CALL_ID_NOT_EXIST by promise, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_hangup_Promise_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_hangup_Promise_0100'; - call.hangup(CALL_ID_NOT_EXIST).then(() => { + let info = {x: POS_700, y: POS_10, z: POS_Z_ERROR, width: POS_LENGTH_300, height: POS_LENGTH_600}; + await call.setDisplayWindow(info); + console.log(`${caseName} case faild`); expect().assertFail(); - console.log(`${caseName} success,case failed`); - done(); - }).catch(error => { + } catch (error) { console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_startDTMF_Async_1300 - * @tc.name Run function startDTMF by args callId MINUS_VALUE character C by callback, - * the callback function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_startDTMF_Async_1300', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_startDTMF_Async_1300'; - call.startDTMF(MINUS_VALUE, SENT_STRING_C, (error) => { - if (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} success,case failed`); - done(); - }); + } + hangupCall2(caseName, done, callId); }); /** - * @tc.number Telephony_CallManager_IMS_startDTMF_Promise_1300 - * @tc.name Dial a call by function dial by args phoneNumber PHONE_NUMBER_LENGTH_11 when before being accepted, - * run function startDTMF by args callId BOUNDARY_NUMBER_INT character C by promise, - * the function return error + * @tc.number Telephony_CallManager_setCameraZoom_Async_0400 + * @tc.name Dial a call and after answering the call,run function setCameraZoom by args + * zoomRatio ZOOM_RATIO_MINUS_1_0 by callback,the callback function return error * @tc.desc Function test */ - it('Telephony_CallManager_IMS_startDTMF_Promise_1300', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_startDTMF_Promise_1300'; + it('Telephony_CallManager_setCameraZoom_Async_0400', 0, function (done) { + let caseName = 'Telephony_CallManager_setCameraZoom_Async_0400'; scenceInCalling({ caseName:caseName, - phoneNumber:PHONE_NUMBER_LENGTH_11, + phoneNumber:AUTO_ACCEPT_NUMBER2, checkState:CALL_STATUS_DIALING }).then(data => { callId = data.callId; - call.startDTMF(BOUNDARY_NUMBER_INT, SENT_STRING_C).then(data => { - console.log(`${caseName} success,case error,data:${toString(data)}`); + call.setCameraZoom(ZOOM_RATIO_MINUS_1_0, (error) => { + if (error) { + console.log(`${caseName} error,case success,error:${toString(error)}`); + hangupCall2(caseName, done, callId); + return; + } + console.log(`${caseName} case failed`); expect().assertFail(); hangupCall2(caseName, done, callId); - }).catch(error => { - console.log(`${caseName} case success`); - hangupCall2(caseName, done, callId); }); }).catch(error => { console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); @@ -1707,277 +595,152 @@ describe('CallManageImsCall', function () { }); /** - * @tc.number Telephony_CallManager_IMS_stopDTMF_Async_0100 - * @tc.name Run function stopDTMF by args callId CALL_ID_NOT_EXIST by callback,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_stopDTMF_Async_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_stopDTMF_Async_0100'; - call.stopDTMF(CALL_ID_NOT_EXIST, (error, data) => { - if (error) { - console.log(`${caseName} case success`); - done(); - return; - } - console.log(`${caseName} success,case error,data:${toString(data)}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_IMS_stopDTMF_Promise_0100 - * @tc.name Run function stopDTMF by args callId BOUNDARY_NUMBER_INT by promise,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_stopDTMF_Promise_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_stopDTMF_Promise_0100'; - call.stopDTMF(BOUNDARY_NUMBER_INT).then(data => { - console.log(`${caseName} success,case error,data:${toString(data)}`); - expect().assertFail(); - done(); - }).catch(error => { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_muteRinger_Async_0100 - * @tc.name Unwanted state,run function muteRinger by callback,the function return void - * @tc.desc Function test - */ - it('Telephony_CallManager_muteRinger_Async_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_muteRinger_Async_0100'; - call.muteRinger((error, data) => { - if (error) { - console.log(`${caseName} error,case failed,error:${toString(error)}`); - expect().assertFail(); - done(); - return; - } - console.log(`${caseName} success,case success`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_muteRinger_Promise_0100 - * @tc.name Unwanted state,run function muteRinger by promise,the function return void - * @tc.desc Function test - */ - it('Telephony_CallManager_muteRinger_Promise_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_muteRinger_Promise_0100'; - call.muteRinger() - .then(data => { - console.log(`${caseName} success,case success`); - done(); - }) - .catch((error) => { - console.log(`${caseName} error,case failed,error:${toString(error)}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_setAudioDevice_Async_0500 - * @tc.name Unwanted state,run function setAudioDevice by callback and by arg DEVICE_EARPIECE, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setAudioDevice_Async_0500', 0, function (done) { - let caseName = 'Telephony_CallManager_setAudioDevice_Async_0500'; - call.setAudioDevice(DEVICE_EARPIECE, (error, data) => { - if (error) { - console.log(`${caseName} success,case ${error ? 'success' : 'failed'},error:${toString(error)}`); - expect(!!error).assertTrue(); - done(); - return; - } - console.log(`${caseName} error,case failed,data:${toString(data)}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_setAudioDevice_Promise_0500 - * @tc.name Unwanted state,run function setAudioDevice by promise and by arg DEVICE_EARPIECE, - * the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setAudioDevice_Promise_0500', 0, function (done) { - let caseName = 'Telephony_CallManager_setAudioDevice_Promise_0500'; - call.setAudioDevice(DEVICE_EARPIECE) - .then(data => { - console.log(`${caseName} error,case failed,data:${toString(data)}`); - expect().assertFail(); - done(); - }) - .catch(error => { - console.log(`${caseName} success,case ${error ? 'success' : 'failed'},error:${toString(error)}`); - expect(!!error).assertTrue(); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_setMuted_Async_0300 - * @tc.name Unwanted state,run function setMuted by callback,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setMuted_Async_0300', 0, function (done) { - let caseName = 'Telephony_CallManager_setMuted_Async_0300'; - call.setMuted((error, data) => { - if (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - expect(!!error).assertTrue(); - done(); - return; - } - console.log(`${caseName} success,case failed,data:${toString(data)}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_setMuted_Promise_0300 - * @tc.name Unwanted state,run function setMuted by promise,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_setMuted_Promise_0300', 0, function (done) { - let caseName = 'Telephony_CallManager_setMuted_Promise_0300'; - call.setMuted() - .then(data => { - console.log(`${caseName} success,case failed,data:${toString(data)}`); - expect().assertFail(); - done(); - }) - .catch(error => { - console.log(`${caseName} error,case success,error:${toString(error)}`); - expect(!!error).assertTrue(); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_cancelMuted_Async_0300 - * @tc.name Unwanted state,run function cancelMuted by callback,the function return error + * @tc.number Telephony_CallManager_setCameraZoom_Promise_0400 + * @tc.name Dial a call and after answering the call,run function setCameraZoom by args + * zoomRatio ZOOM_RATIO_MINUS_1_0 by promise,the function return error * @tc.desc Function test */ - it('Telephony_CallManager_cancelMuted_Async_0300', 0, function (done) { - let caseName = 'Telephony_CallManager_cancelMuted_Async_0300'; - call.cancelMuted((error, data) => { - if (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - return; - } - console.log(`${caseName} success,case failed,data:${toString(data)}`); - expect().assertFail(); + it('Telephony_CallManager_setCameraZoom_Promise_0400', 0, async function (done) { + let caseName = 'Telephony_CallManager_setCameraZoom_Promise_0400'; + try { + let data = await scenceInCalling({ + caseName:caseName, + phoneNumber:AUTO_ACCEPT_NUMBER, + checkState:CALL_STATUS_DIALING + }); + callId = data.callId; + } catch (error) { + console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); done(); - }); + return; + } + try { + await call.setCameraZoom(ZOOM_RATIO_MINUS_1_0); + console.log(`${caseName} case failed`); + expect().assertFail(); + } catch (error) { + console.log(`${caseName} error,case success,error:${toString(error)}`); + } + hangupCall2(caseName, done, callId); }); /** - * @tc.number Telephony_CallManager_cancelMuted_Promise_0300 - * @tc.name Unwanted state,run function cancelMuted by promise,the function return error + * @tc.number Telephony_CallManager_setPausePicture_Async_0500 + * @tc.name Dial a call and after answering the call,run function setPausePicture by args + * path IMAGE_LOCAL_ERROR_PATH by callback,the callback function return error * @tc.desc Function test */ - it('Telephony_CallManager_cancelMuted_Promise_0300', 0, function (done) { - let caseName = 'Telephony_CallManager_cancelMuted_Promise_0300'; - call.cancelMuted() - .then(data => { - console.log(`${caseName} success,case failed,data:${toString(data)}`); - expect().assertFail(); - done(); - }) - .catch(error => { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); + it('Telephony_CallManager_setPausePicture_Async_0500', 0, function (done) { + let caseName = 'Telephony_CallManager_setPausePicture_Async_0500'; + scenceInCalling({ + caseName:caseName, + phoneNumber:AUTO_ACCEPT_NUMBER, + checkState:CALL_STATUS_DIALING + }).then(data => { + callId = data.callId; + call.setPausePicture(IMAGE_LOCAL_ERROR_PATH, (error) => { + if (error) { + console.log(`${caseName} case success,error:${toString(error)}`); + hangupCall2(caseName, done, callId); + return; + } + console.log(`${caseName} success,case failed`); + hangupCall2(caseName, done, callId); }); - }); - - /** - * @tc.number Telephony_CallManager_isNewCallAllowed_Async_0200 - * @tc.name Unwanted state ,run the function isNewCallAllowed by callback ,the function return true - * @tc.desc Function test - */ - it('Telephony_CallManager_isNewCallAllowed_Async_0200', 0, function (done) { - let caseName = 'Telephony_CallManager_isNewCallAllowed_Async_0200'; - call.isNewCallAllowed(function (error, data) { - if (error) { - console.log(`${caseName} error,case failed,error:${toString(error)}`); - expect().assertFail(); - done(); - return; - } - console.log(`${caseName} success,case ${data === true ? 'success' : 'failed'},data:${toString(data)}`); - expect(data === true).assertTrue(); + }).catch(error => { + console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); done(); }); }); /** - * @tc.number Telephony_CallManager_isNewCallAllowed_Promise_0200 - * @tc.name Unwanted state ,run the function isNewCallAllowed by promise ,the function return true + * @tc.number Telephony_CallManager_setPausePicture_Promise_0500 + * @tc.name Dial a call and after answering the call,run function setPausePicture + * by args path IMAGE_LOCAL_ERROR_PATH by promise, + * the callback function return error * @tc.desc Function test */ - it('Telephony_CallManager_isNewCallAllowed_Promise_0200', 0, function (done) { - let caseName = 'Telephony_CallManager_isNewCallAllowed_Promise_0200'; - call.isNewCallAllowed() - .then(data => { - console.log(`${caseName} success,case ${data === true ? 'success' : 'failed'},data:${toString(data)}`); - expect(data === true).assertTrue(); - done(); - }) - .catch(error => { - console.log(`${caseName} error,case failed,error:${toString(error)}`); - expect().assertFail(); - done(); + it('Telephony_CallManager_setPausePicture_Promise_0500', 0, async function (done) { + let caseName = 'Telephony_CallManager_setPausePicture_Promise_0500'; + try { + let data = await scenceInCalling({ + caseName:caseName, + phoneNumber:AUTO_ACCEPT_NUMBER, + checkState:CALL_STATUS_DIALING }); + callId = data.callId; + } catch (error) { + console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); + done(); + return; + } + try { + await call.setPausePicture(IMAGE_LOCAL_ERROR_PATH); + console.log(`${caseName} success,case failed`); + } catch (error) { + console.log(`${caseName} case success,error:${toString(error)}`); + } + hangupCall2(caseName, done, callId); }); /** - * @tc.number Telephony_CallManager_isRinging_Async_0100 - * @tc.name Unwanted state ,run the function isRinging by callback ,the function return false + * @tc.number Telephony_CallManager_setDeviceDirection_Async_0500 + * @tc.name Dial a call and after answering the call,run function setDeviceDirection + * by args rotation ROTATION_MINUS_1 by callback,the callback function return error * @tc.desc Function test */ - it('Telephony_CallManager_isRinging_Async_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_isRinging_Async_0100'; - call.isRinging(function (error, data) { - if (error) { + it('Telephony_CallManager_setDeviceDirection_Async_0500', 0, function (done) { + let caseName = 'Telephony_CallManager_setDeviceDirection_Async_0500'; + scenceInCalling({ + caseName:caseName, + phoneNumber:AUTO_ACCEPT_NUMBER, + checkState:CALL_STATUS_DIALING + }).then(data => { + callId = data.callId; + call.setDeviceDirection(ROTATION_MINUS_1, (error) => { + if (error) { + console.log(`${caseName} success, case success`); + hangupCall2(caseName, done, callId); + return; + } console.log(`${caseName} error,case failed,error:${toString(error)}`); expect().assertFail(); - done(); - return; - } - console.log(`${caseName} success,case ${data === false ? 'success' : 'failed'},data:${toString(data)}`); - expect(data === false).assertTrue(); + hangupCall2(caseName, done, callId); + }); + }).catch(error => { + console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); done(); }); }); /** - * @tc.number Telephony_CallManager_isRinging_Promise_0100 - * @tc.name Unwanted state ,run the function isRinging by promise ,the function return false + * @tc.number Telephony_CallManager_setDeviceDirection_Promise_0500 + * @tc.name Dial a call and after answering the call,run function setDeviceDirection + * by args rotation ROTATION_MINUS_1 by promise,the callback function return error * @tc.desc Function test */ - it('Telephony_CallManager_isRinging_Promise_0100', 0, function (done) { - let caseName = 'Telephony_CallManager_isRinging_Promise_0100'; - call.isRinging() - .then(data => { - console.log(`${caseName} success,case ${data === false ? 'success' : 'failed'},data:${toString(data)}`); - expect(data === false).assertTrue(); - done(); - }) - .catch(error => { - console.log(`${caseName} error,case failed,error:${toString(error)}`); - expect().assertFail(); - done(); + it('Telephony_CallManager_setDeviceDirection_Promise_0500', 0, async function (done) { + let caseName = 'Telephony_CallManager_setDeviceDirection_Promise_0500'; + try { + let data = await scenceInCalling({ + caseName:caseName, + phoneNumber:AUTO_ACCEPT_NUMBER2, + checkState:CALL_STATUS_DIALING }); + callId = data.callId; + } catch (error) { + console.log(`${caseName} scenceInCalling error ,case failed,error:${toString(error)}`); + done(); + return; + } + try { + await call.setDeviceDirection(ROTATION_MINUS_1); + console.log(`${caseName} success,case error`); + expect().assertFail(); + } catch (error) { + console.log(`${caseName} case success,error:${toString(error)}`); + } + hangupCall2(caseName, done, callId); }); /** @@ -2058,120 +821,6 @@ describe('CallManageImsCall', function () { } }); - /** - * @tc.number Telephony_CallManager_getSubCallIdList_Async_0100 - * @tc.name If callId is 999, call getSubCallIdList() to get the call list of subcalls and return the empty list - * @tc.desc Function test - */ - it('Telephony_CallManager_getSubCallIdList_Async_0100', 0, async function (done) { - call.getSubCallIdList(CALL_ID_NOT_EXIST, (err, data) => { - if (err) { - expect().assertFail(); - console.log('Telephony_CallManager_getSubCallIdList_Async_0100 fail'); - done(); - return; - } - expect(data.length === 0).assertTrue(); - console.log(`Telephony_CallManager_getSubCallIdList_Async_0100 finish data = ${data}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_getSubCallIdList_Promise_0100 - * @tc.name If callId is 999, call getSubCallIdList() to get the sub-call list - * @tc.desc Function test - */ - it('Telephony_CallManager_getSubCallIdList_Promise_0100', 0, async function (done) { - try { - var data = await call.getSubCallIdList(CALL_ID_NOT_EXIST); - expect(data.length === 0).assertTrue(); - console.log(`Telephony_CallManager_getSubCallIdList_Promise_0100 finish data = ${data}`); - done(); - } catch (err) { - console.log('Telephony_CallManager_getSubCallIdList_Promise_0100 fail'); - expect().assertFail(); - done(); - - } - }); - - /** - * @tc.number Telephony_CallManager_getCallIdListForConference_Async_0100 - * @tc.name CallId for 999, the callback call getCallIdListForConference () to obtain a list all the phone call - * in the conference call, returns an empty list - * @tc.desc Function test - */ - it('Telephony_CallManager_getCallIdListForConference_Async_0100', 0, async function (done) { - call.getCallIdListForConference(CALL_ID_NOT_EXIST, (err, data) => { - if (err) { - console.log('Telephony_CallManager_getCallIdListForConference_Async_0100 fail'); - expect().assertFail(); - done(); - return; - } - expect(data.length === 0).assertTrue(); - console.log(`Telephony_CallManager_getCallIdListForConference_Async_0100 finish data = ${data}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_getCallIdListForConference_Promise_0100 - * @tc.name GetCallIdListForConference callId for 999, call () to obtain a list all the phone call in the - * conference call, returns an empty list - * @tc.desc Function test - */ - it('Telephony_CallManager_getCallIdListForConference_Promise_0100', 0, async function (done) { - try { - var data = await call.getCallIdListForConference(CALL_ID_NOT_EXIST); - expect(data.length === 0).assertTrue(); - console.log(`Telephony_CallManager_getCallIdListForConference_Promise_0100 finish data = ${data}`); - done(); - } catch (err) { - console.log('Telephony_CallManager_getCallIdListForConference_Promise_0100 fail'); - done(); - - } - }); - - /** - * @tc.number Telephony_CallManager_getMainCallId_Async_0100 - * @tc.name If the mainCallId is 999, call getMainCallId() to get the call and return -1 - * @tc.desc Function test - */ - it('Telephony_CallManager_getMainCallId_Async_0100', 0, async function (done) { - call.getMainCallId(CALL_ID_NOT_EXIST, (err, data) => { - if (err) { - expect().assertFail(); - console.log('Telephony_CallManager_getMainCallId_Async_0100 fail'); - done(); - return; - } - expect(data === GETMAIN_CALLID_ERRO).assertTrue(); - console.log(`Telephony_CallManager_getMainCallId_Async_0100 finish data = ${data}`); - done(); - }); - }); - - /** - * @tc.number Telephony_CallManager_getMainCallId_Promise_0100 - * @tc.name If mainCallId is 999, call getMainCallId() to get the call and return -1 - * @tc.desc Function test - */ - it('Telephony_CallManager_getMainCallId_Promise_0100', 0, async function (done) { - try { - var data = await call.getMainCallId(CALL_ID_NOT_EXIST); - expect(data === GETMAIN_CALLID_ERRO).assertTrue(); - console.log(`Telephony_CallManager_getMainCallId_Promise_0100 finish data = ${data}`); - done(); - } catch (err) { - expect().assertFail(); - console.log(`Telephony_CallManager_getMainCallId_Promise_0100 finish data = ${data}`); - done(); - } - }); - /** * @tc.number Telephony_CallManager_formatPhoneNumber_Async_0100 * @tc.name PhoneNumber is 100000000000. Call formatPhoneNumber() to format the number. @@ -2293,157 +942,4 @@ describe('CallManageImsCall', function () { done(); } }); - - /** - * @tc.number Telephony_CallManager_isInEmergencyCall_Async_0200 - * @tc.name Dial an emergency number (THE_THREE_NUMBER) and call isInEmergencyCall() to determine whether - * an emergency call is made, returning true - * @tc.desc Function test - */ - it('Telephony_CallManager_isInEmergencyCall_Async_0200', 0, async function (done) { - const options = {accountId:SLOTID, videoState:MEDIA_TYPE_VOICE, dialScene:DIAL_SCENCE_CALL_PRIVILEGED, - dialType:DIAL_CARRIER_TYPE}; - call.dial(THE_THREE_NUMBER, options, async (err, data) => { - if (err) { - console.log(`Telephony_CallManager_isInEmergencyCall_Async_0200 dial fail : err = ${err}`); - done(); - return; - } - console.log(`Telephony_CallManager_isInEmergencyCall_Async_0200 dial finish : data = ${data}`); - const startTime = new Date().getTime(); - while (true) { - if (callState === call.CALL_STATUS_DIALING || callState === call.CALL_STATUS_ACTIVE || - callState === call.CALL_STATUS_ALERTING) { - call.isInEmergencyCall((err, data) => { - if (err) { - console.log( - `Telephony_CallManager_isInEmergencyCall_Async_0200 isInEmrgencyCall fail : err = ${ - err}` - ); - done(); - return; - } - console.log( - `Telephony_CallManager_isInEmergencyCall_Async_0200 isInEmrgencyCall finish : data = ${ - data}` - ); - done(); - - }); - return; - } - await sleep(WAITING_TIME); - endTime = new Date().getTime(); - timing = endTime - startTime; - if (timing > TIME_OUT) { - done(); - break; - } - } - }); - }); - - /** - * @tc.number Telephony_CallManager_isInEmergencyCall_Promise_0200 - * @tc.name Dial an emergency number (THE_THREE_NUMBER) and call isInEmergencyCall() to determine whether - * an emergency call is made. The return value is true - * @tc.desc Function test - */ - it('Telephony_CallManager_isInEmergencyCall_Promise_0200', 0, async function (done) { - try { - const options = {accountId:SLOTID, videoState:MEDIA_TYPE_VOICE, dialScene:DIAL_SCENCE_CALL_PRIVILEGED, - dialType:DIAL_CARRIER_TYPE}; - var data = await call.dial(THE_THREE_NUMBER, options); - console.log(`Telephony_CallManager_isInEmergencyCall_Promise_0200 dial finish : data = ${data}`); - const startTime = new Date().getTime(); - while (true) { - if (callState === call.CALL_STATUS_DIALING || callState === call.CALL_STATUS_ACTIVE || - callState === call.CALL_STATUS_ALERTING) { - try { - var data = await call.isInEmergencyCall(); - console.log(`Telephony_CallManager_isInEmergencyCall_Promise_0200 finish : data = ${data}`); - done(); - } catch (err) { - console.log(`Telephony_CallManager_isInEmergencyCall_Promise_0200 fail : err = ${err}`); - done(); - return; - } - return; - } - await sleep(WAITING_TIME); - endTime = new Date().getTime(); - timing = endTime - startTime; - if (timing > TIME_OUT) { - done(); - break; - } - } - } catch (err) { - console.log(`Telephony_CallManager_isInEmergencyCall_Promise_0200 dial fail : err = ${err}`); - done(); - } - }); - - /** - * @tc.number Telephony_CallManager_IMS_dial_Promise_0900 - * @tc.name Dial a call by function dial by args phoneNumber PHONE_NUMBER_LENGTH_11 options - * {accountId:DEFAULT_SLOT_ID, videoState:MEDIA_TYPE_VOICE, dialScene:DIAL_SCENCE_CALL_PRIVILEGED, - * dialType:DIAL_TYPE_ERR_CALL} by promise,the function return error - * @tc.desc Function test - */ - it('Telephony_CallManager_IMS_dial_Promise_0900', 0, function (done) { - let caseName = 'Telephony_CallManager_IMS_dial_Promise_0900'; - let flag = true; - reachState(caseName, CALL_STATUS_DIALING, '', false).then(data => { - callId = data.callId; - console.log(`${caseName} reachState success,case failed,data:${toString(data)}`); - hangupCall2(caseName, done, callId); - }).catch(error => { - console.log(`${caseName} reachState error,case ${flag ? 'success' : 'failed'},error:${toString(error)}`); - done(); - }); - let obj = {accountId:DEFAULT_SLOT_ID, videoState:MEDIA_TYPE_VOICE, - dialScene:DIAL_SCENCE_CALL_PRIVILEGED, dialType:DIAL_TYPE_ERR_CALL}; - call.dial(PHONE_NUMBER_LENGTH_11, obj).then(data => { - flag = false; - }).catch(error => { - console.log(`${caseName} dial error,error:${toString(error)}`); - flag = true; - }); - }); - - /** - * @tc.number Telephony_CallManager_on_0900 - * @tc.name Dial a call by number AUTO_ACCEPT_NUMBER options {accountId: DEFAULT_SLOT_ID, - * videoState: MEDIA_TYPE_VOICE,dialScene: DIAL_SCENCE_CALL_NORMAL, dialType:DIAL_TYPE_OTT} - * and before being accepted,the callEventChange event get EVENT_OTT_FUNCTION_UNSUPPORTED - * @tc.desc Function test - */ - it('Telephony_CallManager_on_0900', 0, function (done) { - let caseName = 'Telephony_CallManager_on_0900'; - let callId = null; - reachCallEventState(EVENT_OTT_FUNCTION_UNSUPPORTED).then(data => { - console.log(`${caseName} reachCallEventState success,case ${ - data.eventId === EVENT_OTT_FUNCTION_UNSUPPORTED ? - 'success' : 'failed'},data:${toString(data)}`); - done(); - }).catch(error => { - if (callId) { - console.log(`${caseName} reachCallEventState error,case failed,error:${toString(error)}`); - done(); - } else { - console.log(`${caseName} scenceInCalling error,case failed,error:${toString(error)}`); - done(); - } - }); - let options = {accountId: DEFAULT_SLOT_ID, videoState: MEDIA_TYPE_VOICE, - dialScene: DIAL_SCENCE_CALL_NORMAL, dialType:DIAL_TYPE_OTT}; - call.dial(AUTO_ACCEPT_NUMBER, options, (err, data) => { - if (err) { - console.log(`${caseName} dial err:${err}`); - return; - } - console.log(`${caseName} dial success data:${data}`); - }); - }); }); \ No newline at end of file diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/config.json b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/config.json index d4661f1ec..3689150af 100644 --- a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/config.json +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/config.json @@ -45,7 +45,7 @@ "launchType": "standard" } ], - "reqPermissions": [ + "reqPermissions": [ { "name": "ohos.permission.LOCATION", "reason": "need use ohos.permission.LOCATION" diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/test/CellularDataAbnorma.test.js b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/test/CellularDataAbnorma.test.js index ff9e708de..33f2b5246 100644 --- a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/test/CellularDataAbnorma.test.js +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/test/CellularDataAbnorma.test.js @@ -56,83 +56,7 @@ describe("ActsCellularDataAbnormalTest", function () { done(); }) }) - - /* - * @tc.number Telephony_CellularData_enableCellularData_Async_0100 - * @tc.name Open the data switch and query the switch status and data status - * @tc.desc Function test - */ - it("Telephony_CellularData_enableCellularData_Async_0100", 0, async function (done) { - cellular.enableCellularData((err) => { - if (err) { - console.log("Telephony_CellularData_enableCellularData_Async_0100 enableCellularData finish"); - done(); - return; - } - expect().assertFail(); - console.log("Telephony_CellularData_enableCellularData_Async_0100 enableCellularData fail"); - done(); - }) - }) - - /* - * @tc.number Telephony_CellularData_disableCellularData_Async_0100 - * @tc.name Turn off the data switch and query the switch status and data status - * @tc.desc Function test - */ - it("Telephony_CellularData_disableCellularData_Async_0100", 0, async function (done) { - cellular.disableCellularData((err) => { - if (err) { - console.log("Telephony_CellularData_disableCellularData_Async_0100 disableCellularData finish"); - done(); - return; - } - expect().assertFail(); - console.log("Telephony_CellularData_disableCellularData_Async_0100 disableCellularData fail"); - done(); - }) - }) - - /* - * @tc.number Telephony_CellularData_enableCellularDataRoaming_Async_0300 - * @tc.name Call enableCellularDataRoaming interface, setting parameters as slotId error value (3), - * to check the correction results - * @tc.desc Function test - */ - it("Telephony_CellularData_enableCellularDataRoaming_Async_0300", 0, async function (done) { - cellular.enableCellularDataRoaming(ERR_SLOT_ID, (err) => { - if (err) { - console.log("Telephony_CellularData_enableCellularDataRoaming_Async_0300 enableCellularData finish"); - done(); - return; - } - expect().assertFail(); - console.log("Telephony_CellularData_enableCellularDataRoaming_Async_0300 enableCellularData fail"); - done(); - }) - }) - - /* - * @tc.number Telephony_CellularData_disableCellularDataRoaming_Async_0300 - * @tc.name Call enableCellularDataRoaming interface, setting parameters as slotId error value (3), to check the - * correction results - * @tc.desc Function test - */ - it("Telephony_CellularData_disableCellularDataRoaming_Async_0300", 0, async function (done) { - cellular.disableCellularDataRoaming(ERR_SLOT_ID, (err) => { - if (err) { - console.log( - "Telephony_CellularData_disableCellularDataRoaming_Async_0300 disableCellularDataRoaming finish" - ); - done(); - return; - } - expect().assertFail(); - console.log("Telephony_CellularData_disableCellularDataRoaming_Async_0300 disableCellularDataRoaming fail"); - done(); - }) - }) - + /* * @tc.number Telephony_CellularData_getCellularDataFlowType_Async_0100 * @tc.name When cellular data is turned on, call getCellularDataFlowType() to get the data stream type and @@ -170,26 +94,7 @@ describe("ActsCellularDataAbnormalTest", function () { done(); }) }) - - /* - * @tc.number Telephony_CellularData_setDefaultCellularDataSlotId_Async_0500 - * @tc.name Call setDefaultCellularDataSlotId() interface, set the default card slot to the number of exceptions - * (-1), and verify whether the setting failed (Async) - * @tc.desc Function test - */ - it("Telephony_CellularData_setDefaultCellularDataSlotId_Async_0500", 0, async function (done) { - cellular.setDefaultCellularDataSlotId(ERR_SLOT_ID, (err) => { - if (err) { - console.log("Telephony_CellularData_setDefaultCellularDataSlotId_Async_0500 finish"); - done(); - return; - } - expect().assertFail(); - console.log("Telephony_CellularData_setDefaultCellularDataSlotId_Async_0500 fail"); - done(); - }) - }) - + /* * @tc.number Telephony_CellularData_getDefaultCellularDataSlotId_Async_0500 * @tc.name Call getDefaultCellularDataSlotId() interface and verify whether the setting failed (Async) @@ -244,76 +149,6 @@ describe("ActsCellularDataAbnormalTest", function () { } }) - /* - * @tc.number Telephony_CellularData_enableCellularData_Promise_0100 - * @tc.name Open the data switch and query the switch status and data status - * @tc.desc Function test - */ - it("Telephony_CellularData_enableCellularData_Promise_0100", 0, async function (done) { - try { - await cellular.enableCellularData(); - expect().assertFail(); - console.log("Telephony_CellularData_enableCellularData_Promise_0100 fail"); - done(); - } catch (err) { - console.log("Telephony_CellularData_enableCellularData_Promise_0100 finish"); - done(); - } - }) - - /* - * @tc.number Telephony_CellularData_disableCellularData_Promise_0100 - * @tc.name Turn off the data switch and query the switch status and data status - * @tc.desc Function test - */ - it("Telephony_CellularData_disableCellularData_Promise_0100", 0, async function (done) { - try { - await cellular.disableCellularData(); - expect().assertFail(); - console.log("Telephony_CellularData_disableCellularData_Promise_0100 fail"); - done(); - } catch (err) { - console.log("Telephony_CellularData_disableCellularData_Promise_0100 finish"); - done(); - } - }) - - /* - * @tc.number Telephony_CellularData_enableCellularDataRoaming_Promise_0300 - * @tc.name Call enableCellularDataRoaming interface, setting parameters as slotId error value (3), - * to check the correction results - * @tc.desc Function test - */ - it("Telephony_CellularData_enableCellularDataRoaming_Promise_0300", 0, async function (done) { - try { - await cellular.enableCellularDataRoaming(ERR_SLOT_ID); - expect().assertFail(); - console.log("Telephony_CellularData_enableCellularDataRoaming_Promise_0300 fail"); - done(); - } catch (err) { - console.log("Telephony_CellularData_enableCellularDataRoaming_Promise_0300 finish"); - done(); - } - }) - - /* - * @tc.number Telephony_CellularData_disableCellularDataRoaming_Promise_0300 - * @tc.name Call enableCellularDataRoaming interface, setting parameters as slotId error value (3), to check the - * correction results - * @tc.desc Function test - */ - it("Telephony_CellularData_disableCellularDataRoaming_Promise_0300", 0, async function (done) { - try { - await cellular.disableCellularDataRoaming(ERR_SLOT_ID); - expect().assertFail(); - console.log("Telephony_CellularData_disableCellularDataRoaming_Promise_0300 fail"); - done(); - } catch (err) { - console.log("Telephony_CellularData_disableCellularDataRoaming_Promise_0300 finish"); - done(); - } - }) - /* * @tc.number Telephony_CellularData_getCellularDataFlowType_Promise_0100 * @tc.name When cellular data is turned on, call getCellularDataFlowType() to get the data stream type and @@ -350,24 +185,6 @@ describe("ActsCellularDataAbnormalTest", function () { } }) - /* - * @tc.number Telephony_CellularData_setDefaultCellularDataSlotId_Promise_0500 - * @tc.name Call setDefaultCellularDataSlotId() interface, set the default card slot to the number of exceptions - * (-1), and verify whether the setting failed (Async) - * @tc.desc Function test - */ - it("Telephony_CellularData_setDefaultCellularDataSlotId_Promise_0500", 0, async function (done) { - try { - await cellular.setDefaultCellularDataSlotId(ERR_SLOT_ID); - expect().assertFail(); - console.log("Telephony_CellularData_setDefaultCellularDataSlotId_Promise_0500 fail"); - done(); - } catch (err) { - console.log("Telephony_CellularData_setDefaultCellularDataSlotId_Promise_0500 finish"); - done(); - } - }) - /* * @tc.number Telephony_CellularData_getDefaultCellularDataSlotId_Promise_0500 * @tc.name Call getDefaultCellularDataSlotId() interface and verify whether the setting failed (Async) diff --git a/telephony/telephonyjstest/netmanager_http/entry/src/main/config.json b/telephony/telephonyjstest/netmanager_http/entry/src/main/config.json index 09ccedf97..295ac996e 100644 --- a/telephony/telephonyjstest/netmanager_http/entry/src/main/config.json +++ b/telephony/telephonyjstest/netmanager_http/entry/src/main/config.json @@ -52,7 +52,7 @@ "launchType": "standard" } ], - "reqPermissions": [ + "reqPermissions": [ { "name": "ohos.permission.LOCATION", "reason": "need use ohos.permission.LOCATION" diff --git a/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/HttpRequestJsunit.test.ets b/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/HttpRequestJsunit.test.ets index 3dcab425b..9206a966e 100644 --- a/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/HttpRequestJsunit.test.ets +++ b/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/HttpRequestJsunit.test.ets @@ -116,13 +116,11 @@ export default function httpRequestJsunit() { } }); - /** * @tc.number Telephony_http_HttpRequest_destroy_0100 * @tc.name httprequest::destroy * @tc.desc Test Test httprequest property. */ - it("Telephony_http_HttpRequest_destroy_0100", 0, async function (done) { var casename = "Telephony_http_HttpRequest_0200" console.log("-----------------------HttpRequest_destroy Test is starting-----------------------"); @@ -163,7 +161,6 @@ export default function httpRequestJsunit() { * @tc.name httprequest::on_headerReceive * @tc.desc Test Test httprequest property. */ - it("Telephony_http_HttpRequest_on_headerReceive_0100", 0, async function (done) { var casename = "Telephony_http_HttpRequest_0300" console.log("-----------------------HttpRequest_on_headerReceive Test is starting-----------------------"); diff --git a/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/HttpRequestOptionsJsunit.test.ets b/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/HttpRequestOptionsJsunit.test.ets index 7d711790c..66c3449c0 100644 --- a/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/HttpRequestOptionsJsunit.test.ets +++ b/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/HttpRequestOptionsJsunit.test.ets @@ -55,8 +55,6 @@ export default function HttpRequestOptionsJsunit() { } }); - - /** * @tc.number Telephony_http_HttpRequestOptions_method_0200 * @tc.name HttpRequestOptions::method @@ -94,7 +92,6 @@ export default function HttpRequestOptionsJsunit() { } }); - /** * @tc.number Telephony_Http_HttpRequestOptions_extraData_0100 * @tc.name HttpRequestOptions::extraData @@ -137,8 +134,6 @@ export default function HttpRequestOptionsJsunit() { } }); - - /** * @tc.number Telephony_Http_HttpRequestOptions_extraData_0200 * @tc.name HttpRequestOptions::extraData @@ -184,13 +179,11 @@ export default function HttpRequestOptionsJsunit() { } }); - /** * @tc.number Telephony_Http_HttpRequestOptions_header_0100 * @tc.name HttpRequestOptions::header * @tc.desc Test Test HttpRequestOptions property. */ - it("Telephony_Http_HttpRequestOptions_header_0100", 0, async function (done) { var casename = 'Telephony_Http_HttpRequestOptions_0300'; console.log("-----------------------HttpRequestOptions_header Test is starting-----------------------"); @@ -232,7 +225,6 @@ export default function HttpRequestOptionsJsunit() { * @tc.name HttpRequestOptions::header * @tc.desc Test Test HttpRequestOptions property. */ - it("Telephony_Http_HttpRequestOptions_header_0200", 0, async function (done) { var casename = 'Telephony_Http_HttpRequestOptions_0300'; console.log("-----------------------HttpRequestOptions_header_01 Test is starting-----------------------"); @@ -281,7 +273,6 @@ export default function HttpRequestOptionsJsunit() { * @tc.name HttpRequestOptions::header * @tc.desc Test Test HttpRequestOptions property. */ - it("Telephony_Http_HttpRequestOptions_header_0300", 0, async function (done) { var casename = 'Telephony_Http_HttpRequestOptions_0300'; console.log("-----------------------HttpRequestOptions_header_02 Test is starting-----------------------"); @@ -323,7 +314,6 @@ export default function HttpRequestOptionsJsunit() { * @tc.name HttpRequestOptions::header * @tc.desc Test Test HttpRequestOptions property. */ - it("Telephony_Http_HttpRequestOptions_header_0400", 0, async function (done) { var casename = 'Telephony_Http_HttpRequestOptions_0300'; console.log("-----------------------HttpRequestOptions_header_03 Test is starting-----------------------"); @@ -364,10 +354,6 @@ export default function HttpRequestOptionsJsunit() { } }); - - - - /** * @tc.number Telephony_Http_HttpRequestOptions_readTimeout_0100 * @tc.name HttpRequestOptions::readTimeout @@ -408,7 +394,6 @@ export default function HttpRequestOptionsJsunit() { * @tc.name HttpRequestOptions::readTimeout * @tc.desc Test Test HttpRequestOptions property. */ - it("Telephony_Http_HttpRequestOptions_readTimeout_0200", 0, async function (done) { var casename = 'Telephony_Http_HttpRequestOptions_0400'; console.log("-----------------------HttpRequestOptions_readTimeout_01 Test is starting-----------------------"); @@ -441,13 +426,11 @@ export default function HttpRequestOptionsJsunit() { } }); - /** * @tc.number Telephony_Http_HttpRequestOptions_connectTimeout_0100 * @tc.name HttpRequestOptions::connectTimeout * @tc.desc Test Test HttpRequestOptions property. */ - it("Telephony_Http_HttpRequestOptions_connectTimeout_0100", 0, async function (done) { var casename = 'Telephony_Http_HttpRequestOptions_0500'; console.log("-----------------------HttpRequestOptions_connectTimeout Test is starting-----------------------"); @@ -483,7 +466,6 @@ export default function HttpRequestOptionsJsunit() { * @tc.name HttpRequestOptions::connectTimeout * @tc.desc Test Test HttpRequestOptions property. */ - it("Telephony_Http_HttpRequestOptions_connectTimeout_0200", 0, async function (done) { var casename = 'Telephony_Http_HttpRequestOptions_0500'; console.log("-----------------------HttpRequestOptions_connectTimeout_01 Test is starting-----------------------"); diff --git a/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/HttpResponseJsunit.test.ets b/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/HttpResponseJsunit.test.ets index 215913b1f..2b00a5d01 100644 --- a/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/HttpResponseJsunit.test.ets +++ b/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/HttpResponseJsunit.test.ets @@ -331,16 +331,12 @@ export default function httpResponseJsunit() { } }); - - - /** * @tc.number Telephony_Http_HttpResponse_cookies_0100 * @tc.name HttpResponse::cookies * @tc.desc Test Test HttpResponse property. */ - it("Telephony_Http_HttpResponse_cookies_0100", 0, async function (done) { var casename = 'Telephony_Http_HttpResponse_0400'; console.log("-----------------------HttpResponse cookies Test is starting-----------------------"); @@ -378,7 +374,6 @@ export default function httpResponseJsunit() { * @tc.desc Test Test HttpResponse property. */ - it("Telephony_Http_HttpResponse_cookies_0200", 0, async function (done) { var casename = 'Telephony_Http_HttpResponse_0400'; console.log("-----------------------HttpResponse cookies_01 Test is starting-----------------------"); @@ -402,15 +397,12 @@ export default function httpResponseJsunit() { }); - - /** * @tc.number Telephony_Http_HttpResponse_cookies_0300 * @tc.name HttpResponse::cookies * @tc.desc Test Test HttpResponse property. */ - it("Telephony_Http_HttpResponse_cookies_0300", 0, async function (done) { var casename = 'Telephony_Http_HttpResponse_0400'; console.log("-----------------------HttpResponse cookies_02 Test is starting-----------------------"); diff --git a/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/RequestMethodJsunit.test.ets b/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/RequestMethodJsunit.test.ets index eb3cc28a9..62afeb9ce 100644 --- a/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/RequestMethodJsunit.test.ets +++ b/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/RequestMethodJsunit.test.ets @@ -417,11 +417,6 @@ export default function requestMethodJsunit() { } }); - - - - - }) }; diff --git a/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/ResponseCodeJsunit.test.ets b/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/ResponseCodeJsunit.test.ets index 473614c51..7b642b0e7 100644 --- a/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/ResponseCodeJsunit.test.ets +++ b/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/test/ResponseCodeJsunit.test.ets @@ -544,7 +544,6 @@ export default function responseCodeJsunit() { }); - /** * @tc.number Telephony_Http_ResponseCode_CONFLICT_0100 * @tc.name ResponseCode::CONFLICT @@ -564,8 +563,6 @@ export default function responseCodeJsunit() { }); - - /** * @tc.number Telephony_Http_ResponseCode_GONE_0100 * @tc.name ResponseCode::GONE diff --git a/telephony/telephonyjstest/netmanager_socket/entry/src/main/config.json b/telephony/telephonyjstest/netmanager_socket/entry/src/main/config.json index cc9d1734f..52694233d 100644 --- a/telephony/telephonyjstest/netmanager_socket/entry/src/main/config.json +++ b/telephony/telephonyjstest/netmanager_socket/entry/src/main/config.json @@ -52,7 +52,7 @@ "launchType": "standard" } ], - "reqPermissions": [ + "reqPermissions": [ { "name": "ohos.permission.LOCATION", "reason": "need use ohos.permission.LOCATION" diff --git a/telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/ConnectionJsunit.test.ets b/telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/ConnectionJsunit.test.ets index 9c050ddb9..8d372ec91 100644 --- a/telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/ConnectionJsunit.test.ets +++ b/telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/ConnectionJsunit.test.ets @@ -407,80 +407,6 @@ export default function connectionJsunit() { done(); }); - - /* - * @tc.number : Telephony_Connection_Connection_enableAirplaneMode_0100 - * @tc.name : enableAirplaneMode - * @tc.desc : Enables the airplane mode for a device. - */ - it('Telephony_Connection_Connection_enableAirplaneMode_0100', 0, function (done) { - console.log("************* Telephony_Connection_Connection_enableAirplaneMode_0100 Test start*************"); - connection.enableAirplaneMode((error, data) => { - if (error) { - expect(true).assertTrue(); - done(); - return; - } - expect().assertFail(); - done(); - }); - console.log("************* Telephony_Connection_Connection_enableAirplaneMode_0100 Test end*************"); - done(); - }); - - /* - * @tc.number : Telephony_Connection_Connection_enableAirplaneMode_0200 - * @tc.name : enableAirplaneMode - * @tc.desc : Enables the airplane mode for a device. - */ - it('Telephony_Connection_Connection_enableAirplaneMode_0200', 0, function (done) { - console.log("************* Telephony_Connection_Connection_enableAirplaneMode_0200 Test start*************"); - connection.enableAirplaneMode().then(data => { - expect(true).assertTrue(); - }).catch(err => { - expect().assertFail(); - }); - console.log("************* Telephony_Connection_Connection_enableAirplaneMode_0200 Test end*************"); - done(); - }); - - /* - * @tc.number : Telephony_Connection_Connection_disableAirplaneMode_0100 - * @tc.name : disableAirplaneMode - * @tc.desc : Disables the airplane mode for a device. - */ - it('Telephony_Connection_Connection_disableAirplaneMode_0100', 0, function (done) { - console.log("************* Telephony_Connection_Connection_disableAirplaneMode_0100 Test start*************"); - connection.disableAirplaneMode((error, data) => { - if (error) { - expect(true).assertTrue(); - done(); - return; - } - expect().assertFail(); - done(); - }); - console.log("************* Telephony_Connection_Connection_disableAirplaneMode_0100 Test end*************"); - done(); - }); - - /* - * @tc.number : Telephony_Connection_Connection_disableAirplaneMode_0200 - * @tc.name : disableAirplaneMode - * @tc.desc : Disables the airplane mode for a device. - */ - it('Telephony_Connection_Connection_disableAirplaneMode_0200', 0, function (done) { - console.log("************* Telephony_Connection_Connection_reportNetConnected_0200 Test start*************"); - connection.disableAirplaneMode().then(data => { - expect(true).assertTrue(); - }).catch(err => { - expect().assertFail(); - }); - console.log("************* Telephony_Connection_Connection_disableAirplaneMode_0200 Test end*************"); - done(); - }); - - /* * @tc.number : Telephony_Connection_Connection_reportNetConnected_0100 * @tc.name : reportNetConnected diff --git a/telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/List.test.ets b/telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/List.test.ets index 410c1e4b7..eed2cac75 100644 --- a/telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/List.test.ets +++ b/telephony/telephonyjstest/netmanager_socket/entry/src/main/ets/MainAbility/test/List.test.ets @@ -16,13 +16,13 @@ //other import import connectionJsunit from './ConnectionJsunit.test.ets'; import socketJsunit from './SocketJsunit.test.ets'; -//import webSocketJsunit from './WebSocketJsunit.test.ets'; +import webSocketJsunit from './WebSocketJsunit.test.ets'; import connectionSecondJsUnit from './ConnectionSecondJsUnit.test.ets'; export default function testsuite() { //other socketJsunit(); - //webSocketJsunit(); + webSocketJsunit(); connectionJsunit(); connectionSecondJsUnit(); } \ No newline at end of file diff --git a/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/config.json b/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/config.json index b22e9627b..113a434ba 100644 --- a/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/config.json +++ b/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/config.json @@ -45,7 +45,7 @@ "launchType": "standard" } ], - "reqPermissions": [ + "reqPermissions": [ { "name": "ohos.permission.LOCATION", "reason": "need use ohos.permission.LOCATION" diff --git a/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js b/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js index a4a24a43e..acb46b815 100644 --- a/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js +++ b/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js @@ -240,105 +240,9 @@ describe('ActsNetworkSearchTest', function () { done(); }); - /** - * @tc.number Telephony_NetworkSearch_setNetworkSelectionMode_Async_0700 - * @tc.name SlotId parameter input is -1, test setNetworkSelectionMode() query function go to the error - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_setNetworkSelectionMode_Async_0700', 0, async function (done) { - - let networkSMode = { - slotId: 55, //set the error slot id is 55 - selectMode: radio.NETWORK_SELECTION_AUTOMATIC, - networkInformation: { - operatorName: '', - operatorNumeric: '', - state: radio.NETWORK_AVAILABLE, - radioTech: radio.RADIO_TECHNOLOGY_GSM.toString(), - }, - resumeSelection: false, - }; - console.log( - `Telephony_NetworkSearch_setNetworkSelectionMode_Async_0700 networkSMode:${JSON.stringify(networkSMode)}`) - radio.setNetworkSelectionMode(networkSMode, (err) => { - if (err) { - console.log('Telephony_NetworkSearch_setNetworkSelectionMode_Async_0700 set finish'); - done(); - return; - } - console.log('Telephony_NetworkSearch_setNetworkSelectionMode_Async_0700 set not go to err'); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_NetworkSearch_setNetworkSelectionMode_Promise_0700 - * @tc.name SlotId parameter input is -1, test setNetworkSelectionMode() query function go to the error - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_setNetworkSelectionMode_Promise_0700', 0, async function (done) { - let networkSMode = { - slotId: 55, //set the error slot id is 55 - selectMode: radio.NETWORK_SELECTION_AUTOMATIC, - networkInformation: { - operatorName: '', - operatorNumeric: '', - state: radio.NETWORK_AVAILABLE, - radioTech: radio.RADIO_TECHNOLOGY_GSM.toString(), - }, - resumeSelection: false, - }; - console.log( - `Telephony_NetworkSearch_setNetworkSelectionMode_Promise_0700 networkSMode:${JSON.stringify(networkSMode)}`) - try { - await radio.setNetworkSelectionMode(networkSMode); - console.log('Telephony_NetworkSearch_setNetworkSelectionMode_Promise_0200 set fail'); - expect().assertFail(); - done(); - } catch (err) { - console.log('Telephony_NetworkSearch_setNetworkSelectionMode_Promise_0200 set finish'); - done(); - }; - }); - - /** - * @tc.number Telephony_NetworkSearch_getNetworkSearchInformation_Async_0400 - * @tc.name SlotId parameter input is -1, test getNetworkSearchInformation() query function go to the error - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getNetworkSearchInformation_Async_0400', 0, async function (done) { - radio.getNetworkSearchInformation(SLOT_2, (err, data) => { - if (err) { - expect(data.isNetworkSearchSuccess != true).assertTrue(); - expect(data.networkSearchResult != undefined).assertTrue(); - console.log('Telephony_NetworkSearch_getNetworkSearchInformation_Async_0400 finish'); - done(); - } else { - console.log('Telephony_NetworkSearch_getNetworkSearchInformation_Async_0400 fail not go to err'); - expect().assertFail(); - } - }); - done(); - }); + - /** - * @tc.number Telephony_NetworkSearch_getNetworkSearchInformation_Promise_0400 - * @tc.name SlotId parameter input is -1, test getNetworkSearchInformation() query function go to the error - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getNetworkSearchInformation_Promise_0400', 0, async function (done) { - try { - await radio.getNetworkSearchInformation(SLOT_2); - console.log('Telephony_NetworkSearch_getNetworkSearchInformation_Promise_0400 fail not go to err'); - expect().assertFail(); - done(); - return; - } catch (err) { - console.log(`Telephony_NetworkSearch_getNetworkSearchInformation_Promise_0400 finish err: ${err}`); - } - done(); - }); + /** * @tc.number Telephony_NetworkSearch_getNetworkState_Promise_0700 @@ -433,391 +337,7 @@ describe('ActsNetworkSearchTest', function () { } }) - /** - * @tc.number Telephony_NetworkSearch_getPreferredNetwork_Async_0700 - * @tc.name Verify the abnormal input of "slotId", test getPreferredNetwork() to view the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getPreferredNetwork_Async_0700', 0, async function (done) { - radio.getPreferredNetwork(SLOT_2, (err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_getPreferredNetwork_Async_0700 get PASS err: ${err}`); - done(); - return; - } - console.log(`Telephony_NetworkSearch_getPreferredNetwork_Async_0700 fail not into err data: ${data}`); - expect().assertFail(); - done(); - }) - }) - - /** - * @tc.number Telephony_NetworkSearch_getPreferredNetwork_Promise_0700 - * @tc.name Verify the abnormal input of "slotId", test getPreferredNetwork() to view the return result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getPreferredNetwork_Promise_0700', 0, async function (done) { - try { - let data = await radio.getPreferredNetwork(SLOT_2); - console.log(`Telephony_NetworkSearch_getPreferredNetwork_Promise_0700 fail data: ${data}`); - expect().assertFail(); - done(); - return; - } catch (err) { - console.log(`Telephony_NetworkSearch_getPreferredNetwork_Promise_0700 finish err: ${err}`); - done(); - } - }) - - /** - * @tc.number Telephony_NetworkSearch_setPreferredNetwork_Async_0100 - * @tc.name Verify the abnormal input of "preferredNetworkMode", - * test setPreferredNetwork() to view the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_setPreferredNetwork_Async_0100', 0, async function (done) { - radio.setPreferredNetwork(SLOT_0, PREFERRED_MODE_ERR2, (err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_setPreferredNetwork_Async_0100 set err: ${err}`); - radio.getPreferredNetwork(SLOT_0, (err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_setPreferredNetwork_Async_0100 get fail err: ${err}`); - done(); - return; - } - console.log(`Telephony_NetworkSearch_setPreferredNetwork_Async_0100 finish data: ${data}`); - expect(data === radio.PREFERRED_NETWORK_MODE_AUTO).assertTrue(); - done(); - }) - } else { - console.log(`Telephony_NetworkSearch_setPreferredNetwork_Async_0100 fail err: ${data}`); - expect().assertFail(); - done(); - } - }); - }); - - /** - * @tc.number Telephony_NetworkSearch_setPreferredNetwork_Async_0600 - * @tc.name Verify the "slotId" abnormal input, test setPreferredNetwork() to view the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_setPreferredNetwork_Async_0600', 0, async function (done) { - radio.setPreferredNetwork(SLOT_2, radio.PREFERRED_NETWORK_MODE_GSM, (err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_setPreferredNetwork_Async_0600 finish err: ${err}`); - radio.getPreferredNetwork(SLOT_0, (err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_setPreferredNetwork_Async_0600 get fail err: ${err}`); - done(); - return; - } - console.log( - `Telephony_NetworkSearch_setPreferredNetwork_Async_0600 finish data: ${JSON.stringify(data)}`); - expect(data === radio.PREFERRED_NETWORK_MODE_AUTO).assertTrue(); - done(); - }) - } else { - console.log(`Telephony_NetworkSearch_setPreferredNetwork_Async_0600 fail: not go to err ${data}`); - expect().assertFail(); - done(); - } - }); - }); - - /** - * @tc.number Telephony_NetworkSearch_setPreferredNetwork_Promise_0100 - * @tc.name Verify the abnormal input of "preferredNetworkMode", - * test setPreferredNetwork() to view the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_setPreferredNetwork_Promise_0100', 0, async function (done) { - try { - await radio.setPreferredNetwork(SLOT_0, PREFERRED_MODE_ERR2); - console.log('Telephony_NetworkSearch_setPreferredNetwork_Promise_0100 set fail: not go to err'); - expect().assertFail(); - done(); - } catch (err) { - try { - let data = await radio.getPreferredNetwork(SLOT_0); - console.log(`Telephony_NetworkSearch_setPreferredNetwork_Promise_0100 finish data: ${data}`); - expect(data === radio.PREFERRED_NETWORK_MODE_AUTO).assertTrue(); - done(); - } catch (err) { - console.log(`Telephony_NetworkSearch_setPreferredNetwork_Promise_0100 fail err: ${err}`); - done(); - } - } - }); - - /** - * @tc.number Telephony_NetworkSearch_setPreferredNetwork_Promise_0600 - * @tc.name Verify the abnormal input of "slotId", test setPreferredNetwork() return result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_setPreferredNetwork_Promise_0600', 0, async function (done) { - 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(); - done(); - } catch (err) { - try { - let data = await radio.getPreferredNetwork(SLOT_0); - console.log(`Telephony_NetworkSearch_setPreferredNetwork_Promise_0600 finish data: ${data}`); - expect(data === radio.PREFERRED_NETWORK_MODE_AUTO).assertTrue(); - done(); - } catch (err) { - console.log(`Telephony_NetworkSearch_setPreferredNetwork_Promise_0600 fail err: ${err}`); - done(); - } - } - }); - - /** - * @tc.number Telephony_NetworkSearch_getCellInformation_Async_0500 - * @tc.name Test getCellInformation() with anomalous soltId(-1) to view the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getCellInformation_Async_0500', 0, async function (done) { - radio.getCellInformation(SLOT_2, (err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_getCellInformation_Async_0500 fail: ${err}`); - expect().assertFail(); - done(); - return; - } - console.log(`Telephony_NetworkSearch_getCellInformation_Async_0500 end data: ${JSON.stringify(data)}`); - expect(data !== '' && data != undefined && data != null).assertTrue(); - expect(data.length).assertEqual(0); - done(); - }); - }); - - /** - * @tc.number Telephony_NetworkSearch_getCellInformation_Promise_0500 - * @tc.name Test getCellInformation() with anomalous soltId(-1) to view the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getCellInformation_Promise_0500', 0, async function (done) { - radio.getCellInformation(SLOT_2).then(data => { - console.log(`Telephony_NetworkSearch_getCellInformation_Promise_0500 end data: ${JSON.stringify(data)}`); - expect(data !== '' && data != undefined && data != null).assertTrue(); - expect(data.length).assertEqual(0); - done(); - }).catch(err => { - console.log(`Telephony_NetworkSearch_getCellInformation_Promise_0500 fail: ${err}`); - expect().assertFail(); - done(); - }) - }); - - /** - * @tc.number Telephony_NetworkSearch_sendUpdateCellLocationRequest_Async_0100 - * @tc.name Test sendUpdateCellLocationRequest() to view the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_sendUpdateCellLocationRequest_Async_0100', 0, async function (done) { - radio.sendUpdateCellLocationRequest((err) => { - if (err) { - console.log(`Telephony_NetworkSearch_sendUpdateCellLocationRequest_Async_0100 fail: ${err}`); - done(); - return; - } - console.log(`Telephony_NetworkSearch_sendUpdateCellLocationRequest_Async_0100 success`) - done(); - }); - }); - - /** - * @tc.number Telephony_NetworkSearch_sendUpdateCellLocationRequest_Promise_0100 - * @tc.name Test sendUpdateCellLocationRequest() to view the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_sendUpdateCellLocationRequest_Promise_0100', 0, async function (done) { - radio.sendUpdateCellLocationRequest().then(data => { - console.log(`Telephony_NetworkSearch_sendUpdateCellLocationRequest_Promise_0100 end data: ${data}`); - done(); - }).catch(err => { - console.log(`Telephony_NetworkSearch_sendUpdateCellLocationRequest_Promise_0100 fail: ${err}`); - done(); - }) - }); - - /** - * @tc.number Telephony_NetworkSearch_getIMEI_Async_0500 - * @tc.name Test getIMEI(-1) to check the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getIMEI_Async_0500', 0, async function (done) { - radio.getIMEI(SLOT_2, (err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_getIMEI_Async_0500 fail: ${err}`); - expect().assertFail(); - done(); - return; - } - console.log(`Telephony_NetworkSearch_getIMEI_Async_0500 end data: ${data}`); - expect(data === '').assertTrue(); - done(); - }); - }); - - /** - * @tc.number Telephony_NetworkSearch_getIMEI_Promise_0500 - * @tc.name Test getIMEI(-1) to check the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getIMEI_Promise_0500', 0, async function (done) { - radio.getIMEI(SLOT_2).then(data => { - console.log(`Telephony_NetworkSearch_getIMEI_Promise_0500 end data: ${data}`); - expect(data === '').assertTrue(); - done(); - }).catch(err => { - console.log(`Telephony_NetworkSearch_getIMEI_Promise_0500 fail: ${err}`); - expect().assertFail(); - done(); - }) - }); - - /** - * @tc.number Telephony_NetworkSearch_getUniqueDeviceId_Async_0500 - * @tc.name Test getUniqueDeviceId(-1) to check the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getUniqueDeviceId_Async_0500', 0, async function (done) { - radio.getUniqueDeviceId(SLOT_2, (err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_getUniqueDeviceId_Async_0500 fail: ${err}`); - expect().assertFail(); - done(); - return; - } - console.log(`Telephony_NetworkSearch_getUniqueDeviceId_Async_0500 end data: ${data}`); - expect(data === '').assertTrue(); - done(); - }); - }); - - /** - * @tc.number Telephony_NetworkSearch_getUniqueDeviceId_Promise_0500 - * @tc.name Test getUniqueDeviceId(-1) to check the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getUniqueDeviceId_Promise_0500', 0, async function (done) { - radio.getUniqueDeviceId(SLOT_2).then(data => { - console.log(`Telephony_NetworkSearch_getUniqueDeviceId_Promise_0500 end data: ${data}`); - expect(data === '').assertTrue(); - done(); - }).catch(err => { - console.log(`Telephony_NetworkSearch_getUniqueDeviceId_Promise_0500 fail: ${err}`); - expect().assertFail(); - done(); - }) - }); - - /** - * @tc.number Telephony_NetworkSearch_getNrOptionMode_Async_0500 - * @tc.name Test getNrOptionMode(-1) to check the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getNrOptionMode_Async_0500', 0, async function (done) { - radio.getNrOptionMode(SLOT_2, (err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_getNrOptionMode_Async_0500 get fail err: ${err}`); - expect().assertFail(); - done(); - return; - } - console.log(`Telephony_NetworkSearch_getNrOptionMode_Async_0500 end data: ${JSON.stringify(data)}`); - expect(data === radio.NR_OPTION_UNKNOWN).assertTrue(); - done(); - }); - }) - - /** - * @tc.number Telephony_NetworkSearch_getNrOptionMode_Promise_0500 - * @tc.name Test getNrOptionMode(-1) to check the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getNrOptionMode_Promise_0500', 0, async function (done) { - radio.getNrOptionMode(SLOT_2).then(data => { - console.log(`Telephony_NetworkSearch_getNrOptionMode_Promise_0500 end data: ${data}`); - expect(data === radio.NR_OPTION_UNKNOWN).assertTrue(); - done(); - }).catch(err => { - console.log(`Telephony_NetworkSearch_getNrOptionMode_Promise_0500 fail: ${err}`); - expect().assertFail(); - done(); - }) - }); - - /** - * @tc.number Telephony_NetworkSearch_turnOnRadio_Async_0200 - * @tc.name Test The function turnOnRadio - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_turnOnRadio_Async_0200', 0, async function (done) { - radio.turnOnRadio((err) => { - if (err) { - console.log(`Telephony_NetworkSearch_turnOnRadio_Async_0200 turnOn fail: ${err}`); - done(); - return; - } - console.log('Telephony_NetworkSearch_turnOnRadio_Async_0200 turnOn finish'); - done(); - }); - }); - - /** - * @tc.number Telephony_NetworkSearch_turnOnRadio_Promise_0200 - * @tc.name Test The function turnOnRadio - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_turnOnRadio_Promise_0200', 0, async function (done) { - try { - await radio.turnOnRadio(); - console.log('Telephony_NetworkSearch_turnOnRadio_Promise_0200 success'); - done(); - } catch (err) { - console.log(`Telephony_NetworkSearch_turnOnRadio_Promise_0200 fail ${err}`); - done(); - } - }); - - /** - * @tc.number Telephony_NetworkSearch_turnOffRadio_Async_0200 - * @tc.name Test The function turnOffRadio - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_turnOffRadio_Async_0200', 0, async function (done) { - radio.turnOffRadio((err) => { - if (err) { - console.log(`Telephony_NetworkSearch_turnOffRadio_Async_0200 turnOff fail: ${err}`); - done(); - return; - } - console.log('Telephony_NetworkSearch_turnOffRadio_Async_0200 turnOff finish'); - done(); - }); - }); - - /** - * @tc.number Telephony_NetworkSearch_turnOffRadio_Promise_0200 - * @tc.name Test The function turnOffRadio - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_turnOffRadio_Promise_0200', 0, async function (done) { - try { - await radio.turnOffRadio(); - console.log('Telephony_NetworkSearch_turnOffRadio_Promise_0200 success'); - done(); - } catch (err) { - console.log(`Telephony_NetworkSearch_turnOffRadio_Promise_0200 fail ${err}`); - done(); - } - }); - + /** * @tc.number Telephony_NetworkSearch_isRadioOn_Async_0200 * @tc.name Test The function isRadioOn diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/SimJsunit.test.ets b/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/SimJsunit.test.ets deleted file mode 100644 index 722f5dfb3..000000000 --- a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/SimJsunit.test.ets +++ /dev/null @@ -1,168 +0,0 @@ -// @ts-nocheck -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; -import sim from '@ohos.telephony.sim'; -import * as env from './lib/Const.js'; -import utils from './Utils.ets' -export default function simJsunit() { - describe('appInfoTest', function () { - console.log("************* sim Test start*************"); - /** - * @tc.number Telephony_Sim_getOperatorConfigs_Async_0100 - * @tc.name The slotId parameter is 0 and the OperatorConfig structure is not expected to be empty - * @tc.desc Function test - */ - it('Telephony_Sim_getOperatorConfigs_Async_0100', 0, async function (done) { - if (utils.notCheck) { - expect(true).assertTrue(); - done(); - return; - } - console.log('Telephony_Sim_getOperatorConfigs_Async_0100 start'); - let containerIsEmpty = 0; - sim.getOperatorConfigs(env.DEFAULT_SLOTID, (err, data) => { - console.log('Telephony_Sim_getOperatorConfigs_Async_0100 result'); - if (err) { - console.log(`Telephony_Sim_getOperatorConfigs_Async_0100 fail, err : ${err.message}`); - done(); - return; - } - expect(Object.keys(data).length !== containerIsEmpty).assertTrue(); - expect(data.field !== containerIsEmpty).assertTrue(); - expect(data.value !== containerIsEmpty).assertTrue(); - console.log('Telephony_Sim_getOperatorConfigs_Async_0100 finish'); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_getSimAccountInfo_Async_0100 - * @tc.name Get the return value by calling the GetSimAccountInfo interface SIM ID input parameter 0. - * @tc.desc Function test - */ - it('Telephony_Sim_getSimAccountInfo_Async_0100', 0, async function (done) { - if (utils.notCheck) { - expect(true).assertTrue(); - done(); - return; - } - const CASE_NAME = 'Telephony_Sim_getSimAccountInfo_Async_0100'; - let iccIdValue; - sim.getSimAccountInfo(env.DEFAULT_SLOTID, (err, info) => { - if (err) { - console.log(`${CASE_NAME} fail ,err : ${err.message}`); - done(); - return; - } - console.log(`${CASE_NAME} getSimAccountInfo: ${JSON.stringify(info)}`); - expect(info.slotIndex === env.DEFAULT_SLOTID - && info.isEsim === false - && info.isActive === true - && info.iccId === iccIdValue - && info.showName === env.SIM_SLOT_NAME - && info.showNumber === env.SIM_SLOT_NUMBER - && info.simId === "simId" - ).assertTrue(); - console.log(`${CASE_NAME} finish`); - done(); - }); - }); - /** - * @tc.number Telephony_Sim_unlockPin_Async_0100 - * @tc.name Test the unlockPin interface when the card status is ready state. - * @tc.desc Function test - */ - it('Telephony_Sim_unlockPin_Async_0100', 0, async function (done) { - if (utils.notCheck) { - expect(true).assertTrue(); - done(); - return; - } - let PIN = '1234'; - sim.unlockPin(env.DEFAULT_SLOTID, PIN, (err, data) => { - if (err) { - console.log(`Telephony_Sim_unlockPin_Async_0100 fail, err: ${err.message}`); - done(); - return; - } - expect(data.result === env.OTHER_ABNORMAL).assertTrue(); - console.log('Telephony_Sim_unlockPin_Async_0100 finish'); - done(); - }); - }); - /** - * @tc.number Telephony_Sim_addIccDiallingNumbers_Async_0100 - * @tc.name Test sim.addIccDiallingNumbers(soltId: -1, type: 1, diallingNumbers: - * {recordNumber: 1, alphaTag: 'test', number: '12345678', pin2: '123@#ABCD'}, - * callback: AsyncCallback) async callback interface, expect enter error. - * @tc.desc Function test - */ - const CONTACT_INFO = { 'recordNumber': 1, 'alphaTag': 'test', 'number': '12345678' }; - const GENERAL_CONTACT_INFO = Object.assign({}, { 'pin2': env.INCORRECT_PIN2 }, CONTACT_INFO); - it('Telephony_Sim_addIccDiallingNumbers_Async_0100', 0, async function (done) { - if (utils.notCheck) { - expect(true).assertTrue(); - done(); - return; - } - const CASE_NAME = 'Telephony_Sim_addIccDiallingNumbers_Async_0100'; - var number = env.SLOTID_MINUS1; - sim.addIccDiallingNumbers(number, - sim.GENERAL_CONTACT, - GENERAL_CONTACT_INFO, - error => { - if (error) { - console.log(`${CASE_NAME} expect error: ${error.message}`); - console.log(`${CASE_NAME} finish.`); - } else { - console.log(`${CASE_NAME} test fail.`); - expect().assertFail(); - } - done(); - }); - }); - /** - * @tc.number Telephony_Sim_SetLockState_Async_0100 - * @tc.name Test the SetLockState async callback interface to open the PIN lock and check the callback value - * @tc.desc Function test - */ - it('Telephony_Sim_SetLockState_Async_0100', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_SetLockState_Async_0100'; - if (utils.notCheck) { - expect(true).assertTrue(); - done(); - return; - } - const lockInfo = { lockType: sim.PIN_LOCK, state: sim.LOCK_ON, password: env.CORRECT_PIN }; - await setPinLockState(sim.LOCK_OFF); - sim.setLockState(env.DEFAULT_SLOTID, lockInfo, (error, lockStatusResponse) => { - if (error) { - console.log(`${CASE_NAME} setLockState error: ${error.message}`); - expect().assertFail(); - done(); - return; - } - if (lockStatusResponse.result !== env.LOCK_RESULT.SUCCESS) { - console.log(`${CASE_NAME} setLockState failure, lock status response: ${lockStatusResponse.result}`); - expect().assertFail(); - done(); - return; - } - }); - }); - console.log("************* sim Test end*************"); - }) -} diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/SmsMmsJsunit.test.ets b/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/SmsMmsJsunit.test.ets deleted file mode 100644 index 8e5fba7f4..000000000 --- a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/SmsMmsJsunit.test.ets +++ /dev/null @@ -1,928 +0,0 @@ -// @ts-nocheck -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; -import mms from '@ohos.telephony.sms'; -import utils from './Utils.ets' -export default function smsUiJsunit() { - describe('appInfoTest', function () { - /** - * @tc.number Telephony_SmsMms_encodeMms_Async_0100 - * @tc.name SendReq type MMS, encoding after decoding, the content after decoding and coding before the same - * @tc.desc Function test - */ - it('Telephony_SmsMms_encodeMms_Async_0100', 0, async function (done) { - if (utils.notCheck) { - expect(true).assertTrue(); - done(); - return; - } - let mmsType = { - "from": { - address: '+861381234****/TYPE=PLMN', charset: mms.UTF_8 - }, - to: [{ - address: '+861388888****/TYPE=PLMN', charset: mms.UTF_8 - }], - transactionId: '2077.1427358451410', - version: mms.MMS_VERSION_1_2, - date: 1639378126, - cc: [{ - address: "+861381111****/TYPE=PLMN", charset: mms.UTF_8 - }], - bcc: [{ - address: "+861382222****/TYPE=PLMN", charset: mms.UTF_8 - }], - subject: "Test mms", - messageClass: 130, - expiry: 1639378126, - priority: mms.MMS_LOW, - senderVisibility: 129, - deliveryReport: 128, - readReport: 129, - contentType: "application/vnd.wap.multipart.related", - }; - let attachment = [ - { - path: '/data/telephony/enSrc/content.text', - fileName: 'content.text', - contentId: '', - contentLocation: 'content.text', - contentDisposition: mms.FROM_DATA, - contentTransferEncoding: 'base64', - contentType: 'text/plain', - isSmil: false, - inBuff: [], - charset: mms.UTF_8 - }, - { - path: '/data/telephony/enSrc/618C0A89.smil', - fileName: '618C0A89.smil', - contentId: '<0000>', - contentLocation: '618C0A89.smil', - contentDisposition: mms.ATTACHMENT, - contentTransferEncoding: 'base64', - contentType: 'application/smil', - isSmil: true, - inBuff: [], - charset: mms.UTF_8 - }, - { - path: '/data/telephony/enSrc/picture.gif', - fileName: 'picture.gif', - contentId: '', - contentLocation: 'picture.gif', - contentDisposition: mms.INLINE, - contentTransferEncoding: 'base64', - contentType: 'image/gif', - isSmil: false, - inBuff: [], - charset: mms.UTF_8 - }]; - - mms.encodeMms({ - messageType: mms.TYPE_MMS_SEND_REQ, mmsType, attachment - }, (err, encodeData) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0100 encodeMms fail'); - done(); - return; - } - console.log('Telephony_SmsMms_encodeMms_Async_0100 encodeMms finish'); - mms.decodeMms(encodeData, (err, data) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0100 fail'); - done(); - return; - } - expect(data.messageType === mms.TYPE_MMS_SEND_REQ).assertTrue(); - expect(data.mmsType.from.address === '+861381234****/TYPE=PLMN').assertTrue(); - expect(data.mmsType.from.charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.to.length > 0).assertTrue(); - expect(data.mmsType.to[0].address === '+861388888****/TYPE=PLMN').assertTrue(); - expect(data.mmsType.to[0].charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.transactionId === '2077.1427358451410').assertTrue(); - expect(data.mmsType.version === mms.MMS_VERSION_1_2).assertTrue(); - expect(data.mmsType.date > 0).assertTrue(); - expect(data.mmsType.cc.length > 0).assertTrue(); - expect(data.mmsType.cc[0].address === '+861381111****/TYPE=PLMN').assertTrue(); - expect(data.mmsType.cc[0].charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.bcc.length > 0).assertTrue(); - expect(data.mmsType.bcc[0].address === '+861382222****/TYPE=PLMN').assertTrue(); - expect(data.mmsType.bcc[0].charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.subject === 'Test mms').assertTrue(); - expect(data.mmsType.messageClass === 130).assertTrue(); - expect(data.mmsType.expiry !== 0).assertTrue(); - expect(data.mmsType.priority === mms.MMS_LOW).assertTrue(); - expect(data.mmsType.senderVisibility === 129).assertTrue(); - expect(data.mmsType.deliveryReport === 128).assertTrue(); - expect(data.mmsType.readReport === 129).assertTrue(); - expect(data.mmsType.contentType === 'application/vnd.wap.multipart.related').assertTrue(); - if (data.attachment != null) { - expect(data.attachment.length > 0).assertTrue(); - expect(data.attachment[0].path === '').assertTrue(); - expect(data.attachment[0].fileName === '618C0A89.smil').assertTrue(); - expect(data.attachment[0].contentId === '<0000>').assertTrue(); - expect(data.attachment[0].contentLocation === '618C0A89.smil').assertTrue(); - expect(data.attachment[0].contentDisposition === mms.ATTACHMENT).assertTrue(); - expect(data.attachment[0].contentTransferEncoding === 'base64').assertTrue(); - expect(data.attachment[0].contentType === 'application/smil').assertTrue(); - expect(data.attachment[0].isSmil).assertTrue(); - expect(data.attachment[0].inBuff.length > 0).assertTrue(); - expect(data.attachment[0].charset === mms.UTF_8).assertTrue(); - expect(data.attachment[1].path === '').assertTrue(); - expect(data.attachment[1].fileName === 'content.text').assertTrue(); - expect(data.attachment[1].contentId === '').assertTrue(); - expect(data.attachment[1].contentLocation === 'content.text').assertTrue(); - expect(data.attachment[1].contentDisposition === mms.FROM_DATA).assertTrue(); - expect(data.attachment[1].contentTransferEncoding === 'base64').assertTrue(); - expect(data.attachment[1].contentType === 'text/plain').assertTrue(); - expect(data.attachment[1].isSmil).assertFalse(); - expect(data.attachment[1].inBuff.length > 0).assertTrue(); - expect(data.attachment[1].charset === mms.UTF_8).assertTrue(); - expect(data.attachment[2].path === '').assertTrue(); - expect(data.attachment[2].fileName === 'picture.gif').assertTrue(); - expect(data.attachment[2].contentId === '').assertTrue(); - expect(data.attachment[2].contentLocation === 'picture.gif').assertTrue(); - expect(data.attachment[2].contentDisposition === mms.INLINE).assertTrue(); - expect(data.attachment[2].contentTransferEncoding === 'base64').assertTrue(); - expect(data.attachment[2].contentType === 'image/gif').assertTrue(); - expect(data.attachment[2].isSmil).assertFalse(); - expect(data.attachment[2].inBuff.length > 0).assertTrue(); - expect(data.attachment[2].charset === mms.UTF_8).assertTrue(); - console.log('Telephony_SmsMms_encodeMms_Async_0100 finish'); - } - done(); - }); - }); - }); - - /** - * @tc.number Telephony_SmsMms_encodeMms_Async_0200 - * @tc.name SendConf type MMS, encoding after decoding, the content after decoding and coding before the same - * @tc.desc Function test - */ - it('Telephony_SmsMms_encodeMms_Async_0200', 0, async function (done) { - if (utils.notCheck) { - expect(true).assertTrue(); - done(); - return; - } - let mmsType = { - responseState: 128, - transactionId: '2077.1427358451410', - version: mms.MMS_VERSION_1_1, - messageId: '0001', - }; - mms.encodeMms({ - messageType: mms.TYPE_MMS_SEND_CONF, mmsType - }, (err, encodeData) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0200 encodeMms fail'); - done(); - return; - } - console.log('Telephony_SmsMms_encodeMms_Async_0200 encodeMms finish'); - mms.decodeMms(encodeData, (err, data) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0200 fail'); - done(); - return; - } - expect(data.messageType === mms.TYPE_MMS_SEND_CONF).assertTrue(); - expect(data.mmsType.responseState === 128).assertTrue(); - expect(data.mmsType.transactionId === '2077.1427358451410').assertTrue(); - expect(data.mmsType.version === mms.MMS_VERSION_1_1).assertTrue(); - expect(data.mmsType.messageId === '0001').assertTrue(); - console.log('Telephony_SmsMms_encodeMms_Async_0200 finish'); - done(); - }); - }); - }); - - /** - * @tc.number Telephony_SmsMms_encodeMms_Async_0300 - * @tc.name NotificationInd type MMS, encoding after decoding, - * the content after decoding and coding before the same - * @tc.desc Function test - */ - it('Telephony_SmsMms_encodeMms_Async_0300', 0, async function (done) { - let mmsType = { - transactionId: "2080.142730", - messageClass: 128, - messageSize: 12345678, - expiry: 1639378126, - version: mms.MMS_VERSION_1_3, - "from": { - address: '+861381234****/TYPE=PLMN', charset: mms.UTF_8 - }, - subject: "Test mms", - deliveryReport: 128, - contentLocation: "Test", - contentClass: 128, - }; - mms.encodeMms({ - messageType: mms.TYPE_MMS_NOTIFICATION_IND, mmsType - }, (err, encodeData) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0300 encodeMms fail'); - done(); - return; - } - console.log('Telephony_SmsMms_encodeMms_Async_0300 encodeMms finish'); - mms.decodeMms(encodeData, (err, data) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0300 fail'); - done(); - return; - } - expect(data.messageType === mms.TYPE_MMS_NOTIFICATION_IND).assertTrue(); - expect(data.mmsType.transactionId === '2080.142730').assertTrue(); - expect(data.mmsType.messageClass === 128).assertTrue(); - expect(data.mmsType.messageSize === 12345678).assertTrue(); - expect(data.mmsType.expiry !== 0).assertTrue(); - expect(data.mmsType.version === mms.MMS_VERSION_1_3).assertTrue(); - expect(data.mmsType.from.address.length > 0).assertTrue(); - expect(data.mmsType.from.charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.subject === 'Test mms').assertTrue(); - expect(data.mmsType.deliveryReport === 128).assertTrue(); - expect(data.mmsType.contentLocation === 'Test').assertTrue(); - expect(data.mmsType.contentClass === 128).assertTrue(); - console.log('Telephony_SmsMms_encodeMms_Async_0300 finish'); - done(); - }); - }); - }); - - /** - * @tc.number Telephony_SmsMms_encodeMms_Async_0400 - * @tc.name NotifyRespInd type MMS, encoding after decoding,the content after decoding and coding before the same - * @tc.desc Function test - */ - it('Telephony_SmsMms_encodeMms_Async_0400', 0, async function (done) { - let mmsType = { - transactionId: '2920.1410', - status: 128, - version: mms.MMS_VERSION_1_0, - reportAllowed: mms.MMS_YES, - }; - mms.encodeMms({ - messageType: mms.TYPE_MMS_RESP_IND, mmsType - }, (err, encodeData) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0400 encodeMms fail'); - done(); - return; - } - console.log('Telephony_SmsMms_encodeMms_Async_0400 encodeMms finish'); - mms.decodeMms(encodeData, (err, data) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0400 fail'); - done(); - return; - } - expect(data.messageType === mms.TYPE_MMS_RESP_IND).assertTrue(); - expect(data.mmsType.transactionId === '2920.1410').assertTrue(); - expect(data.mmsType.status === 128).assertTrue(); - expect(data.mmsType.version === mms.MMS_VERSION_1_0).assertTrue(); - expect(data.mmsType.reportAllowed === mms.MMS_YES).assertTrue(); - console.log('Telephony_SmsMms_encodeMms_Async_0400 finish'); - done(); - }); - }); - }); - - /** - * @tc.number Telephony_SmsMms_encodeMms_Async_0500 - * @tc.name RetrieveConf type MMS, encoding after decoding, the content after decoding and coding before the same - * @tc.desc Function test - */ - it('Telephony_SmsMms_encodeMms_Async_0500', 0, async function (done) { - let mmsType = { - transactionId: "3077.142410", - messageId: "0001", - date: 1639378126, - version: mms.MMS_VERSION_1_2, - to: [{ - address: "+861388888****/TYPE=PLMN", charset: mms.UTF_8 - }], - "from": { - address: '+861381234****/TYPE=PLMN', charset: mms.UTF_8 - }, - cc: [{ - address: '+861381111****/TYPE=PLMN', charset: mms.UTF_8 - }], - subject: "Test mms", - priority: mms.MMS_HIGH, - deliveryReport: 128, - readReport: 128, - retrieveStatus: 128, - retrieveText: "0002", - contentType: "application/vnd.wap.multipart.related", - }; - mms.encodeMms({ - messageType: mms.TYPE_MMS_RETRIEVE_CONF, mmsType - }, (err, encodeData) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0500 encodeMms fail'); - done(); - return; - } - console.log('Telephony_SmsMms_encodeMms_Async_0500 encodeMms finish'); - mms.decodeMms(encodeData, (err, data) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0500 fail'); - done(); - return; - } - expect(data.messageType === mms.TYPE_MMS_RETRIEVE_CONF).assertTrue(); - expect(data.mmsType.transactionId === '3077.142410').assertTrue(); - expect(data.mmsType.messageId === '0001').assertTrue(); - expect(data.mmsType.date > 0).assertTrue(); - expect(data.mmsType.version === mms.MMS_VERSION_1_2).assertTrue(); - expect(data.mmsType.to.length > 0).assertTrue(); - expect(data.mmsType.to[0].address.length > 0).assertTrue(); - expect(data.mmsType.to[0].charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.from.address.length > 0).assertTrue(); - expect(data.mmsType.from.charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.cc.length > 0).assertTrue(); - expect(data.mmsType.cc[0].address.length > 0).assertTrue(); - expect(data.mmsType.cc[0].charset == mms.UTF_8).assertTrue(); - expect(data.mmsType.subject === 'Test mms').assertTrue(); - expect(data.mmsType.priority === mms.MMS_HIGH).assertTrue(); - expect(data.mmsType.deliveryReport === 128).assertTrue(); - expect(data.mmsType.readReport === 128).assertTrue(); - expect(data.mmsType.retrieveStatus === 128).assertTrue(); - expect(data.mmsType.retrieveText === '0002').assertTrue(); - expect(data.mmsType.contentType === 'application/vnd.wap.multipart.related').assertTrue(); - console.log('Telephony_SmsMms_encodeMms_Async_0500 finish'); - done(); - }); - }); - }); - - /** - * @tc.number Telephony_SmsMms_encodeMms_Async_0600 - * @tc.name AcknowledgeInd type MMS, encoding after decoding, - * the content after decoding and coding before the same - * @tc.desc Function test - */ - it('Telephony_SmsMms_encodeMms_Async_0600', 0, async function (done) { - let mmsType = { - transactionId: "27.14210", - version: mms.MMS_VERSION_1_2, - reportAllowed: mms.MMS_NO, - }; - mms.encodeMms({ - messageType: mms.TYPE_MMS_ACKNOWLEDGE_IND, mmsType - }, (err, encodeData) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0600 encodeMms fail'); - done(); - return; - } - console.log('Telephony_SmsMms_encodeMms_Async_0600 encodeMms finish'); - mms.decodeMms(encodeData, (err, data) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0600 fail'); - done(); - return; - } - expect(data.messageType === mms.TYPE_MMS_ACKNOWLEDGE_IND).assertTrue(); - expect(data.mmsType.transactionId === '27.14210').assertTrue(); - expect(data.mmsType.version === mms.MMS_VERSION_1_2).assertTrue(); - expect(data.mmsType.reportAllowed === mms.MMS_NO).assertTrue(); - console.log('Telephony_SmsMms_encodeMms_Async_0600 finish'); - done(); - }); - }); - }); - - /** - * @tc.number Telephony_SmsMms_encodeMms_Async_0700 - * @tc.name DeliveryInd type MMS, encoding after decoding, the content after decoding and coding before the same - * @tc.desc Function test - */ - it('Telephony_SmsMms_encodeMms_Async_0700', 0, async function (done) { - let mmsType = { - messageId: "0001", - date: 1639378126, - to: [{ - address: "+861388888****/TYPE=PLMN", charset: mms.UTF_8 - }], - status: 134, - version: mms.MMS_VERSION_1_2, - }; - mms.encodeMms({ - messageType: mms.TYPE_MMS_DELIVERY_IND, mmsType - }, (err, encodeData) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0700 encodeMms fail'); - done(); - return; - } - console.log('Telephony_SmsMms_encodeMms_Async_0700 encodeMms finish'); - mms.decodeMms(encodeData, (err, data) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0700 fail'); - done(); - return; - } - expect(data.messageType === mms.TYPE_MMS_DELIVERY_IND).assertTrue(); - expect(data.mmsType.messageId === '0001').assertTrue(); - expect(data.mmsType.date > 0).assertTrue(); - expect(data.mmsType.to.length > 0).assertTrue(); - expect(data.mmsType.to[0].address.length > 0).assertTrue(); - expect(data.mmsType.to[0].charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.status === 134).assertTrue(); - expect(data.mmsType.version === mms.MMS_VERSION_1_2).assertTrue(); - console.log('Telephony_SmsMms_encodeMms_Async_0700 finish'); - done(); - }); - }); - }); - - /** - * @tc.number Telephony_SmsMms_encodeMms_Async_0800 - * @tc.name ReadRecInd type MMS, encoding after decoding, the content after decoding and coding before the same - * @tc.desc Function test - */ - it('Telephony_SmsMms_encodeMms_Async_0800', 0, async function (done) { - let mmsType = { - version: mms.MMS_VERSION_1_0, - messageId: "0001", - to: [{ - address: "+861388888****/TYPE=PLMN", charset: mms.UTF_8 - }], - "from": { - address: "+861381234****/TYPE=PLMN", charset: mms.UTF_8 - }, - date: 1639378126, - readStatus: 128, - }; - mms.encodeMms({ - messageType: mms.TYPE_MMS_READ_REC_IND, mmsType - }, (err, encodeData) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0800 encodeMms fail'); - done(); - return; - } - console.log('Telephony_SmsMms_encodeMms_Async_0800 encodeMms finish'); - mms.decodeMms(encodeData, (err, data) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0800 fail'); - done(); - return; - } - expect(data.messageType === mms.TYPE_MMS_READ_REC_IND).assertTrue(); - expect(data.mmsType.version === mms.MMS_VERSION_1_0).assertTrue(); - expect(data.mmsType.messageId === '0001').assertTrue(); - expect(data.mmsType.to.length > 0).assertTrue(); - expect(data.mmsType.to[0].address.length > 0).assertTrue(); - expect(data.mmsType.to[0].charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.from.address.length > 0).assertTrue(); - expect(data.mmsType.from.charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.readStatus === 128).assertTrue(); - expect(data.mmsType.date > 0).assertTrue(); - console.log('Telephony_SmsMms_encodeMms_Async_0800 finish'); - done(); - }); - }); - }); - - /** - * @tc.number Telephony_SmsMms_encodeMms_Async_0900 - * @tc.name ReadOrigInd type MMS, encoding after decoding, the content after decoding and coding before the same - * @tc.desc Function test - */ - it('Telephony_SmsMms_encodeMms_Async_0900', 0, async function (done) { - let mmsType = { - version: mms.MMS_VERSION_1_1, - messageId: "0001", - to: [{ - address: "+861388888****/TYPE=PLMN", charset: mms.UTF_8 - }], - "from": { - address: "+861381234****/TYPE=PLMN", charset: mms.UTF_8 - }, - readStatus: 129, - date: 1639378126, - }; - mms.encodeMms({ - messageType: mms.TYPE_MMS_READ_ORIG_IND, mmsType - }, (err, encodeData) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0900 encodeMms fail'); - done(); - return; - } - console.log('Telephony_SmsMms_encodeMms_Async_0900 encodeMms finish'); - mms.decodeMms(encodeData, (err, data) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0900 fail'); - done(); - return; - } - expect(data.messageType === mms.TYPE_MMS_READ_ORIG_IND).assertTrue(); - expect(data.mmsType.version === mms.MMS_VERSION_1_1).assertTrue(); - expect(data.mmsType.messageId === '0001').assertTrue(); - expect(data.mmsType.to.length > 0).assertTrue(); - expect(data.mmsType.to[0].address.length > 0).assertTrue(); - expect(data.mmsType.to[0].charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.from.address.length > 0).assertTrue(); - expect(data.mmsType.from.charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.date > 0).assertTrue(); - expect(data.mmsType.readStatus === 129).assertTrue(); - console.log('Telephony_SmsMms_encodeMms_Async_0900 finish'); - done(); - }); - }); - }); - /** - * @tc.number Telephony_SmsMms_encodeMms_Async_0900 - * @tc.name RetrieveConf type MMS, encoding after decoding, the content after decoding and coding before the same - * @tc.desc Function test - */ - it('Telephony_SmsMms_encodeMms_Async_0900', 0, async function (done) { - let mmsType = { - transactionId: "3077.142410", - messageId: "0001", - date: 1639378126, - version: mms.MMS_VERSION_1_2, - to: [{ - address: "+861388888****/TYPE=PLMN", charset: mms.UTF_8 - }], - "from": { - address: '+861381234****/TYPE=PLMN', charset: mms.UTF_8 - }, - cc: [{ - address: '+861381111****/TYPE=PLMN', charset: mms.UTF_8 - }], - subject: "Test mms", - priority: mms.MMS_NORMAL, - deliveryReport: 128, - readReport: 128, - retrieveStatus: 128, - retrieveText: "0002", - contentType: "application/vnd.wap.multipart.related", - }; - mms.encodeMms({ - messageType: mms.TYPE_MMS_RETRIEVE_CONF, mmsType - }, (err, encodeData) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0900 encodeMms fail'); - done(); - return; - } - console.log('Telephony_SmsMms_encodeMms_Async_0900 encodeMms finish'); - mms.decodeMms(encodeData, (err, data) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0500 fail'); - done(); - return; - } - expect(data.messageType === mms.TYPE_MMS_RETRIEVE_CONF).assertTrue(); - expect(data.mmsType.transactionId === '3077.142410').assertTrue(); - expect(data.mmsType.messageId === '0001').assertTrue(); - expect(data.mmsType.date > 0).assertTrue(); - expect(data.mmsType.version === mms.MMS_VERSION_1_2).assertTrue(); - expect(data.mmsType.to.length > 0).assertTrue(); - expect(data.mmsType.to[0].address.length > 0).assertTrue(); - expect(data.mmsType.to[0].charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.from.address.length > 0).assertTrue(); - expect(data.mmsType.from.charset === mms.UTF_8).assertTrue(); - expect(data.mmsType.cc.length > 0).assertTrue(); - expect(data.mmsType.cc[0].address.length > 0).assertTrue(); - expect(data.mmsType.cc[0].charset == mms.UTF_8).assertTrue(); - expect(data.mmsType.subject === 'Test mms').assertTrue(); - expect(data.mmsType.priority === mms.MMS_NORMAL).assertTrue(); - expect(data.mmsType.deliveryReport === 128).assertTrue(); - expect(data.mmsType.readReport === 128).assertTrue(); - expect(data.mmsType.retrieveStatus === 128).assertTrue(); - expect(data.mmsType.retrieveText === '0002').assertTrue(); - expect(data.mmsType.contentType === 'application/vnd.wap.multipart.related').assertTrue(); - console.log('Telephony_SmsMms_encodeMms_Async_0500 finish'); - done(); - }); - }); - }); - - const SMS_SEND_DST_NUMBER = ''; - const TRUE_SLOT_ID = 0; - const FALSE_SLOT_ID = 9; - const OTHER_SLOT_ID = 1; - const SECOND_SLOT_ID = 2; - const IDENTIFIER_MIN = 0; - const IDENTIFIER_MAX = 0xFFFF; - const RANTYPE_GSM = 1; - const RANTYPE_CDMA = 2; - const RANTYPE_ERROR = 3; - var rawArray = [ - 0x08, 0x91, 0x68, 0x31, 0x08, 0x20, 0x00, 0x75, 0xF4, 0x24, 0x0D, 0x91, - 0x68, 0x81, 0x29, 0x56, 0x29, 0x83, 0xF6, 0x00, 0x00, 0x12, 0x40, 0x80, - 0x01, 0x02, 0x14, 0x23, 0x02, 0xC1, 0x30 - ] - /** - * @tc.number Telephony_SmsMms_setCBConfig_Async_0100 - * @tc.name Set "StartMessageld" to minimum(0x0000) and "EndMessageld" to minimum(0x0000) for cell broadcast, - * Configure a cell broadcast for an identity. - * @tc.desc Function test - */ - it('Telephony_SmsMms_setCBConfig_Async_0100', 0, async function (done) { - if (true) { - expect(true).assertTrue(); - done(); - return; - } - let data = { - slotId: TRUE_SLOT_ID, - enable: true, - startMessageId: IDENTIFIER_MIN, - endMessageId: IDENTIFIER_MIN, - ranType: RANTYPE_GSM - }; - sms.setCBConfig(data, (err) => { - if (err) { - expect().assertFail(); - console.log('Telephony_SmsMms_setCBConfig_Async_0100 fail'); - done(); - return; - } - console.log('Telephony_SmsMms_setCBConfig_Async_0100 finish'); - done(); - }); - }); - - /** - * @tc.number Telephony_SmsMms_getAllSimMessages_CDMA_Async_0100 - * @tc.name When SLOTID is the correct value,Query all SMS records of the SIM card. - * @tc.desc Function test - */ - it('Telephony_SmsMms_getAllSimMessages_CDMA_Async_0100', 0, async function (done) { - if (true) { - expect(true).assertTrue(); - done(); - return; - } - let data = { - slotId: TRUE_SLOT_ID, - smsc: '', - pdu: CORRECT_SMS_PDU, - status: sms.SIM_MESSAGE_STATUS_SENT - }; - sms.addSimMessage(data, (adderr) => { - if (adderr) { - expect().assertFail(); - console.log('Telephony_SmsMms_getAllSimMessages_CDMA_Async_0100 add fail'); - done(); - return; - } - console.log('Telephony_SmsMms_getAllSimMessages_CDMA_Async_0100 finish '); - sms.getAllSimMessages(TRUE_SLOT_ID, (geterr, getresult) => { - if (geterr) { - expect().assertFail(); - console.log('Telephony_SmsMms_getAllSimMessages_CDMA_Async_0100 get fail'); - done(); - return; - } - expect(getresult.length > 0).assertTrue(); - let addOfPdu = interceptionPdu(getresult[0].shortMessage.pdu); - let isAdd = (addOfPdu === CORRECT_SMS_PDU && - getresult[0].simMessageStatus === sms.SIM_MESSAGE_STATUS_SENT); - expect(isAdd).assertTrue(); - console.log('Telephony_SmsMms_getAllSimMessages_CDMA_Async_0100 getAllSimMessages cur finish'); - sms.delSimMessage(TRUE_SLOT_ID, getresult[0].indexOnSim, (delerr) => { - if (delerr) { - expect().assertFail(); - console.log('Telephony_SmsMms_getAllSimMessages_CDMA_Async_0100 del fail'); - done(); - return; - } - console.log('Telephony_SmsMms_getAllSimMessages_CDMA_Async_0100 delSimMessage finish'); - sms.getAllSimMessages(TRUE_SLOT_ID, (geterr, getresult) => { - if (geterr) { - expect().assertFail(); - console.log('Telephony_SmsMms_getAllSimMessages_CDMA_Async_0100 get 2 fail'); - done(); - return; - } - expect(getresult.length === 0).assertTrue(); - console.log('Telephony_SmsMms_getAllSimMessages_CDMA_Async_0100 getAllSimMessages cur finish'); - done(); - }); - }); - }); - }); - }); - /* - * @tc.number Telephony_SmsMms_createMessage_Async_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_Async_0100', 0, async function (done) { - if (true) { - expect(true).assertTrue(); - done(); - return; - } - sms.createMessage(rawArray, '3gpp', (err, shortMessage) => { - if (err) { - expect().assertFail(); - console.log('Telephony_SmsMms_createMessage_Async_0100 fail'); - done(); - return; - } - 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_Async_0100 finish'); - done(); - }); - }); - - /* - * @tc.number Telephony_SmsMms_sendMessage_0100 - * @tc.name Call the interface sendMessage, set the card slot parameter "slotId" to 1, - * and send SMS successfully - * @tc.desc Function test - */ - it('Telephony_SmsMms_sendMessage_0100', 0, async function (done) { - if (true) { - expect(true).assertTrue(); - done(); - return; - } - sms.sendMessage({ - slotId: TRUE_SLOT_ID, - destinationHost: SMS_SEND_DST_NUMBER, - content: '111111', - sendCallback: (err, value) => { - if (err) { - expect().assertFail(); - console.log('Telephony_SmsMms_sendMessage_0100 sendCallback fail'); - done(); - return; - } - expect(value.result === sms.SEND_SMS_SUCCESS).assertTrue(); - console.log('Telephony_SmsMms_sendMessage_0100 sendCallback finish'); - done() - }, - deliveryCallback: (err, value) => { - if (err) { - expect().assertFail(); - console.log('Telephony_SmsMms_sendMessage_0100 deliveryCallback fail'); - done(); - return; - } - expect(value.pdu.length !== 0).assertTrue(); - console.log('Telephony_SmsMms_sendMessage_0100 deliveryCallback finish'); - done(); - } - }); - }); - /* - * @tc.number Telephony_SmsMms_getSmsSegmentsInfo_Async_0100 - * @tc.name set message to plain Chinese with a length of MAX_CHINESE_MESSAGE_LENTH(63) characters, - * and view the result - * @tc.desc Function test - */ - it('Telephony_SmsMms_getSmsSegmentsInfo_Async_0100', 0, async function (done) { - if (true) { - expect(true).assertTrue(); - done(); - return; - } - let message = ''; - for (let index = 0;index < MAX_CHINESE_MESSAGE_LENTH; index++) { - message += '中'; - } - let force7BitCode = true; - sms.getSmsSegmentsInfo(TRUE_SLOT_ID, message, force7BitCode, (error, result) => { - if (error) { - console.log("Telephony_SmsMms_getSmsSegmentsInfo_Async_0100 getSmsSegmentsInfoon error " + error.message); - console.log('Telephony_SmsMms_getSmsSegmentsInfo_Async_0100 fail'); - expect().assertFail(); - } else { - console.log("Telephony_SmsMms_getSmsSegmentsInfo_Async_0100 splitCount " + result.splitCount); - console.log("Telephony_SmsMms_getSmsSegmentsInfo_Async_0100 encodeCount " + result.encodeCount); - console.log("Telephony_SmsMms_getSmsSegmentsInfo_Async_0100 encodeCountRemaining " + - result.encodeCountRemaining); - console.log("Telephony_SmsMms_getSmsSegmentsInfo_Async_0100 scheme " + result.scheme); - - expect(result.splitCount === DIVIDE_MESSAGE_INTO_1).assertTrue(); - expect(result.encodeCount === MAX_CHINESE_MESSAGE_LENTH).assertTrue(); - let remaining = result.splitCount * MAX_CHAR_MESSAGE_LENTH - result.encodeCount; - console.log("Telephony_SmsMms_getSmsSegmentsInfo_Async_0100 remaining " + remaining); - expect(result.encodeCountRemaining === remaining).assertTrue(); - expect(result.scheme === sms.SMS_ENCODING_7BIT).assertTrue(); - console.log('Telephony_SmsMms_getSmsSegmentsInfo_Async_0100 finish'); - } - done(); - }); - }); - - /* - * @tc.number Telephony_SmsMms_getSmsEncodingScheme_Async_0100 - * @tc.name - * @tc.desc Function test - */ - it('Telephony_SmsMms_getSmsEncodingScheme_Async_0100', 0, async function (done) { - if (true) { - expect(true).assertTrue(); - done(); - return; - } - expect(sms.SMS_ENCODING_UNKNOWN == 0).assertTrue(); - expect(sms.SMS_ENCODING_7BIT == 1).assertTrue(); - expect(sms.SMS_ENCODING_8BIT == 2).assertTrue(); - expect(sms.SMS_ENCODING_16BIT == 3).assertTrue(); - done(); - }); - - /* - * @tc.number Telephony_SmsMms_getSendSmsResult_Async_0100 - * @tc.name - * @tc.desc Function test - */ - it('Telephony_SmsMms_getSendSmsResult_Async_0100', 0, async function (done) { - if (true) { - expect(true).assertTrue(); - done(); - return; - } - expect(sms.SEND_SMS_FAILURE_RADIO_OFF == 0).assertTrue(); - expect(sms.SEND_SMS_FAILURE_SERVICE_UNAVAILABLE == 1).assertTrue(); - expect(sms.SIM_MESSAGE_STATUS_FREE == 0).assertTrue(); - expect(sms.INSTANT_MESSAGE == 1).assertTrue(); - expect(sms.OPTIONAL_MESSAGE == 2).assertTrue(); - done(); - }); - - /* - * @tc.number Telephony_SmsMms_ShortMessageClass_Async_0100 - * @tc.name - * @tc.desc Function test - */ - it('Telephony_SmsMms_ShortMessageClass_Async_0100', 0, async function (done) { - if (true) { - expect(true).assertTrue(); - done(); - return; - } - expect(sms.SIM_MESSAGE_STATUS_FREE == 0).assertTrue(); - expect(sms.INSTANT_MESSAGE == 1).assertTrue(); - expect(sms.OPTIONAL_MESSAGE == 2).assertTrue(); - done(); - }); - /* - * @tc.number Telephony_SmsMms_getMmsCharSets_Async_0100 - * @tc.name - * @tc.desc Function test - */ - it('Telephony_SmsMms_getMmsCharSets_Async_0100', 0, async function (done) { - if (true) { - expect(true).assertTrue(); - done(); - return; - } - expect(sms.BIG5 == 0X07EA).assertTrue(); - expect(sms.ISO_10646_UCS_2 == 0X03E8).assertTrue(); - expect(sms.ISO_8859_1 == 0X04).assertTrue(); - expect(sms.ISO_8859_2 == 0X05).assertTrue(); - expect(sms.ISO_8859_3 == 0X06).assertTrue(); - expect(sms.ISO_8859_4 == 0X07).assertTrue(); - expect(sms.ISO_8859_5 == 0X08).assertTrue(); - expect(sms.ISO_8859_6 == 0X09).assertTrue(); - expect(sms.ISO_8859_7 == 0X10).assertTrue(); - expect(sms.ISO_8859_8 == 0X12).assertTrue(); - expect(sms.ISO_8859_9 == 0X13).assertTrue(); - expect(sms.SHIFT_JIS == 0X11).assertTrue(); - expect(sms.US_ASCII == 0X03).assertTrue(); - expect(sms.UTF_8 == 0X6A).assertTrue(); - done(); - }); - }) -} diff --git a/telephony/telephonyjstest/new_add/BUILD.gn b/telephony/telephonyjstest/observer/BUILD.gn similarity index 93% rename from telephony/telephonyjstest/new_add/BUILD.gn rename to telephony/telephonyjstest/observer/BUILD.gn index 9feab10c4..0e91eb86e 100644 --- a/telephony/telephonyjstest/new_add/BUILD.gn +++ b/telephony/telephonyjstest/observer/BUILD.gn @@ -13,7 +13,7 @@ import("//test/xts/tools/build/suite.gni") -ohos_js_hap_suite("ActsNewAddEtsTest") { +ohos_js_hap_suite("ActsObserverEtsTest") { hap_profile = "./entry/src/main/config.json" deps = [ ":ace_demo_ets_assets", @@ -21,7 +21,7 @@ ohos_js_hap_suite("ActsNewAddEtsTest") { ] ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsNewAddEtsTest" + hap_name = "ActsObserverEtsTest" } ohos_js_assets("ace_demo_ets_assets") { source_dir = "./entry/src/main/ets/MainAbility" diff --git a/telephony/telephonyjstest/observer/Test.json b/telephony/telephonyjstest/observer/Test.json new file mode 100644 index 000000000..1e5f51957 --- /dev/null +++ b/telephony/telephonyjstest/observer/Test.json @@ -0,0 +1,18 @@ +{ + "description": "Configuration for hjunit demo Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "1500000", + "package": "com.ohos.observer", + "shell-timeout": "60000" + }, + "kits": [ + { + "test-file-name": [ + "ActsObserverEtsTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + } + ] +} diff --git a/telephony/telephonyjstest/new_add/entry/src/main/config.json b/telephony/telephonyjstest/observer/entry/src/main/config.json similarity index 97% rename from telephony/telephonyjstest/new_add/entry/src/main/config.json rename to telephony/telephonyjstest/observer/entry/src/main/config.json index 9cfe15949..349a4cc8e 100644 --- a/telephony/telephonyjstest/new_add/entry/src/main/config.json +++ b/telephony/telephonyjstest/observer/entry/src/main/config.json @@ -1,6 +1,6 @@ { "app": { - "bundleName": "com.ohos.newadd", + "bundleName": "com.ohos.observer", "vendor": "open", "version": { "code": 1000000, @@ -14,7 +14,7 @@ }, "deviceConfig": {}, "module": { - "package": "com.ohos.newadd", + "package": "com.ohos.observer", "name": ".MyApplication", "mainAbility": ".MainAbility", "srcPath": "MainAbility", diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/app.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/app.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/app.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/app.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Badge.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Badge.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Badge.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Badge.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Blank.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Blank.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Blank.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Blank.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Button.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Button.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Button.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Button.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Column.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Column.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Column.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Column.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/ColumnSplit.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/ColumnSplit.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/ColumnSplit.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/ColumnSplit.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Counter.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Counter.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Counter.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Counter.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/DataPanel.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/DataPanel.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/DataPanel.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/DataPanel.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Divider.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Divider.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Divider.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Divider.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Flex.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Flex.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Flex.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Flex.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/GridContainer.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/GridContainer.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/GridContainer.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/GridContainer.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Image.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Image.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Image.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Image.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Navigator.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Navigator.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Navigator.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Navigator.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Panel.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Panel.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Panel.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Panel.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Progress.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Progress.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Progress.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Progress.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Qrcode.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Qrcode.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Qrcode.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Qrcode.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Rating.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Rating.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Rating.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Rating.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/RowSplit.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/RowSplit.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/RowSplit.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/RowSplit.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Scroll.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Scroll.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Scroll.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Scroll.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Slider.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Slider.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Slider.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Slider.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Span.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Span.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Span.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Span.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Stack.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Stack.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Stack.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Stack.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Text.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Text.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/Text.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/Text.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/index.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/index.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/pages/index.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/pages/index.ets diff --git a/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/test/List.test.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/test/List.test.ets new file mode 100644 index 000000000..a9cdf9b1d --- /dev/null +++ b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/test/List.test.ets @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//other import + +import observer from './ObserverJsunit.test.ets' + +export default function testsuite() { + + observer(); + +} \ No newline at end of file diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/ObserverJsunit.test.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/test/ObserverJsunit.test.ets similarity index 93% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/ObserverJsunit.test.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/test/ObserverJsunit.test.ets index c380826a0..6261c3259 100644 --- a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/ObserverJsunit.test.ets +++ b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/test/ObserverJsunit.test.ets @@ -191,58 +191,7 @@ export default function observerJsunit() { done() }) - /* - * @tc.number : Telephony_observer_observer_on_cellInfoChange_0100 - * @tc.name : on_cellInfoChange - * @tc.desc : call the on method of cellInfoChange - */ - it('Telephony_observer_observer_on_cellInfoChange_0100', 0, async function (done) { - console.log("************* Telephony_observer_observer_on_cellInfoChange_0100 Test start *************") - observer.on('cellInfoChange', (cellInformation) => { - expect().assertFail() - done() - return - }) - setTimeout(timeout, 3000) - console.log("************* Telephony_observer_observer_on_cellInfoChange_0100 Test end *************") - done() - }) - - /* - * @tc.number : Telephony_observer_observer_on_cellInfoChange_0200 - * @tc.name : on_cellInfoChange - * @tc.desc : call the on method of cellInfoChange - */ - it('Telephony_observer_observer_on_cellInfoChange_0200', 0, async function (done) { - console.log("************* Telephony_observer_observer_on_cellInfoChange_0200 Test start *************") - observer.on('cellInfoChange', { - slotId: SLOT_0 - }, (cellInformation) => { - expect().assertFail() - done() - return - }) - setTimeout(timeout, 3000) - console.log("************* Telephony_observer_observer_on_cellInfoChange_0200 Test end *************") - done() - }) - - /* - * @tc.number : Telephony_observer_observer_off_cellInfoChange_0100 - * @tc.name : off_cellInfoChange - * @tc.desc : call the off method of cellInfoChange - */ - it('Telephony_observer_observer_off_cellInfoChange_0100', 0, async function (done) { - console.log("************* Telephony_observer_observer_off_cellInfoChange_0100 Test start *************") - observer.off('cellInfoChange', (cellInformation) => { - expect().assertFail() - done() - return - }) - setTimeout(timeout, 3000) - console.log("************* Telephony_observer_observer_off_cellInfoChange_0100 Test end *************") - done() - }) + /* * @tc.number : Telephony_observer_observer_on_cellularDataConnectionStateChange_0100 diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/Utils.ets b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/test/Utils.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/Utils.ets rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/test/Utils.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/lib/Const.js b/telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/test/lib/Const.js similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/lib/Const.js rename to telephony/telephonyjstest/observer/entry/src/main/ets/MainAbility/test/lib/Const.js diff --git a/telephony/telephonyjstest/new_add/entry/src/main/resources/base/element/string.json b/telephony/telephonyjstest/observer/entry/src/main/resources/base/element/string.json similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/resources/base/element/string.json rename to telephony/telephonyjstest/observer/entry/src/main/resources/base/element/string.json diff --git a/telephony/telephonyjstest/new_add/entry/src/main/resources/base/media/icon.png b/telephony/telephonyjstest/observer/entry/src/main/resources/base/media/icon.png similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/resources/base/media/icon.png rename to telephony/telephonyjstest/observer/entry/src/main/resources/base/media/icon.png diff --git a/telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/hand.png b/telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/hand.png similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/hand.png rename to telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/hand.png diff --git a/telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/icon.png b/telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/icon.png similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/icon.png rename to telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/icon.png diff --git a/telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/images.jpg b/telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/images.jpg similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/images.jpg rename to telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/images.jpg diff --git a/telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/person.png b/telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/person.png similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/person.png rename to telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/person.png diff --git a/telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/star-1-1.png b/telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/star-1-1.png similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/star-1-1.png rename to telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/star-1-1.png diff --git a/telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/star-1-2.png b/telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/star-1-2.png similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/star-1-2.png rename to telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/star-1-2.png diff --git a/telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/star-1-3.png b/telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/star-1-3.png similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/star-1-3.png rename to telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/star-1-3.png diff --git a/telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/video/show.mp4 b/telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/video/show.mp4 similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/resources/rawfile/video/show.mp4 rename to telephony/telephonyjstest/observer/entry/src/main/resources/rawfile/video/show.mp4 diff --git a/telephony/telephonyjstest/new_add/signature/openharmony_sx.p7b b/telephony/telephonyjstest/observer/signature/openharmony_sx.p7b similarity index 100% rename from telephony/telephonyjstest/new_add/signature/openharmony_sx.p7b rename to telephony/telephonyjstest/observer/signature/openharmony_sx.p7b diff --git a/telephony/telephonyjstest/radiostatistic/BUILD.gn b/telephony/telephonyjstest/radiostatistic/BUILD.gn new file mode 100644 index 000000000..a5f14455b --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/BUILD.gn @@ -0,0 +1,32 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//test/xts/tools/build/suite.gni") + +ohos_js_hap_suite("ActsRadiostatisticEtsTest") { + hap_profile = "./entry/src/main/config.json" + deps = [ + ":ace_demo_ets_assets", + ":ace_demo_ets_resources", + ] + ets2abc = true + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "ActsRadiostatisticEtsTest" +} +ohos_js_assets("ace_demo_ets_assets") { + source_dir = "./entry/src/main/ets/MainAbility" +} +ohos_resources("ace_demo_ets_resources") { + sources = [ "./entry/src/main/resources" ] + hap_profile = "./entry/src/main/config.json" +} diff --git a/telephony/telephonyjstest/new_add/Test.json b/telephony/telephonyjstest/radiostatistic/Test.json similarity index 78% rename from telephony/telephonyjstest/new_add/Test.json rename to telephony/telephonyjstest/radiostatistic/Test.json index a83417445..cf76cebbc 100644 --- a/telephony/telephonyjstest/new_add/Test.json +++ b/telephony/telephonyjstest/radiostatistic/Test.json @@ -3,13 +3,13 @@ "driver": { "type": "JSUnitTest", "test-timeout": "2000000", - "package": "com.ohos.newadd", + "package": "com.ohos.radiostatistic", "shell-timeout": "60000" }, "kits": [ { "test-file-name": [ - "ActsNewAddEtsTest.hap" + "ActsRadiostatisticEtsTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/config.json b/telephony/telephonyjstest/radiostatistic/entry/src/main/config.json new file mode 100644 index 000000000..fda9d63dd --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/config.json @@ -0,0 +1,139 @@ +{ + "app": { + "bundleName": "com.ohos.radiostatistic", + "vendor": "open", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 7, + "releaseType": "Release", + "target": 7 + } + }, + "deviceConfig": {}, + "module": { + "package": "com.ohos.radiostatistic", + "name": ".MyApplication", + "mainAbility": ".MainAbility", + "srcPath": "MainAbility", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": false + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "orientation": "unspecified", + "visible": true, + "srcPath": "MainAbility", + "name": ".MainAbility", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "$string:description_mainability", + "formsEnabled": false, + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "reqPermissions": [ + { + "name": "ohos.permission.LOCATION", + "reason": "need use ohos.permission.LOCATION" + }, + { + "name":"ohos.permission.SET_TELEPHONY_STATE", + "reason":"need use ohos.permission.SET_TELEPHONY_STATE" + }, + { + "name":"ohos.permission.GET_TELEPHONY_STATE", + "reason":"need use ohos.permission.GET_TELEPHONY_STATE" + }, + { + "name":"ohos.permission.PLACE_CALL", + "reason":"need use ohos.permission.PLACE_CALL" + }, + { + "name":"ohos.permission.READ_CONTACTS", + "reason":"need use ohos.permission.READ_CONTACTS" + }, + { + "name":"ohos.permission.WRITE_CONTACTS", + "reason":"need use ohos.permission.WRITE_CONTACTS" + }, + { + "name":"ohos.permission.SEND_MESSAGES", + "reason":"need use ohos.permission.SEND_MESSAGES" + }, + { + "name":"ohos.permission.RECEIVE_SMS", + "reason":"need use ohos.permission.RECEIVE_SMS" + }, + { + "name":"ohos.permission.READ_CALL_LOG", + "reason":"need use ohos.permission.READ_CALL_LOG" + }, + { + "name":"ohos.permission.GET_NETWORK_INFO", + "reason":"need use ohos.permission.GET_NETWORK_INFO" + }, + { + "name":"ohos.permission.INTERNET", + "reason":"need use ohos.permission.INTERNET" + } + ], + "js": [ + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index", + "pages/Button", + "pages/Blank", + "pages/DataPanel", + "pages/Divider", + "pages/Text", + "pages/RowSplit", + "pages/Scroll", + "pages/Stack", + "pages/Image", + "pages/Progress", + "pages/Qrcode", + "pages/Rating", + "pages/Span", + "pages/Slider", + "pages/Badge", + "pages/Column", + "pages/ColumnSplit", + "pages/Counter", + "pages/Flex", + "pages/GridContainer" + + ], + "name": ".MainAbility", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/app.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/app.ets new file mode 100644 index 000000000..261fadca2 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/app.ets @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default { + onCreate() { + console.info('Application onCreate') + }, + onDestroy() { + console.info('Application onDestroy') + }, +} \ No newline at end of file diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Badge.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Badge.ets new file mode 100644 index 000000000..66de6f8e3 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Badge.ets @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct badge { + @State counts: number = 33 + @State message: string = 'new' + @State active: boolean = false + private content: string = "badge Page"; + + onPageShow() { + console.info('badge page show called'); + } + + onBuildDone() { + console.info('badge page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Scroll() { + Column() { + Text(`${this.content}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Badge({ + count: this.counts, + position: BadgePosition.Right, + maxCount: 99, + style: { color: 0xFFFFFF, fontSize: 16, badgeSize: 20, badgeColor: Color.Red } + }) { + Button('message') + .onClick(() => { + this.counts++ + }) + .width(100).height(50).backgroundColor(0x317aff) + } + .width(100) + .height(50) + .key('badge') + + Text("BadgePosition.RightTop").fontSize(16) + Badge({ + count: this.counts, + position: BadgePosition.RightTop, + maxCount: 99, + style: { color: 0xFFFFFF, fontSize: '16', badgeSize: '20', badgeColor: Color.Red } + }) { + Button('message') + .onClick(() => { + this.counts++ + }) + .width(100).height(50).backgroundColor(0x317aff) + } + .width(100) + .height(50) + .key('badge1') + + Text("BadgePosition.Left").fontSize(16) + Badge({ + count: this.counts, + position: BadgePosition.Left, + maxCount: 99, + style: { color: Color.Pink, fontSize: 16, badgeSize: 20, badgeColor: Color.Red } + }) { + Button('message') + .onClick(() => { + this.counts++ + }) + .width(100).height(50).backgroundColor(0x317aff) + } + .width(100) + .height(50) + .key('badge2') + } + } + } + .key('flex') + .width('100%') + .height('100%') + } +} diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Blank.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Blank.ets new file mode 100644 index 000000000..a50fc719e --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Blank.ets @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct blank_testcase { + @State Color: Color = Color.Pink + @State active: boolean = false + private content: string = "Blank Page" + + onPageShow() { + console.info('Blank page show called'); + } + + onBuildDone() { + console.info('Blank page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`${this.content}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Blank(100) + .color(this.Color) + .key('blank') + Text('on/off').fontSize(18).height(60) + } + .key('flex') + .width('100%') + .height('100%') + + + } +} diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Button.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Button.ets new file mode 100644 index 000000000..ac2271ea3 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Button.ets @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router' + +@Entry +@Component +struct button_testcase { + @State stateEffect: boolean = true + @State ButtonType: ButtonType = ButtonType.Circle + private content: string = "Button Page"; + + onPageShow() { + console.info('Button page show called'); + } + + onBuildDone() { + console.info('Button page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`${this.content}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Button('1.value', { type: ButtonType.Circle, stateEffect: this.stateEffect }) + .fontSize(12) + .fontWeight(FontWeight.Bold) + .fontColor(0xCCCCCC) + .height(40) + .width(40) + .key('button') + .backgroundColor('#0D9FFB') + .onClick(() => { + router.back() + }) + .padding(10) + Button() { + Text("2.Capsule") + } + .type(ButtonType.Capsule) + .stateEffect(false) + .backgroundColor('#0D9FFB') + .padding(10) + .key('button1') + + Button() { + Text("3.Normal") + }.type(ButtonType.Normal) + .backgroundColor('#0D9FFB') + .key('button2') + + }.key('flex') + .width('100%') + .height('100%') + } +} + diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Column.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Column.ets new file mode 100644 index 000000000..b9e5c84e2 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Column.ets @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct column { + @State active: boolean = false + private content: string = "Column Page" + + onPageShow() { + console.info('Column page show called'); + } + + onBuildDone() { + console.info('Column page build done called'); + } + + build() { + Column({ space: 5 }) { + Text('alignItems(Center)').fontSize(9).fontColor(0xCCCCCC).width('90%') + Column() { + Column().width('50%').height(50).backgroundColor(0xAFEEEE) + Column().width('50%').height(50).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Center).width('90%').border({ width: 1 }).key('column') + + Text('alignItems(Start)').fontSize(9).fontColor(0xCCCCCC).width('90%') + Column({ space: '5' }) { + Column().width('50%').height(50).backgroundColor(0xAFEEEE) + Column().width('50%').height(50).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.Start).width('90%').border({ width: 1 }).key('column1') + + Text('alignItems(End)').fontSize(9).fontColor(0xCCCCCC).width('90%') + Column() { + Column().width('50%').height(50).backgroundColor(0xAFEEEE) + Column().width('50%').height(50).backgroundColor(0x00FFFF) + }.alignItems(HorizontalAlign.End).width('90%').border({ width: 1 }).key('column2') + }.width('100%').padding({ top: 5 }) + } +} diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/ColumnSplit.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/ColumnSplit.ets new file mode 100644 index 000000000..cb0597310 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/ColumnSplit.ets @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct columnSplit { + private content: string = "ColumnSplit Page" + + onPageShow() { + console.info('ColumnSplit page show called'); + } + + onBuildDone() { + console.info('ColumnSplit page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Scroll() { + Column() { + Text(`${this.content}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Column() { + Text('ColumnSplit').fontSize(9).fontColor(0xCCCCCC).width('90%') + ColumnSplit() { + Text('1').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2').width('100%').height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('3').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width('100%').height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + }.key('columnSplit') + .resizeable(true) + .width('90%').height('60%') + + }.width("100%") + + Column() { + Text('ColumnSplit1').fontSize(9).fontColor(0xCCCCCC).width('90%') + ColumnSplit() { + Text('1').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('2').width('100%').height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('3').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + Text('4').width('100%').height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + Text('5').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + }.key('columnSplit1') + .resizeable(false) + .width('90%').height('60%') + + }.width("100%") + } + } + } + .key('flex') + .width('100%') + .height('100%') + } +} diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Counter.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Counter.ets new file mode 100644 index 000000000..ecdbfaf10 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Counter.ets @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct counter { + @State value: number = 0 + @State active: boolean = false + private content: string = "Counter Page" + + onPageShow() { + console.info('Counter page show called'); + } + + onBuildDone() { + console.info('Counter page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`${this.content}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Counter() { + Text(this.value.toString()) + }.margin(100) + .key('counter') + .onInc(() => { + this.value++ + }) + .onDec(() => { + this.value-- + }) + }.width("100%") + .key('flex') + .width('100%') + .height('100%') + } +} diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/DataPanel.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/DataPanel.ets new file mode 100644 index 000000000..3c6248484 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/DataPanel.ets @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router' + +@Entry +@Component +struct dataPanel_testcase { + @State width: string= "200" + @State height: string= "100" + @State active: boolean = false + private content: string = "DataPanel Page" + + onPageShow() { + console.info('Blank page show called'); + } + + onBuildDone() { + console.info('Blank page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`${this.content}`) + .fontSize(50) + DataPanel({ values: [20, 40, 20], max: 100, type: DataPanelType.Line }) + .width(this.width) + .height(this.height) + .key('DataPanel') + .onClick(() => { + router.back() + }) + .closeEffect(false) + + DataPanel({ values: [20, 40, 20], max: 100, type: DataPanelType.Circle}) + .width(this.width) + .height(this.height) + .key('DataPanel2') + .onClick(() => { + router.back() + }) + .closeEffect(true) + DataPanel({ values: [20, 40, 20], max: 100}) + .width(this.width) + .height(this.height) + .key('DataPanel3') + .onClick(() => { + router.back() + }) + .closeEffect(false) + } + .key('flex') + .width('100%') + .height('100%') + + } +} diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Divider.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Divider.ets new file mode 100644 index 000000000..02bf60779 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Divider.ets @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router' + +@Entry +@Component +struct divider_textcase { + @State vertical: boolean = true + @State color: Color = Color.Red + @State strokeWidth: number = 7 + @State lineCap: LineCapStyle = LineCapStyle.Butt + @State active: boolean = false + private content: string = "Divider Page"; + + onPageShow() { + console.info('Button page show called'); + } + + onBuildDone() { + console.info('Button page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`${this.content}`) + .fontSize(50) + Divider() + .lineCap(LineCapStyle.Butt) + .strokeWidth(this.strokeWidth) + .color(this.color) + .vertical(this.vertical) + .height(150) + .key('divider') + .onClick(() => { + router.back() + }) + Divider() + .lineCap(LineCapStyle.Round) + .vertical(false) + .color(Color.Green) + .strokeWidth(10) + .height(150) + .key('divider1') + Divider() + .lineCap(LineCapStyle.Square) + .color(Color.Green) + .vertical(true) + .strokeWidth(10) + .height(150) + .key('divider2') + } + .key('flex') + .width('100%') + .height('100%') + } +} + + diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Flex.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Flex.ets new file mode 100644 index 000000000..a0e21251e --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Flex.ets @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct flex { + private content: string = "Flex Page" + + onPageShow() { + console.info('Flex page show called'); + } + + onBuildDone() { + console.info('Flex page build done called'); + } + + build() { + Column() { + Column({ space : 2 }) { + Text('direction:Column').fontSize(9).fontColor(0xCCCCCC).width('90%') + Flex({ + direction: FlexDirection.Column, + wrap: FlexWrap.NoWrap, + justifyContent: FlexAlign.Center, + alignItems:ItemAlign.Start, + alignContent: FlexAlign.Start, + }) { + Text('1').width('100%').height(20).backgroundColor(0xF5DEB3) + Text('2').width('100%').height(20).backgroundColor(0xD2B48C) + Text('3').width('100%').height(20).backgroundColor(0xF5DEB3) + } + .key('flex') + .height(70) + .width('90%') + .padding(10) + .backgroundColor(0xAFEEEE) + + Text('direction:Row').fontSize(9).fontColor(0xCCCCCC).width('90%') + Flex({ + direction: FlexDirection.Row, + wrap: FlexWrap.Wrap, + justifyContent: FlexAlign.Start, + alignItems:ItemAlign.Start, + alignContent: FlexAlign.Center, + }) { + Text('1').width('20%').height(20).backgroundColor(0xF5DEB3) + Text('2').width('20%').height(20).backgroundColor(0xD2B48C) + Text('3').width('20%').height(20).backgroundColor(0xF5DEB3) + } + .key('flex1') + .height(70) + .width('90%') + .padding(10) + .backgroundColor(0xAFEEEE) + + Text('direction:RowReverse').fontSize(9).fontColor(0xCCCCCC).width('90%') + Flex({ + direction: FlexDirection.RowReverse, + wrap: FlexWrap.Wrap, + justifyContent: FlexAlign.End, + alignItems:ItemAlign.End, + alignContent: FlexAlign.End, + }) { + Text('1').width('50%').height(20).backgroundColor(0xF5DEB3) + Text('2').width('50%').height(20).backgroundColor(0xD2B48C) + Text('3').width('50%').height(20).backgroundColor(0xF5DEB3) + } + .key('flex2') + .height(90) + .width('90%') + .padding(10) + .backgroundColor(0xAFEEEE) + + Text('justifyContent:SpaceBetween').fontSize(9).fontColor(0xCCCCCC).width('90%') + Flex({ + justifyContent: FlexAlign.SpaceBetween, + wrap: FlexWrap.Wrap, + }) { + Text('1').width('100%').height(20).backgroundColor(0xF5DEB3) + Text('2').width('100%').height(20).backgroundColor(0xD2B48C) + Text('3').width('100%').height(20).backgroundColor(0xF5DEB3) + } + .key('flex3') + .height(100) + .width('90%') + .padding(10) + .backgroundColor(0xAFEEEE) + + Text('justifyContent AND alignContent').fontSize(9).fontColor(0xCCCCCC).width('90%') + Flex({ + justifyContent: FlexAlign.SpaceEvenly, + alignContent: FlexAlign.SpaceEvenly, + wrap: FlexWrap.Wrap, + }) { + Text('1').width('50%').height(20).backgroundColor(0xF5DEB3) + Text('2').width('50%').height(20).backgroundColor(0xD2B48C) + Text('3').width('50%').height(20).backgroundColor(0xF5DEB3) + } + .key('flex4') + .height(90) + .width('90%') + .padding(10) + .backgroundColor(0xAFEEEE) + + Text('justifyContent AND alignContent').fontSize(9).fontColor(0xCCCCCC).width('90%') + Flex({ + justifyContent: FlexAlign.SpaceAround, + alignContent: FlexAlign.SpaceAround, + wrap: FlexWrap.Wrap, + }) { + Text('1').width('50%').height(20).backgroundColor(0xF5DEB3) + Text('2').width('50%').height(20).backgroundColor(0xD2B48C) + Text('3').width('50%').height(20).backgroundColor(0xF5DEB3) + } + .key('flex5') + .height(90) + .width('90%') + .padding(10) + .backgroundColor(0xAFEEEE) + }.width('100%').margin({ top: 5 }) + }.width('100%') + } +} diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/GridContainer.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/GridContainer.ets new file mode 100644 index 000000000..573581104 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/GridContainer.ets @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct gridContainer { + @State sizeType: SizeType = SizeType.XS + @State active: boolean = false + private content: string = "GridContainer Page" + + onPageShow() { + console.info('GridContainer page show called'); + } + + onBuildDone() { + console.info('GridContainer page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`${this.content}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Scroll() { + Column({ space: 5 }) { + GridContainer({ columns: 12, sizeType: this.sizeType, gutter: 10, margin: 20 }) { + Row() { + Text('1') + .useSizeType({ + xs: { span: 6, offset: 0 }, + sm: { span: 2, offset: 0 }, + md: { span: 2, offset: 0 }, + lg: { span: 2, offset: 0 } + }) + .height(50).backgroundColor(0x4682B4).textAlign(TextAlign.Center) + Text('2').gridSpan(2) + + .height(50).backgroundColor(0x00BFFF).textAlign(TextAlign.Center) + Text('3').gridOffset(3) + + .height(50).backgroundColor(0x4682B4).textAlign(TextAlign.Center) + } + }.key('gridContainer') + .width('90%') + .alignItems(HorizontalAlign.Start) + + Text('Click Simulate to change the device width').fontSize(9).width('90%').fontColor(0xCCCCCC) + Row() { + Button('XS') + .onClick(() => { + this.sizeType = SizeType.XS + }).backgroundColor(0x317aff) + Button('SM') + .onClick(() => { + this.sizeType = SizeType.SM + }).backgroundColor(0x317aff) + Button('MD') + .onClick(() => { + this.sizeType = SizeType.MD + }).backgroundColor(0x317aff) + Button('LG') + .onClick(() => { + this.sizeType = SizeType.LG + }).backgroundColor(0x317aff) + } + + GridContainer({ columns: "auto", sizeType: SizeType.MD, gutter: '10', margin: '20' }) { + Row() { + Text('1') + .useSizeType({ + xs: { span: 6, offset: 0 }, + sm: { span: 2, offset: 0 }, + md: { span: 2, offset: 0 }, + lg: { span: 2, offset: 0 } + }) + .height(50).backgroundColor(0x4682B4).textAlign(TextAlign.Center) + Text('2').gridSpan(2) + + .height(50).backgroundColor(0x00BFFF).textAlign(TextAlign.Center) + Text('3').gridOffset(3) + + .height(50).backgroundColor(0x4682B4).textAlign(TextAlign.Center) + } + }.key('gridContainer1') + .width('90%') + .alignItems(HorizontalAlign.Center) + + GridContainer({ columns: 12, sizeType: SizeType.SM, gutter: 10, margin: 20 }) { + Row() { + Text('1') + .useSizeType({ + xs: { span: 6, offset: 0 }, + sm: { span: 2, offset: 0 }, + md: { span: 2, offset: 0 }, + lg: { span: 2, offset: 0 } + }) + .height(50).backgroundColor(0x4682B4).textAlign(TextAlign.Center) + Text('2').gridSpan(2) + + .height(50).backgroundColor(0x00BFFF).textAlign(TextAlign.Center) + Text('3').gridOffset(3) + + .height(50).backgroundColor(0x4682B4).textAlign(TextAlign.Center) + } + }.key('gridContainer2') + .width('90%') + .alignItems(HorizontalAlign.End) + + GridContainer({ columns: 12, sizeType: SizeType.LG, gutter: 10, margin: 20 }) { + Row() { + Text('1') + .useSizeType({ + xs: { span: 6, offset: 0 }, + sm: { span: 2, offset: 0 }, + md: { span: 2, offset: 0 }, + lg: { span: 2, offset: 0 } + }) + .height(50).backgroundColor(0x4682B4).textAlign(TextAlign.Center) + Text('2').gridSpan(2) + + .height(50).backgroundColor(0x00BFFF).textAlign(TextAlign.Center) + Text('3').gridOffset(3) + + .height(50).backgroundColor(0x4682B4).textAlign(TextAlign.Center) + } + }.key('gridContainer3') + .width('90%') + .alignItems(HorizontalAlign.End) + + GridContainer({ columns: 12, sizeType: SizeType.Auto, gutter: 10, margin: 20 }) { + Row() { + Text('1') + .useSizeType({ + xs: { span: 6, offset: 0 }, + sm: { span: 2, offset: 0 }, + md: { span: 2, offset: 0 }, + lg: { span: 2, offset: 0 } + }) + .height(50).backgroundColor(0x4682B4).textAlign(TextAlign.Center) + Text('2').gridSpan(2) + + .height(50).backgroundColor(0x00BFFF).textAlign(TextAlign.Center) + Text('3').gridOffset(3) + + .height(50).backgroundColor(0x4682B4).textAlign(TextAlign.Center) + } + }.key('gridContainer4') + .width('90%') + .alignItems(HorizontalAlign.End) + + }.width('100%').margin({ top: 5 }) + } + } + .key('flex') + .width('100%') + .height('100%') + } +} diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Image.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Image.ets new file mode 100644 index 000000000..5cc583e93 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Image.ets @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct image_textcase { + @State Width: number = 0 + @State height: number = 0 + + onPageShow() { + console.info('Image page show called'); + } + + onBuildDone() { + console.info('Image page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + Text(`Image page`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Image("/resources/rawfile/hand.png") + .matchTextDirection(false) + .fitOriginalSize(false) + .fillColor(0xCCCCCC) + .objectFit(ImageFit.Cover) + .objectRepeat(ImageRepeat.NoRepeat) + .interpolation(ImageInterpolation.None) + .renderMode(ImageRenderMode.Original) + .autoResize(false) + .syncLoad(false) + .sourceSize({ width: 200, height: 100 }) + .alt("/resources/rawfile/person.png") + .key('image1') + Image("/resources/rawfile/hand.png") + .objectFit(ImageFit.Contain) + .objectRepeat(ImageRepeat.X) + .interpolation(ImageInterpolation.High) + .renderMode(ImageRenderMode.Template) + .key('image2') + .height(180) + .width(180) + .onComplete((msg: { + width: number, + height: number + }) => { + this.Width = msg.width + this.height = msg.height + console.info('Width ----' + this.Width) + console.info('height ----' + this.height) + }) + .onError(() => { + console.info('load image fail') + }) + Image("/resources/rawfile/hand.png") + .objectFit(ImageFit.Fill) + .objectRepeat(ImageRepeat.Y) + .interpolation(ImageInterpolation.Low) + .key('image3') + Image("/resources/rawfile/hand.png") + .objectFit(ImageFit.None) + .objectRepeat(ImageRepeat.XY) + .interpolation(ImageInterpolation.Medium) + .key('image4') + Image("/resources/rawfile/hand.png") + .objectFit(ImageFit.ScaleDown) + .key('image5') + }.width(300) + .height(300) + .borderColor(Color.Pink) + .borderWidth(4) + } + } +} + + diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Navigator.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Navigator.ets new file mode 100644 index 000000000..6c50769cf --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Navigator.ets @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct navigator_testcase { + @State active: boolean = false + @State params: Object = { text: 'news' } + + onPageShow() { + console.info('Navigator page show called'); + } + + onBuildDone() { + console.info('Navigator page build done called'); + } + + build() { + Column() { + Navigator({ target: "pages/index", type: NavigationType.Back }) { + Text('Navigator test in Navigator,back') + }.active(this.active) + .key('navigator') + .params({ + data: 24 + }) + + Navigator({ target: "pages/index", type: NavigationType.Push }) { + Text('Navigator test in Navigator,push') + }.active(this.active) + .key('navigator2') + .params({ + data: 24 + }) + + Navigator({ target: "pages/index", type: NavigationType.Replace }) { + Text('Navigator test in Navigator,replace') + }.active(this.active) + .key('navigator3') + .params({ + data: 24 + }) + }.width(300) + .height(300) + .borderColor(Color.Pink) + .borderWidth(2) + } +} diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Panel.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Panel.ets new file mode 100644 index 000000000..32ddabbd1 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Panel.ets @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct PanelExample { + @State show: boolean = true + + onPageShow() { + console.info('Panel page show called'); + } + + onBuildDone() { + console.info('Panel page build done called'); + } + + build() { + Column() { + Text('2021-09-30 Today Calendar: 1.afternoon......Click for details') + .width('90%') + .height(50) + .borderRadius(10) + .backgroundColor(0xFFFFFF) + .padding({ left: 20 }) + .onClick(() => { + this.show = !this.show + }) + Panel(this.show) { + Column() { + Text('Today Calendar') + Divider() + Text('1. afternoon 4:00 The project meeting') + } + } + .key('panel') + .type(PanelType.Foldable) + .mode(PanelMode.Half) + .dragBar(true) + .fullHeight(500) + .halfHeight(250) + .miniHeight(100) + .onChange((value: any) => { + console.info(`width:${value.width},height:${value.height},mode:${value.mode}`) + }) + + Panel(this.show) { + Column() { + Text('Today Calendar') + Divider() + Text('1. afternoon 4:00 The project meeting') + } + } + .key('panel2') + .type(PanelType.Minibar) + .mode(PanelMode.Mini) + .dragBar(true) + .fullHeight(500) + .halfHeight(250) + .miniHeight(100) + .onChange((value: any) => { + console.info(`width:${value.width},height:${value.height},mode:${value.mode}`) + }) + + Panel(false) { + Column() { + Text('Today Calendar') + Divider() + Text('1. afternoon 4:00 The project meeting') + } + } + .key('panel3') + .type(PanelType.Temporary) + .mode(PanelMode.Full) + .dragBar(true) + .fullHeight(500) + .halfHeight(250) + .miniHeight(100) + .onChange((value: any) => { + console.info(`width:${value.width},height:${value.height},mode:${value.mode}`) + }) + + }.width('100%').height('50%').backgroundColor(0xDCDCDC).padding({ top: 5 }) + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Progress.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Progress.ets new file mode 100644 index 000000000..c8608089f --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Progress.ets @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct progress_testcase { + onPageShow() { + console.info('Progress page show called'); + } + + onBuildDone() { + console.info('Progress page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + Text(`Progress page`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Progress({ value: 20, total: 40, style: ProgressStyle.Linear }) + .value(3) + .color(Color.Blue) + .width(50) + .height(70) + .key('progress') + + Progress({ value: 20, total: 40, style: ProgressStyle.Eclipse }) + .value(3) + .color(Color.Blue) + .width(50) + .height(70) + .key('progress2') + + Progress({ value: 20, total: 40, style: ProgressStyle.Ring }) + .value(3) + .color(Color.Blue) + .width(50) + .height(70) + .key('progress3') + + Progress({ value: 20, total: 40, style: ProgressStyle.ScaleRing }) + .value(3) + .color(Color.Blue) + .width(50) + .height(70) + .key('progress4') + + Progress({ value: 20, total: 40, style: ProgressStyle.Capsule }) + .value(3) + .color(Color.Blue) + .width(50) + .height(70) + .key('progress5') + + } + .width(400) + .height(400) + .borderColor(Color.Pink) + .borderWidth(2) + } + } +} + diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Qrcode.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Qrcode.ets new file mode 100644 index 000000000..5c0dd84ef --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Qrcode.ets @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct qrcode_textcase { + @State Color: Color = Color.Pink + + onPageShow() { + console.info('Qrcode page show called'); + } + + onBuildDone() { + console.info('Qrcode page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`Qrcode page`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + QRCode('hello world') + .color("#FFFFC0CB") + .backgroundColor(this.Color) + .width("200") + .height("100") + .key('qrcode') + } + } +} + + diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Rating.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Rating.ets new file mode 100644 index 000000000..b29e26a39 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Rating.ets @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct rating_testcase { + @State rating: number = 2 + + onPageShow() { + console.info('Rating page show called'); + } + + onBuildDone() { + console.info('Rating page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + Text(`Rating page`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Rating({ rating: 2, indicator: false }) + .stepSize(0.5) + .stars(5) + .starStyle({ + backgroundUri: '/resources/rawfile/star-1-1.png', + foregroundUri: '/resources/rawfile/star-1-3.png', + secondaryUri: '/resources/rawfile/star-1-2.png' + }) + .onChange((value: number) => { + this.rating = value + }) + .key('rating1') + Rating({ rating: 2, indicator: true }) + .stepSize(0.5) + .stars(5) + .starStyle({ + backgroundUri: '/resources/rawfile/star-1-1.png', + foregroundUri: '/resources/rawfile/star-1-3.png', + secondaryUri: '/resources/rawfile/star-1-2.png' + }) + .key('rating2') + }.width(300) + .height(300) + .borderColor(Color.Pink) + .borderWidth(2) + } + } +} + diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/RowSplit.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/RowSplit.ets new file mode 100644 index 000000000..0f4f397b1 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/RowSplit.ets @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router' + +@Entry +@Component +struct rowSplit_testcase { + @State resizeable: boolean = false + private content: string = "rowSplit Page"; + + onPageShow() { + console.info('RowSplit page show called'); + } + + onBuildDone() { + console.info('RowSplit page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`${this.content}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + RowSplit() { + Column() { + Text('Demo1.RowSplit') + .fontSize(15) + .fontWeight(FontWeight.Bold) + } + + Column() { + Text('Demo2.RowSplit') + .fontSize(15) + .fontWeight(FontWeight.Bold) + } + } + .height(100) + .key('rowSplit') + .resizeable(this.resizeable) + .onClick(() => { + router.back() + }) + + RowSplit() { + Column() { + Text('Demo3.RowSplit') + .fontSize(15) + .fontWeight(FontWeight.Bold) + } + + Column() { + Text('Demo4.RowSplit') + .fontSize(15) + .fontWeight(FontWeight.Bold) + } + }.height(100) + .key('rowSplit1') + .resizeable(true) + } + .key('flex') + .width('100%') + .height('100%') + } +} + diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Scroll.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Scroll.ets new file mode 100644 index 000000000..363089d22 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Scroll.ets @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct scroll_testcase { + @State scrollBarWidth: number = 20 + @State scrollable: ScrollDirection = ScrollDirection.None + @State scrollBarColor: Color = Color.Pink + @State scrollBar: BarState= BarState.On + private value1: Array = [1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30] + @State edge: Edge= Edge.Top + private content: string = "Scroll Page"; + scroller: Scroller = new Scroller(); + + onPageShow() { + console.info('Button page show called'); + } + + onBuildDone() { + console.info('Button page build done called'); + } + + build() { + + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`${this.content}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Scroll(this.scroller) { + Column() { + ForEach( + this.value1, + item => { + Text(`${item}`) + .fontSize(15) + .width(400) + .margin(10) + .height(70) + .backgroundColor(0xfff5deb3) + }, + item => item + ) + } + } + .scrollable(ScrollDirection.Vertical) + .scrollBar(this.scrollBar) + .scrollBarColor(this.scrollBarColor) + .scrollBarWidth(this.scrollBarWidth) + .key('scroll') + .width(400) + .height(200) + .onScroll((xOffset: number, yOffset: number) => { + console.info(` current offset is ${xOffset} ${yOffset}`) + }) + .onScrollEnd(() => { + console.info(` now on scroll end`) + }) + .onScrollEdge((side: Edge) => { + console.info(`To the edge`) + }) + Scroll() { + Row() { + Text('scroll uppppp') + .width(60) + .height(100) + .backgroundColor(Color.Yellow) + .margin({ + right: 5, + left: 5 + }) + .key('text') + + Text('scroll to') + .width(60) + .height(100) + .backgroundColor(Color.Green) + .margin({ + right: 5, + left: 5 + }) + .onClick(() => { + this.scroller.scrollTo({ + xOffset: 100, + yOffset: 100, + }) + }) + Text('scroll page') + .width(60) + .height(100) + .backgroundColor(Color.Blue) + .margin({ + right: 5, + left: 5 + }) + .onClick(() => { + this.scroller.scrollPage({ + next: true + }) + }) + Text('scroll Edge') + .width(60) + .height(100) + .backgroundColor(Color.Blue) + .margin({ + right: 5, + left: 5 + }) + .onClick(() => { + this.scroller.scrollEdge(Edge.Top) + }) + Text('scroll Edge') + .width(60) + .height(100) + .backgroundColor(Color.Blue) + .margin({ + right: 5, + left: 5 + }) + .onClick(() => { + this.scroller.currentOffset() + }) + Text('scroll to index') + .width(60) + .height(100) + .backgroundColor(Color.Blue) + .margin({ + right: 5, + left: 5 + }) + .onClick(() => { + this.scroller.scrollToIndex(0) + console.info(` now on scroll end`) + }) + } + } + .key('scroll1') + .height(100) + .scrollable(ScrollDirection.Horizontal) + + Scroll() { + Column() { + Text("start").fontSize(30) + Text("scrollable1") + Text("scrollable2") + Text("scrollable3") + Text("scrollable4") + Text("scrollable1") + Text("scrollable2") + Text("scrollable3") + Text("scrollable4") + } + } + .padding(10) + .scrollable(ScrollDirection.None) + .scrollBar(BarState.Off) + .scrollBarColor(Color.Red) + .scrollBarWidth(5) + .width(300) + .height(200) + .key('scroll2') + + Scroll() { + Column() { + Text("start").fontSize(30) + Text("scrollable1") + Text("scrollable2") + Text("scrollable3") + Text("scrollable4") + Text("scrollable1") + Text("scrollable2") + Text("scrollable3") + Text("scrollable4") + } + } + .padding(10) + .scrollable(ScrollDirection.Free) + .scrollBar(BarState.Off) + .scrollBarColor(Color.Red) + .scrollBarWidth(5) + .width(300) + .height(200) + .key('scroll3') + } + .key('flex') + + } +} diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Slider.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Slider.ets new file mode 100644 index 000000000..625cd0287 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Slider.ets @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct slider { + @State inSetValue: number= 40 + @State outSetValue: number= 40 + @State direction: Axis= Axis.Horizontal + @State Begin: number = SliderChangeMode.Begin + + onPageShow() { + console.info('Slider page show called'); + } + + onBuildDone() { + console.info('Slider page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + Text(`Slider page`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Slider({ + value: this.outSetValue, + min: 0, + max: 100, + step: 1, + direction: Axis.Horizontal, + reverse: false, + style: SliderStyle.OutSet + }) + .blockColor('#FFFF0000') + .selectedColor('#FF0000FF') + .trackColor('#FF808080') + .minLabel('10') + .maxLabel('10') + .showTips(false) + .showSteps(false) + .onChange((value: number, mode: SliderChangeMode) => { + this.outSetValue = value + this.Begin = mode + console.info('value: ' + value + '---mode: ' + mode) + }) + .width("100") + .height("100") + .key('slider1') + Slider({ + value: 40, + min: 0, + max: 100, + step: 1, + style: SliderStyle.InSet + }) + .blockColor(Color.Red) + .selectedColor(Color.Blue) + .trackColor(Color.Gray) + .showTips(true) + .showSteps(true) + .key('slider2') + }.width(300) + .height(300) + .borderColor(Color.Pink) + .borderWidth(2) + } + } +} + diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Span.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Span.ets new file mode 100644 index 000000000..df5a71043 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Span.ets @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct span_textcase { + + onPageShow() { + console.info('Span page show called'); + } + + onBuildDone() { + console.info('Span page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Column() { + Text() { + Span('Test Span demo') + .decoration({ type: TextDecorationType.LineThrough, "color": Color.Red }) + .textCase(TextCase.UpperCase) + .fontColor(Color.Blue) + .fontSize("20fp") + .letterSpacing(5) + .fontFamily("sans-serif") + .fontWeight(FontWeight.Bold) + .fontStyle(FontStyle.Italic) + .key('span1') + Span('The second test Span demo') + .textCase(TextCase.LowerCase) + .fontColor(Color.Black) + .letterSpacing('5') + .fontSize(30) + .key('span2') + Span('The third test Span demo') + .textCase(TextCase.Normal) + .fontColor(Color.Yellow) + .fontSize("30fp") + .key('span3') + } + } + .width(300) + .height(300) + .borderColor(Color.Pink) + .borderWidth(4) + } + } +} + + + diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Stack.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Stack.ets new file mode 100644 index 000000000..2a694889f --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Stack.ets @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router' + +@Entry +@Component +struct stack_testcase { + @State alignContent: Alignment = Alignment.Bottom + private content: string = "Stack Page"; + + onPageShow() { + console.info('Stack page show called'); + } + + onBuildDone() { + console.info('Stack page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`${this.content}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Stack({ alignContent: this.alignContent }) { + Text('First child, show in bottom').width('90%').height('100%').backgroundColor(0xd2cab3).align(Alignment.Top) + Text('Second child, show in top').width('70%').height('60%').backgroundColor(0xc1cbac).align(Alignment.Top) + } + .width('100%') + .height(80) + .margin({ top: 5 }) + .key('stack') + .onClick(() => { + router.back() + }) + + Stack({ alignContent: Alignment.BottomStart }) { + Text('First child, show in bottom').width('90%').height('100%').backgroundColor(0xd2cab3).align(Alignment.Top) + Text('Second child, show in top').width('70%').height('60%').backgroundColor(0xc1cbac).align(Alignment.Top) + }.width('100%').height(80).margin({ top: 5 }) + .key('stack1') + + Stack({ alignContent: Alignment.BottomEnd }) { + Text('First child, show in bottom').width('90%').height('100%').backgroundColor(0xd2cab3).align(Alignment.Top) + Text('Second child, show in top').width('70%').height('60%').backgroundColor(0xc1cbac).align(Alignment.Top) + }.width('100%').height(80).margin({ top: 5 }) + .key('stack2') + + Stack({ alignContent: Alignment.Start }) { + Text('First child, show in bottom').width('90%').height('100%').backgroundColor(0xd2cab3).align(Alignment.Top) + Text('Second child, show in top').width('70%').height('60%').backgroundColor(0xc1cbac).align(Alignment.Top) + }.width('100%').height(80).margin({ top: 5 }) + .key('stack3') + + Stack({ alignContent: Alignment.Center }) { + Text('First child, show in bottom').width('90%').height('100%').backgroundColor(0xd2cab3).align(Alignment.Top) + Text('Second child, show in top').width('70%').height('60%').backgroundColor(0xc1cbac).align(Alignment.Top) + }.width('100%').height(80).margin({ top: 5 }) + .key('stack4') + + Stack({ alignContent: Alignment.End }) { + Text('First child, show in bottom').width('90%').height('100%').backgroundColor(0xd2cab3).align(Alignment.Top) + Text('Second child, show in top').width('70%').height('60%').backgroundColor(0xc1cbac).align(Alignment.Top) + }.width('100%').height(80).margin({ top: 5 }) + .key('stack5') + + Stack({ alignContent: Alignment.Top }) { + Text('First child, show in bottom').width('90%').height('100%').backgroundColor(0xd2cab3).align(Alignment.Top) + Text('Second child, show in top').width('70%').height('60%').backgroundColor(0xc1cbac).align(Alignment.Top) + }.width('100%').height(60).margin({ top: 5 }) + .key('stack6') + + Stack({ alignContent: Alignment.TopStart }) { + Text('First child, show in bottom').width('90%').height('100%').backgroundColor(0xd2cab3).align(Alignment.Top) + Text('Second child, show in top').width('70%').height('60%').backgroundColor(0xc1cbac).align(Alignment.Top) + }.width('100%').height(60).margin({ top: 5 }) + .key('stack7') + + Stack({ alignContent: Alignment.TopEnd }) { + Text('First child, show in bottom').width('90%').height('100%').backgroundColor(0xd2cab3).align(Alignment.Top) + Text('Second child, show in top').width('70%').height('60%').backgroundColor(0xc1cbac).align(Alignment.Top) + }.width('100%').height(60).margin({ top: 5 }) + .key('stack8') + } + .key('flex') + .width('100%') + .height('100%') + + } +} + diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Text.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Text.ets new file mode 100644 index 000000000..fbd1415dc --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/Text.ets @@ -0,0 +1,237 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// @ts-nocheck +import router from '@system.router' + +var paramInfo = router.getParams() +console.info("cd paramInfo" + JSON.stringify(paramInfo)) + +@Entry +@Component +struct text_textcase { + @State textAlign: TextAlign= TextAlign.End + @State lineHeight: string= '15fp' + @State overflow: TextOverflow = TextOverflow.Ellipsis + @State textOverflow: textOverflow<{ "overflow": TextOverflow }> = { "overflow": this.overflow } + @State maxLines: number = 2 + @State baselineOffset: number = 0 + @State textCase: TextCase= TextCase.Normal + @State decoration: decoration<{ + type: TextDecorationType, + color: Color + }> = { type: TextDecorationType.Underline, color: Color.Red } + @State color: Color = Color.Red + @State width: string= "200" + @State height: string= "100" + @State size: size = { width: 200, height: 100 } + @State marginBottom: string = "10px" + @State marginTop: string = "10px" + @State marginLeft: string = "10px" + @State marginRingt: string= "10px" + @State paddingBottom: string= "5" + @State paddingTop: string= "5" + @State paddingLeft: string= "5" + @State paddingRingt: string= "5" + @State constraintSize: constraintSize = { minWidth: 20, maxWidth: 200, minHeight: 0, maxHeight: 50 } + @State layoutPriority: string= "9px" + @State layoutWeight: string = "10px" + @State align: Alignment = Alignment.Center + @State direction: Direction = Direction.Auto + @State position: position<{ + x: string, + y: string + }> = { x: "50", y: "50" } + @State markAnchor: markAnchor<{ + x: string, + y: string + }> = { x: "50", y: "50" } + @State offset: offset<{ + x: string, + y: string + }> = { x: "50", y: "50" } + @State flexGrow: number = 5 + @State flexShrink: number = 2 + @State flexBasis: number = 0 + @State alignSelf: ItemAlign = ItemAlign.Auto + @State borderStyle: BorderStyle = BorderStyle.Dashed + @State borderRadius: number = 10 + @State borderWidth: string= "4px" + @State borderColor: Color= Color.Blue + @State backgroundColor: Color = Color.Pink + @State backgroundImageSize: ImageSize = ImageSize.Cover + @State backgroundImagePosition: Alignment= Alignment.Center + @State opacity: number= 1 + @State visibility: Visibility= Visibility.Visible + @State enabled: boolean = false + @State zIndex: number = 1 + @State fontStyle: FontStyle = FontStyle.Italic + @State fontSize: number = 15 + @State minFontSize: number = 15 + @State maxFontSize: number = 15 + @State letterSpacing: number= 10 + @State fontWeight: FontWeight= FontWeight.Bold + @State fontColor: Color= Color.Black + @State active: boolean = false + private content: string = "Text Page"; + + onPageShow() { + console.info('Text page show called'); + } + + onBuildDone() { + console.info('Text page build done called'); + } + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`${this.content}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Text('Text Anto test,Text Anto test,Text Anto test,Text Anto test,test,Text Anto test,Text Anto test,Text Anto test,Text Anto test,Text Anto test,Text Anto test') + .width(this.width) + .height(this.height) + .padding({ bottom: this.paddingBottom, top: this.paddingTop, right: this.paddingRingt, left: this.paddingLeft }) + .margin({ bottom: this.marginBottom, top: this.marginTop, right: this.marginRingt, left: this.marginLeft }) + .constraintSize(this.constraintSize) + .layoutWeight(this.layoutWeight) + .align(this.align) + .direction(this.direction) + .position(this.position) + .markAnchor(this.markAnchor) + .offset(this.offset) + .flexBasis(this.flexBasis) + .flexGrow(this.flexGrow) + .flexShrink(this.flexShrink) + .alignSelf(this.alignSelf) + .borderStyle(this.borderStyle) + .borderRadius(this.borderRadius) + .borderWidth(this.borderWidth) + .borderColor(this.borderColor) + .backgroundColor(this.backgroundColor) + .opacity(this.opacity) + .visibility(this.visibility) + .enabled(this.enabled) + .zIndex(this.zIndex) + .fontColor(this.fontColor) + .fontSize(this.fontSize) + .minFontSize(this.minFontSize) + .letterSpacing(this.letterSpacing) + .maxFontSize(this.maxFontSize) + .fontWeight(this.fontWeight) + .fontStyle(this.fontStyle) + .fontFamily("sans-serif") + .textAlign(this.textAlign) + .textOverflow(this.textOverflow) + .lineHeight(this.lineHeight) + .baselineOffset(this.baselineOffset) + .maxLines(2) + .textCase(this.textCase) + .decoration(this.decoration) + .aspectRatio(1) + .fontColor(Color.Black) + .key('Text') + Text('Text Anto test,Text Anto test,Text Anto test,Text Anto test,Text Anto test,Text Anto test,Text Anto test,Text Anto test') + .size({ width: 100, height: 50 }) + .padding({ bottom: 5, top: 5, right: 5, left: 10 }) + .margin({ bottom: 15, top: 10, right: 10, left: 10 }) + .fontSize('13') + .textAlign(TextAlign.Start) + .align(Alignment.Start) + .direction(Direction.Ltr) + .alignSelf(ItemAlign.Start) + .borderStyle(BorderStyle.Dotted) + .borderWidth(2) + .visibility(Visibility.Hidden) + .enabled(true) + .fontWeight(FontWeight.Normal) + .textAlign(TextAlign.Start) + .textOverflow(TextOverflow.Clip) + .maxLines(2) + .textCase(TextCase.LowerCase) + .decoration({ "type": TextDecorationType.LineThrough, "color": Color.Red }) + .fontColor(Color.White) + .key('Text1') + Text('Text Anto test,Text Anto test,Text Anto test,Text Anto test,Text Anto test,Text Anto test,Text Anto test,Text Anto test,Text Anto test') + .fontSize(13) + .width('100%') + .textAlign(TextAlign.Center) + .align(Alignment.TopEnd) + .direction(Direction.Rtl) + .alignSelf(ItemAlign.Center) + .borderStyle(BorderStyle.Solid) + .borderWidth(2) + .visibility(Visibility.None) + .fontWeight(FontWeight.Bolder) + .textAlign(TextAlign.Center) + .textOverflow(TextOverflow.None) + .textCase(TextCase.UpperCase) + .decoration({ "type": TextDecorationType.None, "color": Color.Red }) + .fontColor(Color.Blue) + .key('Text2') + Text('Text Anto test,Text Anto test,Text Anto test,Text Anto test') + .fontSize(13) + .align(Alignment.Top) + .alignSelf(ItemAlign.End) + .borderWidth(2) + .width('100%') + .fontWeight(FontWeight.Lighter) + .decoration({ type: TextDecorationType.Overline, color: Color.Red }) + .fontColor(Color.Gray) + .key('Text3') + Text('Text Anto test,Text Anto test') + .fontSize(13) + .align(Alignment.TopStart) + .alignSelf(ItemAlign.Baseline) + .borderWidth(2) + .width('100%') + .fontWeight(FontWeight.Medium) + .fontColor(Color.Brown) + .key('Text4') + Text('Text Anto test,Text Anto test,Text Anto test') + .fontSize(13) + .align(Alignment.End) + .alignSelf(ItemAlign.Stretch) + .borderWidth(2) + .width('100%') + .fontWeight(FontWeight.Regular) + .fontColor(Color.Grey) + .key('Text5') + Text('Text Anto test,Text Anto test,Text Anto test') + .fontSize(13) + .align(Alignment.BottomEnd) + .width('100%') + .fontColor(Color.Orange) + .key('Text6') + Text('Text Anto test,Text Anto test,Text Anto test') + .fontSize(13) + .align(Alignment.Bottom) + .width('100%') + .fontColor(Color.Yellow) + .key('Text7') + Text('Text Anto test,Text Anto test,Text Anto test') + .fontSize(13) + .align(Alignment.BottomStart) + .width('100%') + .key('Text8') + + } + .key('flex') + .width('100%') + .height('100%') + } +} + + diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/index.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/index.ets new file mode 100644 index 000000000..10359134d --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/pages/index.ets @@ -0,0 +1,65 @@ +// @ts-nocheck +/** + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import file from '@system.file'; + +import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets"; +import testsuite from "../test/List.test.ets"; +import featureAbility from "@ohos.ability.featureAbility"; + +@Entry +@Component +struct MyComponent { + aboutToAppear() { + console.info("start run testcase!!!!") + featureAbility.getWant() + .then((Want) => { + const core = Core.getInstance(); + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }); + core.addService('expect', expectExtend); + const reportExtend = new ReportExtend(file); + core.addService('report', reportExtend); + core.init(); + core.subscribeEvent('task', reportExtend); + const configService = core.getDefaultService('config'); + Want.parameters['timeout'] = 100000 + console.info('parameters---->' + JSON.stringify(Want.parameters)); + configService.setConfig(Want.parameters); + testsuite(); + core.execute(); + console.info('Operation successful. Data: ' + JSON.stringify(Want)); + }) + .catch((error) => { + console.error('Operation failed. Cause: ' + JSON.stringify(error)); + }) + } + + build() { + Flex({ + direction: FlexDirection.Column, + alignItems: ItemAlign.Center, + justifyContent: FlexAlign.Center + }) { + Text('ACE ETS TEST') + .fontSize(50) + .fontWeight(FontWeight.Bold) + } + .width('100%') + .height('100%') + } +} + diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/CallJsunit.test.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/CallJsunit.test.ets similarity index 61% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/CallJsunit.test.ets rename to telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/CallJsunit.test.ets index 744b261c0..0cd2dcefe 100644 --- a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/CallJsunit.test.ets +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/CallJsunit.test.ets @@ -44,98 +44,6 @@ export default function callJsunit(){ describe('callTest', function(){ console.log("==========> call Test start ==========>"); - /** - * @tc.number Telephony_Call_Call_Dial_0100 - * @tc.name Makes a call. - * @tc.desc Function test - */ - it("Telephony_Call_Call_Dial_0100",0,async function(done){ - let caseName:string = "Telephony_Call_Call_Dial_0100"; - console.log(`==========> ${caseName} Test start ==========>`); - call.dial(PHONE_NUMBER,(err,data) => { - if(err){ - console.log(`${caseName} error,case success,error:${toString(err)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} success,case fail`); - done(); - }); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_Call_Dial_0200 - * @tc.name Makes a call. - * @tc.desc Function test - */ - it("Telephony_Call_Call_Dial_0200",0,async function(done){ - let caseName:string = "Telephony_Call_Call_Dial_0200"; - console.log(`==========> ${caseName} Test start ==========>`); - let options = {extras:false, accountId:DEFAULT_SLOT_ID, videoState:MEDIA_TYPE_VOICE, - dialScene:DIAL_SCENCE_CALL_PRIVILEGED, dialType:DIAL_CARRIER_TYPE}; - call.dial(PHONE_NUMBER,options,(err,data) => { - if(err){ - console.log(`${caseName} error,case success,error:${toString(err)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} success,case fail`); - done(); - }); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_Call_Dial_0200 - * @tc.name Makes a call. - * @tc.desc Function test - */ - it("Telephony_Call_Call_Dial_0200",0,async function(done){ - let caseName:string = "Telephony_Call_Call_Dial_0200"; - console.log(`==========> ${caseName} Test start ==========>`); - let options = {extras:false, accountId:DEFAULT_SLOT_ID, videoState:MEDIA_TYPE_VOICE, - dialScene:DIAL_SCENCE_CALL_PRIVILEGED, dialType:DIAL_CARRIER_TYPE}; - call.dial(PHONE_NUMBER,options,(err,data) => { - if(err){ - console.log(`${caseName} error,case success,error:${toString(err)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} success,case fail`); - done(); - }); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - - - /** - * @tc.number Telephony_Call_Call_Dial_0300 - * @tc.name Makes a call. - * @tc.desc Function test - */ - it("Telephony_Call_Call_Dial_0300",0,async function(done){ - let caseName:string = "Telephony_Call_Call_Dial_0300"; - console.log(`==========> ${caseName} Test start ==========>`); - let options = {extras:false, accountId:DEFAULT_SLOT_ID, videoState:MEDIA_TYPE_VOICE, - dialScene:DIAL_SCENCE_CALL_PRIVILEGED, dialType:DIAL_CARRIER_TYPE}; - call.dial(PHONE_NUMBER,options).then(data=>{ - expect(true).assertTrue(); - }).catch(error =>{ - console.log(caseName+ " dial error :"+ toString(error)); - done(); - return; - }); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); /** * @tc.number Telephony_Call_Call_MakeCall_0100 @@ -215,243 +123,7 @@ export default function callJsunit(){ done(); }); - /** - * @tc.number Telephony_Call_Call_Reject_0100 - * @tc.name call_reject - * @tc.desc Function test - */ - it("Telephony_Call_Call_Reject_0100",0,async function(done){ - let caseName = 'Telephony_Call_Call_Reject_0100'; - console.log(`==========> ${caseName} Test start ==========>`); - call.reject(BOUNDARY_NUMBER_INT, (error) => { - if (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} success,case failed`); - done(); - }); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_Call_Reject_0200 - * @tc.name call_reject - * @tc.desc Function test - */ - it("Telephony_Call_Call_Reject_0200",0,async function(done){ - let caseName = 'Telephony_Call_Call_Reject_0200'; - console.log(`==========> ${caseName} Test start ==========>`); - let options = {messageContent:"hello"} - call.reject(BOUNDARY_NUMBER_INT,options, (error) => { - if (error) { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} success,case failed`); - done(); - }); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_Call_Reject_0300 - * @tc.name call_reject - * @tc.desc Function test - */ - it("Telephony_Call_Call_Reject_0300",0,async function(done){ - let caseName = 'Telephony_Call_Call_Reject_0300'; - console.log(`==========> ${caseName} Test start ==========>`); - call.reject(CALL_ID_NOT_EXIST).then(() => { - expect().assertFail(); - console.log(`${caseName} success,case failed`); - done(); - }).catch(error => { - console.log(`${caseName} error,case success,error:${toString(error)}`); - done(); - return; - }); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_On_CallDetailsChange_0100 - * @tc.name Method in call_on of type callDetailsChange - * @tc.desc Function test - */ - it("Telephony_Call_On_CallDetailsChange_0100",0,async function(done){ - let caseName:string = "Telephony_Call_On_CallDetailsChange_0100"; - console.log(`==========> ${caseName} Test start ==========>`); - try{ - call.on("callDetailsChange",(err,data) => { - if(err){ - console.log(`${caseName} error,error :${toString(err)}`); - done(); - return; - } else { - let callAttributeOptions = data; - console.log(`${caseName} success, startTime = :` + callAttributeOptions.startTime); - } - expect(true).assertTrue(); - done(); - }); - done(); - }catch(err){ - expect().assertFail(); - console.log(`${caseName} fail, err:${err}`); - done(); - } - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_Off_callDetailsChange_0100 - * @tc.name Method in call_off of type callDetailsChange - * @tc.desc Function test - */ - it("Telephony_Call_Off_CallDetailsChange_0100",0,async function(done){ - let caseName:string = "Telephony_Call_Off_CallDetailsChange_0100"; - console.log(`==========> ${caseName} Test start ==========>`); - try{ - call.off("callDetailsChange",(err,data) => { - if(err){ - console.log(`${caseName} error,error :${toString(err)}`); - done(); - return; - } - expect(true).assertTrue(); - done(); - }); - done(); - }catch(err){ - expect().assertFail(); - console.log(`${caseName} fail, err:${err}`); - done(); - } - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_On_CallEventChange_0200 - * @tc.name Method in call_on of type callEventChange - * @tc.desc Function test - */ - it("Telephony_Call_On_CallEventChange_0200",0,async function(done){ - let caseName:string = "Telephony_Call_On_CallEventChange_0200"; - console.log(`==========> ${caseName} Test start ==========>`); - try{ - call.on("callEventChange",(err,data) => { - if(err){ - console.log(`${caseName} error,error :${toString(err)}`); - done(); - return; - } - expect(true).assertTrue(); - done(); - }); - done(); - }catch(err){ - expect().assertFail(); - console.log(`${caseName} fail, err:${err}`); - done(); - } - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_Off_CallEventChange_0200 - * @tc.name Method in call_off of type callEventChange - * @tc.desc Function test - */ - it("Telephony_Call_Off_CallEventChange_0200",0,async function(done){ - let caseName:string = "Telephony_Call_Off_CallEventChange_0200"; - console.log(`==========> ${caseName} Test start ==========>`); - try{ - call.off("callEventChange",(err,data) => { - if(err){ - console.log(`${caseName} error,error :${toString(err)}`); - done(); - return; - } - expect(true).assertTrue(); - done(); - }); - done(); - }catch(err){ - expect().assertFail(); - console.log(`${caseName} fail, err:${err}`); - done(); - } - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_Off_CallEventChange_0200 - * @tc.name Method in call_off of type callDisconnectedCause - * @tc.desc Function test - */ - it("Telephony_Call_On_CallDisconnectedCause_0300",0,async function(done){ - let caseName:string = "Telephony_Call_On_CallDisconnectedCause_0300"; - console.log(`==========> ${caseName} Test start ==========>`); - try{ - call.on("callDisconnectedCause",(err,data) => { - if(err){ - console.log(`${caseName} error,error :${toString(err)}`); - done(); - return; - } - expect(true).assertTrue(); - done(); - }); - done(); - }catch(err){ - expect().assertFail(); - console.log(`${caseName} fail, err:${err}`); - done(); - } - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_Off_CallEventChange_0200 - * @tc.name Method in call_off of type callDisconnectedCause - * @tc.desc Function test - */ - it("Telephony_Call_Off_CallDisconnectedCause_0300",0,async function(done){ - let caseName:string = "Telephony_Call_Off_CallDisconnectedCause_0300"; - console.log(`==========> ${caseName} Test start ==========>`); - try{ - call.off("callDisconnectedCause",(err,data) => { - if(err){ - console.log(`${caseName} error,error :${toString(err)}`); - done(); - return; - } - expect(true).assertTrue(); - done(); - }); - done(); - }catch(err){ - expect().assertFail(); - console.log(`${caseName} fail, err:${err}`); - done(); - } - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - + /** * @tc.number Telephony_Call_AudioDevice_DEVICE_MIC * @tc.name Enum AudioDevice @@ -470,30 +142,7 @@ export default function callJsunit(){ done(); }); - /** - * @tc.number Telephony_Call_Dial_Dial_0200 - * @tc.name Makes a call. - * @tc.desc Function test - */ - it("Telephony_Call_DialOptions_Extras",0,async function(done){ - let caseName:string = "Telephony_Call_DialOptions_extras"; - console.log(`==========> ${caseName} Test start ==========>`); - let options = {extras:false, accountId:DEFAULT_SLOT_ID, videoState:MEDIA_TYPE_VOICE, - dialScene:DIAL_SCENCE_CALL_PRIVILEGED, dialType:DIAL_CARRIER_TYPE}; - call.dial(PHONE_NUMBER,options,(err,data) => { - if(err){ - console.log(`${caseName} error,case success,error:${toString(err)}`); - done(); - return; - } - expect().assertFail(); - console.log(`${caseName} success,case fail`); - done(); - }); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - + /** * @tc.number Telephony_Call_CallTransferType_TRANSFER_TYPE_BUSY * @tc.name Enum CallTransferType @@ -850,4 +499,5 @@ export default function callJsunit(){ }); -} \ No newline at end of file +} + diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/ConvertOptionsJsunit.test.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/ConvertOptionsJsunit.test.ets similarity index 88% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/ConvertOptionsJsunit.test.ets rename to telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/ConvertOptionsJsunit.test.ets index 95fd59ba4..c03aae67d 100644 --- a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/ConvertOptionsJsunit.test.ets +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/ConvertOptionsJsunit.test.ets @@ -15,7 +15,7 @@ */ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' -import ConvertXML from '@ohos.convertxml' +import convertxml from '@ohos.convertxml' export default function convertOptionsJsunit() { describe('XmlTest',function () { console.log("************* settings Test start*************"); @@ -27,8 +27,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false,trim :true}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false,trim :true})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -59,8 +59,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreDeclaration: true}); + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreDeclaration: true})); var str1 = '{"_elements":[{"_type":"element",'+ '"_name":"note",'+ '"_attributes":{"importance":"high",'+ @@ -89,8 +89,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreDeclaration: true}); + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreDeclaration: true})); var str1 = '{"_elements":[{"_type":"element",'+ '"_name":"note",'+ '"_attributes":{"importance":"high",'+ @@ -119,8 +119,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreAttributes: true}); + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreAttributes: true})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -150,8 +150,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreComment: true}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreComment: true})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -183,8 +183,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreCDATA: true}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreCDATA: true})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -216,8 +216,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreDoctype: true}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreDoctype: true})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -248,8 +248,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreText: true}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreText: true})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -274,8 +274,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, declarationKey: "123"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, declarationKey: "123"})); var str1 = '{"123":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -307,8 +307,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, instructionKey: "123"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, instructionKey: "123"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -343,8 +343,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, attributesKey: "123"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, attributesKey: "123"})); var str1 = '{"_declaration":{"123":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"123":{"importance":"high",'+ @@ -378,8 +378,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, textKey: "123"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, textKey: "123"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -411,8 +411,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, cdataKey: "123"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, cdataKey: "123"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -446,8 +446,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, doctypeKey: 'doctype'}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, doctypeKey: 'doctype'})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"doctype","doctype":"foo"},'+ @@ -480,8 +480,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, commentKey: "123"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, commentKey: "123"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"123":"note",'+ @@ -515,8 +515,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, parentKey: "123"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, parentKey: "123"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -551,8 +551,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, typeKey: "123"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, typeKey: "123"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"123":"element",'+ @@ -583,8 +583,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, nameKey: "123"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, nameKey: "123"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"123":"note",'+ @@ -615,8 +615,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, elementsKey: "123"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, elementsKey: "123"})); var str1 = '{"123":[{"123":[{"123":[{"_type":"text",'+ '"_text":"Happy"}],'+ '"_type":"element",'+ @@ -647,8 +647,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false,trim :true}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false,trim :true})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -679,8 +679,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreDeclaration: true}); + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreDeclaration: true})); var str1 = '{"_elements":[{"_type":"element",'+ '"_name":"note",'+ '"_attributes":{"importance":"high",'+ @@ -709,8 +709,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreDeclaration: true}); + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreDeclaration: true})); var str1 = '{"_elements":[{"_type":"element",'+ '"_name":"note",'+ '"_attributes":{"importance":"high",'+ @@ -739,8 +739,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreAttributes: true}); + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreAttributes: true})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -770,8 +770,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreComment: true}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreComment: true})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -803,8 +803,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreCDATA: true}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreCDATA: true})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -836,8 +836,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreDoctype: true}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreDoctype: true})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -868,8 +868,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreText: true}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreText: true})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -894,8 +894,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, declarationKey: "456"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, declarationKey: "456"})); var str1 = '{"456":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -927,8 +927,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, instructionKey: "456"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, instructionKey: "456"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -963,8 +963,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, attributesKey: "456"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, attributesKey: "456"})); var str1 = '{"_declaration":{"456":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"456":{"importance":"high",'+ @@ -998,8 +998,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, textKey: "456"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, textKey: "456"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -1031,8 +1031,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, cdataKey: "456"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, cdataKey: "456"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -1066,8 +1066,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, doctypeKey: 'doctype_next'}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, doctypeKey: 'doctype_next'})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"doctype","doctype_next":"foo"},'+ @@ -1100,8 +1100,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, commentKey: "456"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, commentKey: "456"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"456":"note",'+ @@ -1135,8 +1135,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, parentKey: "456"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, parentKey: "456"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ @@ -1171,8 +1171,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, typeKey: "123"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, typeKey: "123"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"123":"element",'+ @@ -1203,8 +1203,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, nameKey: "123"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, nameKey: "123"})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"123":"note",'+ @@ -1235,8 +1235,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, elementsKey: "123"}) + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, elementsKey: "123"})); var str1 = '{"123":[{"123":[{"123":[{"_type":"text",'+ '"_text":"Happy"}],'+ '"_type":"element",'+ @@ -1273,8 +1273,8 @@ export default function convertOptionsJsunit() { ' Work' + ' Play' + ''; - var convertml = new ConvertXML(); - var result1 = convertml.convert(xml, {compact: false, ignoreInstruction: true}); + var conv = new convertxml.ConvertXML(); + var result1 = JSON.stringify(conv.convert(xml, {compact: false, ignoreInstruction: true})); var str1 = '{"_declaration":{"_attributes":{"version":"1.0",'+ '"encoding":"utf-8"}},'+ '"_elements":[{"_type":"element",'+ diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/DataJsunit.test.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/DataJsunit.test.ets similarity index 100% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/DataJsunit.test.ets rename to telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/DataJsunit.test.ets diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/List.test.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/List.test.ets similarity index 89% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/List.test.ets rename to telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/List.test.ets index 5ebbc36cb..65091fa54 100644 --- a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/List.test.ets +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/List.test.ets @@ -17,11 +17,9 @@ import convertOptionsJsunit from './ConvertOptionsJsunit.test.ets' import radioJsunit from './RadioJsunit.test.ets' import radioSecondJsunit from './RadioSecondJsunit.test.ets' -import observerJsunit from './ObserverJsunit.test.ets' import smsUiJsunit from './SmsMmsJsunit.test.ets'; import callJsunit from './CallJsunit.test.ets'; import dataJsunit from './DataJsunit.test.ets'; -import simJsunit from './SimJsunit.test.ets'; import statisticsUiJsunit from './StatisticsJsunit.test.ets'; export default function testsuite() { @@ -30,9 +28,7 @@ export default function testsuite() { callJsunit(); smsUiJsunit(); convertOptionsJsunit(); - observerJsunit(); radioJsunit(); radioSecondJsunit(); - simJsunit(); statisticsUiJsunit(); } \ No newline at end of file diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/RadioJsunit.test.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/RadioJsunit.test.ets similarity index 76% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/RadioJsunit.test.ets rename to telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/RadioJsunit.test.ets index a6222c025..bcff586ce 100644 --- a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/RadioJsunit.test.ets +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/RadioJsunit.test.ets @@ -24,49 +24,7 @@ export default function radioJsunit() { const SLOT_2 = -1; const SLOT_0 = 0; - /** - * @tc.number Telephony_NetworkSearch_getMEID_Async_0100 - * @tc.name Test getMEID(-1) to view the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getMEID_Async_0100', 0, async function (done) { - if(utils.notCheck){ - done(); - return; - } - radio.getMEID(SLOT_2, (err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_getMEID_Async_0100 fail: ${err}`); - expect().assertFail(); - done(); - return; - } - console.log(`Telephony_NetworkSearch_getMEID_Async_0100 end data: ${data}`); - expect(data === '').assertTrue(); - done(); - }); - }); - - /** - * @tc.number Telephony_NetworkSearch_getMEID_Promise_0100 - * @tc.name Test getMEID(-1) to check the callback result - * @tc.desc FunctigetMEIDon test - */ - it('Telephony_NetworkSearch_getMEID_Promise_0100', 0, async function (done) { - if(utils.notCheck){ - done(); - return; - } - radio.getMEID(SLOT_2).then(data => { - console.log(`Telephony_NetworkSearch_getMEID_Promise_0100 end data: ${data}`); - expect(data === '').assertTrue(); - done(); - }).catch(err => { - console.log(`Telephony_NetworkSearch_getMEID_Promise_0100 fail: ${err}`); - expect().assertFail(); - done(); - }) - }); + /** * @tc.number Telephony_NetworkSearch_getPrimarySlotId_Async_0200 @@ -91,49 +49,7 @@ export default function radioJsunit() { }); }); - /** - * @tc.number Telephony_NetworkSearch_setPrimarySlotId_Async_0300 - * @tc.name Test The function setPrimarySlotId(0) - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_setPrimarySlotId_Async_0300', 0, async function (done) { - if(utils.notCheck){ - done(); - return; - } - radio.setPrimarySlotId(SLOT_0, (err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_setPrimarySlotId_Async_0300 fail: ${err}`); - expect(data === undefined).assertTrue(); - done(); - return; - } - console.log(`Telephony_NetworkSearch_setPrimarySlotId_Async_0300 end data: ${data}`); - expect(data === '').assertTrue(); - done(); - }); - }); - - /** - * @tc.number Telephony_NetworkSearch_setPrimarySlotId_Async_0300 - * @tc.name Test The function setPrimarySlotId(0) - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_setPrimarySlotId_Promise_0300', 0, async function (done) { - if(utils.notCheck){ - done(); - return; - } - try { - await radio.setPrimarySlotId(SLOT_0); - console.log('Telephony_NetworkSearch_setPrimarySlotId_Promise_0300 success'); - done(); - } catch (err) { - console.log(`Telephony_NetworkSearch_setPrimarySlotId_Promiss_0300 fail ${err}`); - done(); - } - }); - + /** * @tc.number Telephony_NetworkSearch_isNrSupported_Promise_0400 * @tc.name Test The function setPrimarySlotId(0) diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/RadioSecondJsunit.test.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/RadioSecondJsunit.test.ets similarity index 68% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/RadioSecondJsunit.test.ets rename to telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/RadioSecondJsunit.test.ets index c4a9207ba..3ae50bb8d 100644 --- a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/RadioSecondJsunit.test.ets +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/RadioSecondJsunit.test.ets @@ -65,63 +65,9 @@ export default function radioSecondJsunit() { const CELL_INFO_MIN = 0; const TIME_RADIO_TURNON = 10000; console.log("************* radio Test start*************"); - it('Telephony_NetworkSearch_getCellInformation_Async_0100', 0, async function (done) { - if (utils.notCheck) { - expect(true).assertTrue(); - done(); - return; - } - radio.getCellInformation((err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_getCellInformation_Async_0100 fail: ${err}`); - expect().assertFail(); - done(); - return; - } - console.log(`Telephony_NetworkSearch_getCellInformation_Async_0100 end data: ${JSON.stringify(data)}`); - if (true) { - console.log(`Telephony_NetworkSearch_getCellInformation_Async_0100 1`); - expect(true).assertTrue(); - done(); - return; - } else { - assertCellInformation(data); - done(); - } - }); - }); - - /** - * @tc.number Telephony_NetworkSearch_getNrOptionMode_Async_0100 - * @tc.name Test getNrOptionMode() to check the callback result - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getNrOptionMode_Async_0100', 0, async function (done) { - if (utils.notCheck) { - expect(true).assertTrue(); - done(); - return; - } - radio.getNrOptionMode((err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_getNrOptionMode_Async_0100 get fail err: ${err}`); - expect().assertFail(); - done(); - return; - } - console.log(`Telephony_NetworkSearch_getNrOptionMode_Async_0100 end data: ${JSON.stringify(data)}`); - if (true) { - console.log(`Telephony_NetworkSearch_getNrOptionMode_Async_0100 1`); - expect(true).assertTrue(); - done(); - return; - } else { - expect(NROPTION_MODE).assertContain(data); - done(); - } - }); - }) + + /** * @tc.number Telephony_NetworkSearch_NetworkState_Async_0100 * @tc.name Test getNrOptionMode() to check the callback result @@ -179,52 +125,7 @@ export default function radioSecondJsunit() { }) - /** - * @tc.number Telephony_NetworkSearch_getNetworkSearchInformation_Async_0100 - * @tc.name Test the getNetworkSearchInformation() query function and set the slotId parameter input to 0, - * test the return value isNetworkSearchSuccess is true and specific operator information - * @tc.desc Function test - */ - it('Telephony_NetworkSearch_getNetworkSearchInformation_Async_0100', 0, async function (done) { - if (utils.notCheck) { - expect(true).assertTrue(); - done(); - return; - } - radio.getNetworkSearchInformation(SLOT_0, (err, data) => { - if (err) { - console.log(`Telephony_NetworkSearch_getNetworkSearchInformation_Async_0100 fail err: ${err}`); - expect().assertFail(); - done(); - return; - } - if (true){ - console.log(`Telephony_NetworkSearch_getNetworkSearchInformation_Async_0100 1`); - expect(true).assertTrue(); - done(); - return; - } - expect(data != null && data != undefined).assertTrue(); - if (data.networkSearchResult.length === 0) { - console.log('Telephony_NetworkSearch_getNetworkSearchInformation_Async_0100 fail'); - expect().assertFail(); - done(); - return; - } - console.log( - `Telephony_NetworkSearch_getNetworkSearchInformation_Async_0100 finish data: ${JSON.stringify(data)}`); - expect(data.isNetworkSearchSuccess).assertTrue(); - expect( - data.networkSearchResult[0].operatorName != undefined && - data.networkSearchResult[0].operatorName != '' && - data.networkSearchResult[0].operatorName != null - ).assertTrue(); - expect(garrNetworkState).assertContain(data.networkSearchResult[0].state); - expect(garrNetworkRadioTech).assertContain(data.networkSearchResult[0].radioTech); - expect(data.networkSearchResult[0].operatorNumeric.substr(0, 3) === '460').assertTrue(); - done(); - }); - }); + console.log("************* radio Test end*************"); function assertCellInformation(data) { expect(data !== '' && data != undefined && data != null).assertTrue(); diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/SmsMmsJsunit.test.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/SmsMmsJsunit.test.ets new file mode 100644 index 000000000..52217aac4 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/SmsMmsJsunit.test.ets @@ -0,0 +1,160 @@ +// @ts-nocheck +/** + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"; +import mms from '@ohos.telephony.sms'; +import utils from './Utils.ets' +export default function smsUiJsunit() { + describe('appInfoTest', function () { + + const SMS_SEND_DST_NUMBER = ''; + const TRUE_SLOT_ID = 0; + const FALSE_SLOT_ID = 9; + const OTHER_SLOT_ID = 1; + const SECOND_SLOT_ID = 2; + const IDENTIFIER_MIN = 0; + const IDENTIFIER_MAX = 0xFFFF; + const RANTYPE_GSM = 1; + const RANTYPE_CDMA = 2; + const RANTYPE_ERROR = 3; + var rawArray = [ + 0x08, 0x91, 0x68, 0x31, 0x08, 0x20, 0x00, 0x75, 0xF4, 0x24, 0x0D, 0x91, + 0x68, 0x81, 0x29, 0x56, 0x29, 0x83, 0xF6, 0x00, 0x00, 0x12, 0x40, 0x80, + 0x01, 0x02, 0x14, 0x23, 0x02, 0xC1, 0x30 + ] + + + + /* + * @tc.number Telephony_SmsMms_createMessage_Async_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_Async_0100', 0, async function (done) { + if (true) { + expect(true).assertTrue(); + done(); + return; + } + sms.createMessage(rawArray, '3gpp', (err, shortMessage) => { + if (err) { + expect().assertFail(); + console.log('Telephony_SmsMms_createMessage_Async_0100 fail'); + done(); + return; + } + 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_Async_0100 finish'); + done(); + }); + }); + + + + + /* + * @tc.number Telephony_SmsMms_getSmsEncodingScheme_Async_0100 + * @tc.name + * @tc.desc Function test + */ + it('Telephony_SmsMms_getSmsEncodingScheme_Async_0100', 0, async function (done) { + if (true) { + expect(true).assertTrue(); + done(); + return; + } + expect(sms.SMS_ENCODING_UNKNOWN == 0).assertTrue(); + expect(sms.SMS_ENCODING_7BIT == 1).assertTrue(); + expect(sms.SMS_ENCODING_8BIT == 2).assertTrue(); + expect(sms.SMS_ENCODING_16BIT == 3).assertTrue(); + done(); + }); + + /* + * @tc.number Telephony_SmsMms_getSendSmsResult_Async_0100 + * @tc.name + * @tc.desc Function test + */ + it('Telephony_SmsMms_getSendSmsResult_Async_0100', 0, async function (done) { + if (true) { + expect(true).assertTrue(); + done(); + return; + } + expect(sms.SEND_SMS_FAILURE_RADIO_OFF == 0).assertTrue(); + expect(sms.SEND_SMS_FAILURE_SERVICE_UNAVAILABLE == 1).assertTrue(); + expect(sms.SIM_MESSAGE_STATUS_FREE == 0).assertTrue(); + expect(sms.INSTANT_MESSAGE == 1).assertTrue(); + expect(sms.OPTIONAL_MESSAGE == 2).assertTrue(); + done(); + }); + + /* + * @tc.number Telephony_SmsMms_ShortMessageClass_Async_0100 + * @tc.name + * @tc.desc Function test + */ + it('Telephony_SmsMms_ShortMessageClass_Async_0100', 0, async function (done) { + if (true) { + expect(true).assertTrue(); + done(); + return; + } + expect(sms.SIM_MESSAGE_STATUS_FREE == 0).assertTrue(); + expect(sms.INSTANT_MESSAGE == 1).assertTrue(); + expect(sms.OPTIONAL_MESSAGE == 2).assertTrue(); + done(); + }); + /* + * @tc.number Telephony_SmsMms_getMmsCharSets_Async_0100 + * @tc.name + * @tc.desc Function test + */ + it('Telephony_SmsMms_getMmsCharSets_Async_0100', 0, async function (done) { + if (true) { + expect(true).assertTrue(); + done(); + return; + } + expect(sms.BIG5 == 0X07EA).assertTrue(); + expect(sms.ISO_10646_UCS_2 == 0X03E8).assertTrue(); + expect(sms.ISO_8859_1 == 0X04).assertTrue(); + expect(sms.ISO_8859_2 == 0X05).assertTrue(); + expect(sms.ISO_8859_3 == 0X06).assertTrue(); + expect(sms.ISO_8859_4 == 0X07).assertTrue(); + expect(sms.ISO_8859_5 == 0X08).assertTrue(); + expect(sms.ISO_8859_6 == 0X09).assertTrue(); + expect(sms.ISO_8859_7 == 0X10).assertTrue(); + expect(sms.ISO_8859_8 == 0X12).assertTrue(); + expect(sms.ISO_8859_9 == 0X13).assertTrue(); + expect(sms.SHIFT_JIS == 0X11).assertTrue(); + expect(sms.US_ASCII == 0X03).assertTrue(); + expect(sms.UTF_8 == 0X6A).assertTrue(); + done(); + }); + }) +} diff --git a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/StatisticsJsunit.test.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/StatisticsJsunit.test.ets similarity index 97% rename from telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/StatisticsJsunit.test.ets rename to telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/StatisticsJsunit.test.ets index 8535e83e6..66c5424ab 100644 --- a/telephony/telephonyjstest/new_add/entry/src/main/ets/MainAbility/test/StatisticsJsunit.test.ets +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/StatisticsJsunit.test.ets @@ -689,45 +689,7 @@ export default function statisticsUiJsunit() { }); }); - /** - * @tc.number Telephony_statistics_statistics_on_0100 - * @tc.name Test on() to check the callback result - * @tc.desc Function test - */ - it('Telephony_statistics_statistics_on_0100', 0, async function (done) { - if (utils.notCheck) { - expect(true).assertTrue(); - done(); - return; - } - let caseName = 'Telephony_statistics_statistics_on_0100'; - statistics.on('netStatsChange', (data) => { - console.log(`${caseName} on data: ${JSON.stringify(data)}`); - expect(data).assertUndefined(); - done(); - }); - done(); - }); - - /** - * @tc.number Telephony_statistics_statistics_off_0100 - * @tc.name Test off() to check the callback result - * @tc.desc Function test - */ - it('Telephony_statistics_statistics_off_0100', 0, async function (done) { - if (utils.notCheck) { - expect(true).assertTrue(); - done(); - return; - } - let caseName = 'Telephony_statistics_statistics_off_0100'; - statistics.off('netStatsChange', (data) => { - console.log(`${caseName} off data: ${JSON.stringify(data)}`); - expect(data).assertUndefined(); - done(); - }); - done(); - }); + /** * @tc.number Telephony_statistics_getIfaceStatsDetail_Async_0100 * @tc.name Test getIfaceStatsDetail() to check the callback result when iface is test diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/Utils.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/Utils.ets new file mode 100644 index 000000000..65f70088d --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/Utils.ets @@ -0,0 +1,119 @@ +// @ts-nocheck +/** + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default class Utils { + static rect_left; + static rect_top; + static rect_right; + static rect_bottom; + static rect_value; + static notCheck = true; + + static sleep(time) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve() + }, time) + }).then(() => { + console.info(`sleep ${time} over...`) + }) + } + + static getComponentRect(key) { + let strJson = getInspectorByKey(key); + let obj = JSON.parse(strJson); + console.info("[getInspectorByKey] current component obj is: " + JSON.stringify(obj)); + let rectInfo = JSON.parse('[' + obj.$rect + ']') + console.info("[getInspectorByKey] rectInfo is: " + rectInfo); + this.rect_left = JSON.parse('[' + rectInfo[0] + ']')[0] + this.rect_top = JSON.parse('[' + rectInfo[0] + ']')[1] + this.rect_right = JSON.parse('[' + rectInfo[1] + ']')[0] + this.rect_bottom = JSON.parse('[' + rectInfo[1] + ']')[1] + return this.rect_value = { + "left": this.rect_left, "top": this.rect_top, "right": this.rect_right, "bottom": this.rect_bottom + } + } + + static async swipe(downX, downY, upX, upY, steps) { + console.info('start to swipe') + this.drags(downX, downY, upX, upY, steps, false) + } + + static async drag(downX, downY, upX, upY, steps) { + console.info('start to drag') + this.drags(downX, downY, upX, upY, steps, true) + } + + static async drags(downX, downY, upX, upY, steps, drag) { + var xStep; + var yStep; + var swipeSteps; + var ret; + xStep = 0; + yStep = 0; + ret = false; + swipeSteps = steps; + if (swipeSteps == 0) { + swipeSteps = 1; + } + xStep = (upX - downX) / swipeSteps; + yStep = (upY - downY) / swipeSteps; + console.info('move step is: ' + 'xStep: ' + xStep + ' yStep: ' + yStep) + var downPonit: TouchObject = { + id: 1, + x: downX, + y: downY, + type: TouchType.Down, + } + console.info('down touch started: ' + JSON.stringify(downPonit)) + sendTouchEvent(downPonit); + console.info('start to move') + if (drag) { + await this.sleep(500) + } + for (var i = 1;i <= swipeSteps; i++) { + var movePoint: TouchObject = { + id: 1, + x: downX + (xStep * i), + y: downY + (yStep * i), + type: TouchType.Move + } + console.info('move touch started: ' + JSON.stringify(movePoint)) + ret = sendTouchEvent(movePoint) + if (ret == false) { + break; + } + await this.sleep(5) + } + console.info('start to up') + if (drag) { + await this.sleep(100) + } + var upPoint: TouchObject = { + id: 1, + x: upX, + y: upY, + type: TouchType.Up, + } + console.info('up touch started: ' + JSON.stringify(upPoint)) + sendTouchEvent(upPoint) + await this.sleep(500) + } +} + + + + diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/lib/Const.js b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/lib/Const.js new file mode 100644 index 000000000..f9263cd46 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/MainAbility/test/lib/Const.js @@ -0,0 +1,36 @@ +/** + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// sim slot id +export const DEFAULT_SLOTID = 0; +export const SLOTID3 = 3; +export const SLOTID2 = 2; +export const SLOTID_MINUS1 = -1; + +// sim correct password +export const CORRECT_PIN = '1234'; +export const CORRECT_PIN2 = '18099014'; + +// sim incorrect password +export const INCORRECT_PIN = '134679'; +export const INCORRECT_PIN_LEN3 = '123'; +export const INCORRECT_PUK = '134679'; +export const INCORRECT_PIN2 = '134679'; +export const INCORRECT_PIN2_LEN3 = '123'; +export const INCORRECT_PIN2_LEN9 = '123456789'; +export const INCORRECT_PUK2 = '134679'; + +// lock status response +export const LOCK_RESULT = { SUCCESS: 0, FAILURE: -1, EXCEPTION: -2 }; \ No newline at end of file diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/resources/base/element/string.json b/telephony/telephonyjstest/radiostatistic/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..03b8532c5 --- /dev/null +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "entry_MainAbility" + }, + { + "name": "description_mainability", + "value": "ETS_Empty Ability" + } + ] +} \ No newline at end of file diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/resources/base/media/icon.png b/telephony/telephonyjstest/radiostatistic/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000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YNra4-JTInqLeQyHYXFJ4J>>9j@YKk1Tf|XH;^mjR5kbVdn-kM z78{W6-o1M{H6x=;RA^oA1svSfJ`*C}*ckOy1R7CC517=vi+-cg1eu=Go6o z_&_#%*zhF=LZv-ha!!W|N6kfo^J%jxx_)gC!=^zc#n6`NCm;m8#-dXF(re5|$uHs- zGFW2C^T57uV+|g6De@Oj>sq;)Xqe6#C(V~k2psp(t_6w|VyyEOw%q+K2b>crWP{3# z@KYon>&0%7|9nN$iZyejsx!hxN&Q>w|JBU1pprWT2bSoe)m#EAx}GUb=`rKo(+KTz zD{g5JK{2-CS>ADY=pE03`^cp%edHgr@z>~3_4XC>T8Fm)?oT1A@qcyCu{3>+XbWI$ zG&nk0VWBy~00_=%?$LwTm;Ld;~g zgBUUcL1NbwI<93~JLelR!T{8ny!2;GlTZ0>^ml(^+R|_~_~ni`Q?nE>&S;CQV>t6lK;O%Wu7Z9iVioo2e;2N-6Q>12y&KznfGiYm5kKXj%s&4C#DoOaz{#a9g>V#}`+uu3TK`_GLGEAH6-}!7+gP8V$ z7a!V3qrpV33gMMuno|cXUM@6Qcx-aT?t@4ED0$2S@#?)rC7Fh3j(i;L&54!|0FMe3x*bXtFnlJzLL3aH zpi;lr6%&X;C%SVM=P%MJ6(}KH>m0w_WKuWy{X2p4!2Pqrwm;>=<2o}Dhu*bisL!?5 z)6?@AU&4YWUN)^*jr!Ozt&JdTDOw)?fw~F17S(d{|7GG(G(KeJZ0N2`FVv?5 NG*q?mAC)bG{|A+36q*14 literal 0 HcmV?d00001 diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/resources/rawfile/star-1-2.png b/telephony/telephonyjstest/radiostatistic/entry/src/main/resources/rawfile/star-1-2.png new file mode 100644 index 0000000000000000000000000000000000000000..450c3dd3ca68bf601bd08e5f41797d376e20d00d GIT binary patch literal 8295 zcma)iby!qi)GiDI3@ITfJq#cs(xo6VIK9g0Is58cut9YYAhAky89NJ&c$4N6Nm zw8Wj?_uaqmbN@K!?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Don}XtBlYX@N6O&mN9(L z$3WvjRw6q*BYjXd*Fq8jXbPB|7!qV;4<3SpL4U$-IR3dR7);6%Ng*HwQb@`@>Ox+;D8{>7P%3W3Q%Usi-A~_qV+>e)rntOWl*O-6dZMKE8F5;?K0akaPU^t@xU> z%=cfHofS|kPL6wHyBU;&9FES!DZ+6ebIF)LFY6Fz{&D!$xgA|o7k1uCUbIc31tSxH zQ9Ry%g+c*8bqSc5h(`)Dg=0P>uD!i0X1s82?ZKCCB;WhGR>U(8-7|qN3Ap)CQv0fX zX>mu>K3(2u5yPDS2i~g-k`cK-?+g}k~KDu+;-P*Btr{$~&b>;qGA|AHs7nh`J|G6Cj zFM?4Cp=2b4lMDphW2lmNDT9=hRhqu_t?@tZNiwycZ^=K%z>ov)XaXk~tj_oQ`@1 zbTo;4XZBDgPjUAKnGqx}k`C5UB78cI_yh?}-u&gMP5ZOtdzXK(qxOqy@YH| zKVg=t_U%sjdhgBr><=%#F8a;Uk{yeK)y=0CKNmdE*mmS2GpIWB>H6u#<%c`=zqcWK z9HF5KQ#7Oa~pEP2)s#v~d&wROM>gVs@EXK<+yLWhcgU&n0TfndfCpllJ0~-G1 zq|eQ>U0Y7f|Lt@0PS { - if (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} fail, data = ${data}`); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_getSimGid1_Promise_0200 - * @tc.name Enter exception parameters to test whether the getSimGid1 interface function can execute normally. - * @tc.desc Function test - */ - it('Telephony_Sim_getSimGid1_Promise_0200', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getSimGid1_Promise_0200'; - try { - var data = await sim.getSimGid1(env.SLOTID2); - } catch (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} fail, data = ${data}`); - done(); - }); - - /** - * @tc.number Telephony_Sim_getSimAccountInfo_Async_0200 - * @tc.name Test getSimAccountInfo async callback interface slotid exception, - * enter parameter 2, and check the callback value - * @tc.desc Function test - */ - it('Telephony_Sim_getSimAccountInfo_Async_0200', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getSimAccountInfo_Async_0200'; - sim.getSimAccountInfo(env.SLOTID2, (err) => { - if (err) { - console.log(`${CASE_NAME} expect error: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} test fail.`); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_getSimAccountInfo_Promise_0200 - * @tc.name Test getSimAccountInfo promise interface slotid exception, - * enter parameter 2, and check the callback value - * @tc.desc Function test - */ - it('Telephony_Sim_getSimAccountInfo_Promise_0200', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getSimAccountInfo_Promise_0200'; - try { - await sim.getSimAccountInfo(env.SLOTID2); - expect().assertFail(); - console.log(`${CASE_NAME} fail`); - } catch (err) { - console.log(`${CASE_NAME} expect error: ${err.message}`); - console.log(`${CASE_NAME} finish`); - } - done(); - }); - - /** - * @tc.number Telephony_Sim_setDefaultVoiceSlotId_Async_0100 - * @tc.name Test the setDefaultVoiceLotid interface when the input SIM ID parameter is 2. - * @tc.desc Function test - */ - it('Telephony_Sim_setDefaultVoiceSlotId_Async_0100', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_setDefaultVoiceSlotId_Async_0100'; - sim.setDefaultVoiceSlotId(env.SLOTID2, (err) => { - if (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} fail`); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_setDefaultVoiceSlotId_Promise_0100 - * @tc.name Test the setDefaultVoiceLotid interface when the input SIM ID parameter is 2. - * @tc.desc Function test - */ - it('Telephony_Sim_setDefaultVoiceSlotId_Promise_0100', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_setDefaultVoiceSlotId_Promise_0100'; - try { - await sim.setDefaultVoiceSlotId(env.SLOTID2); - } catch (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} fail`); - done(); - }); - - /** - * @tc.number Telephony_Sim_getDefaultVoiceSlotId_Async_0200 - * @tc.name The test first sets the default card number and then calls - * the getDefaultVoiceLotid interface to get the SIM ID. - * @tc.desc Function test - */ - it('Telephony_Sim_getDefaultVoiceSlotId_Async_0200', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getDefaultVoiceSlotId_Async_0200'; - sim.getDefaultVoiceSlotId((err, data) => { - if (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_getDefaultVoiceSlotId_Promise_0200 - * @tc.name The test first sets the default card number and then calls - * the getDefaultVoiceLotid interface to get the default SIM ID. - * @tc.desc Function test - */ - it('Telephony_Sim_getDefaultVoiceSlotId_Promise_0200', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getDefaultVoiceSlotId_Promise_0200'; - try { - let data = await sim.getDefaultVoiceSlotId(); - console.log(`${CASE_NAME}, data = ${data}`); - expect().assertFail(); - } catch (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - } - done(); - }); - - /** - * @tc.number Telephony_Sim_unlockPin_Async_0400 - * @tc.name The status of the card is ready state, the unlockPin interface is tested, and slotId is abnormal. - * @tc.desc Function test - */ - it('Telephony_Sim_unlockPin_Async_0400', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_unlockPin_Async_0400'; - sim.unlockPin(env.SLOTID2, env.CORRECT_PIN, err => { - if (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} fail`); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_unlockPin_Promise_0400 - * @tc.name The status of the card is ready state, the unlockPin interface is tested, and slotId is abnormal. - * @tc.desc Function test - */ - it('Telephony_Sim_unlockPin_Promise_0400', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_unlockPin_Promise_0400'; - try { - await sim.unlockPin(env.SLOTID2, env.CORRECT_PIN); - } catch (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} fail`); - done(); - }); - - /** - * @tc.number Telephony_Sim_unlockPuk_Async_0400 - * @tc.name The card status is ready state, and the unlockPuk interface is tested. - * The slotId parameter is abnormal. - * @tc.desc Function test - */ - it('Telephony_Sim_unlockPuk_Async_0400', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_unlockPuk_Async_0400'; - sim.unlockPuk(env.SLOTID2, env.CORRECT_PIN, env.CORRECT_PUK, err => { - if (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} fail`); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_unlockPuk_Promise_0400 - * @tc.name The card status is ready state, and the unlockPuk interface is tested. - * The slotId parameter is abnormal. - * @tc.desc Function test - */ - it('Telephony_Sim_unlockPuk_Promise_0400', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_unlockPuk_Promise_0400'; - try { - await sim.unlockPuk(env.SLOTID2, env.CORRECT_PIN, env.CORRECT_PUK); - } catch (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - console.log(`${CASE_NAME} fail`); - done(); - }); - - /** - * @tc.number Telephony_Sim_alterPin_Async_0400 - * @tc.name The status of the card is ready state, and the alterPin interface. SlotId is abnormal. - * @tc.desc Function test - */ - it('Telephony_Sim_alterPin_Async_0400', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_alterPin_Async_0400'; - sim.alterPin(env.SLOTID2, env.CORRECT_PIN, env.ALTER_PIN, err => { - if (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} fail`); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_alterPin_Promise_0400 - * @tc.name The status of the card is ready state, and the alterPin interface is tested. SlotId is abnormal. - * @tc.desc Function test - */ - it('Telephony_Sim_alterPin_Promise_0400', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_alterPin_Promise_0400'; - try { - await sim.alterPin(env.SLOTID2, env.CORRECT_PIN, env.ALTER_PIN); - } catch (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} fail`); - done(); - }); - - /** - * @tc.number Telephony_Sim_SetLockState_Async_1000 - * @tc.name The card is in the ready state, test the SetLockState async callback interface - * slotId exception into the parameter 2, check the callback value - * @tc.desc Function test - */ - 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) => { - if (error) { - console.log(`${CASE_NAME} setLockState expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish`); - done(); - return; - } - console.log(`${CASE_NAME} test fail`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_SetLockState_Promise_1000 - * @tc.name The card is in the ready state, test the SetLockState promise interface - * slotId exception into the parameter 2, check the callback value - * @tc.desc Function test - */ - it('Telephony_Sim_SetLockState_Promise_1000', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_SetLockState_Promise_1000'; - const lockInfo = { lockType: sim.PIN_LOCK, state: sim.LOCK_OFF, password: env.CORRECT_PIN }; - try { - await sim.setLockState(env.SLOTID2, lockInfo); - console.log(`${CASE_NAME} test fail`); - expect().assertFail(); - } catch (error) { - console.log(`${CASE_NAME} setLockState expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish`); - } - done(); - }); - - /** - * @tc.number Telephony_Sim_GetSimIccId_Async_0600 - * @tc.name CDMA file, getSimIccId async callback interface slotId - * exception enters parameter -1 test - * @tc.desc Function test - */ - it('Telephony_Sim_GetSimIccId_Async_0600', 0, function (done) { - const CASE_NAME = 'Telephony_Sim_GetSimIccId_Async_0600'; - sim.getSimIccId(env.SLOTID2, error => { - if (error) { - console.log(`${CASE_NAME} getSimIccId expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish.`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} test fail.`); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_GetSimIccId_Promise_0600 - * @tc.name CDMA file, getSimIccId promise interface slotId - * exception enters parameter -1 test - * @tc.desc Function test - */ - it('Telephony_Sim_GetSimIccId_Promise_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_GetSimIccId_Promise_0600'; - try { - await sim.getSimIccId(env.SLOTID2); - expect().assertFail(); - console.log(`${CASE_NAME} test fail.`); - } catch (error) { - console.log(`${CASE_NAME} getSimIccId expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish.`); - } - done(); - }); - - /** - * @tc.number Telephony_Sim_getIMSI_Async_0200 - * @tc.name To test the getIMSI interface, enter slotid as 4 and expect the result to enter err. - * @tc.desc Function test - */ - it('Telephony_Sim_getIMSI_Async_0200', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getIMSI_Async_0200'; - sim.getIMSI(env.SLOTID2, err => { - if (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} fail`); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_getIMSI_Promise_0200 - * @tc.name To test the getIMSI interface, enter slotid as 4 and expect the result to enter err. - * @tc.desc Function test - */ - it('Telephony_Sim_getIMSI_Promise_0200', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getIMSI_Async_0200'; - try { - await sim.getIMSI(env.SLOTID2); - } catch (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} fail`); - done(); - }); - - /** - * @tc.number Telephony_Sim_isSimActive_Async_0700 - * @tc.name Test the slotId exception input parameter 2 during isSimActive interface card activation, - * check the callback value, and expect the callback result flase - * @tc.desc Function test - */ - it('Telephony_Sim_isSimActive_Async_0700', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_isSimActive_Async_0700'; - sim.isSimActive(env.SLOTID2, (err, data) => { - if (err) { - console.log(`${CASE_NAME} fail, err: ${err.message}`); - expect().assertFail(); - done(); - return; - } - expect(data).assertFalse(); - console.log(`${CASE_NAME} finish`); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_isSimActive_Promise_0700 - * @tc.name Test the slotId exception input parameter 2 during isSimActive interface card activation, - * check the callback value, and expect the callback result flase - * @tc.desc Function test - */ - it('Telephony_Sim_isSimActive_Promise_0700', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_isSimActive_Promise_0700'; - try { - let data = await sim.isSimActive(env.SLOTID2); - expect(data).assertFalse(); - } catch (err) { - console.log(`${CASE_NAME} isSimActive fail, err: ${err.message}`); - expect().assertFail(); - done(); - return; - } - console.log(`${CASE_NAME} finish`); - done(); - }); - - /** - * @tc.number Telephony_Sim_activateSim_Async_0600 - * @tc.name Test the slotId exception input parameter 2 of activateSim interface, - * check the callback value, and expect to enter ERR - * @tc.desc Function test - */ - it('Telephony_Sim_activateSim_Async_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_activateSim_Async_0600'; - sim.activateSim(env.SLOTID2, (err) => { - if (err) { - console.log(`${CASE_NAME} finish, err: ${err.message}`); - done(); - return; - } - console.log(`${CASE_NAME} fail`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_activateSim_Promise_0600 - * @tc.name Test the slotId exception input parameter 2 of activateSim interface, - * check the callback value, and expect to enter ERR - * @tc.desc Function test - */ - it('Telephony_Sim_activateSim_Promise_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_activateSim_Promise_0600'; - try { - await sim.activateSim(env.SLOTID2); - } catch (err) { - console.log(`${CASE_NAME} finish, err: ${err.message}`); - done(); - return; - } - console.log(`${CASE_NAME} fail`); - expect().assertFail(); - done(); - }); - - /** - * @tc.number Telephony_Sim_deactivateSim_Async_0600 - * @tc.name Test the deactivateSim interface slotId exception input parameter 2 - * and check the callback value, expecting to enter ERR - * @tc.desc Function test - */ - it('Telephony_Sim_deactivateSim_Async_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_deactivateSim_Async_0600'; - sim.deactivateSim(env.SLOTID2, (err) => { - if (err) { - console.log(`${CASE_NAME} finish, err: ${err.message}`); - done(); - return; - } - console.log(`${CASE_NAME} fail`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_deactivateSim_Promise_0600 - * @tc.name Test the deactivateSim interface slotId exception input parameter - * 2 and check the callback value, expecting to enter ERR - * @tc.desc Function test - */ - it('Telephony_Sim_deactivateSim_Promise_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_deactivateSim_Promise_0600'; - try { - await sim.deactivateSim(env.SLOTID2); - } catch (err) { - console.log(`${CASE_NAME} finish, err: ${err.message}`); - done(); - return; - } - console.log(`${CASE_NAME} fail`); - expect().assertFail(); - done(); - }); - - /** - * @tc.number Telephony_Sim_hasSimCard_Async_0600 - * @tc.name Test the slotId exception input parameter 2 of the hasSimCard interface, - * check the callback value, and expect the callback result flase - * @tc.desc Function test - */ - it('Telephony_Sim_hasSimCard_Async_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_hasSimCard_Async_0600'; - sim.hasSimCard(env.SLOTID2, (err, data) => { - if (err) { - expect().assertFail(); - console.log(`${CASE_NAME} fail, err: ${err.message}`); - done(); - return; - } - expect(data).assertFalse(); - console.log(`${CASE_NAME} finish`); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_hasSimCard_Promise_0600 - * @tc.name Test the slotId exception input parameter 2 of the hasSimCard interface, - * check the callback value, and expect the callback result flase - * @tc.desc Function test - */ - it('Telephony_Sim_hasSimCard_Promise_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_hasSimCard_Promise_0600'; - try { - let data = await sim.hasSimCard(env.SLOTID2); - expect(data).assertFalse(); - } catch (err) { - expect().assertFail(); - console.log(`${CASE_NAME} fail, err: ${err.message}`); - done(); - return; - } - console.log(`${CASE_NAME} finish`); - done(); - }); - - /** - * @tc.number Telephony_Sim_setShowName_Async_0700 - * @tc.name Test setShowName slotId exception input parameter 2 to check the - * callback value, expecting to enter ERR - * @tc.desc Function test - */ - it('Telephony_Sim_setShowName_Async_0700', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_setShowName_Async_0700'; - sim.setShowName(env.SLOTID2, env.CARD_NAME, (err) => { - if (err) { - console.log(`${CASE_NAME} finish, err: ${err.message}`); - done(); - return; - } - console.log(`${CASE_NAME} fail`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_setShowName_Promise_0700 - * @tc.name Test setShowName promise interface slotId exception into parameter 2, check the return value - * @tc.desc Function test - */ - it('Telephony_Sim_setShowName_Promise_0700', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_setShowName_Promise_0700'; - try { - await sim.setShowName(env.SLOTID2, env.CARD_NAME); - } catch (err) { - console.log(`${CASE_NAME} finish, error : ${err.message}`); - done(); - return; - } - console.log(`${CASE_NAME} fail`); - expect().assertFail(); - done(); - }); - - /** - * @tc.number Telephony_Sim_getShowName_Async_0700 - * @tc.name Test the slotId exception input parameter 2 of getShowName and - * check the return value, expecting to enter ERR - * @tc.desc Function test - */ - it('Telephony_Sim_getShowName_Async_0700', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getShowName_Async_0700'; - sim.getShowName(env.SLOTID2, (err, data) => { - if (err) { - console.log(`${CASE_NAME} finish, err: ${err.message}`); - done(); - return; - } - console.log(`${CASE_NAME} , data : ${data}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_getShowName_Promise_0700 - * @tc.name Test the slotId exception input parameter 2 of getShowName and check the - * return value, expecting to enter ERR - * @tc.desc Function test - */ - - it('Telephony_Sim_getShowName_Promise_0700', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getShowName_Promise_0700'; - try { - let data = await sim.getShowName(env.SLOTID2); - console.log(`${CASE_NAME} fail, data : ${data}`); - expect().assertFail(); - done(); - } catch (err) { - console.log(`${CASE_NAME} finish, err: ${err.message}`); - done(); - } - }); - - /** - * @tc.number Telephony_Sim_setShowNumber_Async_0700 - * @tc.name Test setShowNumber slotId exception input parameter 2, check the callback value, - * and expect to enter err - * @tc.desc Function test - */ - it('Telephony_Sim_setShowNumber_Async_0700', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_setShowNumber_Async_0700'; - sim.setShowNumber(env.SLOTID2, env.CARD_NUMBER, (err) => { - if (err) { - console.log(`${CASE_NAME} finish, err: ${err.message}`); - done(); - return; - } - console.log(`${CASE_NAME} fail`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_setShowNumber_Promise_0700 - * @tc.name Test setShowNumber slotId exception input parameter 2 and check - * the return value, expecting to enter ERR - * @tc.desc Function test - */ - it('Telephony_Sim_setShowNumber_Promise_0700', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_setShowNumber_Promise_0700'; - try { - await sim.setShowNumber(env.SLOTID2, env.CARD_NUMBER); - console.log(`${CASE_NAME} fail`); - expect().assertFail(); - done(); - } catch (err) { - console.log(`${CASE_NAME} finish, err: ${err.message}`); - done(); - } - }); - - /** - * @tc.number Telephony_Sim_getShowNumber_Async_0600 - * @tc.name Test the slotId exception of the getShowNumber async callback interface into parameter 2, - * check the callback value - * @tc.desc Function test - */ - it('Telephony_Sim_getShowNumber_Async_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getShowNumber_Async_0600'; - sim.getShowNumber(env.SLOTID2, (err, data) => { - if (err) { - console.log(`${CASE_NAME} finish, err: ${err.message}`); - done(); - return; - } - console.log(`${CASE_NAME} fail, data : ${data}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_getShowNumber_Promise_0600 - * @tc.name Test the slotId exception of the getShowNumber interface into parameter 2, check the callback value - * @tc.desc Function test - */ - it('Telephony_Sim_getShowNumber_Promise_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getShowNumber_Promise_0600'; - try { - let data = await sim.getShowNumber(env.SLOTID2); - console.log(`${CASE_NAME} fail, data : ${data}`); - expect().assertFail(); - done(); - } catch (err) { - console.log(`${CASE_NAME} finish, err: ${err.message}`); - done(); - } - }); - - /** - * @tc.number Telephony_Sim_getOperatorConfigs_Async_0700 - * @tc.name Test the getOperatorConfigs slotId exception input parameter 2 and check the - * callback value, expecting to enter err - * @tc.desc Function test - */ - it('Telephony_Sim_getOperatorConfigs_Async_0700', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getOperatorConfigs_Async_0700'; - sim.getOperatorConfigs(env.SLOTID2, (err, data) => { - if (err) { - console.log(`${CASE_NAME} finish, err: ${err.message}`); - done(); - return; - } - console.log(`${CASE_NAME} , data : ${data}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_getOperatorConfigs_Promise_0700 - * @tc.name Test the getOperatorConfigs slotId exception input parameter 2 and check - * the callback value, expecting to enter err - * @tc.desc Function test - */ - it('Telephony_Sim_getOperatorConfigs_Promise_0700', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getOperatorConfigs_Promise_0700'; - try { - let data = await sim.getOperatorConfigs(env.SLOTID2); - console.log(`${CASE_NAME} fail, data : ${data}`); - expect().assertFail(); - done(); - } catch (err) { - console.log(`${CASE_NAME} finish, err: ${err.message}`); - done(); - } - }); - - /** - * @tc.number Telephony_Sim_getActiveSimAccountInfoList_Async_0500 - * @tc.name When there is no card, test the getActiveSimAccountInfoList interface and check the return value - * @tc.desc Function test - */ - it('Telephony_Sim_getActiveSimAccountInfoList_Async_0500', 0, function (done) { - const CASE_NAME = 'Telephony_Sim_getActiveSimAccountInfoList_Async_0500'; - sim.getActiveSimAccountInfoList(error => { - if (error) { - console.log(`${CASE_NAME} expect error: ${error.message}`); - } else { - console.log(`${CASE_NAME} test fail.`); - expect().assertFail(); - } - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_getActiveSimAccountInfoList_Promise_0500 - * @tc.name When there is no card, test the getActiveSimAccountInfoList interface and check the return value - * @tc.desc Function test - */ - it('Telephony_Sim_getActiveSimAccountInfoList_Promise_0500', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getActiveSimAccountInfoList_Async_0500'; - try { - await sim.getActiveSimAccountInfoList(); - expect().assertFail(); - console.log(`${CASE_NAME} test fail.`); - } catch (error) { - console.log(`${CASE_NAME} expect error: ${error.message}`); - } - done(); - }); - - /** - * @tc.number Telephony_Sim_unlockPin2_Async_1000 - * @tc.name Test slotid exception input parameter 2 of unlockPin2 and check the callback - * value, expecting to enter ERR - * @tc.desc Function test - */ - it('Telephony_Sim_unlockPin2_Async_1000', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_unlockPin2_Async_1000'; - sim.unlockPin2(env.SLOTID2, env.INCORRECT_PIN2, (err, data) => { - if (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - console.log(`${CASE_NAME} , data: ${JSON.stringify(data)}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_unlockPin2_Promise_1000 - * @tc.name Test slotid exception input parameter 2 of unlockPin2 and check the callback - * value, expecting to enter ERR - * @tc.desc Function test - */ - it('Telephony_Sim_unlockPin2_Promise_1000', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_unlockPin2_Promise_1000'; - try { - await sim.unlockPin2(env.SLOTID2, env.INCORRECT_PIN2); - expect().assertFail(); - } catch (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - } - done(); - }); - - /** - * @tc.number Telephony_Sim_unlockPuk2_Async_1100 - * @tc.name Test the slotId exception input parameter 2 of the unlockPuk2 - * interface and check the callback value, expecting to enter ERR - * @tc.desc Function test - */ - it('Telephony_Sim_unlockPuk2_Async_1100', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_unlockPuk2_Async_1100'; - sim.unlockPuk2(env.SLOTID2, env.INCORRECT_PIN2, env.INCORRECT_PUK2_LEN8, (err, data) => { - if (err) { - console.log(`${CASE_NAME} expect err: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - console.log(`${CASE_NAME}, data: ${JSON.stringify(data)}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_unlockPuk2_Promise_1100 - * @tc.name Test the slotId exception input parameter 2 of the unlockPuk2 interface - * and check the callback value, expecting to enter ERR - * @tc.desc Function test - */ - it('Telephony_Sim_unlockPuk2_Promise_1100', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_unlockPuk2_Async_1100'; - try { - const data = await sim.unlockPuk2(env.SLOTID2, env.INCORRECT_PIN2, env.INCORRECT_PUK2_LEN8); - console.log(`${CASE_NAME}, data: ${JSON.stringify(data)}`); - expect().assertFail(); - } catch (error) { - console.log(`${CASE_NAME} expect err: ${error.message}`); - console.log(`${CASE_NAME} finish`); - } - done(); - }); - - /** - * @tc.number Telephony_Sim_alterPin2_Async_1100 - * @tc.name Test alterPin2 interface exception slotId input parameter 2, check the callback - * value, expecting to enter err - * @tc.desc Function test - */ - it('Telephony_Sim_alterPin2_Async_1100', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_alterPin2_Async_1100'; - sim.alterPin2(env.SLOTID2, env.INCORRECT_PIN2, env.INCORRECT_PIN2, (err, data) => { - if (err) { - console.log(`${CASE_NAME} expect error: ${err.message}`); - console.log(`${CASE_NAME} finish`); - done(); - return; - } - console.log(`${CASE_NAME} data: ${JSON.stringify(data)}`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_alterPin2_Promise_1100 - * @tc.name Test alterPin2 interface exception slotId input parameter 2, check the callback - * value, expecting to enter err - * @tc.desc Function test - */ - it('Telephony_Sim_alterPin2_Promise_1100', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_alterPin2_Promise_1100'; - try { - const data = await sim.alterPin2(env.SLOTID2, env.INCORRECT_PIN2, env.INCORRECT_PIN2); - console.log(`${CASE_NAME} data: ${JSON.stringify(data)}`); - expect().assertFail(); - } catch (error) { - console.log(`${CASE_NAME} expect error: ${error.message}`); - console.log(`${CASE_NAME} finish`); - } - done(); - }); - - /** - * @tc.number Telephony_Sim_queryIccDiallingNumbers_Async_0800 - * @tc.name Test sim.queryIccDiallingNumbers(soltId: 2, type: 1, callback: - * AsyncCallback>), expect return an empty array. - * @tc.desc Function test - */ - it('Telephony_Sim_queryIccDiallingNumbers_Async_0800', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_queryIccDiallingNumbers_Async_0800'; - sim.queryIccDiallingNumbers(env.SLOTID2, sim.GENERAL_CONTACT, (error, data) => { - if (error) { - console.log(`${CASE_NAME} query error: ${error.message}`); - expect().assertFail(); - done(); - return; - } - expect(data.length === 0).assertTrue(); - console.log(`${CASE_NAME} finish`); - done(); - }); - }); - - /** - * @tc.number elephony_Sim_queryIccDiallingNumbers_Promise_0800 - * @tc.name Test sim.queryIccDiallingNumbers(soltId: 2, type: 1):Promise> - * promise interface, expect result is an empty array. - * @tc.desc Function test - */ - it('telephony_Sim_queryIccDiallingNumbers_Promise_0800', 0, async function (done) { - const CASE_NAME = 'telephony_Sim_queryIccDiallingNumbers_Promise_0800'; - try { - const contacts = await sim.queryIccDiallingNumbers(env.SLOTID2, sim.GENERAL_CONTACT); - expect(contacts.length === 0).assertTrue(); - console.log(`${CASE_NAME} test finish.`); - } catch (error) { - console.log(`${CASE_NAME} query error:${error.message}`); - expect().assertFail(); - } - done(); - }); - - /** - * @tc.number Telephony_Sim_addIccDiallingNumbers_Async_0900 - * @tc.name Test sim.addIccDiallingNumbers(soltId: 2, type: 1, diallingNumbers: - * {recordNumber: 1, alphaTag: 'test', number: '12345678', pin2: '123@#ABCD'}, - * callback: AsyncCallback) async callback interface, expect enter error. - * @tc.desc Function test - */ - it('Telephony_Sim_addIccDiallingNumbers_Async_0900', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_addIccDiallingNumbers_Async_0900'; - const CONTACT_INFO = { 'recordNumber': 1, 'alphaTag': 'test', 'number': '12345678' }; - const GENERAL_CONTACT_INFO = Object.assign({}, { 'pin2': env.INCORRECT_PIN2 }, CONTACT_INFO); - sim.addIccDiallingNumbers(env.SLOTID2, sim.GENERAL_CONTACT, GENERAL_CONTACT_INFO, error => { - if (error) { - console.log(`${CASE_NAME} expect error: ${error.message}`); - console.log(`${CASE_NAME} finish.`); - } else { - console.log(`${CASE_NAME} test fail.`); - expect().assertFail(); - } - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_addIccDiallingNumbers_Promise_0900 - * @tc.name Test sim.addIccDiallingNumbers(soltId: 2, type: 1, diallingNumbers: - * {recordNumber: 1, alphaTag: 'test', number: '12345678', pin2: '123@#ABCD'}): Promise - * promise interface, expect enter error. - * @tc.desc Function test - */ - it('Telephony_Sim_addIccDiallingNumbers_Promise_0900', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_addIccDiallingNumbers_Promise_0900'; - const CONTACT_INFO = { 'recordNumber': 1, 'alphaTag': 'test', 'number': '12345678' }; - const GENERAL_CONTACT_INFO = Object.assign({}, { 'pin2': env.INCORRECT_PIN2 }, CONTACT_INFO); - try { - await sim.addIccDiallingNumbers(env.SLOTID2, sim.GENERAL_CONTACT, GENERAL_CONTACT_INFO); - console.log(`${CASE_NAME} test fail.`); - expect().assertFail(); - } catch (error) { - console.log(`${CASE_NAME} expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish.`); - } - done(); - }); - - /** - * @tc.number Telephony_Sim_delIccDiallingNumbers_Async_0900 - * @tc.name Test sim.delIccDiallingNumbers(soltId: 2, type: 1, diallingNumbers: DiallingNumbersInfo, - * callback: AsyncCallback) async callback interface, expect enter error. - * @tc.desc Function test - */ - it('Telephony_Sim_delIccDiallingNumbers_Async_0900', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_delIccDiallingNumbers_Async_0900'; - const CONTACT_INFO = { 'recordNumber': 1, 'alphaTag': 'test', 'number': '12345678' }; - sim.delIccDiallingNumbers(env.SLOTID2, sim.GENERAL_CONTACT, CONTACT_INFO, error => { - if (error) { - console.log(`${CASE_NAME} expect error: ${error.message}`); - console.log(`${CASE_NAME} finish.`); - } else { - console.log(`${CASE_NAME} test fail.`); - expect().assertFail(); - } - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_delIccDiallingNumbers_Promise_0900 - * @tc.name Test sim.delIccDiallingNumbers(soltId: 2, type: 1, diallingNumbers: DiallingNumbersInfo): - * Promise promise interface to delete record, expect enter error. - * @tc.desc Function test - */ - it('Telephony_Sim_delIccDiallingNumbers_Promise_0900', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_delIccDiallingNumbers_Promise_0900'; - const CONTACT_INFO = { 'recordNumber': 1, 'alphaTag': 'test', 'number': '12345678' }; - try { - await sim.delIccDiallingNumbers(env.SLOTID2, sim.GENERAL_CONTACT, CONTACT_INFO); - console.log(`${CASE_NAME} test fail.`); - expect().assertFail(); - } catch (error) { - console.log(`${CASE_NAME} expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish`); - } - done(); - }); - - /** - * @tc.number Telephony_Sim_updateIccDiallingNumbers_Async_1200 - * @tc.name Test sim.updateIccDiallingNumbers(soltId: 2, type: 1, diallingNumbers: - * {recordNumber: 1, alphaTag: 'test_Update', number: '87654321', pin2:'123@#ABCD'}, callback: - * AsyncCallback) async callback interface, expect enter error. - * @tc.desc Function test - */ - it('Telephony_Sim_updateIccDiallingNumbers_Async_1200', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_updateIccDiallingNumbers_Async_1200'; - let updateInfo = { recordNumber: 1, alphaTag: 'test_Update', number: '87654321', pin2: '123@#ABCD' }; - sim.updateIccDiallingNumbers(env.SLOTID2, sim.GENERAL_CONTACT, updateInfo, error => { - if (error) { - console.log(`${CASE_NAME} expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish.`); - done(); - return; - } - console.log(`${CASE_NAME} test fail.`); - expect().assertFail(); - done(); - }); - }); + + - /** - * @tc.number Telephony_Sim_updateIccDiallingNumbers_Promise_1200 - * @tc.name Test sim.updateIccDiallingNumbers(soltId: 2, type: 1, diallingNumbers: - * {recordNumber: 1, alphaTag: 'test_Update', number: '87654321', pin2:'123@#ABCD'}) - * promise interface, expect enter error. - * @tc.desc Function test - */ - it('Telephony_Sim_updateIccDiallingNumbers_Promise_1200', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_updateIccDiallingNumbers_Promise_1200'; - let updateInfo = { recordNumber: 1, alphaTag: 'test_Update', number: '87654321', pin2: '123@#ABCD' }; - try { - console.log(`${CASE_NAME} update`); - await sim.updateIccDiallingNumbers(env.SLOTID2, sim.GENERAL_CONTACT, updateInfo); - console.log(`${CASE_NAME} test fail.`); - expect().assertFail(); - } catch (error) { - console.log(`${CASE_NAME} expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish.`); - } - done(); - }); + /** - * @tc.number Telephony_Sim_getSimTelephoneNumber_Async_0600 - * @tc.name Test getSimTelephoneNumber slotId exception input parameter 2, - * check the callback value, and expect to enter err - * @tc.desc Function test - */ - it('Telephony_Sim_getSimTelephoneNumber_Async_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getSimTelephoneNumber_Async_0600'; - sim.getSimTelephoneNumber(env.SLOTID2, (err, data) => { + * @tc.number Telephony_Sim_getDefaultVoiceSlotId_Async_0200 + * @tc.name The test first sets the default card number and then calls + * the getDefaultVoiceLotid interface to get the SIM ID. + * @tc.desc Function test + */ + it('Telephony_Sim_getDefaultVoiceSlotId_Async_0200', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_getDefaultVoiceSlotId_Async_0200'; + sim.getDefaultVoiceSlotId((err, data) => { if (err) { + console.log(`${CASE_NAME} expect err: ${err.message}`); console.log(`${CASE_NAME} finish`); done(); return; } - console.log(`${CASE_NAME} , data : ${data}`); expect().assertFail(); done(); }); }); /** - * @tc.number Telephony_Sim_getSimTelephoneNumber_Promise_0600 - * @tc.name Test getSimTelephoneNumber slotId exception input parameter 2, check the callback - * value, and expect to enter err - * @tc.desc Function test - */ - it('Telephony_Sim_getSimTelephoneNumber_Promise_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getSimTelephoneNumber_Promise_0600'; - let data; + * @tc.number Telephony_Sim_getDefaultVoiceSlotId_Promise_0200 + * @tc.name The test first sets the default card number and then calls + * the getDefaultVoiceLotid interface to get the default SIM ID. + * @tc.desc Function test + */ + it('Telephony_Sim_getDefaultVoiceSlotId_Promise_0200', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_getDefaultVoiceSlotId_Promise_0200'; try { - data = await sim.getSimTelephoneNumber(env.SLOTID2); + let data = await sim.getDefaultVoiceSlotId(); + console.log(`${CASE_NAME}, data = ${data}`); + expect().assertFail(); } catch (err) { + console.log(`${CASE_NAME} expect err: ${err.message}`); console.log(`${CASE_NAME} finish`); - done(); - return; } - console.log(`${CASE_NAME}, data : ${data}`); - expect().assertFail(); done(); }); + + + + + + + + + + + /** - * @tc.number Telephony_Sim_getVoiceMailIdentifier_Async_0600 - * @tc.name Test getVoiceMailIdentifier slotId exception input parameter 2, check the - * callback value, and expect to enter err + * @tc.number Telephony_Sim_isSimActive_Async_0700 + * @tc.name Test the slotId exception input parameter 2 during isSimActive interface card activation, + * check the callback value, and expect the callback result flase * @tc.desc Function test */ - it('Telephony_Sim_getVoiceMailIdentifier_Async_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getVoiceMailIdentifier_Async_0600'; - sim.getVoiceMailIdentifier(env.SLOTID2, (err, data) => { + it('Telephony_Sim_isSimActive_Async_0700', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_isSimActive_Async_0700'; + sim.isSimActive(env.SLOTID2, (err, data) => { if (err) { - console.log(`${CASE_NAME} finish`); + console.log(`${CASE_NAME} fail, err: ${err.message}`); + expect().assertFail(); done(); return; } - console.log(`${CASE_NAME} , data : ${data}`); - expect().assertFail(); + expect(data).assertFalse(); + console.log(`${CASE_NAME} finish`); done(); }); }); /** - * @tc.number Telephony_Sim_getVoiceMailIdentifier_Promise_0600 - * @tc.name Test getVoiceMailIdentifier slotId exception input parameter 2, check the callback - * value, and expect to enter err + * @tc.number Telephony_Sim_isSimActive_Promise_0700 + * @tc.name Test the slotId exception input parameter 2 during isSimActive interface card activation, + * check the callback value, and expect the callback result flase * @tc.desc Function test */ - it('Telephony_Sim_getVoiceMailIdentifier_Promise_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getVoiceMailIdentifier_Promise_0600'; - let data; + it('Telephony_Sim_isSimActive_Promise_0700', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_isSimActive_Promise_0700'; try { - data = await sim.getVoiceMailIdentifier(env.SLOTID2); + let data = await sim.isSimActive(env.SLOTID2); + expect(data).assertFalse(); } catch (err) { - console.log(`${CASE_NAME} finish`); + console.log(`${CASE_NAME} isSimActive fail, err: ${err.message}`); + expect().assertFail(); done(); return; } - console.log(`${CASE_NAME}, data : ${data}`); - expect().assertFail(); + console.log(`${CASE_NAME} finish`); done(); }); + + + + /** - * @tc.number Telephony_Sim_getVoiceMailNumber_Async_0600 - * @tc.name Test getVoiceMailNumber slotId exception input parameter 2, check the callback - * value, and expect to enter ERR - * @tc.desc Function test - */ - it('Telephony_Sim_getVoiceMailNumber_Async_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getVoiceMailNumber_Async_0600'; - sim.getVoiceMailNumber(env.SLOTID2, (err, data) => { + * @tc.number Telephony_Sim_hasSimCard_Async_0600 + * @tc.name Test the slotId exception input parameter 2 of the hasSimCard interface, + * check the callback value, and expect the callback result flase + * @tc.desc Function test + */ + it('Telephony_Sim_hasSimCard_Async_0600', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_hasSimCard_Async_0600'; + sim.hasSimCard(env.SLOTID2, (err, data) => { if (err) { - console.log(`${CASE_NAME} finish`); + expect().assertFail(); + console.log(`${CASE_NAME} fail, err: ${err.message}`); done(); return; } - console.log(`${CASE_NAME} , data : ${data}`); - expect().assertFail(); + expect(data).assertFalse(); + console.log(`${CASE_NAME} finish`); done(); }); }); /** - * @tc.number Telephony_Sim_getVoiceMailNumber_Promise_0600 - * @tc.name Test getVoiceMailNumber slotId exception input parameter 2, check the callback - * value, and expect to enter ERR - * @tc.desc Function test - */ - it('Telephony_Sim_getVoiceMailNumber_Promise_0600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_getVoiceMailNumber_Promise_0600'; - let data; + * @tc.number Telephony_Sim_hasSimCard_Promise_0600 + * @tc.name Test the slotId exception input parameter 2 of the hasSimCard interface, + * check the callback value, and expect the callback result flase + * @tc.desc Function test + */ + it('Telephony_Sim_hasSimCard_Promise_0600', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_hasSimCard_Promise_0600'; try { - data = await sim.getVoiceMailNumber(env.SLOTID2); + let data = await sim.hasSimCard(env.SLOTID2); + expect(data).assertFalse(); } catch (err) { - console.log(`${CASE_NAME} finish`); + expect().assertFail(); + console.log(`${CASE_NAME} fail, err: ${err.message}`); done(); return; } - console.log(`${CASE_NAME}, data : ${data}`); - expect().assertFail(); + console.log(`${CASE_NAME} finish`); done(); }); - /** - * @tc.number Telephony_Sim_setVoiceMailInfo_Async_0400 - * @tc.name Test the setVoiceMailInfo async callback interface, slotId is 2, expect enter error. - * @tc.desc Function test - */ - it('Telephony_Sim_setVoiceMailInfo_Async_0400', 0, function (done) { - const CASE_NAME = 'Telephony_Sim_setVoiceMailInfo_Async_0400'; - sim.setVoiceMailInfo(env.SLOTID2, env.MAIL_NAME_LEN12, env.MAIL_NUMBER_LEN20, error => { - if (error) { - console.log(`${CASE_NAME} setVoiceMailInfo expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish`); - } else { - console.log(`${CASE_NAME} test fail.`); - expect().assertFail(); - } - done(); - }); - }); + + + + + + + + + + + - /** - * @tc.number Telephony_Sim_setVoiceMailInfo_Promise_0400 - * @tc.name Test the setVoiceMailInfo promise interface, slotId is 2, expect enter error. - * @tc.desc Function test - */ - it('Telephony_Sim_setVoiceMailInfo_Promise_0400', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_setVoiceMailInfo_Promise_0400'; - try { - await sim.setVoiceMailInfo(env.SLOTID2, env.MAIL_NAME_LEN12, env.MAIL_NUMBER_LEN20); - console.log(`${CASE_NAME} test fail.`); - expect().assertFail(); - } catch (error) { - console.log(`${CASE_NAME} setVoiceMailInfo expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish`); - } - done(); - }); /** * @tc.number Telephony_Sim_getMaxSimCount_0100 @@ -1517,45 +427,6 @@ describe('SimManagerTest', function () { done(); }); - /** - * @tc.number Telephony_Sim_GetLockState_Async_0300 - * @tc.name Test the GetLockState async callback interface, enter parameter 2 - * for slotId exception, check the callback value - * @tc.desc Function test - */ - it('Telephony_Sim_GetLockState_Async_0300', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_GetLockState_Async_0300'; - sim.getLockState(env.SLOTID2, sim.PIN_LOCK, error => { - if (error) { - console.log(`${CASE_NAME} getLockState expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish`); - done(); - return; - } - console.log(`${CASE_NAME} test fail`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_GetLockState_Promise_0300 - * @tc.name Test the GetLockState promise interface, enter parameter 2 - * for slotId exception, check the callback value - * @tc.desc Function test - */ - it('Telephony_Sim_GetLockState_Promise_0300', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_GetLockState_Promise_0300'; - try { - await sim.getLockState(env.SLOTID2, sim.PIN_LOCK); - console.log(`${CASE_NAME} test fail`); - expect().assertFail(); - } catch (error) { - console.log(`${CASE_NAME} getLockState expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish`); - } - done(); - }); /** * @tc.number Telephony_Sim_GetCardType_Async_0400 @@ -1597,85 +468,9 @@ describe('SimManagerTest', function () { done(); }); - /** - * @tc.number Telephony_Sim_SendEnvelopeCmd_Async_0300 - * @tc.name Test SendEnvelopeCmd async callback interface, enter parameter 2 - * for slotId exception, check the callback value - * @tc.desc Function test - */ - it('Telephony_Sim_SendEnvelopeCmd_Async_0300', 0, function (done) { - const CASE_NAME = 'Telephony_Sim_SendEnvelopeCmd_Async_0300'; - sim.sendEnvelopeCmd(env.SLOTID2, env.STK_CMD, (error) => { - if (error) { - console.log(`${CASE_NAME} SendEnvelopeCmd expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish`); - done(); - return; - } - console.log(`${CASE_NAME} test fail`); - expect().assertFail(); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_SendEnvelopeCmd_Promise_0300 - * @tc.name Test SendEnvelopeCmd promise interface, enter parameter 2 - * for slotId exception, check the callback value - * @tc.desc Function test - */ - it('Telephony_Sim_SendEnvelopeCmd_Promise_0300', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_SendEnvelopeCmd_Promise_0300'; - try { - await sim.sendEnvelopeCmd(env.SLOTID2, env.STK_CMD); - console.log(`${CASE_NAME} test fail`); - expect().assertFail(); - } catch (error) { - console.log(`${CASE_NAME} SendEnvelopeCmd expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish`); - } - done(); - }); - /** - * @tc.number Telephony_Sim_SendTerminalResponseCmd_Async_0300 - * @tc.name Test SendTerminalResponseCmd async callback interface, enter parameter 2 - * for slotId exception, check the callback value - * @tc.desc Function test - */ - it('Telephony_Sim_SendTerminalResponseCmd_Async_0300', 0, function (done) { - const CASE_NAME = 'Telephony_Sim_SendTerminalResponseCmd_Async_0300'; - sim.sendTerminalResponseCmd(env.SLOTID2, env.STK_CMD, (error) => { - if (error) { - console.log(`${CASE_NAME} SendTerminalResponseCmd expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish`); - done(); - return; - } - console.log(`${CASE_NAME} test fail`); - expect().assertFail(); - done(); - }); - }); - /** - * @tc.number Telephony_Sim_SendTerminalResponseCmd_Promise_0300 - * @tc.name Test SendTerminalResponseCmd promise interface, enter parameter 2 - * for slotId exception, check the callback value - * @tc.desc Function test - */ - it('Telephony_Sim_SendTerminalResponseCmd_Promise_0300', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_SendTerminalResponseCmd_Promise_0300'; - try { - await sim.sendTerminalResponseCmd(env.SLOTID2, env.STK_CMD); - console.log(`${CASE_NAME} test fail`); - expect().assertFail(); - } catch (error) { - console.log(`${CASE_NAME} SendTerminalResponseCmd expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish`); - } - done(); - }); + /** * @tc.number Telephony_Sim_hasOperatorPrivileges_Async_0400 @@ -1716,44 +511,4 @@ describe('SimManagerTest', function () { } done(); }); - - /** - * @tc.number Telephony_Sim_unlockSimLock_Async_2600 - * @tc.name Test the unlocksimLock interface slotId exception into parameter 2, view the callback result - * @tc.desc Function test - */ - 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, (error) => { - if (error) { - console.log(`${CASE_NAME} expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish.`); - done(); - return; - } - expect().assertFail(); - console.log(`${CASE_NAME} test fail.`); - done(); - }); - }); - - /** - * @tc.number Telephony_Sim_unlockSimLock_Promise_2600 - * @tc.name Test the unlocksimLock interface slotId exception into parameter 2, view the return result - * @tc.desc Function test - */ - it('Telephony_Sim_unlockSimLock_Promise_2600', 0, async function (done) { - const CASE_NAME = 'Telephony_Sim_unlockSimLock_Promise_2600'; - const lockInfo = { lockType: sim.PN_PIN_LOCK, password: env.SIM_PN_PIN_PASSWORD }; - try { - await sim.unlockSimLock(env.SLOTID2, lockInfo); - expect().assertFail(); - console.log(`${CASE_NAME} test fail.`); - } catch (error) { - console.log(`${CASE_NAME} expect error: ${error.message}`); - console.log(`${CASE_NAME} test finish.`); - } - done(); - }); -}); \ No newline at end of file +}) diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/test/SmsMmsError.test.js b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/test/SmsMmsError.test.js index 0bc888c96..ea7bd68f2 100644 --- a/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/test/SmsMmsError.test.js +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/test/SmsMmsError.test.js @@ -38,337 +38,6 @@ describe('SmsMmsErrorTest', function () { const TRUE_SLOT_ID = 0; const RECEIVE_SMS_PDU = '240D91689141468496F600001270721142432302B319'; - /* - * @tc.number Telephony_SmsMms_addSimMessage_Async_0200 - * @tc.name When SLOTID is the wrong value,Failed to save SMS to SIM - * @tc.desc Function test - */ - it('Telephony_SmsMms_addSimMessage_Async_0200', 0, async function (done) { - let data = { - slotId: FALSE_SLOT_ID, - smsc: '', - pdu: CORRECT_SMS_PDU, - status: sms.SIM_MESSAGE_STATUS_SENT - }; - sms.addSimMessage(data, (err, result) => { - if (err) { - console.log('Telephony_SmsMms_addSimMessage_Async_0200 finish'); - done(); - return; - } - expect().assertFail(); - console.log('Telephony_SmsMms_addSimMessage_Async_0200 fail'); - done(); - }); - }); - - /* - * @tc.number Telephony_SmsMms_addSimMessage_Promise_0200 - * @tc.name When SLOTID is the wrong value,Failed to save SMS to SIM - * @tc.desc Function test - */ - it('Telephony_SmsMms_addSimMessage_Promise_0200', 0, async function (done) { - let data = { - slotId: FALSE_SLOT_ID, - smsc: '', - pdu: CORRECT_SMS_PDU, - status: sms.SIM_MESSAGE_STATUS_SENT - }; - try { - await sms.addSimMessage(data); - expect().assertFail(); - console.log('Telephony_SmsMms_addSimMessage_Promise_0200 fail'); - done(); - } catch (err) { - console.log('Telephony_SmsMms_addSimMessage_Promise_0200 finish'); - done(); - } - }); - - /* - * @tc.number Telephony_SmsMms_addSimMessage_Async_1400 - * @tc.name When status is equal to the correct value of SIM_MESSAGE_STATUS_READ, - * Save a text message to the SIM card - * @tc.desc Function test - */ - it('Telephony_SmsMms_addSimMessage_Async_1400', 0, async function (done) { - let data = { - slotId: TRUE_SLOT_ID, - smsc: '', - pdu: RECEIVE_SMS_PDU, - status: sms.SIM_MESSAGE_STATUS_READ - }; - sms.addSimMessage(data, (addErr) => { - if (addErr) { - console.log('Telephony_SmsMms_addSimMessage_Async_1400 finish'); - done(); - return; - } - console.log('Telephony_SmsMms_addSimMessage_Async_1400 add fail '); - }); - }); - - /* - * @tc.number Telephony_SmsMms_addSimMessage_Promise_1400 - * @tc.name When status is equal to the correct value of SIM_MESSAGE_STATUS_READ, - * Save a text message to the SIM card - * @tc.desc Function test - */ - it('Telephony_SmsMms_addSimMessage_Promise_1400', 0, async function (done) { - let data = { - slotId: TRUE_SLOT_ID, - smsc: '', - pdu: RECEIVE_SMS_PDU, - status: sms.SIM_MESSAGE_STATUS_READ - }; - try { - await sms.addSimMessage(data); - console.log('Telephony_SmsMms_addSimMessage_Promise_1400 fail '); - } catch (err) { - console.log('Telephony_SmsMms_addSimMessage_Promise_1400 addSimMessage finish'); - done(); - } - }); - - /* - * @tc.number Telephony_SmsMms_addSimMessage_Async_1700 - * @tc.name When status is equal to the correct value of SIM_MESSAGE_STATUS_UNSENT,Set the PDU read type - * Description Failed to add SMS messages to the SIM card - * @tc.desc Function test - */ - it('Telephony_SmsMms_addSimMessage_Async_1700', 0, async function (done) { - let data = { - slotId: TRUE_SLOT_ID, - smsc: '', - pdu: RECEIVE_SMS_PDU, - status: sms.SIM_MESSAGE_STATUS_UNSENT - }; - sms.addSimMessage(data, (addErr) => { - if (addErr) { - sms.getAllSimMessages(TRUE_SLOT_ID, (getErr, getResult) => { - if (getErr) { - console.log('Telephony_SmsMms_addSimMessage_Async_1700 getAllSimMessages fail'); - done(); - return; - } - expect(getResult.length == 0).assertTrue(); - console.log('Telephony_SmsMms_addSimMessage_Async_1700 getAllSimMessages getResult.length = ' - + getResult.length); - console.log('Telephony_SmsMms_addSimMessage_Async_1700 getAllSimMessages finish'); - done(); - }); - } else { - console.log('Telephony_SmsMms_addSimMessage_Async_1700 addSimMessage fail'); - done(); - } - }); - }); - - /* - * @tc.number Telephony_SmsMms_addSimMessage_Promise_1700 - * @tc.name When status is equal to the correct value of SIM_MESSAGE_STATUS_UNSENT,Set the PDU read type - * Description Failed to add SMS messages to the SIM card - * @tc.desc Function test - */ - it('Telephony_SmsMms_addSimMessage_Promise_1700', 0, async function (done) { - let data = { - slotId: TRUE_SLOT_ID, - smsc: '', - pdu: RECEIVE_SMS_PDU, - status: sms.SIM_MESSAGE_STATUS_UNSENT - }; - try { - await sms.addSimMessage(data); - console.log('Telephony_SmsMms_addSimMessage_Promise_1700 add fail'); - done(); - return; - } catch (err) { - console.log('Telephony_SmsMms_addSimMessage_Promise_1700 finish '); - done(); - } - }); - - /* - * @tc.number Telephony_SmsMms_addSimMessage_Async_1800 - * @tc.name When status is equal to the correct value of SIM_MESSAGE_STATUS_UNREAD,Set the PDU sending type - * Description Failed to add SMS messages to the SIM card - * @tc.desc Function test - */ - it('Telephony_SmsMms_addSimMessage_Async_1800', 0, async function (done) { - let data = { - slotId: TRUE_SLOT_ID, - smsc: '', - pdu: CORRECT_SMS_PDU, - status: sms.SIM_MESSAGE_STATUS_UNREAD - }; - sms.addSimMessage(data, (addErr) => { - if (addErr) { - sms.getAllSimMessages(TRUE_SLOT_ID, (getErr, getResult) => { - if (getErr) { - console.log('Telephony_SmsMms_addSimMessage_Async_1800 getAllSimMessages fail'); - done(); - return; - } - expect(getResult.length == 0).assertTrue(); - console.log('Telephony_SmsMms_addSimMessage_Async_1800 getAllSimMessages getResult = ' + getResult.length); - console.log('Telephony_SmsMms_addSimMessage_Async_1800 getAllSimMessages finish'); - done(); - }); - } else { - console.log('Telephony_SmsMms_addSimMessage_Async_1800 addSimMessage fail'); - done(); - } - }); - }); - - /* - * @tc.number Telephony_SmsMms_addSimMessage_Promise_1800 - * @tc.name When status is equal to the correct value of SIM_MESSAGE_STATUS_UNREAD,Set the PDU sending type - * Description Failed to add SMS messages to the SIM card - * @tc.desc Function test - */ - it('Telephony_SmsMms_addSimMessage_Promise_1800', 0, async function (done) { - let data = { - slotId: TRUE_SLOT_ID, - smsc: '', - pdu: CORRECT_SMS_PDU, - status: sms.SIM_MESSAGE_STATUS_UNREAD - }; - try { - await sms.addSimMessage(data); - console.log('Telephony_SmsMms_addSimMessage_Promise_1800 add fail'); - done(); - } catch (err) { - console.log('Telephony_SmsMms_addSimMessage_Promise_1800 finish '); - done(); - } - }); - - /** - * @tc.number Telephony_SmsMms_delSimMessage_Async_0200 - * @tc.name When SLOTID is the wrong value,Deletes a text message from the SIM card fail - * @tc.desc Function test - */ - it('Telephony_SmsMms_delSimMessage_Async_0200', 0, async function (done) { - sms.delSimMessage(FALSE_SLOT_ID, 0, (err) => { - if (err) { - console.log('Telephony_SmsMms_delSimMessage_Async_0200 delSimMessage finish'); - done(); - return; - } - expect().assertFail(); - console.log('Telephony_SmsMms_delSimMessage_Async_0200 fail'); - done(); - }); - }); - - /** - * @tc.number Telephony_SmsMms_delSimMessage_Promise_0200 - * @tc.name When SLOTID is the wrong value,Deletes a text message from the SIM card fail - * @tc.desc Function test - */ - it('Telephony_SmsMms_delSimMessage_Promise_0200', 0, async function (done) { - try { - await sms.delSimMessage(FALSE_SLOT_ID, 0); - expect().assertFail(); - console.log('Telephony_SmsMms_delSimMessage_Promise_0200 fail'); - done(); - } catch (err) { - console.log('Telephony_SmsMms_delSimMessage_Promise_0200 finish'); - done(); - } - }); - - /** - * @tc.number Telephony_SmsMms_updateSimMessage_Async_0100 - * @tc.name When SLOTID is the wrong value,Failed to update SIM card SMS record - * @tc.desc Function test - */ - it('Telephony_SmsMms_updateSimMessage_Async_0100', 0, async function (done) { - let upData = { - slotId: FALSE_SLOT_ID, - msgIndex: 0, - newStatus: sms.SIM_MESSAGE_STATUS_SENT, - pdu: CORRECT_SMS_PDU, - smsc: '' - }; - sms.updateSimMessage(upData, (err) => { - if (err) { - console.log('Telephony_SmsMms_updateSimMessage_Async_0100 update finish'); - done(); - return; - } - expect().assertFail(); - console.log('Telephony_SmsMms_updateSimMessage_Async_0100 update fail'); - done(); - }); - }); - - /** - * @tc.number Telephony_SmsMms_updateSimMessage_Promise_0100 - * @tc.name When SLOTID is the wrong value,Failed to update SIM card SMS record - * @tc.desc Function test - */ - it('Telephony_SmsMms_updateSimMessage_Promise_0100', 0, async function (done) { - let upData = { - slotId: FALSE_SLOT_ID, - msgIndex: 0, - newStatus: sms.SIM_MESSAGE_STATUS_SENT, - pdu: CORRECT_SMS_PDU, - smsc: '' - }; - try { - await sms.updateSimMessage(upData); - expect().assertFail(); - console.log('Telephony_SmsMms_updateSimMessage_Promise_0100 fail'); - done(); - return; - } catch (err) { - console.log('Telephony_SmsMms_updateSimMessage_Promise_0100 getAllSimMessages cur finish'); - done(); - } - }); - - /** - * @tc.number Telephony_SmsMms_getAllSIMMessages_Async_0200 - * @tc.name When "SLOTID" is an error value,Failed to query all SMS records for SIM card - * @tc.desc Function test - */ - it('Telephony_SmsMms_getAllSIMMessages_Async_0200', 0, async function (done) { - sms.getAllSimMessages(FALSE_SLOT_ID, (err, result) => { - if (err) { - expect().assertFail(); - console.log('Telephony_SmsMms_getAllSIMMessages_Async_0200 fail'); - done(); - return; - } - if (result.length > 0) { - except(result[0].shortMessage != null).assertTrue(); - except(result[0].indexOnSim != -1).assertTrue(); - } - expect(result === undefined || result.length === 0).assertTrue(); - console.log('Telephony_SmsMms_getAllSIMMessages_Async_0200 finish'); - done(); - }); - }); - - /** - * @tc.number Telephony_SmsMms_getAllSIMMessages_Promise_0200 - * @tc.name When "SLOTID" is an error value,Failed to query all SMS records for SIM card - * @tc.desc Function test - */ - it('Telephony_SmsMms_getAllSIMMessages_Promise_0200', 0, async function (done) { - try { - let promise = await sms.getAllSimMessages(FALSE_SLOT_ID); - expect(promise === null || promise === undefined || promise.length === 0).assertTrue(); - console.log('Telephony_SmsMms_getAllSIMMessages_Promise_0200 getAllSimMessages cur finish'); - done(); - } catch (err) { - expect().assertFail(); - console.log('Telephony_SmsMms_getAllSIMMessages_Promise_0200 fail'); - done(); - } - }); /* * @tc.number Telephony_SmsMms_createMessage_Async_0200 @@ -400,36 +69,7 @@ describe('SmsMmsErrorTest', function () { }); }); - /* - * @tc.number Telephony_SmsMms_sendMessage_0200 - * @tc.name Call the interface sendMessage, set the card slot parameter "slotId" to FALSE_SLOT_ID, - * SMS failed to send - * @tc.desc Function test - */ - it('Telephony_SmsMms_sendMessage_0200', 0, async function (done) { - sms.sendMessage({ - slotId: FALSE_SLOT_ID, - destinationHost: SMS_SEND_DST_NUMBER, - serviceCenter: '', - content: 'hello', - destinationPort: 0, - sendCallback: (err, value) => { - if (err) { - expect().assertFail(); - console.log('Telephony_SmsMms_sendMessage_0200 fail'); - done(); - return; - } - console.log(`sendCallback success sendResult = ${value.result}`); - expect(value.result === sms.SEND_SMS_FAILURE_UNKNOWN).assertTrue(); - expect(value.isLastPart != true).assertTrue(); - console.log('Telephony_SmsMms_sendMessage_0200 finish'); - done(); - }, - deliveryCallback: () => {} - }); - }); - + /* * @tc.number Telephony_SmsMms_createMessage_Promise_0200 * @tc.name Call interface CreateMessage, @@ -449,152 +89,7 @@ describe('SmsMmsErrorTest', function () { } }); - /** - * @tc.number Telephony_SmsMms_setSmscAddr_Async_0200 - * @tc.name When "SLOTID" is an error value,Failed to set short message service address - * @tc.desc Function test - */ - it('Telephony_SmsMms_setSmscAddr_Async_0200', 0, async function (done) { - sms.setSmscAddr(FALSE_SLOT_ID, '', (err) => { - if (err) { - console.log('Telephony_SmsMms_setSmscAddr_Async_0200 finish'); - done(); - return; - } - expect().assertFail(); - console.log('Telephony_SmsMms_setSmscAddr_Async_0200 fail'); - done(); - }); - }); - - /** - * @tc.number Telephony_SmsMms_setSmscAddr_Promise_0200 - * @tc.name When "SLOTID" is an error value,Failed to set short message service address - * @tc.desc Function test - */ - it('Telephony_SmsMms_setSmscAddr_Promise_0200', 0, async function (done) { - try { - await sms.setSmscAddr(FALSE_SLOT_ID, ''); - expect().assertFail(); - console.log('Telephony_SmsMms_createMessage_Promise_0200 fail'); - done(); - } catch (err) { - console.log('Telephony_SmsMms_createMessage_Promise_0200 finish '); - done(); - } - }); - - /** - * @tc.number Telephony_SmsMms_getSmscAddr_Async_0200 - * @tc.name When "SLOTID" is an error value,Failed to get SMS service address - * @tc.desc Function test - */ - it('Telephony_SmsMms_getSmscAddr_Async_0200', 0, async function (done) { - sms.getSmscAddr(FALSE_SLOT_ID, (err, getResult) => { - if (err) { - expect().assertFail(); - console.log('Telephony_SmsMms_getSmscAddr_Async_0200 fail'); - done(); - return; - } - expect(getResult === undefined || getResult === ''); - console.log('Telephony_SmsMms_getSmscAddr_Async_0200 finish'); - done(); - }); - }); - - /** - * @tc.number Telephony_SmsMms_getSmscAddr_Promise_0200 - * @tc.name When "SLOTID" is an error value,Failed to get SMS service address - * @tc.desc Function test - */ - it('Telephony_SmsMms_getSmscAddr_Promise_0200', 0, async function (done) { - try { - let promise = await sms.getSmscAddr(FALSE_SLOT_ID); - expect(promise === undefined || promise === ''); - console.log('Telephony_SmsMms_getSmscAddr_Promise_0200 finish'); - done(); - } catch (err) { - console.log('Telephony_SmsMms_getSmscAddr_Promise_0200 fail'); - expect().assertFail(); - done(); - } - }); - - /* - * @tc.number Telephony_SmsMms_getSmsSegmentsInfo_Async_2000 - * @tc.name The passed argument is an error slotId, view the results - * @tc.desc Function test - */ - it('Telephony_SmsMms_getSmsSegmentsInfo_Async_2000', 0, async function (done) { - let message = ''; - for (let index = 0;index < MAX_CHINESE_MESSAGE_LENTH + 1;index++) { - message += '中'; - } - sms.getSmsSegmentsInfo(FALSE_SLOT_ID, message, true, (error, result) => { - if (error) { - console.log("Telephony_SmsMms_getSmsSegmentsInfo_Async_2000 getSmsSegmentsInfo error " + error.message); - console.log('Telephony_SmsMms_getSmsSegmentsInfo_Async_2000 finish'); - } else { - expect().assertFail(); - console.log('Telephony_SmsMms_getSmsSegmentsInfo_Async_2000 fail'); - } - done(); - }); - }); - - /* - * @tc.number Telephony_SmsMms_getSmsSegmentsInfo_Promise_2000 - * @tc.name The passed argument is an error slotId, view the results - * @tc.desc Function test - */ - it('Telephony_SmsMms_getSmsSegmentsInfo_Promise_2000', 0, async function (done) { - let message = ''; - for (let index = 0;index < MAX_MESSAGE_LENTH;index++) { - message += 'a'; - } - try { - let result = await sms.getSmsSegmentsInfo(FALSE_SLOT_ID, message, true); - console.log('Telephony_SmsMms_getSmsSegmentsInfo_Promise_2000 fail'); - expect().assertFail(); - } catch (err) { - console.log('Telephony_SmsMms_getSmsSegmentsInfo_Promise_2000 finish'); - } - done(); - }); - - /* - * @tc.number Telephony_SmsMms_isImsSmsSupported_Async_0100 - * @tc.name Check whether the Ims SMS function is supported - * @tc.desc Function test - */ - it('Telephony_SmsMms_isImsSmsSupported_Async_0100', 0, async function (done) { - sms.isImsSmsSupported((error, result) => { - if (error) { - console.log('Telephony_SmsMms_isImsSmsSupported_Async_0100 fail'); - } else { - expect(result === false || result === true).assertTrue(); - console.log('Telephony_SmsMms_isImsSmsSupported_Async_0100 finish'); - } - done(); - }); - }); - /* - * @tc.number Telephony_SmsMms_isImsSmsSupported_Promise_0100 - * @tc.name Check whether the Ims SMS function is supported - * @tc.desc Function test - */ - it('Telephony_SmsMms_isImsSmsSupported_Promise_0100', 0, async function (done) { - try { - let result = await sms.isImsSmsSupported(); - expect(result === false || result === true).assertTrue(); - console.log('Telephony_SmsMms_isImsSmsSupported_Promise_0100 finish'); - } catch (err) { - console.log('Telephony_SmsMms_isImsSmsSupported_Promise_0100 fail'); - } - done(); - }); /* * @tc.number Telephony_SmsMms_hasSmsCapability_0100 @@ -608,279 +103,6 @@ describe('SmsMmsErrorTest', function () { done(); }); - /* - * @tc.number Telephony_SmsMms_getImsShortMessageFormat_Async_0100 - * @tc.name call the interface to obtain SMS system - * @tc.desc Function test - */ - it('Telephony_SmsMms_getImsShortMessageFormat_Async_0100', 0, async function (done) { - sms.getImsShortMessageFormat((error, result) => { - if (error) { - console.log('Telephony_SmsMms_getImsShortMessageFormat_Async_0100 fail'); - expect().assertFail(); - } else { - expect(result === undefined || result === '').assertTrue(); - console.log('Telephony_SmsMms_getImsShortMessageFormat_Async_0100 result = ' + result); - console.log('Telephony_SmsMms_getImsShortMessageFormat_Async_0100 finish'); - } - done(); - }); - }); - - /* - * @tc.number Telephony_SmsMms_getImsShortMessageFormat_Promise_0100 - * @tc.name call the interface to obtain SMS system - * @tc.desc Function test - */ - it('Telephony_SmsMms_getImsShortMessageFormat_Promise_0100', 0, async function (done) { - try { - let result = await sms.getImsShortMessageFormat(); - expect(result === undefined || result === '').assertTrue(); - console.log('Telephony_SmsMms_getImsShortMessageFormat_Async_0100 result = ' + result); - console.log('Telephony_SmsMms_getImsShortMessageFormat_Promise_0100 finish'); - } catch (err) { - expect().assertFail(); - console.log('Telephony_SmsMms_getImsShortMessageFormat_Promise_0100 fail'); - } - done(); - }); - - /* - * @tc.number Telephony_SmsMms_splitMessage_Async_1600 - * @tc.name Call the interface, set message to empty, and see the result - * @tc.desc Function test - */ - it('Telephony_SmsMms_splitMessage_Async_1600', 0, async function (done) { - let message = ''; - sms.splitMessage(message, (error, result) => { - if (error) { - console.log("Telephony_SmsMms_splitMessage_Async_1600 splitMessage on error because " + error.message); - console.log('Telephony_SmsMms_splitMessage_Async_1600 fail'); - } else { - console.log("Telephony_SmsMms_splitMessage_Async_1600 splitMessage on value = " + JSON.stringify(result)); - expect(result === undefined || result.length === 0).assertTrue(); - console.log('Telephony_SmsMms_splitMessage_Async_1600 finish'); - } - done(); - }); - }); - - /* - * @tc.number Telephony_SmsMms_splitMessage_Promise_1600 - * @tc.name Call the interface, set message to empty, and see the result - * @tc.desc Function test - */ - it('Telephony_SmsMms_splitMessage_Promise_1600', 0, async function (done) { - let message = ''; - try { - let result = await sms.splitMessage(message); - console.log('Telephony_SmsMms_splitMessage_Promise_1600 finish'); - expect(result === undefined || result.length === 0).assertTrue(); - } catch (err) { - console.log('Telephony_SmsMms_splitMessage_Promise_1600 fail'); - } - done(); - }); - - /** - * @tc.number Telephony_SmsMms_decodeMms_Async_1000 - * @tc.name Passing in the exception path, Parse failure - * @tc.desc Function test - */ - it('Telephony_SmsMms_decodeMms_Async_1000', 0, async function (done) { - sms.decodeMms(eorroMessagePath, (err, data) => { - if (err) { - console.log('Telephony_SmsMms_decodeMms_Async_1000 finish'); - done(); - return; - } - expect().assertFail(); - console.log('Telephony_SmsMms_decodeMms_Async_1000 fail'); - done(); - }); - }); - - /** - * @tc.number Telephony_SmsMms_decodeMms_Promise_1000 - * @tc.name Passing in the exception path, Parse failure - * @tc.desc Function test - */ - it('Telephony_SmsMms_decodeMms_Promise_1000', 0, async function (done) { - try { - await sms.decodeMms(eorroMessagePath); - console.log('Telephony_SmsMms_decodeMms_Promise_1000 fail'); - expect().assertFail(); - done(); - } catch (err) { - console.log('Telephony_SmsMms_decodeMms_Promise_1000 finish'); - done(); - } - }); - - /** - * @tc.number Telephony_SmsMms_encodeMms_Async_0900 - * @tc.name ReadOrigInd type MMS, encoding after decoding, the content after decoding and coding before the same - * @tc.desc Function test - */ - it('Telephony_SmsMms_encodeMms_Async_0900', 0, async function (done) { - let mmsType = { - version: sms.MMS_VERSION_1_1, - messageId: "0001", - to: [{address: "+861388888****/TYPE=PLMN", charset: sms.UTF_8}], - "from": {address: "+861381234****/TYPE=PLMN", charset: sms.UTF_8}, - readStatus: 129, - date: 1639378126, - }; - sms.encodeMms({messageType: sms.TYPE_MMS_READ_ORIG_IND, mmsType}, (err, encodeData) =>{ - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0900 encodeMms fail'); - done(); - return; - } - console.log('Telephony_SmsMms_encodeMms_Async_0900 encodeMms finish'); - sms.decodeMms(encodeData, (err, data) => { - if (err) { - console.log('Telephony_SmsMms_encodeMms_Async_0900 fail'); - done(); - return; - } - expect(data.messageType === sms.TYPE_MMS_READ_ORIG_IND).assertTrue(); - expect(data.mmsType.version === sms.MMS_VERSION_1_1).assertTrue(); - expect(data.mmsType.messageId === '0001').assertTrue(); - expect(data.mmsType.to.length > 0).assertTrue(); - expect(data.mmsType.to[0].address.length > 0).assertTrue(); - expect(data.mmsType.to[0].charset === sms.UTF_8).assertTrue(); - expect(data.mmsType.from.address.length > 0).assertTrue(); - expect(data.mmsType.from.charset === sms.UTF_8).assertTrue(); - expect(data.mmsType.date > 0).assertTrue(); - expect(data.mmsType.readStatus === 129).assertTrue(); - console.log('Telephony_SmsMms_encodeMms_Async_0900 finish'); - done(); - }); - }); - }); - - /** - * @tc.number Telephony_SmsMms_encodeMms_Promise_0900 - * @tc.name ReadOrigInd type MMS, encoding after decoding, the content after decoding and coding before the same - * @tc.desc Function test - */ - it('Telephony_SmsMms_encodeMms_Promise_0900', 0, async function (done) { - let mmsType = { - version: sms.MMS_VERSION_1_1, - messageId: "0001", - to: [{address: "+861388888****/TYPE=PLMN", charset: sms.UTF_8}], - "from": {address: "+861381234****/TYPE=PLMN", charset: sms.UTF_8}, - date: 1639378126, - readStatus: 129, - }; - try { - let encodePromise = await sms.encodeMms({messageType: sms.TYPE_MMS_READ_ORIG_IND, mmsType}); - expect(encodePromise.length > 0).assertTrue(); - console.log('Telephony_SmsMms_encodeMms_Promise_0900 encodeMms finish'); - let promise = await sms.decodeMms(encodePromise); - expect(promise.messageType === sms.TYPE_MMS_READ_ORIG_IND).assertTrue(); - expect(promise.mmsType.version === sms.MMS_VERSION_1_1).assertTrue(); - expect(promise.mmsType.messageId === '0001').assertTrue(); - expect(promise.mmsType.to.length > 0).assertTrue(); - expect(promise.mmsType.to[0].address.length > 0).assertTrue(); - expect(promise.mmsType.to[0].charset === sms.UTF_8).assertTrue(); - expect(promise.mmsType.from.address.length > 0).assertTrue(); - expect(promise.mmsType.from.charset === sms.UTF_8).assertTrue(); - expect(promise.mmsType.date > 0).assertTrue(); - expect(promise.mmsType.readStatus === 129).assertTrue(); - console.log('Telephony_SmsMms_decodeMms_Promise_0900 finish'); - done(); - } catch (err) { - console.log('Telephony_SmsMms_decodeMms_Promise_0900 fail'); - done(); - } - }); - - /** - * @tc.number Telephony_SmsMms_setCBConfig_Async_0600 - * @tc.name When "SLOTID" is an error value,Failed to set up cell broadcast - * @tc.desc Function test - */ - it('Telephony_SmsMms_setCBConfig_Async_0600', 0, async function (done) { - let data = { - slotId: FALSE_SLOT_ID, - enable: true, - startMessageId: IDENTIFIER_MIN, - endMessageId: IDENTIFIER_MAX, - ranType: RANTYPE_GSM - }; - sms.setCBConfig(data, (err) => { - if (err) { - console.log(`Telephony_SmsMms_setCBConfig_Async_0600 finish err : ${err.message}`); - done(); - return; - } - expect().assertFail(); - console.log('Telephony_SmsMms_setCBConfig_Async_0600 fail'); - done(); - }); - }); - - /** - * @tc.number Telephony_SmsMms_setCBConfig_Promise_0600 - * @tc.name When "SLOTID" is an error value,Failed to set up cell broadcast - * @tc.desc Function test - */ - it('Telephony_SmsMms_setCBConfig_Promise_0600', 0, async function (done) { - let data = { - slotId: FALSE_SLOT_ID, - enable: true, - startMessageId: IDENTIFIER_MIN, - endMessageId: IDENTIFIER_MAX, - ranType: RANTYPE_GSM - }; - try { - await sms.setCBConfig(data); - expect().assertFail(); - console.log('Telephony_SmsMms_setCBConfig_Promise_0600 fail'); - done(); - } catch (err) { - console.log('Telephony_SmsMms_setCBConfig_Promise_0600 finish'); - done(); - } - }); - - /** - * @tc.number Telephony_SmsMms_setDefaultSmsSlotId_Async_0200 - * @tc.name The default card slot ID is set to an error value,Failed to set send SMS card slot ID - * @tc.desc Function test - */ - it('Telephony_SmsMms_setDefaultSmsSlotId_Async_0200', 0, async function (done) { - sms.setDefaultSmsSlotId(FALSE_SLOT_ID, (err) => { - if (err) { - console.log('Telephony_SmsMms_setDefaultSmsSlotId_Async_0200 finish'); - done(); - return; - } - expect().assertFail(); - console.log('Telephony_SmsMms_setDefaultSmsSlotId_Async_0200 fail'); - done(); - }); - }); - - /** - * @tc.number Telephony_SmsMms_setDefaultSmsSlotId_Promise_0200 - * @tc.name The default card slot ID is set to an error value,Failed to set send SMS card slot ID - * @tc.desc Function test - */ - it('Telephony_SmsMms_setDefaultSmsSlotId_Promise_0200', 0, async function (done) { - try { - await sms.setDefaultSmsSlotId(FALSE_SLOT_ID); - expect().assertFail(); - console.log('Telephony_SmsMms_setDefaultSmsSlotId_Promise_0200 fail'); - done(); - return; - } catch (err) { - console.log('Telephony_SmsMms_setDefaultSmsSlotId_Promise_0200 finish'); - done(); - } - }); /** * @tc.number Telephony_SmsMms_getDefaultSmsSlotId_Async_0100 -- GitLab