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 51e031a98508f38930953245f06600a405b3b334..778323549336ea1ddef5d56913e2c34de6519df8 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 @@ -108,6 +108,10 @@ { "name":"ohos.permission.INTERNET", "reason":"need use ohos.permission.INTERNET" + }, + { + "name":"ohos.permission.GRANT_SENSITIVE_PERMISSIONS", + "reason":"need use ohos.permission.GRANT_SENSITIVE_PERMISSIONS" } ], "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 c837c4d2c20993b64c6265c4afc14a545e4422f1..51c7119e5da016c9ff8a9108ce09e97a94b04a96 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 @@ -12,13 +12,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import net_connection from '@ohos.net.connection'; +import netConnection from '@ohos.net.connection'; import call from '@ohos.telephony.call'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium'; export default function ActsBaseCallManagerTest() { - let net = net_connection.createNetConnection() + let net = netConnection.createNetConnection() class RejectMessageOptions { constructor(str) { 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 b5a1de9a0642d53b3d6b59b0146b0846818155ae..09e9af85f716519dac8e0f1e37f0511cba8b3150 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 @@ -37,7 +37,7 @@ export default function ActsBaseCellularDataTest() { beforeAll(function () { let stringValue = { - profile_name: "test_profile_name", + profile_Name: "test_profile_name", mcc: "460", mnc: "91" }; @@ -47,7 +47,7 @@ export default function ActsBaseCellularDataTest() { }).catch(error => { expect().assertFail(); console.log("Telephony_DataStorage_beforeAll failed"); - return; + done(); }); }) @@ -63,7 +63,7 @@ export default function ActsBaseCellularDataTest() { }).catch(error => { expect().assertFail(); console.log("Telephony_DataStorage_PdpProfile_afterAll failed"); - return; + done(); }); }) @@ -74,7 +74,7 @@ export default function ActsBaseCellularDataTest() { */ it("Telephony_DataStorage_PdpProfile_Insert_Async_0100", 0, async function (done) { let stringValue = { - profile_name: "test_profile_name", + profile_Name: "test_profile_name", mcc: "460", mnc: "91" }; @@ -86,7 +86,6 @@ export default function ActsBaseCellularDataTest() { expect().assertFail(); console.log("Telephony_DataStorage_InsetIntoPdpProfile_Async_0100 failed"); done(); - return; }); }) @@ -105,22 +104,23 @@ export default function ActsBaseCellularDataTest() { condition.equalTo("profile_name", "test_profile_name"); dataAbilityHelper.query(pdpProfileFullUri, resultColumns, condition).then(resultSet => { let pdpProfiles = []; - console.log("Telephony_DataStorage_PdpProfile_Query_Async_0100 resultSet: " + JSON.stringify(resultSet)); + console.log("Telephony_DataStorage_PdpProfile_Query_Async_0100 resultSet: " + + JSON.stringify(resultSet)); while (resultSet.goToNextRow()) { let pdpProfile = {}; - pdpProfile.profile_name = resultSet.getString(0); + pdpProfile.profile_Name = resultSet.getString(0); pdpProfile.mcc = resultSet.getString(1); pdpProfile.mnc = resultSet.getString(2); pdpProfiles.push(pdpProfile); } - console.log("Telephony_DataStorage_PdpProfile_Query_Async_0100 pdpProfiles: " + JSON.stringify(pdpProfiles)); + console.log("Telephony_DataStorage_PdpProfile_Query_Async_0100 pdpProfiles: " + + JSON.stringify(pdpProfiles)); expect(pdpProfiles.length >= 1).assertTrue(); done(); }).catch(error => { expect().assertFail(); console.log("Telephony_DataStorage_PdpProfile_Query_Async_0100 failed"); done(); - return; }); }) @@ -137,14 +137,14 @@ export default function ActsBaseCellularDataTest() { 'mnc': "92", }; dataAbilityHelper.update(pdpProfileFullUri, stringValue, condition).then(data => { - console.log("Telephony_DataStorage_PdpProfile_Update_Async_0100: update success data: " + JSON.stringify(data)); + console.log("Telephony_DataStorage_PdpProfile_Update_Async_0100: update success data: " + + JSON.stringify(data)); expect(data === 0).assertTrue(); done(); }).catch(error => { expect().assertFail(); console.log("Telephony_DataStorage_PdpProfile_Update_Async_0100 failed"); done(); - return; }); }) @@ -157,14 +157,14 @@ export default function ActsBaseCellularDataTest() { var condition = new ohosDataAbility.DataAbilityPredicates(); condition.equalTo("profile_name", "test_profile_name"); dataAbilityHelper.delete(pdpProfileFullUri, condition).then(data => { - console.log("Telephony_DataStorage_PdpProfile_Delete_Async_0100: delete success data: " + JSON.stringify(data)); + console.log("Telephony_DataStorage_PdpProfile_Delete_Async_0100: delete success data: " + + JSON.stringify(data)); expect(data === 0).assertTrue(); done(); }).catch(error => { expect().assertFail(); console.log("Telephony_DataStorage_PdpProfile_Update_Async_0100 failed"); done(); - return; }); }) })