From c9358505732c0c744603c96c6929ddd0257a9066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E6=9B=A6?= Date: Tue, 25 Jan 2022 09:57:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E8=AF=9D=E5=AD=90=E7=B3=BB=E7=BB=9Fjs?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E4=B8=8A=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 高曦 --- telephony/BUILD.gn | 17 + telephony/telephonyjstest/BUILD.gn | 23 + .../telephonyjstest/call_manager/BUILD.gn | 21 + .../call_manager_ims2_call/BUILD.gn | 31 + .../call_manager_ims2_call/Test.json | 19 + .../entry/src/main/config.json | 61 + .../entry/src/main/js/default/app.js | 23 + .../entry/src/main/js/default/i18n/en-US.json | 8 + .../entry/src/main/js/default/i18n/zh-CN.json | 8 + .../src/main/js/default/pages/index/index.css | 9 + .../src/main/js/default/pages/index/index.hml | 5 + .../src/main/js/default/pages/index/index.js | 48 + .../js/resources/base/element/string.json | 12 + .../src/main/js/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../src/main/js/test/CallManageAll.test.js | 2157 +++++++++++++++++ .../entry/src/main/js/test/List.test.js | 15 + .../src/main/js/test/lib/ApiToPromise.js | 40 + .../js/test/lib/ApiToPromisePerfomance.js | 139 ++ .../js/test/lib/ApiToPromiseReliability.js | 131 + .../entry/src/main/js/test/lib/Const.js | 229 ++ .../src/main/js/test/lib/ScenceInCalling.js | 684 ++++++ .../main/js/test/lib/ScenceLimitCalling.js | 57 + .../src/main/js/test/lib/ScenceTransfer.js | 48 + .../main/resources/base/element/string.json | 12 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../signature/openharmony_sx.p7b | Bin 0 -> 3409 bytes .../telephonyjstest/cellular_data/BUILD.gn | 20 + .../cellular_data_abnormal/BUILD.gn | 31 + .../cellular_data_abnormal/Test.json | 19 + .../entry/src/main/config.json | 61 + .../entry/src/main/js/default/app.js | 23 + .../entry/src/main/js/default/i18n/en-US.json | 8 + .../entry/src/main/js/default/i18n/zh-CN.json | 8 + .../src/main/js/default/pages/index/index.css | 9 + .../src/main/js/default/pages/index/index.hml | 5 + .../src/main/js/default/pages/index/index.js | 47 + .../js/resources/base/element/string.json | 12 + .../src/main/js/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../main/js/test/CellularDataAbnorma.test.js | 387 +++ .../entry/src/main/js/test/List.test.js | 16 + .../main/resources/base/element/string.json | 12 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../signature/openharmony_sx.p7b | Bin 0 -> 3379 bytes .../telephonyjstest/network_search/BUILD.gn | 20 + .../network_search_errors/BUILD.gn | 30 + .../network_search_errors/Test.json | 19 + .../entry/src/main/config.json | 61 + .../entry/src/main/js/default/app.js | 23 + .../entry/src/main/js/default/i18n/en-US.json | 6 + .../entry/src/main/js/default/i18n/zh-CN.json | 6 + .../src/main/js/default/pages/index/index.css | 9 + .../src/main/js/default/pages/index/index.hml | 5 + .../src/main/js/default/pages/index/index.js | 47 + .../js/resources/base/element/string.json | 12 + .../src/main/js/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../entry/src/main/js/test/List.test.js | 16 + .../main/js/test/NetworkSearchErrors.test.js | 799 ++++++ .../main/resources/base/element/string.json | 12 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes telephony/telephonyjstest/sim/BUILD.gn | 21 + .../sim/sim_manager_function_test/BUILD.gn | 31 + .../sim/sim_manager_function_test/Test.json | 19 + .../entry/src/main/config.json | 61 + .../entry/src/main/js/default/app.js | 23 + .../entry/src/main/js/default/i18n/en-US.json | 8 + .../entry/src/main/js/default/i18n/zh-CN.json | 8 + .../src/main/js/default/pages/index/index.css | 9 + .../src/main/js/default/pages/index/index.hml | 5 + .../src/main/js/default/pages/index/index.js | 50 + .../js/resources/base/element/string.json | 12 + .../src/main/js/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../entry/src/main/js/test/List.test.js | 16 + .../entry/src/main/js/test/SimManager.test.js | 1684 +++++++++++++ .../entry/src/main/js/test/lib/Const.js | 30 + .../main/resources/base/element/string.json | 12 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes telephony/telephonyjstest/sms_mms/BUILD.gn | 20 + .../sms_mms/sms_mms_error/BUILD.gn | 31 + .../sms_mms/sms_mms_error/Test.json | 19 + .../sms_mms_error/entry/src/main/config.json | 61 + .../entry/src/main/js/default/app.js | 23 + .../entry/src/main/js/default/i18n/en-US.json | 6 + .../entry/src/main/js/default/i18n/zh-CN.json | 6 + .../src/main/js/default/pages/index/index.css | 9 + .../src/main/js/default/pages/index/index.hml | 5 + .../src/main/js/default/pages/index/index.js | 52 + .../js/resources/base/element/string.json | 12 + .../src/main/js/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../entry/src/main/js/test/List.test.js | 19 + .../src/main/js/test/SmsMmsError.test.js | 739 ++++++ .../main/resources/base/element/string.json | 12 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes test_packages.gni | 1 + 96 files changed, 8524 insertions(+) create mode 100644 telephony/BUILD.gn create mode 100644 telephony/telephonyjstest/BUILD.gn create mode 100644 telephony/telephonyjstest/call_manager/BUILD.gn create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/BUILD.gn create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/Test.json create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/config.json create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/app.js create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/i18n/en-US.json create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/i18n/zh-CN.json create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/pages/index/index.css create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/pages/index/index.hml create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/pages/index/index.js create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/resources/base/element/string.json create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/resources/base/media/icon.png create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/CallManageAll.test.js create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/List.test.js create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ApiToPromise.js create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ApiToPromisePerfomance.js create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ApiToPromiseReliability.js create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/Const.js create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ScenceInCalling.js create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ScenceLimitCalling.js create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ScenceTransfer.js create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/resources/base/element/string.json create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/resources/base/media/icon.png create mode 100644 telephony/telephonyjstest/call_manager/call_manager_ims2_call/signature/openharmony_sx.p7b create mode 100644 telephony/telephonyjstest/cellular_data/BUILD.gn create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/BUILD.gn create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/Test.json create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/config.json create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/app.js create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/i18n/en-US.json create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/i18n/zh-CN.json create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/pages/index/index.css create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/pages/index/index.hml create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/pages/index/index.js create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/resources/base/element/string.json create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/resources/base/media/icon.png create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/test/CellularDataAbnorma.test.js create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/test/List.test.js create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/resources/base/element/string.json create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/resources/base/media/icon.png create mode 100644 telephony/telephonyjstest/cellular_data/cellular_data_abnormal/signature/openharmony_sx.p7b create mode 100644 telephony/telephonyjstest/network_search/BUILD.gn create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/BUILD.gn create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/Test.json create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/config.json create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/default/app.js create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/default/i18n/en-US.json create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/default/i18n/zh-CN.json create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/default/pages/index/index.css create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/default/pages/index/index.hml create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/default/pages/index/index.js create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/resources/base/element/string.json create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/resources/base/media/icon.png create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/List.test.js create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/test/NetworkSearchErrors.test.js create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/resources/base/element/string.json create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/resources/base/media/icon.png create mode 100644 telephony/telephonyjstest/network_search/network_search_errors/signature/openharmony_sx.p7b create mode 100644 telephony/telephonyjstest/sim/BUILD.gn create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/BUILD.gn create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/Test.json create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/config.json create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/app.js create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/i18n/en-US.json create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/i18n/zh-CN.json create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/pages/index/index.css create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/pages/index/index.hml create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/pages/index/index.js create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/resources/base/element/string.json create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/resources/base/media/icon.png create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/List.test.js create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/SimManager.test.js create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/lib/Const.js create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/resources/base/element/string.json create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/resources/base/media/icon.png create mode 100644 telephony/telephonyjstest/sim/sim_manager_function_test/signature/openharmony_sx.p7b create mode 100644 telephony/telephonyjstest/sms_mms/BUILD.gn create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/BUILD.gn create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/Test.json create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/config.json create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/app.js create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/i18n/en-US.json create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/i18n/zh-CN.json create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/pages/index/index.css create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/pages/index/index.hml create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/pages/index/index.js create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/resources/base/element/string.json create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/resources/base/media/icon.png create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/test/List.test.js create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/test/SmsMmsError.test.js create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/resources/base/element/string.json create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/resources/base/media/icon.png create mode 100644 telephony/telephonyjstest/sms_mms/sms_mms_error/signature/openharmony_sx.p7b diff --git a/telephony/BUILD.gn b/telephony/BUILD.gn new file mode 100644 index 000000000..5e26b4ee7 --- /dev/null +++ b/telephony/BUILD.gn @@ -0,0 +1,17 @@ +# 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. + +group("telephony") { + testonly = true + deps = [ "telephonyjstest:telephonyjstest" ] +} diff --git a/telephony/telephonyjstest/BUILD.gn b/telephony/telephonyjstest/BUILD.gn new file mode 100644 index 000000000..97520ef46 --- /dev/null +++ b/telephony/telephonyjstest/BUILD.gn @@ -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. + +group("telephonyjstest") { + testonly = true + deps = [ + "call_manager:call_manager", + "cellular_data:cellular_data", + "network_search:network_search", + "sim:sim", + "sms_mms:sms_mms", + ] +} diff --git a/telephony/telephonyjstest/call_manager/BUILD.gn b/telephony/telephonyjstest/call_manager/BUILD.gn new file mode 100644 index 000000000..afa53e6ce --- /dev/null +++ b/telephony/telephonyjstest/call_manager/BUILD.gn @@ -0,0 +1,21 @@ +# 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") + +group("call_manager") { + testonly = true + if (is_standard_system) { + deps = [ "call_manager_ims2_call:ActsCallManagerIms2CallTest" ] + } +} diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/BUILD.gn b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/BUILD.gn new file mode 100644 index 000000000..235315030 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/BUILD.gn @@ -0,0 +1,31 @@ +# 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("ActsCallManagerIms2CallTest") { + hap_profile = "./entry/src/main/config.json" + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "ActsCallManagerIms2CallTest" +} +ohos_js_assets("hjs_demo_js_assets") { + source_dir = "./entry/src/main/js/default" +} +ohos_resources("hjs_demo_resources") { + sources = [ "./entry/src/main/js/resources" ] + hap_profile = "./entry/src/main/config.json" +} diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/Test.json b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/Test.json new file mode 100644 index 000000000..d56e2bcbc --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/Test.json @@ -0,0 +1,19 @@ +{ + "description": "Configuration for ActsCallManagerIms2CallTest Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "1200000", + "package": "com.ohos.actscallmanagerims2calltest", + "shell-timeout": "1200000", + "native-test-timeout":"1200000" + }, + "kits": [ + { + "test-file-name": [ + "$module.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + } + ] +} diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/config.json b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/config.json new file mode 100644 index 000000000..7cb5a2b6f --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/config.json @@ -0,0 +1,61 @@ +{ + "app": { + "bundleName": "com.ohos.actscallmanagerims2calltest", + "vendor": "ohos", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 4, + "target": 5, + "releaseType": "Release" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.ohos.actscallmanagerims2calltest", + "name": ".MyApplication", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry" + }, + "abilities": [ + { + "visible": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "com.ohos.actscallmanagerims2calltest.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/app.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/app.js new file mode 100644 index 000000000..f6cc8926d --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/app.js @@ -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('TestApplication onCreate'); + }, + onDestroy() { + console.info('TestApplication onDestroy'); + } +}; diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/i18n/en-US.json b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/i18n/en-US.json new file mode 100644 index 000000000..55561b837 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/i18n/en-US.json @@ -0,0 +1,8 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + }, + "Files": { + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/i18n/zh-CN.json b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/i18n/zh-CN.json new file mode 100644 index 000000000..cce1af067 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,8 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + }, + "Files": { + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/pages/index/index.css b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/pages/index/index.css new file mode 100644 index 000000000..6fda79275 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/pages/index/index.css @@ -0,0 +1,9 @@ +.container { + flex-direction: column; + justify-content: center; + align-items: center; +} + +.title { + font-size: 100px; +} diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/pages/index/index.hml b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/pages/index/index.hml new file mode 100644 index 000000000..f64b040a5 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + {{ $t('strings.hello') }} {{ title }} + +
diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/pages/index/index.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/pages/index/index.js new file mode 100644 index 000000000..4b9bce0e7 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/default/pages/index/index.js @@ -0,0 +1,48 @@ +/* + * 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 app from '@system.app' +import device from '@system.device' +import router from '@system.router' +import {Core, ExpectExtend} from 'deccjsunit/index' + +const injectRef = Object.getPrototypeOf(global) || global +injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') + +export default { + data: { + title: "" + }, + onInit() { + this.title = this.$t('strings.world'); + }, + onShow() { + console.info('onShow finish') + const core = Core.getInstance() + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }) + core.addService('expect', expectExtend) + core.init() + const configService = core.getDefaultService('config') + configService.timeout = 8000; + configService.setConfig(this) + require('../../../test/List.test') + core.execute() + }, + onReady() { + }, +} diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/resources/base/element/string.json b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/resources/base/element/string.json new file mode 100644 index 000000000..2f9470d82 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "MyApplication" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/resources/base/media/icon.png b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsE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v0N_!);f&9g7o-k(lW5rWnDUR zQBFIRG+X=6NnsI@mxnwm;tf5;_Uxg?jZ8m-m0}&6+DA!qam(p$mN5R})yA_7m$q@| zFEd|dpS595rxQr-n#GjI5i-AhnUE>Cr;jpCqSrD~EwK_DqI^7%3#p5)%T_od!t3SOmH9MyXeeGO2(UQL;ax|x?Ncixmeo1=$ z{-);Au{*tfzOG?KQ~K|ak8-HQ?`Pekhe2WM(8s{xv-p>Zmu_6{G!-oE$7$mY`MOJorI=+mMx?H;`pr!;fVYz?5~yXBACruWB`Ph zZM}90_<^OBxIhyZ9BW$`>6JvO;%VFpqVr8|7t3~AmxYak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y { + 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, + * by callback,the function return error + * @tc.desc Function test + */ + it('Telephony_CallManager_IMS_enableLteEnhanceMode_Async_0400', 0, function (done) { + let caseName = 'Telephony_CallManager_IMS_enableLteEnhanceMode_Async_0400'; + call.enableLteEnhanceMode(SLOT_ID_INVALID, (error, data) => { + if (error) { + console.log(`${caseName} enableLteEnhanceMode error,case success,error:${toString(error)}`); + done(); + return; + } + expect().assertFail(); + console.log(`${caseName} enableLteEnhanceMode success,case failed,data:${toString(data)}`); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_IMS_enableLteEnhanceMode_Promise_0400 + * @tc.name Run the function enableLteEnhanceMode by args slotId SLOT_ID_INVALID by promise, + * the function return error + * @tc.desc Function test + */ + it('Telephony_CallManager_IMS_enableLteEnhanceMode_Promise_0400', 0, function (done) { + let caseName = 'Telephony_CallManager_IMS_enableLteEnhanceMode_Promise_0400'; + call.enableLteEnhanceMode(SLOT_ID_INVALID).then(data => { + expect().assertFail(); + console.log(`${caseName} enableLteEnhanceMode success,case failed,data:${toString(data)}`); + done(); + }).catch(error => { + console.log(`${caseName} enableLteEnhanceMode error,case success,error:${toString(error)}`); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_IMS_disableLteEnhanceMode_Async_0400 + * @tc.name Run the function disableLteEnhanceMode by args slotId SLOT_ID_INVALID, + * by callback,the function return error + * @tc.desc Function test + */ + it('Telephony_CallManager_IMS_disableLteEnhanceMode_Async_0400', 0, function (done) { + let caseName = 'Telephony_CallManager_IMS_disableLteEnhanceMode_Async_0400'; + call.disableLteEnhanceMode(SLOT_ID_INVALID, (error, data) => { + if (error) { + console.log(`${caseName} disableLteEnhanceMode error,case success,error:${toString(error)}`); + done(); + return; + } + expect().assertFail(); + console.log(`${caseName} disableLteEnhanceMode success,case failed,data:${toString(data)}`); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_IMS_disableLteEnhanceMode_Promise_0400 + * @tc.name Run the function disableLteEnhanceMode by args slotId SLOT_ID_INVALID by promise, + * the function return error + * @tc.desc Function test + */ + it('Telephony_CallManager_IMS_disableLteEnhanceMode_Promise_0400', 0, function (done) { + let caseName = 'Telephony_CallManager_IMS_disableLteEnhanceMode_Promise_0400'; + call.disableLteEnhanceMode(SLOT_ID_INVALID).then(data => { + expect().assertFail(); + console.log(`${caseName} disableLteEnhanceMode success,case failed,data:${toString(data)}`); + done(); + }).catch(error => { + console.log(`${caseName} disableLteEnhanceMode error,case success,error:${toString(error)}`); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_IMS_isLteEnhanceModeEnabled_Async_0400 + * @tc.name Run the function isLteEnhanceModeEnabled by args slotId SLOT_ID_INVALID by callback, + * the function return error + * @tc.desc Function test + */ + it('Telephony_CallManager_IMS_isLteEnhanceModeEnabled_Async_0400', 0, function (done) { + let caseName = 'Telephony_CallManager_IMS_isLteEnhanceModeEnabled_Async_0400'; + call.isLteEnhanceModeEnabled(SLOT_ID_INVALID, (error, data) => { + if (error) { + console.log(`${caseName} isLteEnhanceModeEnabled error,case success,error:${toString(error)}`); + done(); + return; + } + expect().assertFail(); + console.log(`${caseName} isLteEnhanceModeEnabled success,case failed,data:${toString(data)}`); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_IMS_isLteEnhanceModeEnabled_Promise_0400 + * @tc.name Run the function isLteEnhanceModeEnabled by args slotId SLOT_ID_INVALID by promise, + * the function return error + * @tc.desc Function test + */ + it('Telephony_CallManager_IMS_isLteEnhanceModeEnabled_Promise_0400', 0, function (done) { + let caseName = 'Telephony_CallManager_IMS_isLteEnhanceModeEnabled_Promise_0400'; + call.isLteEnhanceModeEnabled(SLOT_ID_INVALID).then(data => { + expect().assertFail(); + console.log(`${caseName} isLteEnhanceModeEnabled success,case failed,data:${toString(data)}`); + done(); + }).catch(error => { + console.log(`${caseName} isLteEnhanceModeEnabled error,case success,error:${toString(error)}`); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_IMS_startRTT_Async_0200 + * @tc.name Run function startRTT by args callId CALL_ID_NOT_EXIST,msg RTT_MSG by callback, + * the function return error + * @tc.desc Function test + */ + it('Telephony_CallManager_IMS_startRTT_Async_0200', 0, function (done) { + let caseName = 'Telephony_CallManager_IMS_startRTT_Async_0200'; + call.startRTT(CALL_ID_NOT_EXIST, RTT_MSG, (error, data) => { + if (error) { + console.log(`${caseName} startRTT ${callId} error,case success,error:${toString(error)}`); + done(); + return; + } + expect().assertFail(); + console.log(`${caseName} startRTT success,case failed,data:${toString(data)}`); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_IMS_startRTT_Promise_0200 + * @tc.name Run function startRTT by args callId CALL_ID_NOT_EXIST,msg RTT_MSG by callback, + * the function return error + * @tc.desc Function test + */ + it('Telephony_CallManager_IMS_startRTT_Promise_0200', 0, function (done) { + let caseName = 'Telephony_CallManager_IMS_startRTT_Promise_0200'; + call.startRTT(CALL_ID_NOT_EXIST, RTT_MSG).then(data => { + expect().assertFail(); + console.log(`${caseName} startRTT success,case failed,data:${toString(data)}`); + done(); + }).catch(error => { + console.log(`${caseName} startRTT ${callId} error,case success,error:${toString(error)}`); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_IMS_stopRTT_Async_0200 + * @tc.name Run function stopRTT by args callId CALL_ID_NOT_EXIST by callback,the function return error + * @tc.desc Function test + */ + it('Telephony_CallManager_IMS_stopRTT_Async_0200', 0, function (done) { + let caseName = 'Telephony_CallManager_IMS_stopRTT_Async_0200'; + call.stopRTT(CALL_ID_NOT_EXIST, (error, data) => { + if (error) { + console.log(`${caseName} stopRTT ${callId} error,case success,error:${toString(error)}`); + done(); + return; + } + expect().assertFail(); + console.log(`${caseName} stopRTT success,case failed,data:${toString(data)}`); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_IMS_stopRTT_Promise_0200 + * @tc.name Run function stopRTT by args callId CALL_ID_NOT_EXIST by callback,the function return error + * @tc.desc Function test + */ + it('Telephony_CallManager_IMS_stopRTT_Promise_0200', 0, function (done) { + let caseName = 'Telephony_CallManager_IMS_stopRTT_Promise_0200'; + call.stopRTT(CALL_ID_NOT_EXIST).then(data => { + expect().assertFail(); + console.log(`${caseName} stopRTT success,case failed,data:${toString(data)}`); + done(); + }).catch(error => { + console.log(`${caseName} stopRTT ${callId} error,case success,error:${toString(error)}`); + done(); + }); + }); + + /** + * @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.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(); + }).catch(error => { + console.log(`${caseName} updateImsCallMode error,case success,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.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)}`); + done(); + }); + }); + + /** + * @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.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(); + }).catch(error => { + console.log(`${caseName} holdCall ${CALL_ID_NOT_EXIST} error,case success,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.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)}`); + 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 => { + 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(); + }); + }); + + /** + * @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.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)}`); + 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 => { + 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(); + }); + }); + + /** + * @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.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_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(() => { + 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_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(); + }); + }); + + /** + * @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.desc Function test + */ + it('Telephony_CallManager_IMS_startDTMF_Promise_1300', 0, function (done) { + let caseName = 'Telephony_CallManager_IMS_startDTMF_Promise_1300'; + scenceInCalling({ + caseName:caseName, + phoneNumber:PHONE_NUMBER_LENGTH_11, + 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)}`); + 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)}`); + done(); + }); + }); + + /** + * @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.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(); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_cancelMuted_Promise_0300 + * @tc.name Unwanted state,run function cancelMuted by promise,the 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(); + }); + }); + + /** + * @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(); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_isNewCallAllowed_Promise_0200 + * @tc.name Unwanted state ,run the function isNewCallAllowed by promise ,the function return true + * @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(); + }); + }); + + /** + * @tc.number Telephony_CallManager_isRinging_Async_0100 + * @tc.name Unwanted state ,run the function isRinging by callback ,the function return false + * @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) { + 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(); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_isRinging_Promise_0100 + * @tc.name Unwanted state ,run the function isRinging by promise ,the function return false + * @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(); + }); + }); + + /** + * @tc.number Telephony_CallManager_getCallState_Async_0100 + * @tc.name To get the idle call status, call getCallState() to get the current call status. + * call.CALL_STATE_IDLE is returned + * @tc.desc Function test + */ + it('Telephony_CallManager_getCallState_Async_0100', 0, async function (done) { + call.getCallState((err, data) => { + if (err) { + console.log(`Telephony_CallManager_getCallState_Async_0100 : err = ${err.message}`); + expect().assertFail(); + done(); + return; + } + expect(data === call.CALL_STATE_IDLE).assertTrue(); + console.log(`Telephony_CallManager_getCallState_Async_0100 finish data = ${data}`); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_getCallState_Promise_0100 + * @tc.name To get the idle call status, call getCallState() to get the current call status. + * call.CALL_STATE_IDLE is returned + * @tc.desc Function test + */ + it('Telephony_CallManager_getCallState_Promise_0100', 0, async function (done) { + try { + var data = await call.getCallState(); + expect(data === call.CALL_STATE_IDLE).assertTrue(); + console.log(`Telephony_CallManager_getCallState_Promise_0100 finish data = ${data}`); + done(); + } catch (err) { + console.log(`Telephony_CallManager_getCallState_Promise_0100 : err = ${err.message}`); + expect().assertFail(); + done(); + + } + }); + + /** + * @tc.number Telephony_CallManager_hasCall_Async_0400 + * @tc.name When idle, hasCall() is called to confirm that there is no current call,returning false + * @tc.desc Function test + */ + it('Telephony_CallManager_hasCall_Async_0400', 0, async function (done) { + call.hasCall((err, data) => { + if (err) { + console.log('Telephony_CallManager_hasCall_Async_0400 fail'); + expect().assertFail(); + done(); + return; + } + expect(data === false).assertTrue(); + console.log(`Telephony_CallManager_hasCall_Async_0400 finish data = ${data}`); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_hasCall_Promise_0400 + * @tc.name When idle, hasCall() is called to confirm that there is no current call, returning false + * @tc.desc Function test + */ + it('Telephony_CallManager_hasCall_Promise_0400', 0, async function (done) { + try { + var data = await call.hasCall(); + expect(data === false).assertTrue(); + console.log(`Telephony_CallManager_hasCall_Promise_0400 finish data = ${data}`); + done(); + } catch (err) { + console.log('Telephony_CallManager_hasCall_Promise_0400 fail'); + expect().assertFail(); + done(); + + } + }); + + /** + * @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. + * The return value is 10 000 000 0000 + * @tc.desc Function test + */ + it('Telephony_CallManager_formatPhoneNumber_Async_0100', 0, async function (done) { + call.formatPhoneNumber('100000000000', (err, data) => { + if (err) { + console.log(`Telephony_CallManager_formatPhoneNumber_Async_0100 err = ${err.message}`); + console.log('Telephony_CallManager_formatPhoneNumber_Async_0100 fail'); + expect().assertFail(); + done(); + return; + } + expect(data === '10 000 000 0000').assertTrue(); + console.log(`Telephony_CallManager_formatPhoneNumber_Async_0100 finish data = ${data}`); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_formatPhoneNumber_Promise_0100 + * @tc.name PhoneNumber is 2000000. Call formatPhoneNumber() to format the number. + * The return value is 200 0000 + * @tc.desc Function test + */ + it('Telephony_CallManager_formatPhoneNumber_Promise_0100', 0, async function (done) { + try { + var data = await call.formatPhoneNumber('2000000'); + expect(data === '200 0000').assertTrue(); + console.log(`Telephony_CallManager_formatPhoneNumber_Promise_0100 finish data = ${data}`); + done(); + } catch (err) { + console.log('Telephony_CallManager_formatPhoneNumber_Promise_0100 fail'); + expect().assertFail(); + done(); + + } + }); + + /** + * @tc.number Telephony_CallManager_formatPhoneNumberToE164_Async_0100 + * @tc.name PhoneNumber is 010-0000-0000, options: CN, call formatPhoneNumberToE164() to format the number, + * and return +861000000000 + * @tc.desc Function test + */ + it('Telephony_CallManager_formatPhoneNumberToE164_Async_0100', 0, async function (done) { + call.formatPhoneNumberToE164('010-0000-0000', 'CN', (err, data) => { + if (err) { + console.log('Telephony_CallManager_formatPhoneNumberToE164_Async_0100 fail'); + expect().assertFail(); + done(); + return; + } + expect(data === '+861000000000').assertTrue(); + console.log(`Telephony_CallManager_formatPhoneNumberToE164_Async_0100 finish data = ${data}`); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_formatPhoneNumberToE164_Promise_0100 + * @tc.name PhoneNumber is 52300000000, options: CN, call formatPhoneNumberToE164() to format the number, + * return +8652300000000 + * @tc.desc Function test + */ + it('Telephony_CallManager_formatPhoneNumberToE164_Promise_0100', 0, async function (done) { + try { + var data = await call.formatPhoneNumberToE164('52300000000', 'CN'); + expect(data === '+8652300000000').assertTrue(); + console.log(`Telephony_CallManager_formatPhoneNumberToE164_Promise_0100 finish data = ${data}`); + done(); + } catch (err) { + console.log('Telephony_CallManager_formatPhoneNumberToE164_Promise_0100 fail'); + expect().assertFail(); + done(); + + } + }); + + /** + * @tc.number Telephony_CallManager_isEmergencyPhoneNumber_Async_1300 + * @tc.name PhoneNumber: 110, options -1. Call isEmergencyPhoneNumber() to check whether it is an emergency + * number. The return value is false + * @tc.desc Function test + */ + it('Telephony_CallManager_isEmergencyPhoneNumber_Async_1300', 0, async function (done) { + call.isEmergencyPhoneNumber('110', {slotId: SLOT_ID_INVALID}, (err) => { + if (err) { + console.log(`Telephony_CallManager_isEmergencyPhoneNumber_Async_1300 finish err = ${err}`); + done(); + return; + } + expect().assertFail(); + console.log('Telephony_CallManager_isEmergencyPhoneNumber_Async_1300 fail '); + done(); + }); + }); + + /** + * @tc.number Telephony_CallManager_isEmergencyPhoneNumber_Promise_1300 + * @tc.name PhoneNumber: 120, options -1. Call isEmergencyPhoneNumber() to check whether it is an emergency + * number. The return value is false + * @tc.desc Function test + */ + it('Telephony_CallManager_isEmergencyPhoneNumber_Promise_1300', 0, async function (done) { + try { + var data = await call.isEmergencyPhoneNumber('120', {slotId: SLOT_ID_INVALID}); + expect().assertFail(); + console.log('Telephony_CallManager_isEmergencyPhoneNumber_Promise_1300 fail '); + done(); + } catch (err) { + console.log(`Telephony_CallManager_isEmergencyPhoneNumber_Promise_1300 finish err = ${err}`); + done(); + } + }); + +}); \ No newline at end of file diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/List.test.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/List.test.js new file mode 100644 index 000000000..f4aa98ba2 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/List.test.js @@ -0,0 +1,15 @@ +/** + * 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. + */ + require('./CallManageAll.test.js'); diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ApiToPromise.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ApiToPromise.js new file mode 100644 index 000000000..6b600564f --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ApiToPromise.js @@ -0,0 +1,40 @@ +/** + * 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 function toString (data) { + if (typeof data === 'object') { + return JSON.stringify(data); + } else { + return data; + } +} + +export function promisify (fn) { + return function () { + let args = Array.prototype.slice.call(arguments); + return new Promise(function (resolve, reject) { + console.log(`Telephony_CallManager promisify args:${toString(arguments)},fn:${fn}`); + args.push(function (error, data) { + console.log(`Telephony_CallManager promisify error:${toString(error)},data:${toString(data)}`); + if (error) { + reject(error); + } else { + resolve(data); + } + }); + fn.apply(null, args); + }); + }; +} \ No newline at end of file diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ApiToPromisePerfomance.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ApiToPromisePerfomance.js new file mode 100644 index 000000000..5a56f7556 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ApiToPromisePerfomance.js @@ -0,0 +1,139 @@ + +/** + * 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_PERF_COUNT, PERF_GOAL_TIME} from './Const.js'; +import {toString} from './ApiToPromise.js'; +// packaging the function to the perfomace test function +export async function apiToPromisePerfomace (options, args) { + // recursion plan + let {func, caseName, target, perfTime, compareFunc} = options; + let flag = true; + let count = TEST_PERF_COUNT; + perfTime = perfTime ? perfTime : PERF_GOAL_TIME; + + console.log(`${caseName} apiToPromisePerfomace func ${func}, caseName ${caseName},args:${toString(args)}`); + function excuteCallbackPromise () { + return new Promise((resolve, reject) => { + function excuteCallback () { + target[func](...args); + } + args[args.length - 1] = function (error, data) { + if (count === 0) { + if (flag) { + resolve(flag); + } else { + reject(new Error(`flag:${flag}`)); + } + } else { + flag = flag && !!compareFunc(error, data); + count--; + excuteCallback(); + } + }; + excuteCallback(); + }); + } + + let startTime = new Date().getTime(); + if (typeof args[args.length - 1] === 'function') { + try { + flag = await excuteCallbackPromise(); + } catch (error) { + flag = false; + } + } else { + for (;count > 0;count--) { + let error = null; + let data = null; + try { + data = await target[func](...args); + flag = flag && !!compareFunc(error, data); + } catch (err) { + error = err; + flag = flag && !!compareFunc(error, data); + } + } + } + let endTime = new Date().getTime(); + const cost = endTime - startTime; + console.log(`${caseName} ${func} result flag:${toString(flag)} count:${TEST_PERF_COUNT}` + + ` cost:${cost}ms avarage:${parseInt(cost * 1000 / TEST_PERF_COUNT)}`); + if (flag && cost < perfTime) { + return flag; + } else { + throw new Error(`flag:${flag}`); + } +} + +export async function apiToPerfomace (options, args) { + // recursion plan + let {func, caseName, target, perfTime, compareFunc, runedFunc} = options; + let flag = true; + let count = TEST_PERF_COUNT; + perfTime = perfTime ? perfTime : PERF_GOAL_TIME; + + console.log(`${caseName} apiToPerfomace func ${func}, caseName ${caseName},args:${toString(args)}`); + function excuteCallbackPromise () { + return new Promise((resolve, reject) => { + function excuteCallback () { + target[func](...args); + } + args[args.length - 1] = function (error, data) { + if (count === 0) { + if (flag) { + resolve(flag); + } else { + reject(new Error(`flag:${flag}`)); + } + } else { + flag = flag && !!compareFunc(error, data); + count--; + excuteCallback(); + } + }; + excuteCallback(); + }); + } + + let startTime = new Date().getTime(); + if (typeof args[args.length - 1] === 'function') { + try { + flag = await excuteCallbackPromise(); + } catch (error) { + flag = false; + } + } else { + for (;count > 0;count--) { + let error = null; + let data = null; + try { + data = await target[func](...args); + flag = flag && !!compareFunc(error, data); + } catch (err) { + error = err; + flag = flag && !!compareFunc(error, data); + } + } + } + let endTime = new Date().getTime(); + const cost = endTime - startTime; + console.log(`${caseName} ${func} result flag:${toString(flag)} count:${TEST_PERF_COUNT}` + + ` cost:${cost}ms avarage:${parseInt(cost * 1000 / TEST_PERF_COUNT)}`); + runedFunc(flag && cost < perfTime); +} +export function validate (error, data, func) { + return func(error, data); +} \ No newline at end of file diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ApiToPromiseReliability.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ApiToPromiseReliability.js new file mode 100644 index 000000000..3285b2ba6 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ApiToPromiseReliability.js @@ -0,0 +1,131 @@ +/** + * 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 {toString} from './ApiToPromise.js'; +import {TEST_RELY_NUMBER} from './Const.js'; +// packaging the function to the reliability test function +export async function apiToPromiseReliability (options, args) { + // recursion plan + let {func, caseName, target, compareFunc} = options; + let flag = true; + let count = TEST_RELY_NUMBER; + + console.log(`${caseName} apiToPromiseReliability func ${func}, caseName ${caseName},args:${toString(args)}`); + function excuteCallbackPromise () { + return new Promise((resolve, reject) => { + function excuteCallback () { + target[func](...args); + } + args[args.length - 1] = function (error, data) { + if (count === 0) { + if (flag) { + resolve(flag); + } else { + reject(new Error(`flag:${flag}`)); + } + } else { + flag = flag && !!compareFunc(error, data); + count--; + excuteCallback(); + } + }; + excuteCallback(); + }); + } + + if (typeof args[args.length - 1] === 'function') { + try { + flag = await excuteCallbackPromise(); + } catch (error) { + flag = false; + } + } else { + for (;count > 0;count--) { + let error = null; + let data = null; + try { + data = await target[func](...args); + flag = flag && !!compareFunc(error, data); + } catch (err) { + error = err; + flag = flag && !!compareFunc(error, data); + } + } + } + console.log(`${caseName} result ${func} flag:${toString(flag)} count:${TEST_RELY_NUMBER}`); + if (flag) { + return flag; + } else { + throw new Error(`flag:${flag}`); + } +} + +export async function apiToReliability (options, args) { + // recursion plan + let {func, caseName, target, compareFunc, runedFunc} = options; + let flag = true; + let count = TEST_RELY_NUMBER; + + console.log(`${caseName} apiToPromiseReliability func ${func}, caseName ${caseName},args:${toString(args)}`); + function excuteCallbackPromise () { + return new Promise((resolve, reject) => { + function excuteCallback () { + target[func](...args); + } + args[args.length - 1] = function (error, data) { + console.log(`${caseName} error ${toString(error)} data ${toString(data)}`); + if (count === 0) { + if (flag) { + resolve(flag); + } else { + reject(new Error(`flag:${flag}`)); + } + } else { + flag = flag && !!compareFunc(error, data); + count--; + console.log(`${caseName} error:${toString(error)},data:${toString(data)},` + + `flag:${flag},count:${count}`); + excuteCallback(); + } + }; + excuteCallback(); + }); + } + + if (typeof args[args.length - 1] === 'function') { + try { + flag = await excuteCallbackPromise(); + } catch (error) { + flag = false; + } + } else { + for (;count > 0;count--) { + let error = null; + let data = null; + try { + data = await target[func](...args); + flag = flag && !!compareFunc(error, data); + } catch (err) { + error = err; + flag = flag && !!compareFunc(error, data); + } + console.log(`${caseName} error:${toString(error)},data:${toString(data)},flag:${flag},count:${count}`); + } + } + console.log(`${caseName} result ${func} flag:${toString(flag)} count:${TEST_RELY_NUMBER}`); + runedFunc(flag); +} + + diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/Const.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/Const.js new file mode 100644 index 000000000..b0e95d9c4 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/Const.js @@ -0,0 +1,229 @@ +/** + * 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 const AUTO_ACCEPT_NUMBER = '17615117737'; +export const AUTO_ACCEPT_NUMBER = '10010'; +export const AUTO_ACCEPT_NUMBER2 = '10010'; +export const NOT_ACCEPT_NUMBER = '17160409240'; +export const PHONE_NUMBER_AREA_LAND = '089800000000'; +export const PHONE_NUMBER_LENGTH_8 = '86459751'; + +export const PHONE_NUMBER_LENGTH_11 = '10000000001'; +export const PHONE_NUMBER_VOICE_MAIL = '12599'; +export const PHONE_NUMBER_LONG = '1234567890123456789012345678901234567890123' + + '4567890123456789012345678901234567890123456789012345678901'; +export const EMERGENCY_NUMBER = '112'; +export const RIGHT_PASSWORD = '000001'; +export const ERROR_PASSWORD = '1234567890123456789012345678901234567890123' + +'4567890123456789012345678901234567890123456789012345678901'; +export const CALL_EMERGENCY = 2; +export const PHONE_LIST = ['10000000001']; +export const PHONE_LIST2 = ['10000000001', '10000000002']; +export const NULL_PHONE_NUMBER = ''; +export const SPECIA_CHAR_NUMBER = '"=#$%^&*()+'; +export const PHONE_NUMBER_CHAR = 'abcdefghijk'; +export const BOUNDARY_NUMBER_INT = 2147483649; +export const MINUS_BOUNDARY_NUMBER_INT = -2147483649; +export const MINUS_VALUE = -100; +export const TEST_RELY_NUMBER = 20; // test count for Reliability +export const TEST_PERF_COUNT = 20; // test count for Perfomace +export const PERF_GOAL_TIME = TEST_PERF_COUNT * 0.5; + +export const CALL_STATUS_ACTIVE = 0; +export const CALL_STATUS_HOLDING = 1; +export const CALL_STATUS_DIALING = 2; +export const CALL_STATUS_ALERTING = 3; +export const CALL_STATUS_INCOMING = 4; +export const CALL_STATUS_WAITING = 5; +export const CALL_STATUS_DISCONNECTED = 6; +export const CALL_STATUS_DISCONNECTING = 7; +export const CALL_STATUS_IDLE = 8; + +export const TEL_CONFERENCE_IDLE = 0; +export const TEL_CONFERENCE_ACTIVE = 1; +export const TEL_CONFERENCE_DISCONNECTING = 2; +export const TEL_CONFERENCE_DISCONNECTED = 3; + +export const DEVICE_EARPIECE = 0; +export const DEVICE_SPEAKER = 1; +export const DEVICE_WIRED_HEADSET = 2; +export const DEVICE_BLUETOOTH_SCO = 3; +export const DEVICE_INVALID = -1; +export const DEVICE_INVALID4 = 4; + +export const RESTRICTION_MODE_DEACTIVATION = 0; +export const RESTRICTION_MODE_ACTIVATION = 1; +export const RESTRICTION_MODE_INVALID = -1; +export const RESTRICTION_MODE_INVALID2 = 2; + +export const RESTRICTION_DISABLE = 0; +export const RESTRICTION_ENABLE = 1; + +export const RESTRICTION_TYPE_ALL_INCOMING = 0; +export const RESTRICTION_TYPE_ALL_OUTGOING = 1; +export const RESTRICTION_TYPE_INTERNATIONAL = 2; +export const RESTRICTION_TYPE_INTERNATIONAL_EXCLUDING_HOME = 3; +export const RESTRICTION_TYPE_ROAMING_INCOMING = 4; +export const RESTRICTION_TYPE_INCOMING_SERVICES = 7; +export const RESTRICTION_TYPE_OUTGOING_SERVICES = 6; +export const RESTRICTION_TYPE_ALL_CALLS = 5; +export const RESTRICTION_TYPE_INVALID = -1; +export const RESTRICTION_TYPE_INVALID2 = 8; + +export const DEFAULT_SLOT_ID = 0; +export const SLOT_ID1 = 1; +export const SLOT_ID_INVALID = -1; +export const SLOT_ID_INVALID_2 = 2; +export const CALL_ID_NOT_EXIST = 999; +export const VIDEO_STATE_AUDIO = 0; +export const CALL_TYPE_CS = 0; +export const CALL_TYPE_IMS = 1; + +export const EVENT_START_DTMF_SUCCESS = 3; +export const EVENT_STOP_DTMF_SUCCESS = 5; + +export const CALL_STATE_UNKNOWN = -1; +export const CALL_STATE_IDLE = 0; +export const CALL_STATE_RINGING = 1; +export const CALL_STATE_OFFHOOK = 2; + +export const TIMEOUT_LENTH = 1000; + +// call error code +export const CALL_MANAGER_NUMBER_NULL_NOTICE = '83951616'; + +export const TRANSFER_DISABLE = 0; // tran is close +export const TRANSFER_ENABLE = 1; // tran is open + +export const CALL_TRANSFER_ENABLE = 0; +export const CALL_TRANSFER_DISABLE = 1; +export const CALL_TRANSFER_REGISTRATION = 3; // open tran function +export const CALL_TRANSFER_ERASURE = 4; // close tran function +export const CALL_TRANSFER_INVALID = -1; +export const CALL_TRANSFER_INVALID2 = 5; +export const CALL_TRANSFER_INVALID3 = 2; + +export const TRANSFER_TYPE_BUSY = 1; // tran busy +export const TRANSFER_TYPE_NO_REPLY = 2;// no response tran +export const TRANSFER_TYPE_NOT_REACHABLE = 3; // untouchable(no signal/shut down) tran +export const TRANSFER_TYPE_UNCONDITIONAL = 0; // unconditional tran +export const TRANSFER_TYPE_INVALID = -1; +export const TRANSFER_TYPE_INVALID4 = 4; + +export const REACH_TIMES = 10; +export const AFTER_HANUP_TIMES = 5; + +export const CARMER_ID_NOT_EXIT = 'xtsautotest123456'; +export const CARMER_ID_SPACE = ''; +export const IMAGE_PNG_PATH = '/system/data/callManager.png'; +export const IMAGE_JPG_PATH = '/system/data/callManager.jpg'; +export const IMAGE_BMP_PATH = '/system/data/callManager.bmp'; +export const IMAGE_WEBP_PATH = '/system/data/callManager.webp'; +export const IMAGE_LOCAL_ERROR_PATH = '/system/data/callManager/notexistpath.png'; +export const IMAGE_SPACE_PATH = ''; +export const SENT_STRING_0 = '0'; +export const SENT_STRING_1 = '1'; +export const SENT_STRING_2 = '2'; +export const SENT_STRING_3 = '3'; +export const SENT_STRING_4 = '4'; +export const SENT_STRING_5 = '5'; +export const SENT_STRING_6 = '6'; +export const SENT_STRING_7 = '7'; +export const SENT_STRING_8 = '8'; +export const SENT_STRING_9 = '9'; +export const SENT_STRING_ERROR_10 = '10'; +export const SENT_STRING_A = 'A'; +export const SENT_STRING_Z = 'Z'; +export const SENT_STRING_C = 'C'; +export const SENT_STRING_D = 'D'; +export const SENT_STRING_E = 'E'; +export const SENT_STRING_LOW_A = 'a'; +export const SENT_STRING_LOW_C = 'c'; +export const SENT_STRING_LOW_B = 'b'; +export const SENT_STRING_LOW_D = 'd'; +export const SENT_STRING_STAR = '*'; +export const SENT_STRING_ADD = '+'; +export const SENT_STRING_MINUS = '-'; +export const SENT_STRING_JIN = '#'; +export const CALL_MODE_CS = 0; +export const CALL_MODE_IMS = 3; +export const MEDIA_TYPE_VOICE = 0; +export const MEDIA_TYPE_VIDEO = 1; +export const MEDIA_TYPE_ERROR = -1; +export const MEDIA_TYPE_ERROR2 = 2; +export const DIAL_SCENCE_CALL_NORMAL = 0; +export const DIAL_SCENCE_CALL_PRIVILEGED = 1; +export const DIAL_SCENCE_CALL_CALL_EMERGENCY = 2; +export const DIAL_SCENCE_ERROR = -1; +export const DIAL_SCENCE_ERROR2 = 3; +export const DIAL_CARRIER_TYPE = 0; +export const DIAL_VOICE_MAIL_TYPE = 1; +export const DIAL_OTT_TYPE = 2; +export const DIAL_TYPE_ERROR = -1; +export const DIAL_TYPE_ERROR3 = 3; + +export const POS_700 = 700; +export const POS_10 = 10; +export const POS_Z_0 = 0; +export const POS_Z_1 = 1; +export const POS_Z_ERROR = -1; +export const POS_Z_ERROR2 = 2; +export const POS_LENGTH_300 = 300; +export const POS_LENGTH_600 = 600; + +export const ZOOM_RATIO_5_0 = 5.0; +export const ZOOM_RATIO_15_0 = 15.0; +export const ZOOM_RATIO_0_0 = 0.0; +export const ZOOM_RATIO_10_1 = 10.1; +export const ZOOM_RATIO_MINUS_1_0 = -1.0; + +export const ROTATION_0 = 0; +export const ROTATION_90 = 90; +export const ROTATION_60 = 60; +export const ROTATION_180 = 180; +export const ROTATION_270 = 270; +export const ROTATION_360 = 360; +export const ROTATION_MINUS_1 = -1; + +export const COMMAND_CALL_WAITTING_OPEN = '*43#'; +export const COMMAND_CALL_WAITTING_CLOSE = '#43#'; +export const COMMAND_CALL_WAITTING_QUERY = '*#43#'; +export const COMMAND_CALL_TRANS_OPEN = '*21*10000000001#'; +export const COMMAND_CALL_TRANS_OPEN2 = '**21*10000000001*10#'; +export const COMMAND_CALL_TRANS_RESET = '##21#'; +export const COMMAND_CALL_ERROR = '**21*10000000001******10#'; +export const COMMAND_CALL_ERROR2 = '*ABCDEF123456789#'; +export const COMMAND_CALL_ERROR3 = '#ABCDEF123456789#'; +export const COMMAND_CALL_ERROR4 = '*#ABCDE123456789#'; +export const COMMAND_CALL_ERROR5 = '**ABCDE123456789#'; +export const COMMAND_CALL_ERROR6 = '##ABCDEF123456789#'; + +export const CALL_WAITING_DISABLE = 0; +export const CALL_WAITING_ENABLE = 1; + +export const EVENT_SEND_USSD_SUCCESS = 17; +export const EVENT_SEND_USSD_FAILED = 18; +export const EVENT_SEND_MEDIA_MODE_UPDATE = 19; + +export const RTT_MSG = 'Ab666&#'; + +export const CALL_MODE_AUDIO_ONLY = 0; +export const CALL_MODE_SEND_RECEIVE = 3; +export const CALL_MODE_SEND_ONLY = 1; +export const CALL_MODE_RECEIVE_ONLY = 2; +export const CALL_MODE_VIDEO_PAUSED = 4; +export const CALL_MODE_INVALID_MINUS_1 = -1; +export const CALL_MODE_INVALID_5 = 5; + diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ScenceInCalling.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ScenceInCalling.js new file mode 100644 index 000000000..f9e88b234 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ScenceInCalling.js @@ -0,0 +1,684 @@ +/** + * 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 { + CALL_MANAGER_NUMBER_NULL_NOTICE, + NULL_PHONE_NUMBER, + CALL_STATUS_HOLDING, + CALL_STATUS_DIALING, + CALL_STATUS_DISCONNECTED, + CALL_STATUS_DISCONNECTING, + TIMEOUT_LENTH, + DEFAULT_SLOT_ID, + CALL_STATUS_ACTIVE, + REACH_TIMES, + AFTER_HANUP_TIMES +} from './Const.js'; +import {toString} from './ApiToPromise.js'; +import call from '@ohos.telephony.call'; +import observer from '@ohos.telephony.observer'; + +let hunupTimeOut = null; + +export function clearHandupTime (caseName) { + console.log(`${caseName} clearHandupTime success`); + clearTimeout(hunupTimeOut); +} + +let stateStorage = []; +export let callId = null; +export function callDetailsChangeOn () { + console.log('Telephony_CallManager callDetailsChangeOn'); + call.on('callDetailsChange', (err, callStateInfo) => { + console.log(`Telephony_CallManager callDetailsChange error ${toString(err)}` + + `,callStateInfo ${toString(callStateInfo)}`); + if (callStateInfo) { + stateStorage.push({...callStateInfo}); + callId = callStateInfo.callId; + } + }); +} +export function callDetailsChangeOff () { + console.log('Telephony_CallManager callDetailsChangeOff'); + call.off('callDetailsChange'); +} + +let reachStateTimeout = null; +export function reachState (caseName, checkState, tag, isHunup, target) { + clearInterval(reachStateTimeout); + stateStorage = []; + let oldTime = new Date(); + let timeoutflag = false; + let timeOutLenth = 2 * REACH_TIMES * TIMEOUT_LENTH; + return new Promise((resolve, reject) => { + reachStateTimeout = setInterval(() => { + let now = new Date(); + console.log(`${caseName} ${tag} reachState now:${toString(now)},stateStorage:${toString({stateStorage})}`); + let find = stateStorage.find(ele => { + if (target && target.callId === null && ele.callState === CALL_STATUS_DIALING) { + target.callId = ele.callId; + } + if (target) { // be satisfied with multing call + return ele.callState === checkState && ele.callId === target.callId; + } else { + return ele.callState === checkState; + } + }); + if (find) { + clearInterval(reachStateTimeout); + const message = `${caseName} ${tag} reachState,get the right state checkState:${checkState}`; + console.log(message); + resolve(find); + return; + } + find = stateStorage.find(ele => { + if (target) { // be satisfied with multing call + return ele.callState === CALL_STATUS_DISCONNECTED && ele.callId === target.callId; + } else { + return ele.callState === CALL_STATUS_DISCONNECTED; + } + }); + if (find) { + clearInterval(reachStateTimeout); + reachStateTimeout = setTimeout(() => { + const message = `${caseName} ${tag} reachState,get the state CALL_STATUS_DISCONNECTED from` + + ` ${timeoutflag ? 'local' : 'opposite'}, callId ${find.callId}`; + console.log(message); + if (target) { // be satisfied with multing call + target.callId = null; + } + reject(new Error(message)); + }, AFTER_HANUP_TIMES * TIMEOUT_LENTH); + return; + } + if (new Date() - oldTime > timeOutLenth) { + if (isHunup) { + const message = `${caseName} ${tag} timeout,hunup is runed`; + console.log(message); + clearInterval(reachStateTimeout); + reject(new Error(message)); + return; + } + if (timeoutflag === false) { + timeoutflag = true; + let callId = target ? target.callId : callId;// be satisfied with multing call + if (!callId) { + clearInterval(reachStateTimeout); + const message = `${caseName} ${tag} timeout reachState,callId is not exit`; + reject(new Error(message)); + return; + } + const message = `${caseName} ${tag} timeout reachState,start hunupCall`; + console.log(message); + hangupCall(caseName, callId).then(data => { + const message = `${caseName} ${tag} timeout hangupCall success,data:${toString(data)}`; + console.log(message); + clearInterval(reachStateTimeout); + reject(new Error(message)); + }).catch(error => { + clearInterval(reachStateTimeout); + const message = `${caseName} ${tag} timeout hangupCall error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + } + } + }, 1 * TIMEOUT_LENTH); + }); +} + +export function clearReachState () { + clearInterval(reachStateTimeout); +} + +// dial call in a nomal scence,when specific state arrive,we get the information of this state +export function scenceInCalling (options) { + console.log(`scenceInCalling options ${toString(options)}`); + if (!options.target) { // be satisfied with multing call + callId = null; + } + return new Promise((resolve, reject) => { + let {caseName, phoneNumber, checkState, dialOptions, target} = options; + try { + reachState(caseName, checkState, 'scenceInCalling', false, target)// be satisfied with multing call + .then(data => { + const message = `${caseName} reach the right state success,data:${toString(data)}`; + console.log(message); + resolve(data); + }) + .catch(error => { + const message = `${caseName} reach the right state error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + const callback = (error, data) => { + if (error) { + const message = `${caseName} scenceInCalling dial error,error:${toString(error)}`; + console.log(message); + clearReachState(); + reject(new Error(message)); + return; + } + if (data !== true) { + const message = `${caseName} scenceInCalling dial data error,data:${toString(data)}`; + console.log(message); + clearReachState(); + reject(new Error(message)); + return; + } + console.log(`${caseName} dial true,run continue`); + }; + let arg = [phoneNumber]; + if (dialOptions) { + arg.push(dialOptions); + } + arg.push(callback); + call.dial(...arg); + } catch (error) { + const message = `${caseName} dial try catch error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + } + }); +} + +/* normal function + dial a call with number '',we shoudld get the error */ +export function scenceInCallingNull (options) { + console.log(`scenceInCallingNull options ${toString(options)}`); + return new Promise((resolve, reject) => { + let {caseName, dialOptions} = options; + const callback = (err, data) => { + if (err && err.message === CALL_MANAGER_NUMBER_NULL_NOTICE) { + console.log(`${caseName} dial call null number,data:${toString(err)}`); + resolve(data); + return; + } + const message = `${caseName} should be CALL_MANAGER_NUMBER_NULL_NOTICE,` + + `dial error:${toString(err)},data:${toString(data)}`; + console.log(message); + reject(new Error(message)); + }; + let arg = [NULL_PHONE_NUMBER]; + if (dialOptions) { + arg.push(dialOptions); + } + arg.push(callback); + try { + call.dial(...arg); + } catch (error) { + const message = `${caseName} error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + } + }); +} + +// holding call scence,use it should base on scenceInCalling,get the infomation at CALL_STATUS_HOLDING state +export function scenceInHolding (options) { + console.log(`scenceInHolding options ${toString(options)}`); + return new Promise(async (resolve, reject) => { + let {caseName, callId} = options; + if (callId) { + reachState(caseName, CALL_STATUS_HOLDING, 'scenceInHolding', false) + .then(data => { + const message = `${caseName} scenceInHolding get the right state success,data:${toString(data)}`; + console.log(message); + resolve(data); + }) + .catch(error => { + const message = `${caseName} scenceInHolding get the right state error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + call.holdCall(callId, (error, data) => { + if (error) { + const message = `${caseName} scenceInHolding holdCall error,error:${toString(error)}`; + console.log(message); + clearReachState(); + reject(new Error(message)); + } + + }); + } else { + const message = `${caseName} scenceInHolding error,need callId`; + console.log(message); + reject(new Error(message)); + } + }); +} + +export function scenceInUnHolding (options) { + console.log(`scenceInUnHolding options ${toString(options)}`); + return new Promise(async (resolve, reject) => { + let {caseName, callId} = options; + if (callId) { + reachState(caseName, CALL_STATUS_ACTIVE, 'scenceInUnHolding', false) + .then(data => { + const message = `${caseName} scenceInUnHolding get the right state success,data:${toString(data)}`; + console.log(message); + resolve(data); + }) + .catch(error => { + const message = `${caseName} scenceInUnHolding get the right state error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + call.unHoldCall(callId, (error, data) => { + if (error) { + const message = `${caseName} scenceInUnHolding error,error:${toString(error)}`; + console.log(message); + clearReachState(); + reject(new Error(message)); + } + + }); + } else { + const message = `${caseName} scenceInUnHolding error,need callId`; + console.log(message); + reject(new Error(message)); + } + }); +} + +// hunup call scence,use it should base on scenceInCalling,specific state arrive,get the infomation at this state +export function scenceInHangup (options) { + console.log(`scenceInHangup options ${toString(options)}`); + return new Promise(async (resolve, reject) => { + let {caseName, callId, checkState} = options; + if (callId) { + reachState(caseName, checkState, 'scenceInHangup', true).then(data => { + const message = `${caseName} scenceInHangup get the right state success ,data:${toString(data)}`; + console.log(message); + resolve(data); + }).catch(error => { + const message = `${caseName} scenceInHangup get the right state error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + call.hangup(callId) + .then((data) => { + const message = `${caseName} scenceInHangup data,data:${toString(data)}`; + console.log(message); + }) + .catch(error => { + const message = `${caseName} func hangup,error:${toString(error)}`; + console.log(message); + clearReachState(); + reject(new Error(message)); + }); + + } else { + const message = `${caseName} scenceInHangup error,need callId`; + console.log(message); + reject(new Error(message)); + } + }); +} + +// hunup the call ,used in test case +export function hangupCall2 (caseName, done, callId, delaytime) { + let timeout = null; + if (callId) { + const message = `${caseName} hunup,hangupCall2 callId ${callId}`; + console.log(message); + reachState(caseName, CALL_STATUS_DISCONNECTED, 'hangupCall2', true) + .then(data => { + const message = `${caseName} hangupCall2 get right state success,data:${toString(data)}`; + console.log(message); + clearTimeout(timeout); + timeout = setTimeout(function () { + done(); + }, AFTER_HANUP_TIMES * TIMEOUT_LENTH); + }) + .catch(error => { + const message = `${caseName} hangupCall2 get right state error,error:${toString(error)}`; + console.log(message); + }); + call.hangup(callId) + .then((data) => { + console.log(`${caseName} func hangup success,${toString(data)}`); + }) + .catch(error => { + const message = `${caseName} func hangup,error:${toString(error)}`; + console.log(message); + clearReachState(); + done(); + }); + + } else { + const message = `${caseName} hangupCall2 error,need callId`; + console.log(message); + done(); + } +} + +// hunup the call ,used in packaging function +export function hangupCall (caseName, callId) { + return new Promise((resolve, reject) => { + let timeout = null; + if (callId) { + let message = `${caseName} hunup,hangupCall callId:${callId}`; + console.log(message); + reachState(caseName, CALL_STATUS_DISCONNECTED, 'hangupCall', true) + .then(data => { + const message = `${caseName} hangupCall get right state success,data:${toString(data)}`; + console.log(message); + clearTimeout(timeout); + timeout = setTimeout(function () { + resolve(data); + }, AFTER_HANUP_TIMES * TIMEOUT_LENTH); + }) + .catch(error => { + const message = `${caseName} hangupCall get right state error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + call.hangup(callId) + .then((data) => { + console.log(`${caseName} func hangup success,${toString(data)}`); + }) + .catch(error => { + const message = `${caseName} func hangup,error:${toString(error)}`; + console.log(message); + clearReachState(); + reject(new Error(message)); + }); + } else { + const message = `${caseName} func hangup error,need callId`; + console.log(message); + reject(new Error(message)); + } + + }); +} + +/* dial call in a nomal scence used in third-party applications,when specific state arrive, + we get the information of this state */ +export function scenceInCallingForRegister (options) { + console.log(`scenceInCallingForRegister options ${toString(options)}`); + return new Promise((resolve, reject) => { + let {caseName} = options; + let callId = null; + let callChangeData = null; + let func = null; + let count = 0; + if (options.isOnce) { + func = observer.once; + } else { + func = observer.on; + } + if (typeof func !== 'function') { + let message = `${caseName} observer.once or observer.on is not exit,options:${toString(options)}`; + console.log(message); + reject(new Error(message)); + return; + } + func('callStateChange', {slotId: DEFAULT_SLOT_ID}, (data) => { + console.log(`${caseName} callStateChange,data:${toString(data)}`); + callChangeData = data; + count++; + }); + + scenceInCalling({...options}) + .then(data => { + callId = data.callId; + let tempCallChangeData = {count, ...callChangeData}; + console.log(`${caseName} scenceInCalling data,data:${toString(data)},` + + `tempCallChangeData:${toString(tempCallChangeData)}`); + observer.off('callStateChange'); + hangupCall(caseName, callId) + .then(data => { + console.log(`${caseName} scenceInCalling hangupCall data,data:${toString(data)}`); + resolve(tempCallChangeData); + }) + .catch(error => { + const message = `${caseName} scenceInCalling hangupCall error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + }) + .catch(error => { + const message = `${caseName} scenceInCalling error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + }); +} + +// holding call scence used in third-party applications,we get the information of state at CALL_STATUS_HOLDING state +export function scenceInCallingHoldingForRegister (options) { + console.log(`scenceInCallingHoldingForRegister options ${toString(options)}`); + return new Promise((resolve, reject) => { + let {caseName} = options; + let callId = null; + let callChangeData = null; + let func = null; + let count = 0; + if (options.isOnce) { + func = observer.once; + } else { + func = observer.on; + } + if (typeof func !== 'function') { + reject(new Error(`${caseName} observer.once or observer.on is not exit,options:${toString(options)}`)); + return; + } + func('callStateChange', {slotId: DEFAULT_SLOT_ID}, (data) => { + console.log(`${caseName} callStateChange,data:${toString(data)}`); + count++; + callChangeData = data; + }); + scenceInCalling(options) + .then(data => { + scenceInHolding({callId:data.callId, ...options}) + .then(data => { + callId = data.callId; + let tempCallChangeData = {count, ...callChangeData}; + console.log(`${caseName} scenceInHolding data,data:${toString(data)}` + + `,tempCallChangeData:${toString(tempCallChangeData)}`); + observer.off('callStateChange'); + hangupCall(caseName, callId) + .then(data => { + console.log(`${caseName} hangupCall data,data:${toString(data)}`); + resolve(tempCallChangeData); + }) + .catch(error => { + const message = `${caseName} hangupCall error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + }) + .catch(error => { + const message = `${caseName} scenceInHolding ,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + }) + .catch(error => { + const message = `${caseName} scenceInCalling error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + }); +} + +// holding call scence used in third-party applications,we get the information of state when unHoldCall the call +export function scenceInCallingNnHoldingForRegister (options) { + console.log(`scenceInCallingNnHoldingForRegister options ${toString(options)}`); + return new Promise((resolve, reject) => { + let {caseName} = options; + let callId = null; + let callChangeData = null; + let func = null; + let count = 0; + if (options.isOnce) { + func = observer.once; + } else { + func = observer.on; + } + if (typeof func !== 'function') { + reject(new Error(`${caseName} observer.once or observer.on is not exit,options:${toString(options)}`)); + return; + } + func('callStateChange', {slotId:DEFAULT_SLOT_ID}, (data) => { + console.log(`${caseName} callStateChange,data:${toString(data)}`); + count++; + callChangeData = data; + }); + scenceInCalling(options) + .then(data => { + scenceInHolding({callId:data.callId, ...options}) + .then(data => { + callId = data.callId; + scenceInUnHolding({callId:data.callId, ...options}) + .then(data => { + let tempCallChangeData = {count, ...callChangeData}; + console.log(`${caseName} unHoldCall data,data:${toString(data)}, + tempCallChangeData:${toString(tempCallChangeData)}`); + observer.off('callStateChange'); + hangupCall(caseName, callId) + .then(data => { + console.log(`${caseName} hangupCall data,data:${toString(data)}`); + resolve(tempCallChangeData); + }) + .catch(error => { + const message = `${caseName} hangupCall error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + }) + .catch(error => { + const message = `${caseName} unHoldCall error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + }) + .catch(error => { + const message = `${caseName} scenceInHolding error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + }) + .catch(error => { + const message = `${caseName} scenceInCalling error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + }); +} + +// hunup call scence used in third-party applications,we get the information of state when hunup the call +export function scenceInCallingHangupForRegister (options) { + console.log(`scenceInCallingHangupForRegister options ${toString(options)}`); + return new Promise((resolve, reject) => { + let {caseName} = options; + let callId = null; + let callChangeData = null; + let func = null; + let count = 0; + if (options.isOnce) { + func = observer.once; + } else { + func = observer.on; + } + if (typeof func !== 'function') { + reject(new Error(`${caseName} observer.once or observer.on is not exit,options:${toString(options)}`)); + return; + } + func('callStateChange', {slotId: DEFAULT_SLOT_ID}, (data) => { + console.log(`${caseName} callStateChange,data:${toString(data)}`); + count++; + callChangeData = data; + }); + scenceInCalling(options) + .then(data => { + options.checkState = CALL_STATUS_DISCONNECTED; + scenceInHangup({callId:data.callId, ...options}) + .then(data => { + callId = data.callId; + let tempCallChangeData = {count, ...callChangeData}; + console.log(`${caseName} scenceInHangup data,data:${toString(data)},` + + `tempCallChangeData:${toString(tempCallChangeData)}`); + observer.off('callStateChange'); + resolve(tempCallChangeData); + }) + .catch(error => { + const message = `${caseName} scenceInHangup error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + }) + .catch(error => { + const message = `${caseName} scenceInCalling error,error:${toString(error)}`; + console.log(message); + reject(new Error(message)); + }); + }); +} + +export function isHanupEd (state) { + return (state === CALL_STATUS_DISCONNECTING) || (state === CALL_STATUS_DISCONNECTED); +} + +export function reachCallEventState (eventId) { + return new Promise(function (resolve, reject) { + let time = null; + call.on('callEventChange', (err, value) => { + console.log(`Telephony_CallManager callEventChange error ${toString(err)},callStateInfo ${ + toString(value)}`); + if (err) { + let message = `Telephony_CallManager reachCallEventState err message = ${toString(err)}`; + console.log(message); + clearTimeout(time); + reject(new Error(message)); + return; + } + if (eventId === value.eventId) { + let message = `Telephony_CallManager reachCallEventState get the right eventId ${toString(value)}`; + console.log(message); + clearTimeout(time); + resolve(value); + } else { + let message = `Telephony_CallManager reachCallEventState get the error eventId ${toString(value)}`; + console.log(message); + clearTimeout(time); + reject(new Error(message)); + } + }); + time = setTimeout(function () { + let message = 'Telephony_CallManager reachCallEventState time out'; + console.log(message); + reject(new Error(message)); + }, 20 * TIMEOUT_LENTH); + }); +} + +export class TeleCall { + constructor () { + this.callId = null; + } + callScenceInCalling (options) { + this.callId = null; + options.target = this; + return scenceInCalling(options); + } + callReachState (caseName, checkState, tag, isHunup) { + return reachState(caseName, checkState, tag, isHunup, this); + } + callHangupCall (caseName) { + return hangupCall(caseName, this.callId, this); + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ScenceLimitCalling.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ScenceLimitCalling.js new file mode 100644 index 000000000..eade0379d --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ScenceLimitCalling.js @@ -0,0 +1,57 @@ +/** + * 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 {RIGHT_PASSWORD, DEFAULT_SLOT_ID, RESTRICTION_MODE_DEACTIVATION} from './Const.js'; +import {toString} from './ApiToPromise.js'; +import call from '@ohos.telephony.call'; + +// limit call scence +export function scenceLimitCalling (caseName, type, mode, slotId) { + return new Promise((resolve, reject) => { + console.log(`${caseName} scenceLimitCalling type:${type},mode:${mode}`); + call.setCallRestriction(slotId ? slotId : DEFAULT_SLOT_ID, { + type, + mode, + password:RIGHT_PASSWORD, + }) + .then(data => { + console.log(`${caseName} setCallRestriction success, data:${toString(data)}`); + resolve(data); + }) + .catch((error) => { + console.log(`${caseName} setCallRestriction error,error:${toString(error)}`); + reject(error); + }); + }); +} + +export function scenceLimitCancel (caseName, type, slotId) { + return new Promise((resolve, reject) => { + console.log(`${caseName} scenceLimitCancel type:${type}`); + call.setCallRestriction(slotId ? slotId : DEFAULT_SLOT_ID, { + type, + mode:RESTRICTION_MODE_DEACTIVATION, + password:RIGHT_PASSWORD, + }) + .then(data => { + console.log(`${caseName} scenceLimitCancel success, data:${toString(data)}`); + resolve(data); + }) + .catch((error) => { + console.log(`${caseName} scenceLimitCancel error,error:${toString(error)}`); + reject(error); + }); + }); +} diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ScenceTransfer.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ScenceTransfer.js new file mode 100644 index 000000000..41cfdbaf5 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/js/test/lib/ScenceTransfer.js @@ -0,0 +1,48 @@ +/** + * 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 call from '@ohos.telephony.call'; +import {toString} from './ApiToPromise.js'; +export function scenceTransferCalling (caseName, settingType, type, phoneNumber) { + return new Promise((resolve, reject) => { + call.setCallTransfer(0, { + settingType, + type, + phoneNumber, + }) + .then(data => { + console.log(`${caseName} scenceTransferCalling success,data:${toString(data)}`); + resolve(data); + }) + .catch((error) => { + console.log(`${caseName} scenceTransferCalling error,error:${toString(error)}`); + reject(error); + }); + }); +} + +export function scenceTransferCancel (caseName) { + return new Promise((resolve, reject) => { + call.dial('##002#') + .then(data => { + console.log(`${caseName} scenceTransferCancel success,data:${toString(data)}`); + resolve(data); + }) + .catch((error) => { + console.log(`${caseName} scenceTransferCancel error,error${toString(error)}`); + reject(error); + }); + }); +} + diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/resources/base/element/string.json b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..359c05368 --- /dev/null +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "CallManager" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/resources/base/media/icon.png b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmK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plQlKxrcY>@3d)}x-%+u0^_rdS{{@ff BRPz7; literal 0 HcmV?d00001 diff --git a/telephony/telephonyjstest/cellular_data/BUILD.gn b/telephony/telephonyjstest/cellular_data/BUILD.gn new file mode 100644 index 000000000..21dcacb5a --- /dev/null +++ b/telephony/telephonyjstest/cellular_data/BUILD.gn @@ -0,0 +1,20 @@ +# 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") + +group("cellular_data") { + testonly = true + if (is_standard_system) { + deps = [ "cellular_data_abnormal:ActsCellularDataAbnormalTest" ] + } +} diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/BUILD.gn b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/BUILD.gn new file mode 100644 index 000000000..d71d00f31 --- /dev/null +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/BUILD.gn @@ -0,0 +1,31 @@ +# 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("ActsCellularDataAbnormalTest") { + hap_profile = "./entry/src/main/config.json" + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "ActsCellularDataAbnormalTest" +} +ohos_js_assets("hjs_demo_js_assets") { + source_dir = "./entry/src/main/js/default" +} +ohos_resources("hjs_demo_resources") { + sources = [ "./entry/src/main/js/resources" ] + hap_profile = "./entry/src/main/config.json" +} diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/Test.json b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/Test.json new file mode 100644 index 000000000..411be27c3 --- /dev/null +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/Test.json @@ -0,0 +1,19 @@ +{ + "description": "Configuration for callmanager Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "18000", + "package": "com.ohos.cellulardata", + "shell-timeout": "18000", + "native-test-timeout":"18000" + }, + "kits": [ + { + "test-file-name": [ + "$module.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + } + ] +} 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 new file mode 100644 index 000000000..6707fd3ba --- /dev/null +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/config.json @@ -0,0 +1,61 @@ +{ + "app": { + "bundleName": "com.ohos.cellulardata", + "vendor": "ohos", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 4, + "target": 5, + "releaseType": "Release" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.ohos.cellulardata", + "name": ".MyApplication", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry" + }, + "abilities": [ + { + "visible": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "com.ohos.cellulardata.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/app.js b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/app.js new file mode 100644 index 000000000..f6cc8926d --- /dev/null +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/app.js @@ -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('TestApplication onCreate'); + }, + onDestroy() { + console.info('TestApplication onDestroy'); + } +}; diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/i18n/en-US.json b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/i18n/en-US.json new file mode 100644 index 000000000..55561b837 --- /dev/null +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/i18n/en-US.json @@ -0,0 +1,8 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + }, + "Files": { + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/i18n/zh-CN.json b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/i18n/zh-CN.json new file mode 100644 index 000000000..cce1af067 --- /dev/null +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,8 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + }, + "Files": { + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/pages/index/index.css b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/pages/index/index.css new file mode 100644 index 000000000..6fda79275 --- /dev/null +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/pages/index/index.css @@ -0,0 +1,9 @@ +.container { + flex-direction: column; + justify-content: center; + align-items: center; +} + +.title { + font-size: 100px; +} diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/pages/index/index.hml b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/pages/index/index.hml new file mode 100644 index 000000000..f64b040a5 --- /dev/null +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + {{ $t('strings.hello') }} {{ title }} + +
diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/pages/index/index.js b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/pages/index/index.js new file mode 100644 index 000000000..f159d2674 --- /dev/null +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/default/pages/index/index.js @@ -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. + */ + +import file from '@system.file' +import app from '@system.app' +import device from '@system.device' +import router from '@system.router' +import {Core, ExpectExtend} from 'deccjsunit/index' +const injectRef = Object.getPrototypeOf(global) || global +injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') +export default { + data: { + title: "" + }, + onInit() { + this.title = this.$t('strings.world'); + }, + onShow() { + console.info('onShow finish!') + const core = Core.getInstance() + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }) + core.addService('expect', expectExtend) + core.init() + + const configService = core.getDefaultService('config') + configService.timeout = 8000 + configService.setConfig(this) + require('../../../test/List.test') + core.execute() + }, + onReady() { + }, +} \ No newline at end of file diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/resources/base/element/string.json b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/resources/base/element/string.json new file mode 100644 index 000000000..359c05368 --- /dev/null +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "CallManager" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/resources/base/media/icon.png b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPh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Pvf#a9OHyYLcwQD4Kcm)`LLwMh4WT~p29f7M!iafJSU`IV}QY5Wa z(n44-9oA}?J{a+ah*@31WTs#&J#o1`H98#6IQf;Wv0N_!);f&9g7o-k(lW5rWnDUR zQBFIRG+X=6NnsI@mxnwm;tf5;_Uxg?jZ8m-m0}&6+DA!qam(p$mN5R})yA_7m$q@| zFEd|dpS595rxQr-n#GjI5i-AhnUE>Cr;jpCqSrD~EwK_DqI^7%3#p5)%T_od!t3SOmH9MyXeeGO2(UQL;ax|x?Ncixmeo1=$ z{-);Au{*tfzOG?KQ~K|ak8-HQ?`Pekhe2WM(8s{xv-p>Zmu_6{G!-oE$7$mY`MOJorI=+mMx?H;`pr!;fVYz?5~yXBACruWB`Ph zZM}90_<^OBxIhyZ9BW$`>6JvO;%VFpqVr8|7t3~AmxYak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y { + if (err) { + expect().assertFail(); + console.log("Telephony_CellularData_isCellularDataEnabled_Async_0100 fail"); + done(); + return; + } + console.log("Telephony_CellularData_isCellularDataEnabled_Async_0100 finish"); + done(); + }) + }) + + /* + * @tc.number Telephony_CellularData_getCellularDataState_Async_0100 + * @tc.name Call the enableCellularData interface, call the getCellularDataState interface, + * and get the result 1 or 2 + * @tc.desc Function test + */ + it("Telephony_CellularData_getCellularDataState_Async_0100", 0, async function (done) { + cellular.getCellularDataState((err, data) => { + if (err) { + expect().assertFail(); + console.log("Telephony_CellularData_getCellularDataState_Async_0100 fail"); + done(); + return; + } + console.log("Telephony_CellularData_getCellularDataState_Async_0100 finish"); + 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) { + expect().assertFail(); + console.log("Telephony_CellularData_enableCellularData_Async_0100 enableCellularData fail"); + done(); + return; + } + console.log("Telephony_CellularData_enableCellularData_Async_0100 enableCellularData finish"); + 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) { + expect().assertFail(); + console.log("Telephony_CellularData_disableCellularData_Async_0100 disableCellularData fail"); + done(); + return; + } + console.log("Telephony_CellularData_disableCellularData_Async_0100 disableCellularData finish"); + 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 + * verify that the callback value is within the enumeration value range + * @tc.desc Function test + */ + it("Telephony_CellularData_getCellularDataFlowType_Async_0100", 0, async function (done) { + cellular.getCellularDataFlowType((err, data) => { + if (err) { + expect().assertFail(); + console.log("Telephony_CellularData_getCellularDataFlowType_Async_0100 fail"); + done(); + return; + } + console.log("Telephony_CellularData_getCellularDataFlowType_Async_0100 finish"); + done(); + }) + }) + + /* + * @tc.number Telephony_CellularData_isCellularDataRoamingEnabled_Async_0200 + * @tc.name Call isCellularDataRoamingEnabled, set the slotId to error values (3), to check the correction + * results + * @tc.desc Function test + */ + it("Telephony_CellularData_isCellularDataRoamingEnabled_Async_0200", 0, async function (done) { + cellular.isCellularDataRoamingEnabled(ERR_SLOT_ID, (err) => { + if (err) { + console.log("Telephony_CellularData_isCellularDataRoamingEnabled_Async_0200 finish"); + done(); + return; + } + expect().assertFail(); + console.log("Telephony_CellularData_isCellularDataRoamingEnabled_Async_0200 fail"); + 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) + * @tc.desc Function test + */ + it("Telephony_CellularData_getDefaultCellularDataSlotId_Async_0500", 0, async function (done) { + cellular.getDefaultCellularDataSlotId((err) => { + if (err) { + expect().assertFail(); + console.log("Telephony_CellularData_setDefaultCellularDataSlotId_Async_0500 fail"); + done(); + return; + } + console.log("Telephony_CellularData_setDefaultCellularDataSlotId_Async_0500 finish"); + done(); + }) + }) + + /* + * @tc.number Telephony_CellularData_isCellularDataEnabled_Promise_0100 + * @tc.name Call the enableCellularData interface and then call the isCellularDataEnabled interface. + * The result is true + * @tc.desc Function test + */ + it("Telephony_CellularData_isCellularDataEnabled_Promise_0100", 0, async function (done) { + try { + await cellular.isCellularDataEnabled(); + console.log("Telephony_CellularData_isCellularDataEnabled_Promise_0100 finish"); + done(); + } catch (err) { + expect().assertFail(); + console.log("Telephony_CellularData_isCellularDataEnabled_Promise_0100 fail"); + done(); + } + }) + + /* + * @tc.number Telephony_CellularData_getCellularDataState_Promise_0100 + * @tc.name Call the enableCellularData interface, call the getCellularDataState interface, + * and get the result 1 or 2 + * @tc.desc Function test + */ + it("Telephony_CellularData_getCellularDataState_Promise_0100", 0, async function (done) { + try { + await cellular.getCellularDataState(); + console.log("Telephony_CellularData_getCellularDataState_Promise_0100 finish"); + done(); + } catch (err) { + expect().assertFail(); + console.log("Telephony_CellularData_getCellularDataState_Promise_0100 fail"); + done(); + } + }) + + /* + * @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(); + console.log("Telephony_CellularData_enableCellularData_Promise_0100 finish"); + done(); + } catch (err) { + expect().assertFail(); + console.log("Telephony_CellularData_enableCellularData_Promise_0100 fail"); + 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(); + console.log("Telephony_CellularData_disableCellularData_Promise_0100 finish"); + done(); + } catch (err) { + expect().assertFail(); + console.log("Telephony_CellularData_disableCellularData_Promise_0100 fail"); + 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 + * verify that the callback value is within the enumeration value range + * @tc.desc Function test + */ + it("Telephony_CellularData_getCellularDataFlowType_Promise_0100", 0, async function (done) { + try { + await cellular.getCellularDataFlowType(); + console.log("Telephony_CellularData_getCellularDataFlowType_Promise_0100 finish"); + done(); + } catch (err) { + expect().assertFail(); + console.log("Telephony_CellularData_getCellularDataFlowType_Promise_0100 fail"); + done(); + } + }) + + /* + * @tc.number Telephony_CellularData_isCellularDataRoamingEnabled_Promise_0200 + * @tc.name Call isCellularDataRoamingEnabled, set the slotId to error values (3), to check the correction + * results + * @tc.desc Function test + */ + it("Telephony_CellularData_isCellularDataRoamingEnabled_Promise_0200", 0, async function (done) { + try { + await cellular.isCellularDataRoamingEnabled(ERR_SLOT_ID); + expect().assertFail(); + console.log("Telephony_CellularData_isCellularDataRoamingEnabled_Promise_0200 fail"); + done(); + } catch (err) { + console.log("Telephony_CellularData_isCellularDataRoamingEnabled_Promise_0200 finish"); + done(); + } + }) + + /* + * @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) + * @tc.desc Function test + */ + it("Telephony_CellularData_getDefaultCellularDataSlotId_Promise_0500", 0, async function (done) { + try { + await cellular.getDefaultCellularDataSlotId(); + console.log("Telephony_CellularData_getDefaultCellularDataSlotId_Promise_0500 finish"); + done(); + } catch (err) { + expect().assertFail(); + console.log("Telephony_CellularData_getDefaultCellularDataSlotId_Promise_0500 fail"); + done(); + } + }) +}) diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/test/List.test.js b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/test/List.test.js new file mode 100644 index 000000000..90fc09236 --- /dev/null +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/js/test/List.test.js @@ -0,0 +1,16 @@ +/* + * 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. + */ + +require('./CellularDataAbnorma.test.js') \ No newline at end of file diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/resources/base/element/string.json b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..359c05368 --- /dev/null +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "CallManager" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/resources/base/media/icon.png b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuC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|+{T`9Ns+$fmzLFa3{-ybgCzBEv~{N&P~1olN+4}GWyrURd?pDC?A*#6eB4U;zR zxVe0J=FM}>dCTv&fTl0x>tWEFmAH}Y?wGbk|X~I#~vwe!%i5ED+%Ci;J@%Q z*|Oh+Z@l>S-BMS5+ezu>o}-y3JF|M0I5Mkx)y6NDH%@f5YrZ*uwSC;jS35`3Vs+vv zl4>grZqc{T5cD0a-TnT$b(zO}Pj`(^O#c3riCc$TxdDuA-{lD@jA zdHc&tr!EyQ9n;BbIkmcU!@NF|J-zMbOOe(dBj+#d+!v + + {{ $t('strings.hello') }} {{ title }} + + diff --git a/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/default/pages/index/index.js b/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/default/pages/index/index.js new file mode 100644 index 000000000..f159d2674 --- /dev/null +++ b/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/default/pages/index/index.js @@ -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. + */ + +import file from '@system.file' +import app from '@system.app' +import device from '@system.device' +import router from '@system.router' +import {Core, ExpectExtend} from 'deccjsunit/index' +const injectRef = Object.getPrototypeOf(global) || global +injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') +export default { + data: { + title: "" + }, + onInit() { + this.title = this.$t('strings.world'); + }, + onShow() { + console.info('onShow finish!') + const core = Core.getInstance() + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }) + core.addService('expect', expectExtend) + core.init() + + const configService = core.getDefaultService('config') + configService.timeout = 8000 + configService.setConfig(this) + require('../../../test/List.test') + core.execute() + }, + onReady() { + }, +} \ No newline at end of file diff --git a/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/resources/base/element/string.json b/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/resources/base/element/string.json new file mode 100644 index 000000000..2f9470d82 --- /dev/null +++ b/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "MyApplication" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/resources/base/media/icon.png b/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/js/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnu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-AhnUE>Cr;jpCqSrD~EwK_DqI^7%3#p5)%T_od!t3SOmH9MyXeeGO2(UQL;ax|x?Ncixmeo1=$ z{-);Au{*tfzOG?KQ~K|ak8-HQ?`Pekhe2WM(8s{xv-p>Zmu_6{G!-oE$7$mY`MOJorI=+mMx?H;`pr!;fVYz?5~yXBACruWB`Ph zZM}90_<^OBxIhyZ9BW$`>6JvO;%VFpqVr8|7t3~AmxYak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y { + setTimeout(() => { + console.log(`Telephony_NetworkSearch_CellInformation sleep ${timeout}ms`); + resolve(); + }, timeout); + }) + } + + async function turnOnRadio() { + let isOn = await radio.isRadioOn(); + if (!isOn) { + await radio.turnOnRadio(); + console.log('Telephony_NetworkSearch_CellInformation turnOnRadio success'); + await sleep(5000); + } + } + + beforeAll(async function () { + await radio.setPreferredNetwork(SLOT_0, radio.PREFERRED_NETWORK_MODE_AUTO); + await turnOnRadio(); + }) + + afterAll(async function () { + await radio.setPreferredNetwork(SLOT_0, radio.PREFERRED_NETWORK_MODE_AUTO); + await turnOnRadio(); + }) + + /** + * @tc.number Telephony_NetworkSearch_getNetworkState_Async_0700 + * @tc.name SlotId parameter input is -1, test getNetworkState() query function go to the error + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_getNetworkState_Async_0700', 0, async function (done) { + radio.getNetworkState(SLOT_2, (err, data) => { + if (err) { + console.log(`Telephony_NetworkSearch_getNetworkState_Async_0700 finish err: ${err}`); + done(); + return; + } + console.log(`Telephony_NetworkSearch_getNetworkState_Async_0700 fail not go to err ${data}`); + expect().assertFail(); + done(); + }); + }); + + /** + * @tc.number Telephony_NetworkSearch_getRadioTech_Async_0400 + * @tc.name SlotId parameter input is -1, test getRadioTech() query function go to the error + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_getRadioTech_Async_0400', 0, async function (done) { + radio.getRadioTech(SLOT_2, (err, data) => { + if (err) { + console.log(`Telephony_NetworkSearch_getRadioTech_Async_0400 finish err: ${err}`); + done(); + return; + } + console.log(`Telephony_NetworkSearch_getRadioTech_Async_0400 fail not go to err ${data}`); + expect().assertFail(); + done(); + }); + }); + + /** + * @tc.number Telephony_NetworkSearch_getSignalInformation_Async_0400 + * @tc.name SlotId parameter input is -1, test getSignalInformation() query function go to the error + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_getSignalInformation_Async_0400', 0, async function (done) { + radio.getSignalInformation(SLOT_2, (err, data) => { + if (err) { + console.log(`Telephony_NetworkSearch_getSignalInformation_Async_0400 fail err: ${err}`); + expect().assertFail(); + done(); + return; + } + console.log(`Telephony_NetworkSearch_getSignalInformation_Async_0400 finish data: ${JSON.stringify(data)}`); + expect(data.length === 0).assertTrue(); + done(); + }); + }); + + /** + * @tc.number Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 + * @tc.name SlotId parameter input is -1, test getISOCountryCodeForNetwork() query function and datalengtch = 0 + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400', 0, async function (done) { + radio.getISOCountryCodeForNetwork(SLOT_2, (err, data) => { + if (err) { + console.log(`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 fail err: ${err}`); + expect().assertFail(); + done(); + return; + } + console.log( + `Telephony_NetworkSearch_getISOCountryCodeForNetwork_Async_0400 finish data: ${JSON.stringify(data)}`); + expect(data.length === 0).assertTrue(); + done(); + }); + }); + + /** + * @tc.number Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 + * @tc.name SlotId parameter input is -1, test getISOCountryCodeForNetwork() query function go to the error + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400', 0, async function (done) { + try { + let data = await radio.getISOCountryCodeForNetwork(SLOT_2); + console.log( + `Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 finish data:${JSON.stringify(data)}`); + expect(data.length === 0).assertTrue(); + } catch (err) { + console.log(`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 fail err: ${err}`); + expect().assertFail(); + done(); + return; + } + done(); + }); + + /** + * @tc.number Telephony_NetworkSearch_getNetworkSelectionMode_Async_0500 + * @tc.name SlotId parameter input is -1, test getNetworkSelectionMode() query function go to the error + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_getNetworkSelectionMode_Async_0500', 0, async function (done) { + radio.getNetworkSelectionMode(SLOT_2, (err, res) => { + if (err) { + console.log(`Telephony_NetworkSearch_getNetworkSelectionMode_Async_0500 err: ${err}`); + done(); + } else { + console.log('Telephony_NetworkSearch_getNetworkSelectionMode_Async_0500 fail not go to err'); + expect().assertFail(); + done(); + } + + }); + }); + + /** + * @tc.number Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500 + * @tc.name SlotId parameter input is -1, test getNetworkSelectionMode() query function go to the error + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500', 0, async function (done) { + try { + await radio.getNetworkSelectionMode(SLOT_2); + console.log('Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500 fail not go to err'); + expect().assertFail(); + } catch (err) { + console.log('Telephony_NetworkSearch_getNetworkSelectionMode_Promise_0500 finish'); + done(); + return; + } + 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_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)}`) + 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) { + 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 + * @tc.name SlotId parameter input is -1, test getNetworkState() query function go to the error + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_getNetworkState_Promise_0700', 0, async function (done) { + try { + await radio.getNetworkState(SLOT_2); + console.log('Telephony_NetworkSearch_getNetworkState_Promise_0700 fail not go to err'); + expect().assertFail(); + } catch (err) { + console.log(`Telephony_NetworkSearch_getNetworkState_Promise_0700 finish err: ${err}`); + done(); + return; + } + done(); + }); + + /** + * @tc.number Telephony_NetworkSearch_getRadioTech_Promise_0400 + * @tc.name SlotId parameter input is -1, test getRadioTech() query function go to the error + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_getRadioTech_Promise_0400', 0, async function (done) { + try { + await radio.getRadioTech(SLOT_2); + console.log('Telephony_NetworkSearch_getRadioTech_Promise_0400 fail not go to err'); + expect().assertFail(); + } catch (err) { + console.log(`Telephony_NetworkSearch_getRadioTech_Promise_0400 finish err: ${err}`); + done(); + return; + } + done(); + }); + + /** + * @tc.number Telephony_NetworkSearch_getSignalInformation_Promise_0400 + * @tc.name SlotId parameter input is -1, test getSignalInformation() query function return the datalength is 0 + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_getSignalInformation_Promise_0400', 0, async function (done) { + try { + let data = await radio.getSignalInformation(SLOT_2); + console.log( + `Telephony_NetworkSearch_getSignalInformation_Promise_0400 finish data: ${JSON.stringify(data)}`); + expect(data.length === 0).assertTrue(); + } catch (err) { + console.log(`Telephony_NetworkSearch_getSignalInformation_Promise_0400 fail err: ${err}`); + expect().assertFail(); + done(); + return; + } + done(); + }); + + /** + * @tc.number Telephony_NetworkSearch_getOperatorName_Async_0400 + * @tc.name Verify the abnormal input of "slotId", test getOperatorName() to view the callback result + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_getOperatorName_Async_0400', 0, async function (done) { + radio.getOperatorName(SLOT_2, (err, data) => { + if (err) { + console.log(`Telephony_NetworkSearch_getOperatorName_Async_0400 fail err: ${err}`); + expect().assertFail(); + done(); + return; + } + console.log(`Telephony_NetworkSearch_getOperatorName_Async_0400 finish data: ${data}`); + expect(data === '').assertTrue(); + done(); + }) + }) + + /** + * @tc.number Telephony_NetworkSearch_getOperatorName_Promise_0400 + * @tc.name Verify the abnormal input of "slotId", test getOperatorName() to view the callback result + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_getOperatorName_Promise_0400', 0, async function (done) { + try { + let data = await radio.getOperatorName(SLOT_2); + console.log(`Telephony_NetworkSearch_getOperatorName_Promise_0400 finish data: ${data}`); + expect(data === '').assertTrue(); + done(); + } catch (err) { + console.log(`Telephony_NetworkSearch_getOperatorName_Promise_0400 fail err: ${err}`); + expect().assertFail(); + done(); + } + }) + + /** + * @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}`); + expect().assertFail(); + 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}`); + expect().assertFail(); + 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}`); + expect().assertFail(); + 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}`); + expect().assertFail(); + 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 + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_isRadioOn_Async_0200', 0, async function (done) { + radio.isRadioOn((err) => { + if (err) { + console.log(`Telephony_NetworkSearch_isRadioOn_Async_0200 fail: ${err}`); + done(); + return; + } + console.log('Telephony_NetworkSearch_isRadioOn_Async_0200 finish'); + done(); + }); + }); + + /** + * @tc.number Telephony_NetworkSearch_isRadioOn_Promise_0200 + * @tc.name Test The function isRadioOn + * @tc.desc Function test + */ + it('Telephony_NetworkSearch_isRadioOn_Promise_0200', 0, async function (done) { + try { + await radio.isRadioOn(); + console.log('Telephony_NetworkSearch_isRadioOn_Promise_0200 success'); + done(); + } catch (err) { + console.log(`Telephony_NetworkSearch_isRadioOn_Promise_0200 fail ${err}`); + done(); + } + }); + +}); diff --git a/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/resources/base/element/string.json b/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..aa6e0c68f --- /dev/null +++ b/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "NetworkSearchTest" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/resources/base/media/icon.png b/telephony/telephonyjstest/network_search/network_search_errors/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3N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jY>ls9cL%I)F|JIW-#+48$+lD4k*(P*kDM%zx_fvu4u5ZYUnI}5 zdrycFq>xFU)&X3p@pP2u%$o}}YcRn(MhJ&B2o?KS@cIVz>Ye%o^xV?CB{_Qhu z;}_q1bvO^g{8<3!gYbo4Di{8qzV+(9 zdlmksohQmRTs@qB;(Wo?dER_ux6XQb@q$tQPW?CMu6GVQd;R=iR;-S{Kr%Zks7>b1 zNs{|-+jhObYE}NR&`TGGr^h^4bjh%c>R#@=8nM&Md>_a+zVulsl;){flFekV1t9ob z+SqfV_Pv3$2f)bQ8%Ul2>fdYR^1zs0BQF~olsOj5AodC&Q_7SMFzsz2 z9newxE&jodk~tNHwl%LBMMDbrk=(^b literal 0 HcmV?d00001 diff --git a/telephony/telephonyjstest/sim/BUILD.gn b/telephony/telephonyjstest/sim/BUILD.gn new file mode 100644 index 000000000..0e4d8d5a7 --- /dev/null +++ b/telephony/telephonyjstest/sim/BUILD.gn @@ -0,0 +1,21 @@ +# 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("//build/ohos_var.gni") + +group("sim") { + testonly = true + if (is_standard_system) { + deps = [ "sim_manager_function_test:ActsSimManagerFunctionTest" ] + } +} diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/BUILD.gn b/telephony/telephonyjstest/sim/sim_manager_function_test/BUILD.gn new file mode 100644 index 000000000..7dedfbfea --- /dev/null +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/BUILD.gn @@ -0,0 +1,31 @@ +# 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("ActsSimManagerFunctionTest") { + hap_profile = "./entry/src/main/config.json" + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "ActsSimManagerFunctionTest" +} +ohos_js_assets("hjs_demo_js_assets") { + source_dir = "./entry/src/main/js/default" +} +ohos_resources("hjs_demo_resources") { + sources = [ "./entry/src/main/js/resources" ] + hap_profile = "./entry/src/main/config.json" +} diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/Test.json b/telephony/telephonyjstest/sim/sim_manager_function_test/Test.json new file mode 100644 index 000000000..13e4b7159 --- /dev/null +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/Test.json @@ -0,0 +1,19 @@ +{ + "description": "Function test of sim manager interface", + "driver": { + "type": "JSUnitTest", + "test-timeout": "540000", + "package": "com.ohos.simmanagertest", + "shell-timeout": "540000", + "native-test-timeout":"540000" + }, + "kits": [ + { + "test-file-name": [ + "$module.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + } + ] +} diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/config.json b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/config.json new file mode 100644 index 000000000..5f6a69ff6 --- /dev/null +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/config.json @@ -0,0 +1,61 @@ +{ + "app": { + "bundleName": "com.ohos.simmanagertest", + "vendor": "ohos", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 4, + "target": 5, + "releaseType": "Release" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.ohos.simmanagertest", + "name": ".MyApplication", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry" + }, + "abilities": [ + { + "visible": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "com.ohos.simmanagertest.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/app.js b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/app.js new file mode 100644 index 000000000..d61b8caa6 --- /dev/null +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/app.js @@ -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('TestApplication onCreate'); + }, + onDestroy () { + console.info('TestApplication onDestroy'); + } +}; diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/i18n/en-US.json b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/i18n/en-US.json new file mode 100644 index 000000000..55561b837 --- /dev/null +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/i18n/en-US.json @@ -0,0 +1,8 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + }, + "Files": { + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/i18n/zh-CN.json b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/i18n/zh-CN.json new file mode 100644 index 000000000..cce1af067 --- /dev/null +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,8 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + }, + "Files": { + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/pages/index/index.css b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/pages/index/index.css new file mode 100644 index 000000000..6fda79275 --- /dev/null +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/pages/index/index.css @@ -0,0 +1,9 @@ +.container { + flex-direction: column; + justify-content: center; + align-items: center; +} + +.title { + font-size: 100px; +} diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/pages/index/index.hml b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/pages/index/index.hml new file mode 100644 index 000000000..371603e8d --- /dev/null +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + SIM卡TEST + +
diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/pages/index/index.js b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/pages/index/index.js new file mode 100644 index 000000000..5e9c3a742 --- /dev/null +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/default/pages/index/index.js @@ -0,0 +1,50 @@ +/* + * 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 app from '@system.app'; +import device from '@system.device'; +import router from '@system.router'; +import {Core, ExpectExtend} from 'deccjsunit/index'; + +const injectRef = Object.getPrototypeOf(global) || global +injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') + +export default { + data: { + title: '' + }, + onInit () { + this.title = this.$t('strings.world'); + }, + onShow () { + console.info('onShow finish!'); + const core = Core.getInstance(); + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }); + core.addService('expect', expectExtend); + core.init(); + + const configService = core.getDefaultService('config'); + configService.timeout = 8000 + configService.setConfig(this); + + require('../../../test/List.test'); + core.execute(); + }, + onReady () { + }, +}; \ No newline at end of file diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/resources/base/element/string.json b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/resources/base/element/string.json new file mode 100644 index 000000000..4a597eff5 --- /dev/null +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "Sim Test" + }, + { + "name": "mainability_description", + "value": "Sim Test - sim manager interface test" + } + ] +} \ No newline at end of file diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/resources/base/media/icon.png b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_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m9S%F`$nQ*_#NcuD`&)Ek%_s{&^78{9Hm ztri&rYLOxgFdG>O@+XHy z9#;|&vBCPXH5Mon^I`jSuR$&~ZWtyB67ujzFSj!51>#C}C17~TffQ{c-!QFQkTQ%! zIR^b1`zHx|*1GU?tbBx23weFLz5H?y_Q%N&t$}k?w+``2A=aotj0;2v$~AL z{scF-cL{wsdrmPvf#a9OHyYLcwQD4Kcm)`LLwMh4WT~p29f7M!iafJSU`IV}QY5Wa z(n44-9oA}?J{a+ah*@31WTs#&J#o1`H98#6IQf;Wv0N_!);f&9g7o-k(lW5rWnDUR zQBFIRG+X=6NnsI@mxnwm;tf5;_Uxg?jZ8m-m0}&6+DA!qam(p$mN5R})yA_7m$q@| zFEd|dpS595rxQr-n#GjI5i-AhnUE>Cr;jpCqSrD~EwK_DqI^7%3#p5)%T_od!t3SOmH9MyXeeGO2(UQL;ax|x?Ncixmeo1=$ z{-);Au{*tfzOG?KQ~K|ak8-HQ?`Pekhe2WM(8s{xv-p>Zmu_6{G!-oE$7$mY`MOJorI=+mMx?H;`pr!;fVYz?5~yXBACruWB`Ph zZM}90_<^OBxIhyZ9BW$`>6JvO;%VFpqVr8|7t3~AmxYak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y { + 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_getISOCountryCodeForSim_Promise_0200 + * @tc.name Enter exception parameters to test whether the getISOCountryCodeForSim interface function + * can execute normally. + * @tc.desc Function test + */ + it('Telephony_Sim_getISOCountryCodeForSim_Promise_0200', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_getISOCountryCodeForSim_Promise_0200'; + try { + var data = await sim.getISOCountryCodeForSim(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_getSimOperatorNumeric_Async_0200 + * @tc.name Enter exception parameters to test whether the getSimOperatorNumeric interface function + * can execute normally. + * @tc.desc Function test + */ + it('Telephony_Sim_getSimOperatorNumeric_Async_0200', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_getSimOperatorNumeric_Async_0200'; + sim.getSimOperatorNumeric(env.SLOTID2, (err, data) => { + 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_getSimOperatorNumeric_Promise_0200 + * @tc.name Enter exception parameters to test whether the getSimOperatorNumeric interface function + * can execute normally. + * @tc.desc Function test + */ + it('Telephony_Sim_getSimOperatorNumeric_Promise_0200', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_getSimOperatorNumeric_Promise_0200'; + try { + var data = await sim.getSimOperatorNumeric(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_getSimSpn_Async_0200 + * @tc.name Enter exception parameters to test whether the getSimSpn interface function can execute normally. + * @tc.desc Function test + */ + it('Telephony_Sim_getSimSpn_Async_0200', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_getSimSpn_Async_0200'; + sim.getSimSpn(env.SLOTID2, (err, data) => { + if (err) { + console.log(`${CASE_NAME} fail: ${err.message}`); + console.log(`${CASE_NAME} finish`); + done(); + return; + } + expect().assertFail(); + console.log(`${CASE_NAME} fail, data = ${data}`); + done(); + }); + }); + + /** + * @tc.number Telephony_Sim_getSimSpn_Promise_0200 + * @tc.name Enter exception parameters to test whether the getSimSpn interface function can execute normally. + * @tc.desc Function test + */ + it('Telephony_Sim_getSimSpn_Promise_0200', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_getSimSpn_Promise_0200'; + try { + var data = await sim.getSimSpn(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_getSimState_Async_0200 + * @tc.name Enter exception parameters to test whether the getSimState interface function can execute normally. + * @tc.desc Function test + */ + it('Telephony_Sim_getSimState_Async_0200', 0, async function (done) { + sim.getSimState(env.SLOTID2, (err, data) => { + const CASE_NAME = 'Telephony_Sim_getSimState_Async_0200'; + 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_getSimState_Promise_0200 + * @tc.name Enter exception parameters to test whether the getSimState interface function can execute normally. + * @tc.desc Function test + */ + it('Telephony_Sim_getSimState_Promise_0200', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_getSimState_Promise_0200'; + try { + var data = await sim.getSimState(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_getSimGid1_Async_0200 + * @tc.name Enter exception parameters to test whether the getSimGid1 interface function can execute normally. + * @tc.desc Function test + */ + it('Telephony_Sim_getSimGid1_Async_0200', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_getSimGid1_Async_0200'; + sim.getSimGid1(env.SLOTID2, (err, data) => { + 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 a 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 a 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) => { + if (err) { + 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; + try { + data = await sim.getSimTelephoneNumber(env.SLOTID2); + } catch (err) { + 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.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) => { + if (err) { + console.log(`${CASE_NAME} finish`); + done(); + return; + } + console.log(`${CASE_NAME} , data : ${data}`); + expect().assertFail(); + 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.desc Function test + */ + it('Telephony_Sim_getVoiceMailIdentifier_Promise_0600', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_getVoiceMailIdentifier_Promise_0600'; + let data; + try { + data = await sim.getVoiceMailIdentifier(env.SLOTID2); + } catch (err) { + console.log(`${CASE_NAME} finish`); + done(); + return; + } + console.log(`${CASE_NAME}, data : ${data}`); + expect().assertFail(); + 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) => { + if (err) { + console.log(`${CASE_NAME} finish`); + done(); + return; + } + console.log(`${CASE_NAME} , data : ${data}`); + expect().assertFail(); + 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; + try { + data = await sim.getVoiceMailNumber(env.SLOTID2); + } catch (err) { + console.log(`${CASE_NAME} finish`); + done(); + return; + } + console.log(`${CASE_NAME}, data : ${data}`); + expect().assertFail(); + 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 + * @tc.name Test the getMaxSimCount interface and view the callback result + * @tc.desc Function test + */ + it('Telephony_Sim_getMaxSimCount_0100', 0, function (done) { + const CASE_NAME = 'Telephony_Sim_getMaxSimCount_0100'; + let simCount = sim.getMaxSimCount(); + expect(simCount > env.SIM_MIN_COUNT).assertTrue(); + console.log(`${CASE_NAME} test finish.`); + 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 + * @tc.name Verify that the slotId of the GetCardType async callback interface is abnormal + * and enter parameter 2, and check the callback value + * @tc.desc Function test + */ + it('Telephony_Sim_GetCardType_Async_0400', 0, function (done) { + const CASE_NAME = 'Telephony_Sim_GetCardType_Async_0400'; + sim.getCardType(env.SLOTID2, (error, cardType) => { + if (error) { + console.log(`${CASE_NAME} GetCardType error: ${error.message}`); + expect().assertFail(); + done(); + return; + } + expect(cardType === sim.UNKNOWN_CARD).assertTrue(); + console.log(`${CASE_NAME} test finish.`); + done(); + }); + }); + + /** + * @tc.number Telephony_Sim_GetCardType_Promise_0400 + * @tc.name Verify that the slotId of the GetCardType promise interface is abnormal + * and enter parameter 2, and check the callback value + * @tc.desc Function test + */ + it('Telephony_Sim_GetCardType_Promise_0400', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_GetCardType_Promise_0400'; + try { + const cardType = await sim.getCardType(env.SLOTID2); + expect(cardType === sim.UNKNOWN_CARD).assertTrue(); + console.log(`${CASE_NAME} test finish.`); + } catch (error) { + console.log(`${CASE_NAME} GetCardType error: ${error.message}`); + expect().assertFail(); + } + 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 + * @tc.name Test hasOperatorPrivileges interface slotId exception enter parameter 2, + * check the callback result + * @tc.desc Function test + */ + it('Telephony_Sim_hasOperatorPrivileges_Async_0400', 0, function (done) { + const CASE_NAME = 'Telephony_Sim_hasOperatorPrivileges_Async_0400'; + sim.hasOperatorPrivileges(env.SLOTID2, (error, result) => { + if (error) { + console.log(`${CASE_NAME} hasOperatorPrivileges error: ${error.message}`); + expect().assertFail(); + done(); + return; + } + expect(result).assertFalse(); + console.log(`${CASE_NAME} test finish.`); + done(); + }); + }); + + /** + * @tc.number Telephony_Sim_hasOperatorPrivileges_Promise_0400 + * @tc.name Test hasOperatorPrivileges interface slotId exception enter parameter 2, + * check the returned result + * @tc.desc Function test + */ + it('Telephony_Sim_hasOperatorPrivileges_Promise_0400', 0, async function (done) { + const CASE_NAME = 'Telephony_Sim_hasOperatorPrivileges_Promise_0400'; + try { + const result = await sim.hasOperatorPrivileges(env.SLOTID2); + expect(result).assertFalse(); + console.log(`${CASE_NAME} test finish.`); + } catch (error) { + console.log(`${CASE_NAME} hasOperatorPrivileges error: ${error.message}`); + expect().assertFail(); + } + 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, async (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/sim/sim_manager_function_test/entry/src/main/js/test/lib/Const.js b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/lib/Const.js new file mode 100644 index 000000000..3f2dd04d8 --- /dev/null +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/js/test/lib/Const.js @@ -0,0 +1,30 @@ +/** + * 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 const SLOTID2 = 2; +export const CORRECT_PIN = '1234'; +export const CORRECT_PUK = '12345678'; +export const CORRECT_PIN2 = '12345678'; +export const INCORRECT_PIN2 = '4321'; +export const INCORRECT_PUK2_LEN8 = '12345678'; +export const ALTER_PIN = '1234'; +export const LOCK_STATE = { SUCCESS: 0, FAILURE: -1, EXCEPTION: -2 }; +export const CARD_NAME = '1234'; +export const CARD_NUMBER = '1234'; +export const MAIL_NAME_LEN12 = '123#@%_ABCDE'; +export const MAIL_NUMBER_LEN20 = '01234567890123456789'; +export const SIM_MIN_COUNT = 0; +export const STK_CMD = 'D30781020181900101'; +export const SIM_PN_PIN_PASSWORD = '1111'; \ No newline at end of file diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/resources/base/element/string.json b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..4a597eff5 --- /dev/null +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "Sim Test" + }, + { + "name": "mainability_description", + "value": "Sim Test - sim manager interface test" + } + ] +} \ No newline at end of file diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/resources/base/media/icon.png b/telephony/telephonyjstest/sim/sim_manager_function_test/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMm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p1_v{Jbb`7m}2PTyUdOmtJj~m z9bB=ecw4_^rw1IW=of+>nrW5=d3k`3qHCxsIN_F{T1A545};;+fsyC&qChi+YV zr~M63H8ZLCPYmsjY>ls9cL%I)F|JIW-#+48$+lD4k*(P*kDM%zx_fvu4u5ZYUnI}5 zdrycFq>xFU)&X3p@pP2u%$o}}YcRn(MhJ&B2o?KS@cIVz>Ye%o^xV?CB{_Qhu z;}_q1bvO^g{8<3!gYbo4Di{8qzV+(9 zdlmksohQmRTs@qB;(Wo?dER_ux6XQb@q$tQPW?CMu6GVQd;R=iR;-S{Kr%Zks7>b1 zNs{|-+jhObYE}NR&`TGGr^h^4bjh%c>R#@=8nM&Md>_a+zVulsl;){flFekV1t9ob z+SqfV_Pv3$2f)bQ8%Ul2>fdYR^1zs0BQF~olsOj5AodC&Q_7SMFzsz2 z9newxE&jodk~tNHwl%LBMMDbrk=(^b literal 0 HcmV?d00001 diff --git a/telephony/telephonyjstest/sms_mms/BUILD.gn b/telephony/telephonyjstest/sms_mms/BUILD.gn new file mode 100644 index 000000000..456564752 --- /dev/null +++ b/telephony/telephonyjstest/sms_mms/BUILD.gn @@ -0,0 +1,20 @@ +# 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") + +group("sms_mms") { + testonly = true + if (is_standard_system) { + deps = [ "sms_mms_error:SmsMmsErrorTest" ] + } +} diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/BUILD.gn b/telephony/telephonyjstest/sms_mms/sms_mms_error/BUILD.gn new file mode 100644 index 000000000..03ec5c041 --- /dev/null +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/BUILD.gn @@ -0,0 +1,31 @@ +# 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("SmsMmsErrorTest") { + hap_profile = "./entry/src/main/config.json" + deps = [ + ":hjs_demo_js_assets", + ":hjs_demo_resources", + ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "ActSmsMmsErrorTest" +} +ohos_js_assets("hjs_demo_js_assets") { + source_dir = "./entry/src/main/js/default" +} +ohos_resources("hjs_demo_resources") { + sources = [ "./entry/src/main/js/resources" ] + hap_profile = "./entry/src/main/config.json" +} diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/Test.json b/telephony/telephonyjstest/sms_mms/sms_mms_error/Test.json new file mode 100644 index 000000000..6b6f4c2cb --- /dev/null +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/Test.json @@ -0,0 +1,19 @@ +{ + "description": "Configuration for sms_mms demo Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "240000", + "package": "com.ohos.smsmms", + "shell-timeout": "240000", + "native-test-timeout":"240000" + }, + "kits": [ + { + "test-file-name": [ + "$module.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + } + ] +} diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/config.json b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/config.json new file mode 100644 index 000000000..049a30f90 --- /dev/null +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/config.json @@ -0,0 +1,61 @@ +{ + "app": { + "bundleName": "com.ohos.smsmms", + "vendor": "ohos", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 4, + "target": 5, + "releaseType": "Release" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.ohos.smsmms", + "name": ".MyApplication", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry" + }, + "abilities": [ + { + "visible": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "com.ohos.smsmms.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/app.js b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/app.js new file mode 100644 index 000000000..e423f4bce --- /dev/null +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/app.js @@ -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('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } +}; diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/i18n/en-US.json b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/i18n/en-US.json new file mode 100644 index 000000000..e63c70d97 --- /dev/null +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/i18n/en-US.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/i18n/zh-CN.json b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/i18n/zh-CN.json new file mode 100644 index 000000000..de6ee5748 --- /dev/null +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + } +} \ No newline at end of file diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/pages/index/index.css b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/pages/index/index.css new file mode 100644 index 000000000..6fda79275 --- /dev/null +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/pages/index/index.css @@ -0,0 +1,9 @@ +.container { + flex-direction: column; + justify-content: center; + align-items: center; +} + +.title { + font-size: 100px; +} diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/pages/index/index.hml b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/pages/index/index.hml new file mode 100644 index 000000000..f64b040a5 --- /dev/null +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + {{ $t('strings.hello') }} {{ title }} + +
diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/pages/index/index.js b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/pages/index/index.js new file mode 100644 index 000000000..f16c40ec1 --- /dev/null +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/default/pages/index/index.js @@ -0,0 +1,52 @@ +/* + * 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 app from '@system.app' +import device from '@system.device' +import router from '@system.router' +import { + Core, + ExpectExtend +} from 'deccjsunit/index' + +const injectRef = Object.getPrototypeOf(global) || global +injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') + +export default { + data: { + title: "" + }, + onInit() { + this.title = this.$t('strings.world'); + }, + onShow() { + console.info('onShow finish!') + const core = Core.getInstance() + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }) + core.addService('expect', expectExtend) + core.init() + + const configService = core.getDefaultService('config') + configService.timeout = 60000 + configService.setConfig(this) + + require('../../../test/List.test') + core.execute() + }, + onReady() {}, +} \ No newline at end of file diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/resources/base/element/string.json b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/resources/base/element/string.json new file mode 100644 index 000000000..2f9470d82 --- /dev/null +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "MyApplication" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/resources/base/media/icon.png b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/js/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl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IcntQBI2T#>2;tOxu{%D?kML476AErF(qN9hPva5Nkc@BF zC-tLF@3ZFb%Kpj)M<{)x*l|*Ia@ECeXo2E4h2f!aV=cHAhi_E_mfUth(sM4^hJq7B zQsGWqdZUm9S%F`$nQ*_#NcuD`&)Ek%_s{&^78{9Hm ztri&rYLOxgFdG>O@+XHy z9#;|&vBCPXH5Mon^I`jSuR$&~ZWtyB67ujzFSj!51>#C}C17~TffQ{c-!QFQkTQ%! zIR^b1`zHx|*1GU?tbBx23weFLz5H?y_Q%N&t$}k?w+``2A=aotj0;2v$~AL z{scF-cL{wsdrmPvf#a9OHyYLcwQD4Kcm)`LLwMh4WT~p29f7M!iafJSU`IV}QY5Wa z(n44-9oA}?J{a+ah*@31WTs#&J#o1`H98#6IQf;Wv0N_!);f&9g7o-k(lW5rWnDUR zQBFIRG+X=6NnsI@mxnwm;tf5;_Uxg?jZ8m-m0}&6+DA!qam(p$mN5R})yA_7m$q@| zFEd|dpS595rxQr-n#GjI5i-AhnUE>Cr;jpCqSrD~EwK_DqI^7%3#p5)%T_od!t3SOmH9MyXeeGO2(UQL;ax|x?Ncixmeo1=$ z{-);Au{*tfzOG?KQ~K|ak8-HQ?`Pekhe2WM(8s{xv-p>Zmu_6{G!-oE$7$mY`MOJorI=+mMx?H;`pr!;fVYz?5~yXBACruWB`Ph zZM}90_<^OBxIhyZ9BW$`>6JvO;%VFpqVr8|7t3~AmxYak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y { + 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_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; + } + 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 + * @tc.name Call interface CreateMessage, + * The incoming PDU is empty, the specification is 3GPP, + * shortMessage isn't empty + * @tc.desc Function test + */ + it('Telephony_SmsMms_createMessage_Async_0200', 0, async function (done) { + sms.createMessage(rawArrayNull, '3gpp', (err, shortMessage) => { + if (err) { + console.log('Telephony_SmsMms_createMessage_Async_0200 finish'); + done(); + return; + } + expect().assertFail(); + console.log('Telephony_SmsMms_createMessage_Async_0200 fail'); + done(); + }); + }); + + /* + * @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, + content: 'hello', + 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(); + console.log('Telephony_SmsMms_sendMessage_0200 finish'); + done(); + }, + deliveryCallback: () => {} + }); + }); + + /* + * @tc.number Telephony_SmsMms_createMessage_Promise_0200 + * @tc.name Call interface CreateMessage, + * The incoming PDU is empty, the specification is 3GPP, + * promise returns the result Don't empty + * @tc.desc Function test + */ + it('Telephony_SmsMms_createMessage_Promise_0200', 0, async function (done) { + try { + await sms.createMessage(rawArrayNull, '3gpp'); + 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_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 getSmsSegmentsInfoon 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 + * @tc.name Check whether the Ims SMS function is supported + * @tc.desc Function test + */ + it('Telephony_SmsMms_hasSmsCapability_0100', 0, async function (done) { + let result = sms.hasSmsCapability(); + console.log('Telephony_SmsMms_hasSmsCapability_0100 result : ' + result); + expect(result === false || result === true).assertTrue(); + 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 === '3gpp' || result === '3gpp2').assertTrue(); + 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 === '3gpp' || result === '3gpp2').assertTrue(); + 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 + * @tc.name Set the default card slot ID for sending SMS + * @tc.desc Function test + */ + it('Telephony_SmsMms_getDefaultSmsSlotId_Async_0100', 0, async function (done) { + sms.getDefaultSmsSlotId((geterr, getresult) => { + if (geterr) { + console.log('Telephony_SmsMms_getDefaultSmsSlotId_Async_0100 fail'); + done(); + return; + } + expect(getresult !== FALSE_SLOT_ID).assertTrue(); + console.log('Telephony_SmsMms_getDefaultSmsSlotId_Async_0100 finish'); + done(); + }); + }); + + /** + * @tc.number Telephony_SmsMms_getDefaultSmsSlotId_Promise_0100 + * @tc.name Set the default card slot ID for sending SMS + * @tc.desc Function test + */ + it('Telephony_SmsMms_getDefaultSmsSlotId_Promise_0100', 0, async function (done) { + try { + let promise = await sms.getDefaultSmsSlotId(); + expect(promise !== FALSE_SLOT_ID).assertTrue(); + console.log('Telephony_SmsMms_getDefaultSmsSlotId_Promise_0100 finish'); + done(); + } catch (err) { + console.log('Telephony_SmsMms_getDefaultSmsSlotId_Promise_0100 fail'); + done(); + } + }); + +}); \ No newline at end of file diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/resources/base/element/string.json b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..a9c511780 --- /dev/null +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "sms_mms" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/resources/base/media/icon.png b/telephony/telephonyjstest/sms_mms/sms_mms_error/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v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bvO^g{8<3!gYbo4Di{8qzV+(9 zdlmksohQmRTs@qB;(Wo?dER_ux6XQb@q$tQPW?CMu6GVQd;R=iR;-S{Kr%Zks7>b1 zNs{|-+jhObYE}NR&`TGGr^h^4bjh%c>R#@=8nM&Md>_a+zVulsl;){flFekV1t9ob z+SqfV_Pv3$2f)bQ8%Ul2>fdYR^1zs0BQF~olsOj5AodC&Q_7SMFzsz2 z9newxE&jodk~tNHwl%LBMMDbrk=(^b literal 0 HcmV?d00001 diff --git a/test_packages.gni b/test_packages.gni index ad39723c1..9cb2dac47 100755 --- a/test_packages.gni +++ b/test_packages.gni @@ -36,6 +36,7 @@ _all_test_packages = [ "${ACTS_ROOT}/multimodalinput:multimodalinput", "${ACTS_ROOT}/resourceschedule:resourceschedule", "${ACTS_ROOT}/dsoftbus:dsoftbus", + "${ACTS_ROOT}/telephony:telephony", ] _all_test_packages_ivi = [ -- GitLab