diff --git a/ability/ability_runtime/want/actsgetwantalltest/src/main/js/test/ActsGetWantAllTest.js b/ability/ability_runtime/want/actsgetwantalltest/src/main/js/test/ActsGetWantAllTest.js index b1af462a13d618340649e226de2f10e425b4729e..8cdc430bb2c7e1cdc2f2e992b66bb5cefb6f89aa 100644 --- a/ability/ability_runtime/want/actsgetwantalltest/src/main/js/test/ActsGetWantAllTest.js +++ b/ability/ability_runtime/want/actsgetwantalltest/src/main/js/test/ActsGetWantAllTest.js @@ -16,6 +16,15 @@ import featureAbility from '@ohos.ability.featureAbility' import wantConstant from '@ohos.ability.wantConstant' import { describe, beforeAll, it, expect } from '@ohos/hypium' + +const sleep = async delay => { + return new Promise((resolve, _) => { + setTimeout(async () => { + resolve(0); + }, delay); + }); +}; + export default function ActsGetWantTest() { describe('ActsGetWantTest', function () { beforeAll(async (done) => { @@ -23,6 +32,10 @@ describe('ActsGetWantTest', function () { done(); }) + beforeEach(async () => { + await sleep(1000); + }) + // @tc.number: ACTS_GetWant_0100 // @tc.name: getWant : get want in current ability // @tc.desc:Start the ability through startabilityforresult,