From 7331be14348a5332bb41f61d3030d3f63e6587f7 Mon Sep 17 00:00:00 2001 From: chengxingzhen Date: Thu, 12 May 2022 09:04:22 +0800 Subject: [PATCH] =?UTF-8?q?XTS=E7=B3=BB=E7=BB=9FAPI=E6=8B=86=E5=88=86?= =?UTF-8?q?=E4=B8=8B=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chengxingzhen --- .../test/ActsAbilityDelegatorCaseTest.test.js | 39 -------------- .../entry/src/main/js/test/startFULL.test.js | 54 ------------------- .../main/js/test/FeatureAbilityJsunit.test.js | 38 ------------- .../main/js/test/StartAbilityJsunit.test.js | 22 -------- 4 files changed, 153 deletions(-) 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 9a8eb59c1..c0512ca12 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==== 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'); - } }) diff --git a/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js b/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js index 2ea1b8001..396606c69 100755 --- a/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js +++ b/aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js @@ -2157,42 +2157,4 @@ describe('ActsFeatureAbilityTest', function () { done(); } }); - - /* - * @tc.number: ACTS_StartAbility_0100 - * @tc.name: featureAbility.getWindow : Get an ability window. - * @tc.desc: Check the return window of the interface (by AsyncCallback) - */ - it('ACTS_StartAbility_0100', 0, async function (done) { - console.log('ACTS_StartAbility_0100===={ - console.log('getWindow call back'); - done(); - }); - done(); - } catch (err) { - console.log('ACTS_StartAbility_0100==== { - console.log('testAbility0600 data: ' + JSON.stringify(data)) - expect().assertFail() - }).catch((error) => { - console.log('testAbility0600 error: ' + JSON.stringify(error)) - expect(errCode1).assertEqual(error.code) - }) - done() - }) - /* * @tc.number: SUB_AA_JsApi_Ability_0500 * @tc.name: testAblity0500. -- GitLab