diff --git a/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/Test.json b/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/Test.json index 8250ec410d64f0f3b285dfc587d6e96e08102e45..4553d0904aa1784824061c0793aa049d7cbc5aa2 100644 --- a/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/Test.json +++ b/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/Test.json @@ -17,23 +17,6 @@ ], "type": "AppInstallKit", "cleanup-apps": true - }, - { - "type": "ShellKit", - "run-command": [ - "param set persist.ace.testmode.enabled 1", - "param set persist.sys.suspend_manager_enabled 0", - "reboot", - "power-shell wakeup", - "hilog -Q pidoff", - "hilog -b DEBUG", - "uinput -T -d 300 600 -m 300 600 300 100 -u 300 100", - "power-shell setmode 602" - ], - "teardown-command": [ - "param set persist.sys.suspend_manager_enabled 1", - "reboot" - ] } ] } diff --git a/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/ets/test/OnAndOffScreenTest.test.ets b/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/ets/test/OnAndOffScreenTest.test.ets index 807396215c76ca060d2821ffedf69895bd0a41be..5a8bf0ef9e0bda259d49f07b8f073a83177bf1b4 100644 --- a/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/ets/test/OnAndOffScreenTest.test.ets +++ b/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/ets/test/OnAndOffScreenTest.test.ets @@ -17,9 +17,6 @@ import commonEvent from '@ohos.commonEvent'; import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'; import power from '@ohos.power'; import backgroundTaskManager from '@ohos.backgroundTaskManager'; -import { BY, UiDriver, UiComponent, MatchPattern } from '@ohos.uitest'; - -var driver; function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); @@ -42,7 +39,6 @@ export default function OnAndOffScreenTest() { }) id = delayInfo.requestId; console.log(TAG1 + "requestId is : " + id); - driver = await UiDriver.create(); setTimeout(function () { console.log(TAG1 + "beforeAll end"); done(); @@ -52,10 +48,6 @@ export default function OnAndOffScreenTest() { afterAll(async (done) => { console.log(TAG1 + "afterAll called"); backgroundTaskManager.cancelSuspendDelay(id); - let button = await driver.findComponent(BY.text('知道了').enabled(true)); - await sleep(4000); - await button.click(); - await sleep(2000); setTimeout(function () { console.log(TAG1 + "afterAll end"); done(); diff --git a/ability/ability_runtime/featureability/actsfeatureabilitytest/Test.json b/ability/ability_runtime/featureability/actsfeatureabilitytest/Test.json index 2df96f9857ef5aabca509f805a93f63aff3d1ced..f2af2537338b4b2245b8ee73d7e85215197f586b 100644 --- a/ability/ability_runtime/featureability/actsfeatureabilitytest/Test.json +++ b/ability/ability_runtime/featureability/actsfeatureabilitytest/Test.json @@ -22,23 +22,6 @@ ], "type": "AppInstallKit", "cleanup-apps": true - }, - { - "type": "ShellKit", - "run-command": [ - "param set persist.ace.testmode.enabled 1", - "param set persist.sys.suspend_manager_enabled 0", - "reboot", - "power-shell wakeup", - "hilog -Q pidoff", - "hilog -b DEBUG", - "uinput -T -d 300 600 -m 300 600 300 100 -u 300 100", - "power-shell setmode 602" - ], - "teardown-command": [ - "param set persist.sys.suspend_manager_enabled 1", - "reboot" - ] } ] } diff --git a/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js b/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js index 57b6b9573fefde52227cf9a214545bae2367e066..0467d3f53868cf55848be497f3e852f530a0dc08 100644 --- a/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js +++ b/ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js @@ -19,9 +19,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from import commonEvent from '@ohos.commonEvent' import particleAbility from '@ohos.ability.particleAbility' import backgroundTaskManager from '@ohos.backgroundTaskManager' -import { BY, UiDriver, UiComponent, MatchPattern } from '@ohos.uitest'; - -var driver; const START_ABILITY_TIMEOUT = 4000; let subscriberInfoActsStartAbility0100 = { @@ -64,22 +61,20 @@ function sleep(time) { export default function actsFeatureAbilityTest() { describe('ActsFeatureAbilityTest', function () { - beforeAll(async (done) => { - console.info('beforeAll called') - driver = await UiDriver.create(); - await sleep(2000); - done(); + beforeAll(function() { + + /* + * @tc.setup: setup invoked before all testcases + */ + console.info('beforeAll called') }) - afterAll(async (done) => { - let button = await driver.findComponent(BY.text('知道了').enabled(true)); - await sleep(4000); - await button.click(); - await sleep(4000); - setTimeout(function () { - console.info('afterAll called') - done(); - }, 6000); + afterAll(function() { + + /* + * @tc.teardown: teardown invoked after all testcases + */ + console.info('afterAll called') }) beforeEach(function() { 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 c453f5df356639c1e2fb85ac26cc3d40c2307f24..100f7e0d6907b7c2d8ee9a458c1a7a1c401d9579 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 @@ -14,9 +14,6 @@ */ import featureAbility from '@ohos.ability.featureAbility' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' -import { BY, UiDriver, UiComponent, MatchPattern } from '@ohos.uitest'; - -var driver; let resultCode = 123; let bundleName = 'ohso.act.aafwk'; @@ -24,29 +21,8 @@ let mainAbilityName = 'ohos.acts.aafwk.jsap'; const errCode = 1; const errCode1 = 202; -function sleep(time) { - return new Promise((resolve)=>setTimeout(resolve,time)); -} - export default function startAbilityTest() { describe('StartAbilityTest', function () { - - beforeAll(async (done) => { - driver = await UiDriver.create(); - await sleep(2000); - done(); - }) - - afterAll(async (done) => { - let button = await driver.findComponent(BY.text('知道了').enabled(true)); - await sleep(4000); - await button.click(); - await sleep(2000); - setTimeout(function () { - console.log("afterAll end"); - done(); - }, 6000); - }) afterEach(async function(done) { let wantInfo = { diff --git a/ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/signature/openharmony_sx.p7b index ee506e1c0c8f6b9b8e62f9996154c1351fbe1cda..ffae2fa745bc0e6f907f8af32b1a6c4b192057d0 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/finishwithresultemptytest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/signature/openharmony_sx.p7b index c42017e6bc6f09594a96225f2b184e0be035a391..9052d226ca8d0e9a4bdc787be31e1676141acfee 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/finishwithresultpromiseparameterstest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/finishwithresulttest/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/finishwithresulttest/signature/openharmony_sx.p7b index 97a7418a53e260efdd7b8582b6a90781e5e9af43..1ed62dee078fe98e12b9b421a75b299b482925d3 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/finishwithresulttest/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/finishwithresulttest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/getcallingbundletest/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/getcallingbundletest/signature/openharmony_sx.p7b index c6623404e1ae972ae1bdc9dd2962762e37cf4006..29b79c17e2a4910ac2303c1f7c41440a45b366f0 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/getcallingbundletest/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/getcallingbundletest/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/startability/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/startability/signature/openharmony_sx.p7b index 1400970931465803106fb6f9d40e5cd9f45edf6d..9f05cd3048bed62a17b7421ac3ac39512b8ae243 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/startability/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/startability/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/startabilityforresult/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/startabilityforresult/signature/openharmony_sx.p7b index dde231d05c535fa9ee3a956353abb336526141cf..4c4eb9704964e80f9b7a8cb9e830327290c64494 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/startabilityforresult/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/startabilityforresult/signature/openharmony_sx.p7b differ diff --git a/ability/ability_runtime/featureability/sceneproject/terminateabilitytest/signature/openharmony_sx.p7b b/ability/ability_runtime/featureability/sceneproject/terminateabilitytest/signature/openharmony_sx.p7b index 601dbe3e7e5373d3c773ec71cf509d8e5a182078..15c1cb27ac853d5a083fae7c1c6fcc6ca90e047b 100644 Binary files a/ability/ability_runtime/featureability/sceneproject/terminateabilitytest/signature/openharmony_sx.p7b and b/ability/ability_runtime/featureability/sceneproject/terminateabilitytest/signature/openharmony_sx.p7b differ