diff --git a/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js b/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js index fce9888d7ad8ef22729e92f873b43dac478adb40..36d5ac0c2fe2e4bb49c2204894493a5e9f752288 100644 --- a/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js +++ b/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/StartAbilityJsunit.test.js @@ -19,6 +19,7 @@ let resultCode = 123; let bundleName = 'ohso.act.aafwk'; let mainAbilityName = 'ohos.acts.aafwk.jsap'; const errCode = 1; +const errCode1 = 202; describe('ConnectAbilityTest', function () { @@ -64,12 +65,10 @@ describe('ConnectAbilityTest', function () { * @tc.desc: StartAbility fail with error parameter.(by promise) */ it("SUB_AA_JsApi_StartAbility_0300", 0, async function (done) { - let parameter = { - 'StartAbilityParameter': { - 'want': {} - } + let startAbilityParameter = { + 'want': {} } - await featureAbility.startAbility(parameter).then((data) => { + await featureAbility.startAbility(startAbilityParameter).then((data) => { console.log('testAbility0300 data: ' + JSON.stringify(data)) expect().assertFail() }).catch((error) => { @@ -85,12 +84,10 @@ describe('ConnectAbilityTest', function () { * @tc.desc: StartAbility fail with error parameter.(by callback) */ it("SUB_AA_JsApi_StartAbility_0400", 0, async function (done) { - let parameter = { - 'StartAbilityParameter': { - 'want': {} - } + let startAbilityParameter = { + 'want': {} } - featureAbility.startAbility((parameter), (error, data) => { + featureAbility.startAbility((startAbilityParameter), (error, data) => { console.log('testAbility0400 data: ' + JSON.stringify(data)) console.log('testAbility0400 error: ' + JSON.stringify(error)) expect(errCode).assertEqual(error.code) @@ -192,16 +189,13 @@ describe('ConnectAbilityTest', function () { * @tc.desc: startAbility-want configure action+entities- entities is configurd as a string.(by promise) */ it("SUB_AA_JsApi_Ability_0900", 0, async function (done) { - let parameter = { - 'startAbilityParameter': { - 'want': { - 'bundleName': bundleName, - 'abilityName': mainAbilityName - } - + let startAbilityParameter = { + 'want': { + 'bundleName': bundleName, + 'abilityName': mainAbilityName } } - await featureAbility.startAbility(parameter).then((data) => { + await featureAbility.startAbility(startAbilityParameter).then((data) => { console.log('testAblity0900 data: ' + JSON.stringify(data)) expect().assertFail() }).catch((error) => { @@ -217,16 +211,13 @@ describe('ConnectAbilityTest', function () { * @tc.desc: startAbility-want configure action+entities- entities is configurd as a string.(by callback) */ it("SUB_AA_JsApi_Ability_1000", 0, async function (done) { - let parameter = { - 'startAbilityParameter': { - 'want': { - 'bundleName': bundleName, - 'abilityName': mainAbilityName - } - + let startAbilityParameter = { + 'want': { + 'bundleName': bundleName, + 'abilityName': mainAbilityName } } - featureAbility.startAbility((parameter), (error, data) => { + featureAbility.startAbility((startAbilityParameter), (error, data) => { console.log('testAblity1000 data: ' + JSON.stringify(data)) console.log('testAblity1000 error: ' + JSON.stringify(error)) expect(errCode).assertEqual(error.code) @@ -246,7 +237,7 @@ describe('ConnectAbilityTest', function () { expect().assertFail() }).catch((error) => { console.log('testAblity1100 error: ' + JSON.stringify(error)) - expect(errCode).assertEqual(error.code) + expect(errCode1).assertEqual(error.code) }) done() }) @@ -261,7 +252,7 @@ describe('ConnectAbilityTest', function () { featureAbility.startAbility(parameter, (error, data) => { console.log('testAblity1200 data: ' + JSON.stringify(data)) console.log('testAblity1200 error: ' + JSON.stringify(error)) - expect(errCode).assertEqual(error.code) + expect(errCode1).assertEqual(error.code) done(); }) }) @@ -277,7 +268,7 @@ describe('ConnectAbilityTest', function () { expect().assertFail() }).catch((error) => { console.log('testAblity1300 error: ' + JSON.stringify(error)) - expect(errCode).assertEqual(error.code) + expect(errCode1).assertEqual(error.code) }) done() }) @@ -291,7 +282,7 @@ describe('ConnectAbilityTest', function () { featureAbility.startAbility(undefined, (error, data) => { console.log('testAblity1400 data: ' + JSON.stringify(data)) console.log('testAblity1400 error: ' + JSON.stringify(error)) - expect(errCode).assertEqual(error.code) + expect(errCode1).assertEqual(error.code) done(); }) }) @@ -308,7 +299,7 @@ describe('ConnectAbilityTest', function () { expect.assertFail() }).catch((error) => { console.log('testAblity1500' + JSON.stringify(error)); - expect(errCode).assertEqual(error.code) + expect(errCode1).assertEqual(error.code) }) done() }) @@ -323,7 +314,7 @@ describe('ConnectAbilityTest', function () { featureAbility.startAbilityForResult(parameter, (error, data) => { console.log('testAblity1600 data: ' + JSON.stringify(data)) console.log('testAblity1600 error: ' + JSON.stringify(error)) - expect(errCode).assertEqual(error.code) + expect(errCode1).assertEqual(error.code) console.log('testAblity1600-1 error: ' + JSON.stringify(error)) done(); }) @@ -340,7 +331,7 @@ describe('ConnectAbilityTest', function () { expect.assertFail() }).catch((error) => { console.log('testAblity1700' + JSON.stringify(error)); - expect(errCode).assertEqual(error.code) + expect(errCode1).assertEqual(error.code) }) done() }) @@ -353,7 +344,7 @@ describe('ConnectAbilityTest', function () { it("SUB_AA_JsApi_Ability_1800", 0, async function (done) { featureAbility.startAbilityForResult(undefined, (error) => { console.log('testAblity1800' + JSON.stringify(error)); - expect(errCode).assertEqual(error.code) + expect(errCode1).assertEqual(error.code) done() }) }) @@ -364,19 +355,17 @@ describe('ConnectAbilityTest', function () { * @tc.desc: startAbilityForResult-wrong input parameter format want a layer outside.(by promise) */ it("SUB_AA_JsApi_Ability_1900", 0, async function (done) { - let parameter = { - 'StartAbilityParameter': { - 'want': { - 'bundleName': bundleName, - 'abilityName': mainAbilityName, - 'parameters': { - 'key': resultCode, - 'terminate': true - } + let startAbilityParameter = { + 'want': { + 'bundleName': bundleName, + 'abilityName': mainAbilityName, + 'parameters': { + 'key': resultCode, + 'terminate': true } } } - await featureAbility.startAbilityForResult(parameter).then((data) => { + await featureAbility.startAbilityForResult(startAbilityParameter).then((data) => { console.log('testAblity1900 data: ' + JSON.stringify(data)) expect.assertFail() }).catch((error) => { @@ -392,19 +381,17 @@ describe('ConnectAbilityTest', function () { * @tc.desc: startAbilityForResult-wrong input parameter format want a layer outside.(by callback) */ it("SUB_AA_JsApi_Ability_2000", 0, async function (done) { - let parameter = { - 'StartAbilityParameter': { - 'want': { - 'bundleName': bundleName, - 'abilityName': mainAbilityName, - 'parameters': { - 'key': resultCode, - 'terminate': true - } + let startAbilityParameter = { + 'want': { + 'bundleName': bundleName, + 'abilityName': mainAbilityName, + 'parameters': { + 'key': resultCode, + 'terminate': true } } } - featureAbility.startAbilityForResult(parameter, (error, data) => { + featureAbility.startAbilityForResult(startAbilityParameter, (error, data) => { console.log('testAblity2000' + JSON.stringify(error)); expect(errCode).assertEqual(error.code) done() diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/Test.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/Test.json index f004fd4342be2787b9233d86904451a61773a781..b412802a8235344f13bdc6084cb49585a7437794 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/Test.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/Test.json @@ -18,6 +18,13 @@ ], "type": "AppInstallKit", "cleanup-apps": true + }, + { + "type": "ShellKit", + "run-command": [ + "power-shell wakeup", + "power-shell setmode 602" + ] } ] } diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/Test.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/Test.json index 5e0ae08e4331e977092d65e48243011363e4e07d..ac9ae4d70dca5b4c984a7c9ecb889ca79e7d6655 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/Test.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formperformancetest/Test.json @@ -15,6 +15,13 @@ ], "type": "AppInstallKit", "cleanup-apps": true + }, + { + "type": "ShellKit", + "run-command": [ + "power-shell wakeup", + "power-shell setmode 602" + ] } ] } \ No newline at end of file diff --git a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/Test.json b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/Test.json index 6de3637f2fd1edb97c32d70be810f0d81879bb55..d0068688e3849ed62e3927354377d88da1d255c6 100644 --- a/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/Test.json +++ b/ability/ability_runtime/formmanager/fa/formsystemtest_ets/formstatetest_enable/Test.json @@ -20,6 +20,13 @@ ], "type": "AppInstallKit", "cleanup-apps": true + }, + { + "type": "ShellKit", + "run-command": [ + "power-shell wakeup", + "power-shell setmode 602" + ] } ] }