diff --git a/aafwk/aafwk_standard/actsabilitydelegatorcase/entry/src/main/js/test/ActsAbilityDelegatorCaseTest.test.js b/aafwk/aafwk_standard/actsabilitydelegatorcase/entry/src/main/js/test/ActsAbilityDelegatorCaseTest.test.js index 9a8eb59c1484c4c243024ce5880d273d15240d1b..f566346d9919fc990cdf035a32ea4851c41e24cc 100644 --- a/aafwk/aafwk_standard/actsabilitydelegatorcase/entry/src/main/js/test/ActsAbilityDelegatorCaseTest.test.js +++ b/aafwk/aafwk_standard/actsabilitydelegatorcase/entry/src/main/js/test/ActsAbilityDelegatorCaseTest.test.js @@ -85,45 +85,6 @@ describe('ActsStServiceAbilityTest', function () { }) - /** - * @tc.number: ACTS_AExecuteShellCommand_0200 - * @tc.name: Execute a shell command with arguments (AsyncCallback). - * @tc.desc: Verify that the interface executes the Shell command successfully. - */ - it('ACTS_AExecuteShellCommand_Callback_0200', 0, async function (done) { - console.log("ACTS_AExecuteShellCommand_Callback_0200 --- start") - var currentAlertTimeout = 0; - try { - currentAlertTimeout = setTimeout(mySetTimeout, gSetTimeout); - function mySetTimeout() { - console.log('ACTS_AExecuteShellCommand_Callback_0200==== { - clearTimeout(currentAlertTimeout); - console.log('ACTS_AExecuteShellCommand_Callback_0200 - executeShellCommand: start ') - - console.log('ACTS_AExecuteShellCommand_Callback_0200 stdResult = ' + data.stdResult) - var i = data.stdResult.indexOf('start ability successfully.'); - console.log('ACTS_AExecuteShellCommand_Callback_0200 query string i = ' + i); - expect(i == -1).assertEqual(false); - - console.log('ACTS_AExecuteShellCommand_Callback_0200 exitCode = ' + data.exitCode) - expect(data.exitCode).assertEqual(0); - - done() - }) - } catch (error) { - clearTimeout(currentAlertTimeout); - console.log("ACTS_AExecuteShellCommand_Callback_0200 : error = " + error); - console.debug('ACTS_AExecuteShellCommand_Callback_0200==== { - console.log("ACTS_AAACommand_0100 finishTest test end ========> callback ") - done() - }) - } catch (error) { - clearTimeout(currentAlertTimeout); - console.log("ACTS_AAACommand_0100 : error = " + error); - console.debug('ACTS_AAACommand_0100==== { - console.log("ACTS_AAACommand_1200 finishTest test end ========> callback ") - done() - }) - } catch (error) { - clearTimeout(currentAlertTimeout); - console.log("ACTS_AAACommand_1200 : error = " + error); - console.debug('ACTS_AAACommand_1200==== setTimeout(resolve, time)) } - - /** - * @tc.number: SUB_AA_OpenHarmony_StateListener_0300 - * @tc.name: Find all foreground application validations - * @tc.desc: Function test - * @tc.level 0 - */ - it("SUB_AA_OpenHarmony_StateListener_0300", 0, async function (done) { - await appManager.getForegroundApplications().then((data) => { - console.log("---appM- starting---"); - for (var i = 0; i < data.length; i++) { - if (data[i].bundleName == "com.example.statelistener") { - appbefore = data[i] - } - } - checkAppBefore(appbefore) - }).catch(()=>{ - expect().assertFail() - }) - var want = { - "bundleName": "com.example.fzgc", - "abilityName": "com.example.fzgc.MainAbility" - } - await featureAbility.startAbility({ want }).then().catch(); - await sleep(1000) - await appManager.getForegroundApplications().then((data) => { - for (var i = 0; i < data.length; i++) { - if (data[i].bundleName == "com.example.fzgc") { - appafter = data[i] - } - } - checkAppAfter(appafter) - }).catch(()=>{ - expect().assertFail() - }) - await sleep(2000) - done(); - }) - - function checkAppAfter(app) { - expect(app.state == 2).assertTrue(); - expect(app.uid > 0).assertTrue(); - expect(app.bundleName).assertEqual('com.example.fzgc'); - } - function checkAppBefore(app) { - expect(app.state == 2).assertTrue(); - expect(app.uid > 0).assertTrue(); - expect(app.bundleName).assertEqual('com.example.statelistener'); - } -}) - - - - - - +}) \ No newline at end of file diff --git a/aafwk/aafwk_standard/want/sceneProject/actsgetwantalltesthap/src/main/js/default/pages/index/index.js b/aafwk/aafwk_standard/want/sceneProject/actsgetwantalltesthap/src/main/js/default/pages/index/index.js index 510a67390f12569e4cfcb45f4b780930025fb849..b234923cbcdeab8896e47957f0b778a7a4de7192 100755 --- a/aafwk/aafwk_standard/want/sceneProject/actsgetwantalltesthap/src/main/js/default/pages/index/index.js +++ b/aafwk/aafwk_standard/want/sceneProject/actsgetwantalltesthap/src/main/js/default/pages/index/index.js @@ -23,41 +23,8 @@ export default { }, onShow() { console.info('============Start Ability onShow finish'); - - featureAbility.getWant( - (err, data) => { - data = data; - console.debug("==========data=" + JSON.stringify(data)); - if (data.parameters.mykey5[1] == 'test123'){ - featureAbility.getWant().then((data) =>{ - data = data - setTimeout(function(){ - console.debug("==========data2 bundleName is===========" - + JSON.stringify(data.bundleName)); - featureAbility.terminateSelfWithResult( - { - resultCode: 1, - want: data - } - ); - },1000); - }) - }else{ - setTimeout(function(){ - console.debug("==========data1 bundleName is===========" - + JSON.stringify(data.bundleName)); - featureAbility.terminateSelfWithResult( - { - resultCode: 1, - want: data - } - ); - },1000); - } - } - ) }, onReady() { console.info('onReady'); }, -} +} \ No newline at end of file