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 89589fce89da880dc7d2e0976950331f11349b82..afa33f835b84b23f2a8f58ab15d76d80cda205f4 100644 --- a/telephony/telephonyjstest/telephony_base/call_manager/src/main/config.json +++ b/telephony/telephonyjstest/telephony_base/call_manager/src/main/config.json @@ -8,7 +8,7 @@ }, "apiVersion": { "compatible": 4, - "target": 5, + "target": 7, "releaseType": "Release" } }, 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 d0a893040abb18431db410f622cfa85a1ef6ac77..74b5fe73e2532c20ba7b562a846bdd190d3203cd 100644 --- a/telephony/telephonyjstest/telephony_base/cellular_data/src/main/config.json +++ b/telephony/telephonyjstest/telephony_base/cellular_data/src/main/config.json @@ -8,7 +8,7 @@ }, "apiVersion": { "compatible": 4, - "target": 5, + "target": 7, "releaseType": "Release" } }, diff --git a/telephony/telephonyjstest/telephony_base/sms_mms/src/main/config.json b/telephony/telephonyjstest/telephony_base/sms_mms/src/main/config.json index 49bbcd0b2a892ce829ed629f8f942a5d9e184688..e59af5c88dbc7f1d0f25cca27498419690dd20fe 100644 --- a/telephony/telephonyjstest/telephony_base/sms_mms/src/main/config.json +++ b/telephony/telephonyjstest/telephony_base/sms_mms/src/main/config.json @@ -8,7 +8,7 @@ }, "apiVersion": { "compatible": 4, - "target": 5, + "target": 7, "releaseType": "Release" } }, diff --git a/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/MainAbility/app.js b/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/MainAbility/app.js index d5d6f8c0376bcf59457011044853f353892fb821..b4e801145dde8d1076e656983f0f8446763e916a 100644 --- a/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/MainAbility/app.js +++ b/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/MainAbility/app.js @@ -14,7 +14,7 @@ */ export default { onCreate() { - console.info('TestApplication onCreate') + console.info('TestApplication onCreate'); }, onDestroy() { diff --git a/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/MainAbility/pages/index/index.js b/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/MainAbility/pages/index/index.js index 168e3ac9313747f04f9db1711a5283581816be2a..3fe73f9a970568ef15036feb8ecdf0bab40184be 100644 --- a/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/MainAbility/pages/index/index.js +++ b/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/MainAbility/pages/index/index.js @@ -13,9 +13,9 @@ * limitations under the License. */ -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' -import { Hypium } from '@ohos/hypium' -import testsuite from '../../../test/List.test' +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../../../test/List.test'; const injectRef = Object.getPrototypeOf(global) || global injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') @@ -25,13 +25,13 @@ export default { title: '' }, onInit () { - this.title = this.$t('strings.world'); + this.title = this.$t('strings.world') }, onShow () { console.info('onShow finish!'); var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() - console.info('start run testcase!!!') + console.info('start run testcase!!!'); Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) }, onReady () { diff --git a/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/TestRunner/OpenHarmonyTestRunner.js b/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/TestRunner/OpenHarmonyTestRunner.js index 04f59896e3bece96511cb66e40dedbfda1b031cd..48030915af6544ec0ad307fe78f2c5ed5b704546 100644 --- a/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/TestRunner/OpenHarmonyTestRunner.js +++ b/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/TestRunner/OpenHarmonyTestRunner.js @@ -13,7 +13,7 @@ * limitations under the License. */ -import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; function translateParamsToString(parameters) { const keySet = new Set([ @@ -32,10 +32,10 @@ function translateParamsToString(parameters) { export default { onPrepare() { - console.info('OpenHarmonyTestRunner OnPrepare') + console.info('OpenHarmonyTestRunner OnPrepare'); }, onRun() { - console.log('OpenHarmonyTestRunner onRun run') + console.log('OpenHarmonyTestRunner onRun run'); var abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() var abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() @@ -44,12 +44,12 @@ function translateParamsToString(parameters) { var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName cmd += ' ' + translateParamsToString(abilityDelegatorArguments.parameters) var debug = abilityDelegatorArguments.parameters["-D"] - console.info('debug value : '+debug) + console.info('debug value : '+debug); if (debug == 'true') { cmd += ' -D' } - console.info('cmd : '+cmd) + console.info('cmd : '+cmd); abilityDelegator.executeShellCommand(cmd, (err, data) => { console.info('executeShellCommand : err : ' + JSON.stringify(err)); console.info('executeShellCommand : data : ' + data.stdResult); diff --git a/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/test/List.test.js b/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/test/List.test.js index 0147eb134f5402458e61098df959b289bd13dd63..4351c20ac1ae25841d690ba6d66080ad1a629a86 100644 --- a/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/test/List.test.js +++ b/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/test/List.test.js @@ -13,7 +13,7 @@ * limitations under the License. */ -import SmsMmsBatchInsert from './SmsMmsBatchInsert.test' +import SmsMmsBatchInsert from './SmsMmsBatchInsert.test'; export default function testsuite() { SmsMmsBatchInsert(); diff --git a/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/test/SmsMmsBatchInsert.test.js b/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/test/SmsMmsBatchInsert.test.js index 5143572cab8836f7af57bf5fe8522b8afa451276..cf1dc8cfaa69c48beee38f72b1c61035d440cd5a 100644 --- a/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/test/SmsMmsBatchInsert.test.js +++ b/telephony/telephonyjstest/telephony_base/sms_mms/src/main/js/test/SmsMmsBatchInsert.test.js @@ -96,8 +96,9 @@ export default function SmsMmsBatchInsert() { var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); - if (now.getTime() > exitTime) - return; + if (now.getTime() > exitTime){ + return; + } } } @@ -138,8 +139,8 @@ export default function SmsMmsBatchInsert() { } ExpectTrue(data.code === 0); console.log(CASE_NAME + ' batchInsert Success, data:' + JSON.stringify(data)); - }) - await sleep(100); + }); + sleep(100); try { let data = await DAHelper.query(URL_INFO); ExpectTrue(data.rowCount === num); @@ -175,7 +176,7 @@ export default function SmsMmsBatchInsert() { ExpectFalse(); console.log(CASE_NAME + ' batchInsert failed, data:' + JSON.stringify(data)); done(); - }) + }); }); /* @@ -195,8 +196,8 @@ export default function SmsMmsBatchInsert() { } ExpectTrue(data.code === 0); console.log(CASE_NAME + ' batchInsert Success, data:' + JSON.stringify(data)); - }) - await sleep(100); + }); + sleep(100); try { let data = await DAHelper.query(URL_INFO); ExpectTrue(data.rowCount === 0); @@ -229,8 +230,8 @@ export default function SmsMmsBatchInsert() { } ExpectTrue(data.code === 0); console.log(CASE_NAME + ' batchInsert Success, data:' + JSON.stringify(data)); - }) - await sleep(2000); + }); + sleep(2000); try { let data = await DAHelper.query(URL_INFO); ExpectTrue(data.rowCount === num); @@ -266,7 +267,7 @@ export default function SmsMmsBatchInsert() { ExpectFalse(); console.log(CASE_NAME + ' batchInsert failed, data:' + JSON.stringify(data)); done(); - }) + }); }); /* @@ -347,7 +348,7 @@ export default function SmsMmsBatchInsert() { done(); return; } - await sleep(100); + sleep(100); try { let data = await DAHelper.query(URL_INFO); ExpectTrue(data.rowCount === 0); @@ -383,7 +384,7 @@ export default function SmsMmsBatchInsert() { done(); return; } - await sleep(100); + sleep(100); try { let data = await DAHelper.query(URL_INFO); ExpectTrue(data.rowCount === num);