diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/test/ExampleJsunit.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/test/ExampleJsunit.test.js index 05382bea0f3fcce711f3fcc8bbe52cbd02aa4ce8..d9bb9bf5df32b2c2a5e9a83c4b8f2cbdfbf5e6dd 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/test/ExampleJsunit.test.js +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/test/ExampleJsunit.test.js @@ -18,7 +18,6 @@ import demo from '@ohos.bundle' import featureAbility from '@ohos.ability.featureability' import abilityManager from '@ohos.app.abilityManager' import commonEvent from '@ohos.commonevent' -import missionmanager from '@ohos.application.missionManager' const PATH = "/data/" const ERROR = "error.hap" @@ -46,35 +45,6 @@ var subscriberInfoEvent_0100 = { }; describe('ActsBundleManagerUninstall', function () { - afterEach(async (done) => { - var testMissionId; - testMissionId = await getMissionId(); - console.debug('======>ActsBundleManagerUninstall afterEach testMissionId<=======' + testMissionId); - if (testMissionId != -1) { - await missionmanager.moveMissionToFront(testMissionId); - } - done(); - }) - - function getMissionId() { - return new Promise(async (resolve, reject) => { - var numMax = 1024; - var missionId = -1; - var missionInfos = await missionmanager.getMissionInfos('', numMax); - console.debug('getMissionId result: ' + missionInfos.length); - for (let i = 0; i < missionInfos.length; i++) { - console.debug('getMissionId result: ' + i + '= ' + JSON.stringify(missionInfos[i])) - if ((missionInfos[i].want.abilityName == "com.example.actsbundlemanageruninstall.MainAbility") && - (missionInfos[i].runningState == 0)) { - missionId = missionInfos[i].missionId; - break; - } - } - console.debug('======>getMissionId resolve missionId<=======' + missionId); - resolve(missionId); - }) - } - /** * @tc.number uninstall_0100 * @tc.name BUNDLE::uninstall