diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/Test.json b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/Test.json index b6f4493338f3c4ad99b03002a32fce1eff818206..eeb54779d526a367bd7881ede086484156d629e2 100644 --- a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/Test.json +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/Test.json @@ -15,6 +15,15 @@ ], "type": "AppInstallKit", "cleanup-apps": true + }, + { + "type": "ShellKit", + "run-command": [ + "power-shell wakeup", + "power-shell setmode 602", + "uinput -T -m 200 1000 200 200 200", + "param set persist.ace.testmode.enabled 1" + ] } ] } diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/signature/openharmony_sx.p7b b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..4169f099138777295cd378d316440c00e510f82d 100644 Binary files a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/config.json b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/config.json index ffe06738b87a5f5acebfd2fd3658541bd8ce0880..8a56d8878b92c420f3654643dd41aacbf0d1ad4b 100644 --- a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/config.json +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/config.json @@ -19,8 +19,8 @@ "mainAbility": ".MainAbility", "srcPath":"", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "distro": { @@ -67,53 +67,13 @@ } ], "reqPermissions": [ - { - "name": "ohos.permission.LOCATION", - "reason": "need use ohos.permission.LOCATION" - }, - { - "name":"ohos.permission.SET_TELEPHONY_STATE", - "reason":"need use ohos.permission.SET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.GET_TELEPHONY_STATE", - "reason":"need use ohos.permission.GET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.PLACE_CALL", - "reason":"need use ohos.permission.PLACE_CALL" - }, - { - "name":"ohos.permission.READ_CONTACTS", - "reason":"need use ohos.permission.READ_CONTACTS" - }, { "name":"ohos.permission.WRITE_CONTACTS", "reason":"need use ohos.permission.WRITE_CONTACTS" - }, - { - "name":"ohos.permission.SEND_MESSAGES", - "reason":"need use ohos.permission.SEND_MESSAGES" - }, - { - "name":"ohos.permission.RECEIVE_SMS", - "reason":"need use ohos.permission.RECEIVE_SMS" - }, - { - "name":"ohos.permission.READ_CALL_LOG", - "reason":"need use ohos.permission.READ_CALL_LOG" - }, - { - "name":"ohos.permission.GET_NETWORK_INFO", - "reason":"need use ohos.permission.GET_NETWORK_INFO" - }, - { - "name":"ohos.permission.INTERNET", - "reason":"need use ohos.permission.INTERNET" }, { - "name":"ohos.permission.GRANT_SENSITIVE_PERMISSIONS", - "reason":"need use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" + "name":"ohos.permission.READ_CONTACTS", + "reason":"need use ohos.permission.READ_CONTACTS" } ], "js": [ diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/CallManageAll.test.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/CallManageAll.test.js index 8397dc53280678ef3ff5999db4fe45092b557ca4..16bc746653f996212fa6a75aa8f0b2117952c86b 100644 --- a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/CallManageAll.test.js +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/CallManageAll.test.js @@ -19,74 +19,27 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from import { AUTO_ACCEPT_NUMBER, - AUTO_ACCEPT_NUMBER2, - PHONE_NUMBER_LENGTH_11, CALL_STATUS_DIALING, - CALL_ID_NOT_EXIST, CALL_STATE_UNKNOWN, CALL_STATE_IDLE, DEFAULT_SLOT_ID, - CALL_MODE_IMS, - SLOT_ID_INVALID, - PHONE_LIST2, - RTT_MSG, - CALL_MODE_SEND_RECEIVE, - POS_700, - POS_10, - POS_LENGTH_300, - POS_LENGTH_600, - DEVICE_EARPIECE, - BOUNDARY_NUMBER_INT, - SENT_STRING_C, - MINUS_VALUE, - PHONE_NUMBER_LONG, - NULL_PHONE_NUMBER, - DIAL_CARRIER_TYPE, - DIAL_SCENCE_CALL_PRIVILEGED, MEDIA_TYPE_VOICE, - ROTATION_MINUS_1, - IMAGE_LOCAL_ERROR_PATH, - POS_Z_ERROR, - RESTRICTION_TYPE_ROAMING_INCOMING, - RESTRICTION_MODE_ACTIVATION, - RIGHT_PASSWORD, - RESTRICTION_TYPE_ALL_INCOMING, - TRANSFER_TYPE_NOT_REACHABLE, - TRANSFER_TYPE_UNCONDITIONAL, - PHONE_NUMBER_AREA_LAND, - CALL_TRANSFER_DISABLE, - TRANSFER_TYPE_NO_REPLY, - COMMAND_CALL_ERROR4, - COMMAND_CALL_ERROR, - CARMER_ID_NOT_EXIT, - ZOOM_RATIO_MINUS_1_0, - DIAL_SCENCE_CALL_NORMAL, DIAL_TYPE_OTT, - EVENT_OTT_FUNCTION_UNSUPPORTED, TEL_CONFERENCE_IDLE } from './lib/Const.js'; import {toString} from './lib/ApiToPromise.js'; import { - scenceInCalling, - hangupCall2, hangupCall, - callDetailsChangeOn, callId as gloabCallId, - reachState, - callDetailsChangeOff, - reachCallEventState + callDetailsChangeOff } from './lib/ScenceInCalling.js'; -const GETMAIN_CALLID_ERRO = -1; -const REJECT_MESSAGE_STR = 'Hi,hello?'; -const REJECT_MESSAGE_NUM = 1234567890123456789012345678901234567890; -const ERR_SLOT_ID = -1; -const SLOTID = 0; -const THE_THREE_NUMBER = '112'; -const DIAL_TYPE_ERR_CALL = 3; -const TIME_OUT = 20000; -const WAITING_TIME = 200; +const ERR_SLOT_ID = -1; +var callState = -1; +var timing = 0; +var endTime = 0; let callId = null; + class RejectMessageOptions { constructor (str) { this.messageContent = str; @@ -126,9 +79,7 @@ const sleep = (time) => { }); }; -var callState = -1; -var timing = 0; -var endTime = 0; + export default function CallManageImsCall() { describe('CallManageImsCall', function () { diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/List.test.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/List.test.js index aff42319687dd8e211891e74de7a598d0139fd12..fb2f3e2737cbb52dff1a855b437bf83be6149573 100644 --- a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/List.test.js +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/List.test.js @@ -16,6 +16,6 @@ import CallManageImsCall from './CallManageAll.test.js' import ObjectInterfaceTest from './ObjectInterface_test.js' export default function testsuite() { - CallManageImsCall() - ObjectInterfaceTest() + ObjectInterfaceTest(); + CallManageImsCall(); } diff --git a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/ObjectInterface_test.js b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/ObjectInterface_test.js index d472204abf31d088c6cee448057f080c8a0abc22..37a3794901d1fc9392bbc0dfc76c02073e98f0fd 100644 --- a/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/ObjectInterface_test.js +++ b/telephony/telephonyjstest/call_manager/call_manager_ims2_call/src/main/js/test/ObjectInterface_test.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2022 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 @@ -15,25 +15,46 @@ import contactsapi from "@ohos.contact"; import sms from '@ohos.telephony.sms'; -import bundle from '@ohos.bundle' -import abilityAccessCtrl from '@ohos.abilityAccessCtrl' -import account from '@ohos.account.osAccount'; -import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it } from '@ohos/hypium' +import featureAbility from "@ohos.ability.featureAbility"; +import {afterAll, afterEach, beforeAll, describe, expect, it} from '@ohos/hypium'; +import {UiComponent,UiDriver,Component,Driver,UiWindow,ON,BY} from '@ohos.uitest' export default function ObjectInterfaceTest() { describe('ObjectInterfaceTest', function () { - + function sleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); - if (now.getTime() > exitTime) + if (now.getTime() > exitTime); return; } } + async function driveFn() { + console.info("come in driveFn"); + let driver = await UiDriver.create(); + console.info("driver is " + JSON.stringify(driver)); + sleep(2000); + let button = await driver.findComponent(BY.text('允许')); + console.info("button is " + JSON.stringify(button)); + await button.click(); + sleep(5000); + } + + beforeAll(async function () { + var permissions = ["ohos.permission.WRITE_CONTACTS","ohos.permission.READ_CONTACTS"]; + featureAbility.getContext().requestPermissionsFromUser(permissions, 0, () => { + console.info("start requestPermissionsFromUser"); + }); + for(let i=0; i<2; i++){ + await driveFn(); + console.log("get user_grant permission"); + } + }); + var contactData = { id: 0, key: "0", @@ -323,11 +344,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_insert_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } try { var rawContactId = await contactsapi.addContact(contactData); console.info("contactsApi_insert_test_100 : rawContactId = " + rawContactId); @@ -338,7 +354,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_insert_test_100 : raw_contact insert error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -347,11 +363,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_delete_test_200", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var deleteId = gRawContactId; try { var deleteCode = await contactsapi.deleteContact(deleteId); @@ -363,7 +374,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_delete_test_200 : delete error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -372,11 +383,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_update_test_300", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var rawContactId = await contactsapi.addContact(contactData); console.info("contactsApi_insert_test_300 : rawContactId = " + rawContactId); gRawContactId = rawContactId; @@ -399,7 +405,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_update_test_300 : update error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -408,22 +414,21 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_contact_test_400", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } - var queryId = gRawContactId; + var queryId = await contactsapi.addContact(contactData); + console.info("contactsApi_query_contact_test_400 : queryId = " + queryId); + expect(queryId > 0).assertTrue(); + try { var resultSet = await contactsapi.queryContact(queryId); console.info("contactsApi_query_contact_test_400 : query resultSet = " + JSON.stringify(resultSet)); - expect(resultSet == undefined).assertTrue(); + expect(resultSet != null).assertTrue(); done(); } catch (error) { console.info("contactsApi_query_contact_test_400 query error = " + error); + expect().assertFalse(); done(); } - sleep(500) + sleep(500); }); /** @@ -432,11 +437,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_contact_test_500", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var queryId = gRawContactId; var holder = { bundleName: "com.ohos.contacts", displayName: "phone", holderId: 1 @@ -454,7 +454,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_contact_test_500 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -463,11 +463,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_contact_test_600", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var queryId = gRawContactId; var holder = { bundleName: "com.ohos.contacts", displayName: "phone", holderId: 1 @@ -485,7 +480,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_contact_test_600 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -494,11 +489,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_contacts_test_700", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } try { var resultSet = await contactsapi.queryContacts(); console.info("contactsApi_query_contacts_test_700 : query resultSet = " + JSON.stringify(resultSet)); @@ -508,7 +498,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_contacts_test_700 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -517,11 +507,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_contacts_test_800", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var holder = { bundleName: "com.ohos.contacts", displayName: "phone", holderId: 1 } @@ -534,7 +519,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_contacts_test_800 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -543,11 +528,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_contacts_test_900", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var ContactAttributes = { attributes: [1, 5, 6] } @@ -560,7 +540,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_contacts_test_900 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -569,11 +549,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_contacts_test_1000", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var holder = { bundleName: "com.ohos.contacts", displayName: "phone", holderId: 1 }; @@ -589,7 +564,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_contacts_test_1000 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -598,11 +573,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_email_test_1100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var email = "email"; var holder = { bundleName: "com.ohos.contacts", displayName: "phone", holderId: 1 @@ -616,7 +586,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_email_test_1100 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -625,11 +595,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_email_test_1200", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var email = "email"; try { var resultSet = await contactsapi.queryContactsByEmail(email); @@ -640,7 +605,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_email_test_1200 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -649,11 +614,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_email_test_1300", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var email = "email"; var holder = { bundleName: "com.ohos.contacts", displayName: "phone", holderId: 1 @@ -670,7 +630,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_email_test_1300 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -679,11 +639,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_email_test_1400", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var email = "email"; var ContactAttributes = { attributes: [1, 5, 6] @@ -697,7 +652,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_email_test_1400 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -706,11 +661,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_phoneNumber_test_1500", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var phoneNumber = "183"; var holder = { bundleName: "com.ohos.contacts", displayName: "phone", holderId: 1 @@ -724,7 +674,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_phoneNumber_test_1500 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -733,11 +683,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_phoneNumber_test_1600", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var phoneNumber = "183"; var holder = { bundleName: "com.ohos.contacts", displayName: "phone", holderId: 1 @@ -754,7 +699,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_phoneNumber_test_1600 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -763,11 +708,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_phoneNumber_test_1700", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var phoneNumber = "183"; try { var resultSet = await contactsapi.queryContactsByPhoneNumber(phoneNumber); @@ -778,7 +718,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_phoneNumber_test_1700 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -787,11 +727,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_phoneNumber_test_1800", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var phoneNumber = "183"; var ContactAttributes = { attributes: [1, 5, 6] @@ -805,7 +740,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_phoneNumber_test_1800 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -814,11 +749,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_group_test_1900", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } try { var resultSet = await contactsapi.queryGroups(); console.info("contactsApi_query_group_test_1900 : query resultSet = " + JSON.stringify(resultSet)); @@ -828,7 +758,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_group_test_1900 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -837,11 +767,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_group_test_2000", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var holder = { bundleName: "com.ohos.contacts", displayName: "phone", holderId: 1 } @@ -854,7 +779,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_group_test_2000 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -863,11 +788,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_holders_test_2200", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } try { var resultSet = await contactsapi.queryHolders(); console.info("contactsApi_query_holders_test_2200 : query resultSet = " + JSON.stringify(resultSet)); @@ -877,7 +797,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_holders_test_2200 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -886,11 +806,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_key_test_2300", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var idtest = gRawContactId; var holder = { bundleName: "com.ohos.contacts", displayName: "phone", holderId: 1 @@ -904,7 +819,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_key_test_2300 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -913,11 +828,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_key_test_2400", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var idtest = gRawContactId; console.info("contactsApi_query_key_test_2400 : query gRawContactId = " + idtest); try { @@ -929,7 +839,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_key_test_2400 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -938,11 +848,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_query_mycard_test_2500", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var holder = { bundleName: "com.ohos.contacts", displayName: "phone", holderId: 1 } @@ -955,7 +860,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_mycard_test_2500 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -964,11 +869,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_isMyCard_test_2600", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var id = 1; try { var isExist = await contactsapi.isMyCard(id); @@ -979,7 +879,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_isMyCard_test_2600 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -988,11 +888,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("contactsApi_isLocalContact_test_2700", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var id = gRawContactId; try { var isExist = await contactsapi.isLocalContact(id); @@ -1003,7 +898,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_isLocalContact_test_2700 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -1012,11 +907,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("abnormal_contactsApi_insert_test_2800", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var contactDataError = {}; try { var rawContactId = await contactsapi.addContact(contactDataError); @@ -1027,7 +917,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_insert_test_100 : raw_contact insert error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -1036,11 +926,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("abnormal_contactsApi_update_test_3000", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var rawContactId = -1; var updateValues = { id: rawContactId, name: { @@ -1053,13 +938,13 @@ export default function ObjectInterfaceTest() { try { var updateCode = await contactsapi.updateContact(updateValues, condition); console.info("abnormal_contactsApi_update_test_3000 : updateCode = " + updateCode); - expect(updateCode === -1).assertTrue(); + expect(updateCode === 0).assertTrue(); done(); } catch (error) { console.info("abnormal_contactsApi_update_test_3000 : update error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -1068,11 +953,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("abnormal_contactsApi_query_contact_test_3100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var queryId = "-1"; try { var resultSet = await contactsapi.queryContact(queryId); @@ -1089,7 +969,7 @@ export default function ObjectInterfaceTest() { console.info("abnormal_contactsApi_query_contact_test_3100 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -1098,11 +978,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("abnormal_contactsApi_query_contacts_test_3200", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var ContactAttributes = { attributes: [100] } @@ -1122,7 +997,7 @@ export default function ObjectInterfaceTest() { console.info("abnormal_contactsApi_query_contacts_test_3200 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -1131,11 +1006,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("abnormal_contactsApi_query_email_test_3300", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var email = "email2222"; try { var resultSet = await contactsapi.queryContactsByEmail(email); @@ -1146,7 +1016,7 @@ export default function ObjectInterfaceTest() { console.info("abnormal_contactsApi_query_email_test_3300 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -1155,11 +1025,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("abnormal_contactsApi_query_phoneNumber_test_3400", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var phoneNumber = "19999999"; try { var resultSet = await contactsapi.queryContactsByPhoneNumber(phoneNumber); @@ -1171,7 +1036,7 @@ export default function ObjectInterfaceTest() { console.info("abnormal_contactsApi_query_phoneNumber_test_3400 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -1180,11 +1045,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("abnormal_contactsApi_query_group_test_3500", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var holder = { bundleName: "com.ohos.contacts2", displayName: "phone2", holderId: 2 } @@ -1197,7 +1057,7 @@ export default function ObjectInterfaceTest() { console.info("contactsApi_query_group_test_2000 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -1206,11 +1066,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("abnormal_contactsApi_query_key_test_3600", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var idtest = -1; try { var resultSet = await contactsapi.queryKey(idtest); @@ -1221,7 +1076,7 @@ export default function ObjectInterfaceTest() { console.info("abnormal_contactsApi_query_key_test_3600 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -1230,11 +1085,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("abnormal_contactsApi_query_mycard_test_3700", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var ContactAttributes = { attributes: [100] }; @@ -1248,7 +1098,7 @@ export default function ObjectInterfaceTest() { console.info("abnormal_contactsApi_query_mycard_test_3700 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -1257,11 +1107,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("abnormal_contactsApi_isMyCard_test_3800", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var id = 999; try { var isExist = await contactsapi.isMyCard(id); @@ -1272,7 +1117,7 @@ export default function ObjectInterfaceTest() { console.info("abnormal_contactsApi_isMyCard_test_3800 query error = " + error); done(); } - sleep(500) + sleep(500); }); /** @@ -1281,11 +1126,6 @@ export default function ObjectInterfaceTest() { * @tc.desc Function test */ it("abnormal_contactsApi_isLocalContact_test_3900", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } var id = 999; try { var isExist = await contactsapi.isLocalContact(id); @@ -1296,15 +1136,10 @@ export default function ObjectInterfaceTest() { console.info("abnormal_contactsApi_isLocalContact_test_3900 query error = " + error); done(); } - sleep(500) + sleep(500); }); it("contactsApi_addContact_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.addContact(contactData, (err, data) => { if (err) { done(); @@ -1313,15 +1148,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) != -1).assertTrue(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_deleteContact_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.deleteContact('xxx', (err) => { if (err) { expect(JSON.stringify(err) == -1).assertTrue(); @@ -1332,16 +1162,11 @@ export default function ObjectInterfaceTest() { done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContact_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContact('xxx', (err, data) => { if (err) { expect(false).assertTrue(); @@ -1351,15 +1176,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) == undefined).assertTrue(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContact_test_200", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContact('xxx', { holderId: 0 }, (err, data) => { @@ -1371,15 +1191,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) == undefined).assertTrue(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContact_test_300", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContact('xxx', { attributes: ["ATTR_EMAIL", "ATTR_NAME"] }, (err, data) => { @@ -1391,15 +1206,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) == undefined).assertTrue(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContact_test_400", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContact('xxx', { holderId: 0 }, { @@ -1413,15 +1223,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) == undefined).assertTrue(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContact_test_500", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } let promise = contactsapi.queryContact('xxx', { holderId: 0 }, { @@ -1434,15 +1239,10 @@ export default function ObjectInterfaceTest() { expect(false).assertTrue(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContacts_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContacts((err, data) => { if (err) { expect(JSON.stringify(data) === null).assertFalse(); @@ -1452,15 +1252,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContacts_test_200", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContacts({ holderId: 0 }, (err, data) => { @@ -1472,15 +1267,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContacts_test_300", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContacts({ attributes: ["ATTR_EMAIL", "ATTR_NAME"] }, (err, data) => { @@ -1492,16 +1282,11 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContacts_test_400", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContacts({ holderId: 0 }, { @@ -1515,16 +1300,11 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContacts_test_500", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } let promise = contactsapi.queryContacts({ holderId: 0 }, { @@ -1537,15 +1317,10 @@ export default function ObjectInterfaceTest() { expect(false).assertTrue(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContactsByPhoneNumber_test_000", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContactsByPhoneNumber('138xxxxxxxx', (err, data) => { if (err) { expect(JSON.stringify(data) === null).assertFalse(); @@ -1555,15 +1330,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContactsByPhoneNumber_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContactsByPhoneNumber('138xxxxxxxx', { holderId: 0 }, (err, data) => { @@ -1575,15 +1345,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContactsByPhoneNumber_test_200", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContactsByPhoneNumber('138xxxxxxxx', { attributes: ["ATTR_EMAIL", "ATTR_NAME"] }, (err, data) => { @@ -1595,15 +1360,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContactsByPhoneNumber_test_300", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContactsByPhoneNumber('138xxxxxxxx', { holderId: 0 }, { @@ -1617,16 +1377,11 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContactsByEmail_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContactsByEmail('xxx@email.com', (err, data) => { if (err) { expect(JSON.stringify(data) === null).assertFalse(); @@ -1636,15 +1391,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContactsByEmail_test_200", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContactsByEmail('xxx@email.com', { holderId: 0 }, (err, data) => { @@ -1656,16 +1406,11 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContactsByEmail_test_300", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContactsByEmail('xxx@email.com', { attributes: ["ATTR_EMAIL", "ATTR_NAME"] }, (err, data) => { @@ -1677,16 +1422,11 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryContactsByEmail_test_400", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryContactsByEmail('xxx@email.com', { holderId: 0 }, { @@ -1700,15 +1440,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryGroups_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryGroups((err, data) => { if (err) { expect(JSON.stringify(data) === null).assertFalse(); @@ -1718,15 +1453,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryGroups_test_200", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryGroups({ holderId: 0 }, (err, data) => { @@ -1738,16 +1468,11 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryHolders_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryHolders((err, data) => { if (err) { expect(JSON.stringify(data) === null).assertFalse(); @@ -1757,15 +1482,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryKey_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryKey( /*id*/ 1, (err, data) => { if (err) { @@ -1776,15 +1496,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryKey_test_200", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryKey( /*id*/ 1, { holderId: 1 @@ -1797,16 +1512,11 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryMyCard_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryMyCard((err, data) => { if (err) { expect(JSON.stringify(data) === null).assertFalse(); @@ -1816,16 +1526,11 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_queryMyCard_test_200", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.queryMyCard({ attributes: ['ATTR_EMAIL', 'ATTR_NAME'] }, (err, data) => { @@ -1837,15 +1542,10 @@ export default function ObjectInterfaceTest() { expect(JSON.stringify(data) === null).assertFalse(); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_updateContact_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.updateContact({ name: { fullName: 'xxx' @@ -1862,15 +1562,10 @@ export default function ObjectInterfaceTest() { console.info('updateContact success'); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_updateContact_test_200", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.updateContact({ fullName: { fullName: 'xxx' @@ -1889,15 +1584,10 @@ export default function ObjectInterfaceTest() { console.info('updateContact success'); done(); }); - sleep(500) + sleep(500); }); it("contactsApi_isLocalContact_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.isLocalContact( /*id*/ 1, (err, data) => { if (err) { @@ -1907,15 +1597,10 @@ export default function ObjectInterfaceTest() { } done(); }); - sleep(500) + sleep(500); }); it("contactsApi_isMyCard_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.isMyCard( /*id*/ 1, (err, data) => { if (err) { @@ -1925,15 +1610,10 @@ export default function ObjectInterfaceTest() { } done(); }); - sleep(500) + sleep(500); }); it("contactsApi_sendMessage_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } let sendCallback = function (err, data) { expect(JSON.stringify(data) === null).assertFalse(); done(); @@ -1958,65 +1638,26 @@ export default function ObjectInterfaceTest() { }; sms.sendMessage(options); done(); - sleep(500) + sleep(500); }); it("contactsApi_selectContact_test_100", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } contactsapi.selectContact((err, data) => { expect(JSON.stringify(data) === null).assertFalse(); done(); - sleep(500) + sleep(500); }); }); it("contactsApi_selectContact_test_200", 0, async function (done) { - checkContactPermission(); - if (!contactPermission) { - done(); - return; - } let promise = contactsapi.selectContact(); promise.then((data) => { expect(JSON.stringify(data) === null).assertFalse(); done(); - sleep(500) + sleep(500); }).catch((err) => { done(); }); }); - - let contactPermission; - let userId; - async function getUserId() { - await account.getAccountManager().getOsAccountLocalIdFromProcess().then(account => { - console.info("getOsAccountLocalIdFromProcess userid ==========" + account); - userId = account; - }).catch(err => { - console.info("getOsAccountLocalIdFromProcess err ==========" + JSON.stringify(err)); - }) - } - - async function checkContactPermission() { - await getUserId(); - let appInfo = await bundle.getApplicationInfo('com.ohos.actscallmanagerims2calltest', 0, userId); - console.info("getOsAccountLocalIdFromProcess appInfo ==========" + JSON.stringify(appInfo) + "userId:" + userId); - let tokenID = appInfo.accessTokenId; - let atManager = abilityAccessCtrl.createAtManager(); - let result1 = await atManager.grantUserGrantedPermission(tokenID, "ohos.permission.READ_CONTACTS", 1); - let result2 = await atManager.grantUserGrantedPermission(tokenID, "ohos.permission.WRITE_CONTACTS", 1); - console.info("checkContactPermission Log: Perm1:" + result1); - console.info("checkContactPermission Log: Perm2:" + result2); - if (result1 == -1 || result2 == -1) { - contactPermission = false; - done(); - } - contactPermission = true; - done(); - } }); } \ No newline at end of file diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/signature/openharmony_sx.p7b b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..3c137221b8a1a8f0851b2bb8fc32b9fcbfb3a65e 100644 Binary files a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/src/main/config.json b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/src/main/config.json index c53763734ec878f982201e12665f973b907935f2..051c93804cf7995f5513c9aecf44b0d25f72cc52 100644 --- a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/src/main/config.json +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/src/main/config.json @@ -19,8 +19,8 @@ "mainAbility": ".MainAbility", "srcPath":"", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "distro": { @@ -67,47 +67,11 @@ } ], "reqPermissions": [ - { - "name": "ohos.permission.LOCATION", - "reason": "need use ohos.permission.LOCATION" - }, - { - "name":"ohos.permission.SET_TELEPHONY_STATE", - "reason":"need use ohos.permission.SET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.GET_TELEPHONY_STATE", - "reason":"need use ohos.permission.GET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.PLACE_CALL", - "reason":"need use ohos.permission.PLACE_CALL" - }, - { - "name":"ohos.permission.READ_CONTACTS", - "reason":"need use ohos.permission.READ_CONTACTS" - }, - { - "name":"ohos.permission.WRITE_CONTACTS", - "reason":"need use ohos.permission.WRITE_CONTACTS" - }, - { - "name":"ohos.permission.SEND_MESSAGES", - "reason":"need use ohos.permission.SEND_MESSAGES" - }, - { - "name":"ohos.permission.RECEIVE_SMS", - "reason":"need use ohos.permission.RECEIVE_SMS" - }, - { - "name":"ohos.permission.READ_CALL_LOG", - "reason":"need use ohos.permission.READ_CALL_LOG" - }, - { + { "name":"ohos.permission.GET_NETWORK_INFO", "reason":"need use ohos.permission.GET_NETWORK_INFO" }, - { + { "name":"ohos.permission.INTERNET", "reason":"need use ohos.permission.INTERNET" } diff --git a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/src/main/js/test/CellularDataAbnorma.test.js b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/src/main/js/test/CellularDataAbnorma.test.js index a4d56caa43a715b9ea6322ff5b5a8faf0beb66f2..eb4ac0fb2996c3996f6dfd87860121177ba95782 100644 --- a/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/src/main/js/test/CellularDataAbnorma.test.js +++ b/telephony/telephonyjstest/cellular_data/cellular_data_abnormal/src/main/js/test/CellularDataAbnorma.test.js @@ -209,7 +209,5 @@ describe("ActsCellularDataAbnormalTest", function () { expect(data == 0 || data == 1).assertTrue; done(); }); - - -}) +}); } diff --git a/telephony/telephonyjstest/netmanager_base/dns/signature/openharmony_sx.p7b b/telephony/telephonyjstest/netmanager_base/dns/signature/openharmony_sx.p7b index 36610716a064376bedf0d6d75ab4dc88519db020..25055f073e326161693f530f12d503f5a8dad571 100644 Binary files a/telephony/telephonyjstest/netmanager_base/dns/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/netmanager_base/dns/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/netmanager_base/dns/src/main/config.json b/telephony/telephonyjstest/netmanager_base/dns/src/main/config.json index baaa6238178d215be8d861668bf0ade19ad9d6d9..722ebeb672eb1a4f2339abed8c8e841f0ff868de 100644 --- a/telephony/telephonyjstest/netmanager_base/dns/src/main/config.json +++ b/telephony/telephonyjstest/netmanager_base/dns/src/main/config.json @@ -19,8 +19,8 @@ "mainAbility": ".MainAbility", "srcPath":"", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "distro": { diff --git a/telephony/telephonyjstest/netmanager_base/jshttp/Test.json b/telephony/telephonyjstest/netmanager_base/jshttp/Test.json index 91ac4f8c2ac6cd5e3ed20d0d24e0fcfc5d71338e..1373c493264e35206ef0c9802bb85520aae45eac 100644 --- a/telephony/telephonyjstest/netmanager_base/jshttp/Test.json +++ b/telephony/telephonyjstest/netmanager_base/jshttp/Test.json @@ -6,7 +6,7 @@ "bundle-name": "com.ohos.jshttp", "package-name": "com.ohos.jshttp", "shell-timeout": "900000", - "testcase-timeout":"100000" + "testcase-timeout":"200000" }, "kits": [ { diff --git a/telephony/telephonyjstest/netmanager_base/jshttp/signature/openharmony_sx.p7b b/telephony/telephonyjstest/netmanager_base/jshttp/signature/openharmony_sx.p7b index 36610716a064376bedf0d6d75ab4dc88519db020..9a097376de4168fc5e5d9072dc0c0af3a293ddac 100644 Binary files a/telephony/telephonyjstest/netmanager_base/jshttp/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/netmanager_base/jshttp/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/netmanager_base/jshttp/src/main/js/test/List.test.js b/telephony/telephonyjstest/netmanager_base/jshttp/src/main/js/test/List.test.js index d06dbcc2e2707e49eb36f018a17ed3567d0a38bd..d33eac10165a33240350a98e88f45fc27a011727 100644 --- a/telephony/telephonyjstest/netmanager_base/jshttp/src/main/js/test/List.test.js +++ b/telephony/telephonyjstest/netmanager_base/jshttp/src/main/js/test/List.test.js @@ -12,12 +12,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - import Telephony_NETSTACK_HTTPTest from './NetworkManagerHttp.test.js' - import Http2Test from './Http2Test.js' - import HttpCacheTest from './HttpCacheTest.js' + import Telephony_NETSTACK_HTTPTest from './NetworkManagerHttp.test.js'; + import Http2Test from './Http2Test.js'; + import HttpCacheTest from './HttpCacheTest.js'; export default function testsuite() { - Telephony_NETSTACK_HTTPTest() - Http2Test() - HttpCacheTest() + HttpCacheTest(); + Telephony_NETSTACK_HTTPTest(); + Http2Test(); } diff --git a/telephony/telephonyjstest/netmanager_base/network_nopermission/signature/openharmony_sx.p7b b/telephony/telephonyjstest/netmanager_base/network_nopermission/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..e42582eae47365ac1132ced053c0e039d6279cef 100644 Binary files a/telephony/telephonyjstest/netmanager_base/network_nopermission/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/netmanager_base/network_nopermission/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/netmanager_base/network_nopermission/src/main/config.json b/telephony/telephonyjstest/netmanager_base/network_nopermission/src/main/config.json index 93cc23855b551d46c990418eb83495e56a73307d..bc19f328cdf7e304b5d303064dec947068c37c16 100644 --- a/telephony/telephonyjstest/netmanager_base/network_nopermission/src/main/config.json +++ b/telephony/telephonyjstest/netmanager_base/network_nopermission/src/main/config.json @@ -16,8 +16,8 @@ "module": { "mainAbility": ".MainAbility", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "abilities": [ diff --git a/telephony/telephonyjstest/netmanager_base/network_nowifi/signature/openharmony_sx.p7b b/telephony/telephonyjstest/netmanager_base/network_nowifi/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c0c32c8f3ed1f83e8bb5752d8bef893a1f3b5880 100644 Binary files a/telephony/telephonyjstest/netmanager_base/network_nowifi/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/netmanager_base/network_nowifi/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/netmanager_base/network_nowifi/src/main/config.json b/telephony/telephonyjstest/netmanager_base/network_nowifi/src/main/config.json index c43ace5ece1a98b7f16fa982974ad5b92e0f31de..b4b7acec7ee4bdfa7a375cfeef520a50e4d9cc37 100644 --- a/telephony/telephonyjstest/netmanager_base/network_nowifi/src/main/config.json +++ b/telephony/telephonyjstest/netmanager_base/network_nowifi/src/main/config.json @@ -16,8 +16,8 @@ "module": { "mainAbility": ".MainAbility", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "abilities": [ diff --git a/telephony/telephonyjstest/netmanager_base/network_wifi/signature/openharmony_sx.p7b b/telephony/telephonyjstest/netmanager_base/network_wifi/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..5b2497342e5db76d5973680592c17eab84fe6053 100644 Binary files a/telephony/telephonyjstest/netmanager_base/network_wifi/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/netmanager_base/network_wifi/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/netmanager_base/network_wifi/src/main/config.json b/telephony/telephonyjstest/netmanager_base/network_wifi/src/main/config.json index 1be40e45103a00b322f644bb37d08b101b3a911a..2b5f1d95bb30271da23a59c103ffd95f2dc31eeb 100644 --- a/telephony/telephonyjstest/netmanager_base/network_wifi/src/main/config.json +++ b/telephony/telephonyjstest/netmanager_base/network_wifi/src/main/config.json @@ -16,8 +16,8 @@ "module": { "mainAbility": ".MainAbility", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "abilities": [ diff --git a/telephony/telephonyjstest/netmanager_base/register/signature/openharmony_sx.p7b b/telephony/telephonyjstest/netmanager_base/register/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..d78821b10897bc9efb334ad1dc6ff7050c5df7c8 100644 Binary files a/telephony/telephonyjstest/netmanager_base/register/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/netmanager_base/register/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/netmanager_base/register/src/main/config.json b/telephony/telephonyjstest/netmanager_base/register/src/main/config.json index be27d56eab39b4bff1890ac3d5f09d583d7a4c09..4f513551258c45a4e656bdc9b27cdfa989b8e187 100644 --- a/telephony/telephonyjstest/netmanager_base/register/src/main/config.json +++ b/telephony/telephonyjstest/netmanager_base/register/src/main/config.json @@ -19,8 +19,8 @@ "mainAbility": ".MainAbility", "srcPath":"", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "distro": { @@ -66,48 +66,12 @@ "launchType": "standard" } ], - "reqPermissions": [ - { - "name": "ohos.permission.LOCATION", - "reason": "need use ohos.permission.LOCATION" - }, - { - "name":"ohos.permission.SET_TELEPHONY_STATE", - "reason":"need use ohos.permission.SET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.GET_TELEPHONY_STATE", - "reason":"need use ohos.permission.GET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.PLACE_CALL", - "reason":"need use ohos.permission.PLACE_CALL" - }, - { - "name":"ohos.permission.READ_CONTACTS", - "reason":"need use ohos.permission.READ_CONTACTS" - }, - { - "name":"ohos.permission.WRITE_CONTACTS", - "reason":"need use ohos.permission.WRITE_CONTACTS" - }, - { - "name":"ohos.permission.SEND_MESSAGES", - "reason":"need use ohos.permission.SEND_MESSAGES" - }, - { - "name":"ohos.permission.RECEIVE_SMS", - "reason":"need use ohos.permission.RECEIVE_SMS" - }, - { - "name":"ohos.permission.READ_CALL_LOG", - "reason":"need use ohos.permission.READ_CALL_LOG" - }, - { + "reqPermissions": [ + { "name":"ohos.permission.GET_NETWORK_INFO", "reason":"need use ohos.permission.GET_NETWORK_INFO" }, - { + { "name":"ohos.permission.INTERNET", "reason":"need use ohos.permission.INTERNET" } diff --git a/telephony/telephonyjstest/netmanager_base/socket/signature/openharmony_sx.p7b b/telephony/telephonyjstest/netmanager_base/socket/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..996fb4b65e81367a49b2f8d9d72aa72b292ea3a1 100644 Binary files a/telephony/telephonyjstest/netmanager_base/socket/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/netmanager_base/socket/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/netmanager_base/socket/src/main/config.json b/telephony/telephonyjstest/netmanager_base/socket/src/main/config.json index 8e4802e66622d92c7bdc7b5710d364503f1196af..69c7510a88a48c599e492ff340700abaa503ea17 100644 --- a/telephony/telephonyjstest/netmanager_base/socket/src/main/config.json +++ b/telephony/telephonyjstest/netmanager_base/socket/src/main/config.json @@ -19,8 +19,8 @@ "mainAbility": ".MainAbility", "srcPath":"", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "distro": { @@ -66,48 +66,12 @@ "launchType": "standard" } ], - "reqPermissions": [ - { - "name": "ohos.permission.LOCATION", - "reason": "need use ohos.permission.LOCATION" - }, - { - "name":"ohos.permission.SET_TELEPHONY_STATE", - "reason":"need use ohos.permission.SET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.GET_TELEPHONY_STATE", - "reason":"need use ohos.permission.GET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.PLACE_CALL", - "reason":"need use ohos.permission.PLACE_CALL" - }, - { - "name":"ohos.permission.READ_CONTACTS", - "reason":"need use ohos.permission.READ_CONTACTS" - }, - { - "name":"ohos.permission.WRITE_CONTACTS", - "reason":"need use ohos.permission.WRITE_CONTACTS" - }, - { - "name":"ohos.permission.SEND_MESSAGES", - "reason":"need use ohos.permission.SEND_MESSAGES" - }, - { - "name":"ohos.permission.RECEIVE_SMS", - "reason":"need use ohos.permission.RECEIVE_SMS" - }, - { - "name":"ohos.permission.READ_CALL_LOG", - "reason":"need use ohos.permission.READ_CALL_LOG" - }, - { + "reqPermissions": [ + { "name":"ohos.permission.GET_NETWORK_INFO", "reason":"need use ohos.permission.GET_NETWORK_INFO" }, - { + { "name":"ohos.permission.INTERNET", "reason":"need use ohos.permission.INTERNET" } diff --git a/telephony/telephonyjstest/netmanager_base/system_fetch/signature/openharmony_sx.p7b b/telephony/telephonyjstest/netmanager_base/system_fetch/signature/openharmony_sx.p7b index 36610716a064376bedf0d6d75ab4dc88519db020..227d24469b9d44ec789c080e5c0a28378ecf31f1 100644 Binary files a/telephony/telephonyjstest/netmanager_base/system_fetch/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/netmanager_base/system_fetch/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/netmanager_base/system_fetch/src/main/config.json b/telephony/telephonyjstest/netmanager_base/system_fetch/src/main/config.json index c6409ad21d0fcae8810b903b2ae410426e316b33..ba9e15aebb5e34ae1bbf14130888b8997c7003c1 100644 --- a/telephony/telephonyjstest/netmanager_base/system_fetch/src/main/config.json +++ b/telephony/telephonyjstest/netmanager_base/system_fetch/src/main/config.json @@ -18,8 +18,8 @@ "mainAbility": ".MainAbility", "srcPath":"", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone", "tablet" ], diff --git a/telephony/telephonyjstest/netmanager_http/entry/src/main/config.json b/telephony/telephonyjstest/netmanager_http/entry/src/main/config.json index aa1f5402d706fa6f4c453d04f3207abdd68687df..6d61b25138aab2f79f566a0ddd1c4bf3fb313466 100644 --- a/telephony/telephonyjstest/netmanager_http/entry/src/main/config.json +++ b/telephony/telephonyjstest/netmanager_http/entry/src/main/config.json @@ -19,8 +19,8 @@ "mainAbility": ".MainAbility", "srcPath": "", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "distro": { @@ -68,47 +68,11 @@ } ], "reqPermissions": [ - { - "name": "ohos.permission.LOCATION", - "reason": "need use ohos.permission.LOCATION" - }, - { - "name":"ohos.permission.SET_TELEPHONY_STATE", - "reason":"need use ohos.permission.SET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.GET_TELEPHONY_STATE", - "reason":"need use ohos.permission.GET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.PLACE_CALL", - "reason":"need use ohos.permission.PLACE_CALL" - }, - { - "name":"ohos.permission.READ_CONTACTS", - "reason":"need use ohos.permission.READ_CONTACTS" - }, - { - "name":"ohos.permission.WRITE_CONTACTS", - "reason":"need use ohos.permission.WRITE_CONTACTS" - }, - { - "name":"ohos.permission.SEND_MESSAGES", - "reason":"need use ohos.permission.SEND_MESSAGES" - }, - { - "name":"ohos.permission.RECEIVE_SMS", - "reason":"need use ohos.permission.RECEIVE_SMS" - }, - { - "name":"ohos.permission.READ_CALL_LOG", - "reason":"need use ohos.permission.READ_CALL_LOG" - }, - { + { "name":"ohos.permission.GET_NETWORK_INFO", "reason":"need use ohos.permission.GET_NETWORK_INFO" }, - { + { "name":"ohos.permission.INTERNET", "reason":"need use ohos.permission.INTERNET" } diff --git a/telephony/telephonyjstest/netmanager_http/signature/openharmony_sx.p7b b/telephony/telephonyjstest/netmanager_http/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..5773249ea7578d7950eb53d2665820ecfc017e4f 100644 Binary files a/telephony/telephonyjstest/netmanager_http/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/netmanager_http/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/netmanager_socket/entry/src/main/config.json b/telephony/telephonyjstest/netmanager_socket/entry/src/main/config.json index 1d9afdd6e638bf73bdba23ea7385c2057ec14227..e3ea955c08deb5dc039a6fcd842005efe03eb7f0 100644 --- a/telephony/telephonyjstest/netmanager_socket/entry/src/main/config.json +++ b/telephony/telephonyjstest/netmanager_socket/entry/src/main/config.json @@ -19,8 +19,8 @@ "mainAbility": ".MainAbility", "srcPath": "", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "distro": { @@ -72,43 +72,11 @@ "name": "ohos.permission.LOCATION", "reason": "need use ohos.permission.LOCATION" }, - { - "name":"ohos.permission.SET_TELEPHONY_STATE", - "reason":"need use ohos.permission.SET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.GET_TELEPHONY_STATE", - "reason":"need use ohos.permission.GET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.PLACE_CALL", - "reason":"need use ohos.permission.PLACE_CALL" - }, - { - "name":"ohos.permission.READ_CONTACTS", - "reason":"need use ohos.permission.READ_CONTACTS" - }, - { - "name":"ohos.permission.WRITE_CONTACTS", - "reason":"need use ohos.permission.WRITE_CONTACTS" - }, - { - "name":"ohos.permission.SEND_MESSAGES", - "reason":"need use ohos.permission.SEND_MESSAGES" - }, - { - "name":"ohos.permission.RECEIVE_SMS", - "reason":"need use ohos.permission.RECEIVE_SMS" - }, - { - "name":"ohos.permission.READ_CALL_LOG", - "reason":"need use ohos.permission.READ_CALL_LOG" - }, - { + { "name":"ohos.permission.GET_NETWORK_INFO", "reason":"need use ohos.permission.GET_NETWORK_INFO" }, - { + { "name":"ohos.permission.INTERNET", "reason":"need use ohos.permission.INTERNET" } diff --git a/telephony/telephonyjstest/netmanager_socket/signature/openharmony_sx.p7b b/telephony/telephonyjstest/netmanager_socket/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..4c424bfdd55020dbf7ecdd10045c3791750b2ae7 100644 Binary files a/telephony/telephonyjstest/netmanager_socket/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/netmanager_socket/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/network_search/network_search_errors/signature/openharmony_sx.p7b b/telephony/telephonyjstest/network_search/network_search_errors/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..6941d7358e07e8d9dc650d7fb2efb8a0a2f516d8 100644 Binary files a/telephony/telephonyjstest/network_search/network_search_errors/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/network_search/network_search_errors/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/network_search/network_search_errors/src/main/config.json b/telephony/telephonyjstest/network_search/network_search_errors/src/main/config.json index 7a1b37f4832b5b5ddfe209c01fbd563717ede6fa..e843ee96f535ec140211c0cce389231f284bfa72 100644 --- a/telephony/telephonyjstest/network_search/network_search_errors/src/main/config.json +++ b/telephony/telephonyjstest/network_search/network_search_errors/src/main/config.json @@ -19,8 +19,8 @@ "mainAbility": ".MainAbility", "srcPath":"", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "distro": { @@ -67,47 +67,11 @@ } ], "reqPermissions": [ - { - "name": "ohos.permission.LOCATION", - "reason": "need use ohos.permission.LOCATION" - }, - { - "name":"ohos.permission.SET_TELEPHONY_STATE", - "reason":"need use ohos.permission.SET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.GET_TELEPHONY_STATE", - "reason":"need use ohos.permission.GET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.PLACE_CALL", - "reason":"need use ohos.permission.PLACE_CALL" - }, - { - "name":"ohos.permission.READ_CONTACTS", - "reason":"need use ohos.permission.READ_CONTACTS" - }, - { - "name":"ohos.permission.WRITE_CONTACTS", - "reason":"need use ohos.permission.WRITE_CONTACTS" - }, - { - "name":"ohos.permission.SEND_MESSAGES", - "reason":"need use ohos.permission.SEND_MESSAGES" - }, - { - "name":"ohos.permission.RECEIVE_SMS", - "reason":"need use ohos.permission.RECEIVE_SMS" - }, - { - "name":"ohos.permission.READ_CALL_LOG", - "reason":"need use ohos.permission.READ_CALL_LOG" - }, - { + { "name":"ohos.permission.GET_NETWORK_INFO", "reason":"need use ohos.permission.GET_NETWORK_INFO" }, - { + { "name":"ohos.permission.INTERNET", "reason":"need use ohos.permission.INTERNET" } diff --git a/telephony/telephonyjstest/network_search/network_search_errors/src/main/js/test/NetworkSearchErrors.test.js b/telephony/telephonyjstest/network_search/network_search_errors/src/main/js/test/NetworkSearchErrors.test.js index 7331f409bf392ee1904d48647e6a33b542574e9f..f46db256026e56370e9a1b32d5c9b4e60de2087e 100644 --- a/telephony/telephonyjstest/network_search/network_search_errors/src/main/js/test/NetworkSearchErrors.test.js +++ b/telephony/telephonyjstest/network_search/network_search_errors/src/main/js/test/NetworkSearchErrors.test.js @@ -22,7 +22,6 @@ describe('ActsNetworkSearchTest', function () { const SLOT_0 = 0; const SLOT_2 = -1; - const PREFERRED_MODE_ERR2 = -1; function sleep(timeout) { return new Promise((resolve, reject) => { @@ -87,10 +86,6 @@ describe('ActsNetworkSearchTest', function () { expect(radio.NsaState.NSA_STATE_DUAL_CONNECTED === 5).assertTrue(); expect(radio.NsaState.NSA_STATE_SA_ATTACHED === 6).assertTrue(); - expect(radio.NetworkInformationState.NETWORK_UNKNOWN === 0).assertTrue(); - expect(radio.NetworkInformationState.NETWORK_CURRENT === 2).assertTrue(); - expect(radio.NetworkInformationState.NETWORK_FORBIDDEN === 3).assertTrue(); - expect(radio.NetworkSelectionMode.NETWORK_SELECTION_UNKNOWN === 0).assertTrue(); expect(radio.NetworkSelectionMode.NETWORK_SELECTION_MANUAL === 2).assertTrue(); } catch (error) { @@ -195,13 +190,13 @@ describe('ActsNetworkSearchTest', function () { console.info( `Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 finish data:${JSON.stringify(data)}`); expect(data.length === 0).assertTrue(); + done(); } catch (err) { console.info(`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 fail err: ${err}`); expect(err.code).assertEqual(202); done(); return; } - done(); }); /** @@ -292,13 +287,13 @@ describe('ActsNetworkSearchTest', function () { console.info( `Telephony_NetworkSearch_getSignalInformation_Promise_0400 finish data: ${JSON.stringify(data)}`); expect(data.length === 0).assertTrue(); - done(); } catch (err) { console.info(`Telephony_NetworkSearch_getSignalInformation_Promise_0400 fail err: ${err}`); expect(err.code).assertEqual(202); done(); return; } + done(); }); /** diff --git a/telephony/telephonyjstest/observer/entry/src/main/config.json b/telephony/telephonyjstest/observer/entry/src/main/config.json index 7eab57da2d10b0e5f733da5095afdd37699875d2..61e828ea5ec6c96944143050c00d29b19e1399e4 100644 --- a/telephony/telephonyjstest/observer/entry/src/main/config.json +++ b/telephony/telephonyjstest/observer/entry/src/main/config.json @@ -68,7 +68,7 @@ } ], "reqPermissions": [ - { + { "name":"ohos.permission.GET_NETWORK_INFO", "reason":"need use ohos.permission.GET_NETWORK_INFO" } diff --git a/telephony/telephonyjstest/observer/signature/openharmony_sx.p7b b/telephony/telephonyjstest/observer/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c745badda2fe7e7489a00644ae450ea6a58fa167 100644 Binary files a/telephony/telephonyjstest/observer/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/observer/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/config.json b/telephony/telephonyjstest/radiostatistic/entry/src/main/config.json index 7c3f303e64693f999fd3e32ed3dd8e8104d4bbbc..d63dfef67f29051222c4ba51e89e0f8dab28d30b 100644 --- a/telephony/telephonyjstest/radiostatistic/entry/src/main/config.json +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/config.json @@ -19,8 +19,8 @@ "mainAbility": ".MainAbility", "srcPath": "", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "distro": { @@ -68,49 +68,9 @@ } ], "reqPermissions": [ - { - "name": "ohos.permission.LOCATION", - "reason": "need use ohos.permission.LOCATION" - }, - { - "name":"ohos.permission.SET_TELEPHONY_STATE", - "reason":"need use ohos.permission.SET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.GET_TELEPHONY_STATE", - "reason":"need use ohos.permission.GET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.PLACE_CALL", - "reason":"need use ohos.permission.PLACE_CALL" - }, - { - "name":"ohos.permission.READ_CONTACTS", - "reason":"need use ohos.permission.READ_CONTACTS" - }, - { - "name":"ohos.permission.WRITE_CONTACTS", - "reason":"need use ohos.permission.WRITE_CONTACTS" - }, - { - "name":"ohos.permission.SEND_MESSAGES", - "reason":"need use ohos.permission.SEND_MESSAGES" - }, - { - "name":"ohos.permission.RECEIVE_SMS", - "reason":"need use ohos.permission.RECEIVE_SMS" - }, - { - "name":"ohos.permission.READ_CALL_LOG", - "reason":"need use ohos.permission.READ_CALL_LOG" - }, - { + { "name":"ohos.permission.GET_NETWORK_INFO", "reason":"need use ohos.permission.GET_NETWORK_INFO" - }, - { - "name":"ohos.permission.INTERNET", - "reason":"need use ohos.permission.INTERNET" } ], "js": [ diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/CallJsunit.test.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/CallJsunit.test.ets index bea92d9a2d2ebb28181e91f2c656d369173f95a9..1e6f3001a30a15db8a46ad07c54dfdef35f1d18a 100644 --- a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/CallJsunit.test.ets +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/CallJsunit.test.ets @@ -21,8 +21,7 @@ export function toString(data) { } else { return data; } -} -; +}; export default function callJsunit() { describe('callTest', function () { @@ -46,118 +45,6 @@ export default function callJsunit() { done(); }); - /** - * @tc.number Telephony_Call_CallTransferInfo_Type - * @tc.name Interface CallTransferInfo - * @tc.desc Interface value test - */ - it('Telephony_Call_CallTransferInfo_Type', 0, function (done) { - let caseName = 'Telephony_Call_CallTransferInfo_Type'; - console.log(`==========> ${caseName} Test start ==========>`); - let callTransferInfo = { - transferNum: '10000000001', type: 2, settingType: 1 - }; - expect(callTransferInfo.type === 2).assertTrue(); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_CallTransferResult_Status - * @tc.name Interface CallTransferResult - * @tc.desc Interface value test - */ - it('Telephony_Call_CallTransferResult_Status', 0, function (done) { - let caseName = 'Telephony_Call_CallTransferResult_Status'; - console.log(`==========> ${caseName} Test start ==========>`); - let callTransferResult = { - status: 0, number: '10000000001' - }; - expect(callTransferResult.status === 0).assertTrue(); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_CallTransferResult_Number - * @tc.name Interface CallTransferResult - * @tc.desc Interface value test - */ - it('Telephony_Call_CallTransferResult_Number', 0, function (done) { - let caseName = 'Telephony_Call_CallTransferResult_Number'; - console.log(`==========> ${caseName} Test start ==========>`); - let callTransferResult = { - status: 0, number: '10000000001' - }; - expect(callTransferResult.number === '10000000001').assertTrue(); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_CallAttributeOptions_CallId - * @tc.name Interface CallAttributeOptions - * @tc.desc Interface value test - */ - it('Telephony_Call_CallAttributeOptions_CallId', 0, function (done) { - let caseName = 'Telephony_Call_CallAttributeOptions_CallId'; - console.log(`==========> ${caseName} Test start ==========>`); - let callAttributeOptions = { - callId: 1 - }; - expect(callAttributeOptions.callId === 1).assertTrue(); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_CallRestrictionInfo_Type - * @tc.name Interface CallRestrictionInfo - * @tc.desc Interface value test - */ - it('Telephony_Call_CallRestrictionInfo_Type', 0, function (done) { - let caseName = 'Telephony_Call_CallRestrictionInfo_Type'; - console.log(`==========> ${caseName} Test start ==========>`); - let callRestrictionInfo = { - type: 0, password: '123456', mode: 1 - }; - expect(callRestrictionInfo.type === 0).assertTrue(); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_CallRestrictionInfo_Mode - * @tc.name Interface CallRestrictionInfo - * @tc.desc Interface value test - */ - it('Telephony_Call_CallRestrictionInfo_Mode', 0, function (done) { - let caseName = 'Telephony_Call_CallRestrictionInfo_Mode'; - console.log(`==========> ${caseName} Test start ==========>`); - let callRestrictionInfo = { - type: 0, password: '123456', mode: 1 - }; - expect(callRestrictionInfo.mode === 1).assertTrue(); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - - /** - * @tc.number Telephony_Call_CallEventOptions_EventId - * @tc.name Interface CallEventOptions - * @tc.desc Interface value test - */ - it('Telephony_Call_CallEventOptions_EventId', 0, function (done) { - let caseName = 'Telephony_Call_CallEventOptions_EventId'; - console.log(`==========> ${caseName} Test start ==========>`); - let callEventOptions = { - eventId: 1 - }; - expect(callEventOptions.eventId === 1).assertTrue(); - console.log(`==========> ${caseName} Test end ==========>`); - done(); - }); - /** * @tc.number Telephony_Call_Call_MakeCall_0100 * @tc.name Make a call. diff --git a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/RadioSecondJsunit.test.ets b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/RadioSecondJsunit.test.ets index 349b5692449d445c37c74e8428f23f403fdd9b37..7dd043e140e7ecda008d357b1098c170b42d2fe2 100644 --- a/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/RadioSecondJsunit.test.ets +++ b/telephony/telephonyjstest/radiostatistic/entry/src/main/ets/test/RadioSecondJsunit.test.ets @@ -137,27 +137,6 @@ export default function radioSecondJsunit() { } }) - - /** - * @tc.number Telephony_Radio_CdmaCellInformation_sid_0100 - * @tc.name sid - * @tc.desc sid test - */ - it('Telephony_Radio_CdmaCellInformation_sid_0100', 0, async function (done) { - console.log("-----------------------Telephony_Radio_CdmaCellInformation_sid_0100 start-----------------------"); - let cdmaCellInformation = { - baseId: 1, - latitude: 39, - longitude: 116, - nid: 101, - sid: 102 - }; - expect(101).assertEqual(cdmaCellInformation.nid); - expect(102).assertEqual(cdmaCellInformation.sid); - done(); - console.log("-----------------------Telephony_Radio_CdmaCellInformation_sid_0100 end-----------------------"); - }) - /** * @tc.number Telephony_NetworkSearch_getRadioTech_Async_0500 * @tc.name TestGetRadioTech_0500 diff --git a/telephony/telephonyjstest/radiostatistic/signature/openharmony_sx.p7b b/telephony/telephonyjstest/radiostatistic/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..c745badda2fe7e7489a00644ae450ea6a58fa167 100644 Binary files a/telephony/telephonyjstest/radiostatistic/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/radiostatistic/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/signature/openharmony_sx.p7b b/telephony/telephonyjstest/sim/sim_manager_function_test/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..69aa6c3a10fe2c9eba1bb292a1089cdfc0e6736d 100644 Binary files a/telephony/telephonyjstest/sim/sim_manager_function_test/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/sim/sim_manager_function_test/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/src/main/config.json b/telephony/telephonyjstest/sim/sim_manager_function_test/src/main/config.json index 9d3b11d7c4695d2c691ee482edb9553ea7628a97..b0db2aa32a83a066d2b55e747dd4be0fe4c66baf 100644 --- a/telephony/telephonyjstest/sim/sim_manager_function_test/src/main/config.json +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/src/main/config.json @@ -19,8 +19,8 @@ "mainAbility": ".MainAbility", "srcPath":"", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "distro": { @@ -66,52 +66,6 @@ "launchType": "standard" } ], - "reqPermissions": [ - { - "name": "ohos.permission.LOCATION", - "reason": "need use ohos.permission.LOCATION" - }, - { - "name":"ohos.permission.SET_TELEPHONY_STATE", - "reason":"need use ohos.permission.SET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.GET_TELEPHONY_STATE", - "reason":"need use ohos.permission.GET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.PLACE_CALL", - "reason":"need use ohos.permission.PLACE_CALL" - }, - { - "name":"ohos.permission.READ_CONTACTS", - "reason":"need use ohos.permission.READ_CONTACTS" - }, - { - "name":"ohos.permission.WRITE_CONTACTS", - "reason":"need use ohos.permission.WRITE_CONTACTS" - }, - { - "name":"ohos.permission.SEND_MESSAGES", - "reason":"need use ohos.permission.SEND_MESSAGES" - }, - { - "name":"ohos.permission.RECEIVE_SMS", - "reason":"need use ohos.permission.RECEIVE_SMS" - }, - { - "name":"ohos.permission.READ_CALL_LOG", - "reason":"need use ohos.permission.READ_CALL_LOG" - }, - { - "name":"ohos.permission.GET_NETWORK_INFO", - "reason":"need use ohos.permission.GET_NETWORK_INFO" - }, - { - "name":"ohos.permission.INTERNET", - "reason":"need use ohos.permission.INTERNET" - } - ], "js": [ { "pages": [ diff --git a/telephony/telephonyjstest/sim/sim_manager_function_test/src/main/js/test/SimManager.test.js b/telephony/telephonyjstest/sim/sim_manager_function_test/src/main/js/test/SimManager.test.js index 5a3ac37cee2747e406aee7f54c96712a89b13e63..84032d34c9ee1fd82c9d88ef9f008f9cb521e52a 100644 --- a/telephony/telephonyjstest/sim/sim_manager_function_test/src/main/js/test/SimManager.test.js +++ b/telephony/telephonyjstest/sim/sim_manager_function_test/src/main/js/test/SimManager.test.js @@ -83,12 +83,6 @@ describe('SimManagerTest', function () { expect(sim.SimState.SIM_STATE_NOT_READY !== env.INVALID_VALUE).assertTrue(); expect(sim.SimState.SIM_STATE_READY !== env.INVALID_VALUE).assertTrue(); expect(sim.SimState.SIM_STATE_LOADED !== env.INVALID_VALUE).assertTrue(); - expect(sim.ContactType.GENERAL_CONTACT !== env.INVALID_VALUE).assertTrue(); - expect(sim.ContactType.FIXED_DIALING !== env.INVALID_VALUE).assertTrue(); - expect(sim.LockState.LOCK_OFF !== env.INVALID_VALUE).assertTrue(); - expect(sim.LockState.LOCK_ON !== env.INVALID_VALUE).assertTrue(); - expect(sim.PIN_LOCK !== env.INVALID_VALUE).assertTrue(); - expect(sim.FDN_LOCK !== env.INVALID_VALUE).assertTrue(); expect(sim.UNKNOWN_CARD !== env.INVALID_VALUE).assertTrue(); expect(sim.SINGLE_MODE_SIM_CARD !== env.INVALID_VALUE).assertTrue(); expect(sim.SINGLE_MODE_USIM_CARD !== env.INVALID_VALUE).assertTrue(); @@ -99,16 +93,6 @@ describe('SimManagerTest', function () { expect(sim.DUAL_MODE_TELECOM_LTE_CARD !== env.INVALID_VALUE).assertTrue(); expect(sim.DUAL_MODE_UG_CARD !== env.INVALID_VALUE).assertTrue(); expect(sim.SINGLE_MODE_ISIM_CARD !== env.INVALID_VALUE).assertTrue(); - expect(sim.PN_PIN_LOCK !== env.INVALID_VALUE).assertTrue(); - expect(sim.PN_PUK_LOCK !== env.INVALID_VALUE).assertTrue(); - expect(sim.PU_PIN_LOCK !== env.INVALID_VALUE).assertTrue(); - expect(sim.PU_PUK_LOCK !== env.INVALID_VALUE).assertTrue(); - expect(sim.PP_PIN_LOCK !== env.INVALID_VALUE).assertTrue(); - expect(sim.PP_PUK_LOCK !== env.INVALID_VALUE).assertTrue(); - expect(sim.PC_PIN_LOCK !== env.INVALID_VALUE).assertTrue(); - expect(sim.PC_PUK_LOCK !== env.INVALID_VALUE).assertTrue(); - expect(sim.SIM_PIN_LOCK !== env.INVALID_VALUE).assertTrue(); - expect(sim.SIM_PUK_LOCK !== env.INVALID_VALUE).assertTrue(); console.info(`Telephony_Sim_constantValidate_0100 finish`); done(); }); diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/signature/openharmony_sx.p7b b/telephony/telephonyjstest/sms_mms/sms_mms_error/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..a4104a6796c9db3064f044ea11ed47695d1415b5 100644 Binary files a/telephony/telephonyjstest/sms_mms/sms_mms_error/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/sms_mms/sms_mms_error/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/src/main/config.json b/telephony/telephonyjstest/sms_mms/sms_mms_error/src/main/config.json index 4a2d0c60129781fc9fefda2432b5261ebd9fbdab..d2bd740ef8043eb00a58815924774adbda0c4531 100644 --- a/telephony/telephonyjstest/sms_mms/sms_mms_error/src/main/config.json +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/src/main/config.json @@ -19,8 +19,8 @@ "mainAbility": ".MainAbility", "srcPath":"", "deviceType": [ - "tablet", - "default", + "tablet", + "default", "phone" ], "distro": { @@ -66,52 +66,6 @@ "launchType": "standard" } ], - "reqPermissions": [ - { - "name": "ohos.permission.LOCATION", - "reason": "need use ohos.permission.LOCATION" - }, - { - "name":"ohos.permission.SET_TELEPHONY_STATE", - "reason":"need use ohos.permission.SET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.GET_TELEPHONY_STATE", - "reason":"need use ohos.permission.GET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.PLACE_CALL", - "reason":"need use ohos.permission.PLACE_CALL" - }, - { - "name":"ohos.permission.READ_CONTACTS", - "reason":"need use ohos.permission.READ_CONTACTS" - }, - { - "name":"ohos.permission.WRITE_CONTACTS", - "reason":"need use ohos.permission.WRITE_CONTACTS" - }, - { - "name":"ohos.permission.SEND_MESSAGES", - "reason":"need use ohos.permission.SEND_MESSAGES" - }, - { - "name":"ohos.permission.RECEIVE_SMS", - "reason":"need use ohos.permission.RECEIVE_SMS" - }, - { - "name":"ohos.permission.READ_CALL_LOG", - "reason":"need use ohos.permission.READ_CALL_LOG" - }, - { - "name":"ohos.permission.GET_NETWORK_INFO", - "reason":"need use ohos.permission.GET_NETWORK_INFO" - }, - { - "name":"ohos.permission.INTERNET", - "reason":"need use ohos.permission.INTERNET" - } - ], "js": [ { "pages": [ diff --git a/telephony/telephonyjstest/sms_mms/sms_mms_error/src/main/js/test/SmsMmsError.test.js b/telephony/telephonyjstest/sms_mms/sms_mms_error/src/main/js/test/SmsMmsError.test.js index c58939884fd2a391f35ee463969df6b3830d3528..d163e8c73547f162ea26d320ef6f30f58b29eb07 100644 --- a/telephony/telephonyjstest/sms_mms/sms_mms_error/src/main/js/test/SmsMmsError.test.js +++ b/telephony/telephonyjstest/sms_mms/sms_mms_error/src/main/js/test/SmsMmsError.test.js @@ -17,20 +17,8 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from export default function SmsMmsErrorTest() { describe('SmsMmsErrorTest', function () { - const FALSE_SLOT_ID = 9; - const CORRECT_SMS_PDU = '01000F9168683106019196F400080A00680065006C006C006F'; - const ERROR_MESSAGE_PATH = '/data/telephony/deSrc/EorroMessagePath.mms'; - const IDENTIFIER_MIN = 0; - const IDENTIFIER_MAX = 0xFFFF; - const RANTYPE_GSM = 1; - var rawArrayNull = []; - const SMS_SEND_DST_NUMBER = ''; - const MAX_CHINESE_MESSAGE_LENTH = 63; - const MAX_MESSAGE_LENTH = 2401; - - const TRUE_SLOT_ID = 0; - const RECEIVE_SMS_PDU = '240D91689141468496F600001270721142432302B319'; + var rawArrayNull = []; /* * @tc.number Telephony_SmsMms_createMessage_Async_0200 diff --git a/telephony/telephonyjstest/telephony_base/call_manager/signature/openharmony_sx.p7b b/telephony/telephonyjstest/telephony_base/call_manager/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..9d11359614c936109bf0700e8cc73903e0ab2199 100644 Binary files a/telephony/telephonyjstest/telephony_base/call_manager/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/telephony_base/call_manager/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/telephony_base/call_manager/src/main/config.json b/telephony/telephonyjstest/telephony_base/call_manager/src/main/config.json index 46201b3d15e40aad0cd3e0924441175616a9fcee..89589fce89da880dc7d2e0976950331f11349b82 100644 --- a/telephony/telephonyjstest/telephony_base/call_manager/src/main/config.json +++ b/telephony/telephonyjstest/telephony_base/call_manager/src/main/config.json @@ -67,49 +67,9 @@ } ], "reqPermissions": [ - { - "name": "ohos.permission.LOCATION", - "reason": "need use ohos.permission.LOCATION" - }, - { - "name":"ohos.permission.SET_TELEPHONY_STATE", - "reason":"need use ohos.permission.SET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.GET_TELEPHONY_STATE", - "reason":"need use ohos.permission.GET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.PLACE_CALL", - "reason":"need use ohos.permission.PLACE_CALL" - }, - { - "name":"ohos.permission.READ_CONTACTS", - "reason":"need use ohos.permission.READ_CONTACTS" - }, - { - "name":"ohos.permission.WRITE_CONTACTS", - "reason":"need use ohos.permission.WRITE_CONTACTS" - }, - { - "name":"ohos.permission.SEND_MESSAGES", - "reason":"need use ohos.permission.SEND_MESSAGES" - }, - { - "name":"ohos.permission.RECEIVE_SMS", - "reason":"need use ohos.permission.RECEIVE_SMS" - }, - { - "name":"ohos.permission.READ_CALL_LOG", - "reason":"need use ohos.permission.READ_CALL_LOG" - }, - { + { "name":"ohos.permission.GET_NETWORK_INFO", "reason":"need use ohos.permission.GET_NETWORK_INFO" - }, - { - "name":"ohos.permission.INTERNET", - "reason":"need use ohos.permission.INTERNET" } ], "js": [ diff --git a/telephony/telephonyjstest/telephony_base/call_manager/src/main/js/test/CallManagerTest.test.js b/telephony/telephonyjstest/telephony_base/call_manager/src/main/js/test/CallManagerTest.test.js index 51c7119e5da016c9ff8a9108ce09e97a94b04a96..89cef842b72b216698282b888c743eada462531f 100644 --- a/telephony/telephonyjstest/telephony_base/call_manager/src/main/js/test/CallManagerTest.test.js +++ b/telephony/telephonyjstest/telephony_base/call_manager/src/main/js/test/CallManagerTest.test.js @@ -117,25 +117,6 @@ export default function ActsBaseCallManagerTest() { } }); - - /** - * @tc.number Telephony_CallManager_startDTMF_Async_1000 - * @tc.name CallId is 999, character is C, startDTMF() is called as a callback to startDTMF and capture err - * @tc.desc Function test - */ - it('Telephony_CallManager_startDTMF_Async_1000', 0, async function (done) { - call.startDTMF(ERROR_CALLID_999, 'C', (err) => { - if (err) { - console.log(`Telephony_CallManager_startDTMF_Async_1000 finish err = ${err.message}`); - done(); - return; - } - expect().assertFail(); - console.log('Telephony_CallManager_startDTMF_Async_1000 fail'); - done(); - }); - }); - /** * @tc.number Telephony_CallManager_formatPhoneNumber_Async_0100 * @tc.name PhoneNumber is 100000000000. Call formatPhoneNumber() to format the number. diff --git a/telephony/telephonyjstest/telephony_base/cellular_data/signature/openharmony_sx.p7b b/telephony/telephonyjstest/telephony_base/cellular_data/signature/openharmony_sx.p7b index 66b4457a8a81fb8d3356cf46d67226c850944858..5d2256ef22054365b117ed7db99447d689f01679 100644 Binary files a/telephony/telephonyjstest/telephony_base/cellular_data/signature/openharmony_sx.p7b and b/telephony/telephonyjstest/telephony_base/cellular_data/signature/openharmony_sx.p7b differ diff --git a/telephony/telephonyjstest/telephony_base/cellular_data/src/main/config.json b/telephony/telephonyjstest/telephony_base/cellular_data/src/main/config.json index 9122fe56379db5d6e09f5d427da19af31b166d18..d0a893040abb18431db410f622cfa85a1ef6ac77 100644 --- a/telephony/telephonyjstest/telephony_base/cellular_data/src/main/config.json +++ b/telephony/telephonyjstest/telephony_base/cellular_data/src/main/config.json @@ -66,11 +66,7 @@ "launchType": "standard" } ], - "reqPermissions": [ - { - "name": "ohos.permission.LOCATION", - "reason": "need use ohos.permission.LOCATION" - }, + "reqPermissions":[ { "name":"ohos.permission.SET_TELEPHONY_STATE", "reason":"need use ohos.permission.SET_TELEPHONY_STATE" @@ -78,38 +74,6 @@ { "name":"ohos.permission.GET_TELEPHONY_STATE", "reason":"need use ohos.permission.GET_TELEPHONY_STATE" - }, - { - "name":"ohos.permission.PLACE_CALL", - "reason":"need use ohos.permission.PLACE_CALL" - }, - { - "name":"ohos.permission.READ_CONTACTS", - "reason":"need use ohos.permission.READ_CONTACTS" - }, - { - "name":"ohos.permission.WRITE_CONTACTS", - "reason":"need use ohos.permission.WRITE_CONTACTS" - }, - { - "name":"ohos.permission.SEND_MESSAGES", - "reason":"need use ohos.permission.SEND_MESSAGES" - }, - { - "name":"ohos.permission.RECEIVE_SMS", - "reason":"need use ohos.permission.RECEIVE_SMS" - }, - { - "name":"ohos.permission.READ_CALL_LOG", - "reason":"need use ohos.permission.READ_CALL_LOG" - }, - { - "name":"ohos.permission.GET_NETWORK_INFO", - "reason":"need use ohos.permission.GET_NETWORK_INFO" - }, - { - "name":"ohos.permission.INTERNET", - "reason":"need use ohos.permission.INTERNET" } ], "js": [ diff --git a/telephony/telephonyjstest/telephony_base/cellular_data/src/main/js/test/PdpProfileDataStorageFunction.test.js b/telephony/telephonyjstest/telephony_base/cellular_data/src/main/js/test/PdpProfileDataStorageFunction.test.js index 09e9af85f716519dac8e0f1e37f0511cba8b3150..541d55ed288ff8c721adc0be86857f2ceb2a211a 100644 --- a/telephony/telephonyjstest/telephony_base/cellular_data/src/main/js/test/PdpProfileDataStorageFunction.test.js +++ b/telephony/telephonyjstest/telephony_base/cellular_data/src/main/js/test/PdpProfileDataStorageFunction.test.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Huawei Device Co., Ltd. + * Copyright (C) 2022 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