diff --git a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/ApplicationInfoJsunit.test.js b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/ApplicationInfoJsunit.test.js index 1ab6fb91cb75d485adee3e50f211e2864ca3808d..01cf6ddd7ea5f71c7e3d86d99ad81bad4f1fc29f 100644 --- a/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/ApplicationInfoJsunit.test.js +++ b/aafwk/aafwk_standard/fa/fa_applicationinfo_test/entry/src/main/js/test/ApplicationInfoJsunit.test.js @@ -18,6 +18,7 @@ import {describe, expect, it} from 'deccjsunit/index' import commonEvent from '@ohos.commonevent' import featureAbility from '@ohos.ability.featureability' import formBindingData from '@ohos.application.formBindingData' +import bundle from '@ohos.bundle'; var getCallingBundleUri = { events: ["uri"] @@ -133,4 +134,65 @@ describe("ApplicationInfoTest", function () { console.log("------------end SUB_AA_OpenHarmony_Want_0300-------------"); }) + /* + * @tc.number SUB_AA_OpenHarmony_ApplicationInfo_0100 + * @tc.name Verify the CodePath of applicationinfo + * @tc.desc Function test + * @tc.level 0 + */ + it('SUB_AA_OpenHarmony_ApplicationInfo_0100', 0, async function (done) { + console.log("------------start SUB_AA_OpenHarmony_ApplicationInfo_0100-------------"); + TAG = "SUB_AA_OpenHarmony_ApplicationInfo_0100"; + + bundle.getApplicationInfo("com.example.applicationinfo", 1, (error, data)=> { + console.log(TAG + "getApplicationInfo success, error: " + + JSON.stringify(error) + ", data: " + JSON.stringify(data)) + console.log(TAG + "data.condePath: " + JSON.stringify(data.codePath)) + expect(JSON.stringify(data.codePath)). + assertEqual(JSON.stringify("/data/app/el1/bundle/public/com.example.applicationinfo")) + done() + }) + console.log("------------end SUB_AA_OpenHarmony_ApplicationInfo_0100-------------"); + }) + + /* + * @tc.number SUB_AA_OpenHarmony_ApplicationInfo_0200 + * @tc.name Verify the removable of applicationinfo + * @tc.desc Function test + * @tc.level 0 + */ + it('SUB_AA_OpenHarmony_ApplicationInfo_0200', 0, async function (done) { + console.log("------------start SUB_AA_OpenHarmony_ApplicationInfo_0200-------------"); + TAG = "SUB_AA_OpenHarmony_ApplicationInfo_0200"; + + bundle.getApplicationInfo("com.example.applicationinfo", 1, (error, data)=> { + console.log(TAG + "getApplicationInfo success, error: " + + JSON.stringify(error) + ", data: " + JSON.stringify(data)) + console.log(TAG + "data.removable: " + JSON.stringify(data.removable)) + expect(JSON.stringify(data.removable)).assertEqual("true") + done() + }) + console.log("------------end SUB_AA_OpenHarmony_ApplicationInfo_0200-------------"); + }) + + /* + * @tc.number SUB_AA_OpenHarmony_ApplicationInfo_0300 + * @tc.name Verify the accesstokenid of applicationinfo + * @tc.desc Function test + * @tc.level 0 + */ + it('SUB_AA_OpenHarmony_ApplicationInfo_0300', 0, async function (done) { + console.log("------------start SUB_AA_OpenHarmony_ApplicationInfo_0300-------------"); + TAG = "SUB_AA_OpenHarmony_ApplicationInfo_0300"; + + bundle.getApplicationInfo("com.example.applicationinfo", 1, (error, data)=> { + console.log(TAG + "getApplicationInfo success, error: " + + JSON.stringify(error) + ", data: " + JSON.stringify(data)) + console.log(TAG + "data.accessTokenId: " + JSON.stringify(data.accessTokenId)) + expect(data.accessTokenId == 537317578).assertTrue(); + done() + }) + console.log("------------end SUB_AA_OpenHarmony_ApplicationInfo_0300-------------"); + }) + }) \ No newline at end of file diff --git a/aafwk/aafwk_standard/stage/BUILD.gn b/aafwk/aafwk_standard/stage/BUILD.gn index b6f0b4519e4f797ae5e075d5ccf31c21c9463024..74a30a86d06ebb15d3fd6bcd1b8c6ff4fd4e5cf6 100644 --- a/aafwk/aafwk_standard/stage/BUILD.gn +++ b/aafwk/aafwk_standard/stage/BUILD.gn @@ -16,6 +16,9 @@ import("//test/xts/tools/build/suite.gni") group("stage") { testonly = true if (is_standard_system) { - deps = [ "actsamscontexttest:ActsAmsContextTest" ] + deps = [ + "actsamscontexttest:ActsAmsContextTest", + "stageenvchangetest:StageEnvchangeTest", + ] } } diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/BUILD.gn b/aafwk/aafwk_standard/stage/stageenvchangetest/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..65e2c903157908c380d5216ab5cdbadc8ac05278 --- /dev/null +++ b/aafwk/aafwk_standard/stage/stageenvchangetest/BUILD.gn @@ -0,0 +1,32 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//test/xts/tools/build/suite.gni") + +ohos_js_hap_suite("StageEnvchangeTest") { + hap_profile = "entry/src/main/config.json" + deps = [ + ":stageenvchangetest_js_assets", + ":stageenvchangetest_resources", + ] + ets2abc = true + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "StageEnvchangeTest" +} +ohos_js_assets("stageenvchangetest_js_assets") { + source_dir = "entry/src/main/ets/MainAbility" +} +ohos_resources("stageenvchangetest_resources") { + sources = [ "entry/src/main/resources" ] + hap_profile = "entry/src/main/config.json" +} diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/Test.json b/aafwk/aafwk_standard/stage/stageenvchangetest/Test.json new file mode 100644 index 0000000000000000000000000000000000000000..0bf3a5ae4111f6c41269c0411a3a45b301cc214c --- /dev/null +++ b/aafwk/aafwk_standard/stage/stageenvchangetest/Test.json @@ -0,0 +1,18 @@ +{ + "description": "Configuration for Ability Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "600000", + "package": "com.example.etsmyapplication", + "shell-timeout": "60000" + }, + "kits": [ + { + "test-file-name": [ + "StageAbilityTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + } + ] +} diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/config.json b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..70d294b76f6f1023cc908735179f714cf22c8820 --- /dev/null +++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/config.json @@ -0,0 +1,97 @@ +{ + "app": { + "bundleName": "com.example.missionmanager", + "vendor": "example", + "version": { + "code": 1000000, + "name": "1.0.0" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.missionmanager", + "name": ".MyApplication", + "mainAbility": ".MainAbility", + "srcPath": "", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": false + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "orientation": "unspecified", + "visible": true, + "srcPath": "MainAbility", + "name": ".MainAbility", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "$string:description_mainability", + "formsEnabled": false, + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index", + "pages/second" + ], + "name": ".MainAbility", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ], + "reqPermissions": [ + { + "name": "ohos.permission.GET_BUNDLE_INFO", + "reason": "need use ohos.permission.INSTALL_BUNDLE" + }, + { + "name": "ohos.permission.MANAGE_MISSIONS" + }, + { + "name": "ohos.permission.INSTALL_BUNDLE", + "reason": "need use ohos.permission.INSTALL_BUNDLE" + }, + { + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", + "reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" + }, + { + "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE", + "reason": "need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" + }, + { + "name": "ohos.permission.REMOVE_CACHE_FILES", + "reason": "need use ohos.permission.REMOVE_CACHE_FILES" + }, + { + "name": "ohos.permission.LISTEN_BUNDLE_CHANGE", + "reason": "need use ohos.permission.LISTEN_BUNDLE_CHANGE" + } + ] + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/AbilityStage.ts b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/AbilityStage.ts new file mode 100644 index 0000000000000000000000000000000000000000..838e5620b5ee3acdf978759143ce65ded0c102c8 --- /dev/null +++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/AbilityStage.ts @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import AbilityStage from "@ohos.application.AbilityStage" + +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("MyAbilityStage onCreate") + globalThis.stageOnCreateRun = 1; + globalThis.stageContext = this.context; + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/MainAbility.ts b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/MainAbility.ts new file mode 100644 index 0000000000000000000000000000000000000000..9aa883e02038b26bbb45ddc6304e27194da220e9 --- /dev/null +++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/MainAbility.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import Ability from '@ohos.application.Ability' + +export default class MainAbility extends Ability { + + onCreate(want, launchParam) { + // Ability is creating, initialize resources for this ability + console.log("MainAbility onCreate") + globalThis.abilityWant = want; + globalThis.abilityContext = this.context + } + onDestroy() { + // Ability is destroying, release resources for this ability + console.log("MainAbility onDestroy") + } + onWindowStageCreate(windowStage) { + // Main window is created, set main page for this ability + console.log("MainAbility onWindowStageCreate") + windowStage.setUIContent(this.context, "pages/index", null) + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + console.log("MainAbility onWindowStageDestroy") + } + + onForeground() { + // Ability has brought to foreground + console.log("MainAbility onForeground") + } + + onBackground() { + // Ability has back to background + console.log("MainAbility onBackground") + } +}; diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/app.ets b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/app.ets new file mode 100644 index 0000000000000000000000000000000000000000..cfb9635413551f8ad3434468b138550cbad174d6 --- /dev/null +++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/app.ets @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export default { + onCreate() { + console.info('Application onCreate') + }, + onDestroy() { + console.info('Application onDestroy') + }, +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/pages/index.ets b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/pages/index.ets new file mode 100644 index 0000000000000000000000000000000000000000..3710d45bf9575f1f529b6feaf4cbee9fa3c21bcb --- /dev/null +++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/pages/index.ets @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import file from '@system.file'; +import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets" +import testsuite from "../../test/List.test.ets" + +@Entry +@Component +struct Index { + aboutToAppear() { + console.log("start run testcase!!!!1"); + const core = Core.getInstance(); + + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }); + core.addService('expect', expectExtend); + const reportExtend = new ReportExtend(file); + + core.addService('report', reportExtend); + core.init(); + core.subscribeEvent('task', reportExtend); + const configService = core.getDefaultService('config'); + +// console.log('parameters---->' + JSON.stringify(globalThis.abilityWant.parameters)); + +// configService.setConfig(globalThis.abilityWant.parameters); + + testsuite(globalThis.abilityContext); + + core.execute(); + } + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text('Hello World 111') + .fontSize(50) + .fontWeight(FontWeight.Bold) + Button() { + Text('next page') + .fontSize(25) + .fontWeight(FontWeight.Bold) + }.type(ButtonType.Capsule) + .margin({ + top: 20 + }) + .backgroundColor('#0D9FFB') + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/pages/second.ets b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/pages/second.ets new file mode 100644 index 0000000000000000000000000000000000000000..93e67fa5f1ec3b4b087d37f046e36f6c0da60b8c --- /dev/null +++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/MainAbility/pages/second.ets @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import router from '@system.router'; + +@Entry +@Component +struct Second { + private content: string = "Second Page" + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text(`${this.content}`) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Button() { + Text('back to index') + .fontSize(20) + .fontWeight(FontWeight.Bold) + }.type(ButtonType.Capsule) + .margin({ + top: 20 + }) + .backgroundColor('#0D9FFB') + .onClick(() => { + router.back() + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/test/List.test.ets b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..998a93af5388fb381f325e80b11f1b9e815026fe --- /dev/null +++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/test/List.test.ets @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permisrsions and + * limitations under the License. + */ +import missionManagerTest from './MissionManager_test.ets' + + +export default function testsuite(context) { + + missionManagerTest(context) + +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/test/MissionManager_test.ets b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/test/MissionManager_test.ets new file mode 100644 index 0000000000000000000000000000000000000000..343ed89efaa8dc138f148e124947bced981c47c9 --- /dev/null +++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/ets/test/MissionManager_test.ets @@ -0,0 +1,155 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index" +import missionManager from "@ohos.application.missionManager" +import AbilityConstant from '@ohos.application.AbilityConstant' + + +export default function missionManagerTest(abilityContext) { + describe('missionManagerTest', function () { + /* + * @tc.number SUB_AA_OpenHarmony_AbilityStart_6200 + * @tc.name Verify the enumeration values abilityContext.config.language + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_AA_OpenHarmony_EnvChange_0100", 0, async function (done) { + console.info("------------------logMessage SUB_AA_OpenHarmony_EnvChange_0100-------------------"); + console.info("SUB_AA_OpenHarmony_EnvChange_0100 abilityContext.config.language:" + abilityContext.config.language); + expect(abilityContext.config.language=="zh-Hans").assertTrue(); + done(); + }); + /* + * @tc.number SUB_AA_OpenHarmony_AbilityStart_6200 + * @tc.name Call direction to get the direction + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_AA_OpenHarmony_EnvChange_0200", 0, async function (done) { + console.info("------------------logMessage SUB_AA_OpenHarmony_EnvChange_0200-------------------"); + console.info("SUB_AA_OpenHarmony_EnvChange_0200 abilityContext.config.direction:" + abilityContext.config.direction); + expect(abilityContext.config.direction==0).assertTrue(); + done(); + }); + /* + * @tc.number SUB_AA_OpenHarmony_AbilityStart_6200 + * @tc.name Call direction to get the screenDensity + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_AA_OpenHarmony_EnvChange_0300", 0, async function (done) { + console.info("------------------logMessage SUB_AA_OpenHarmony_EnvChange_0300-------------------"); + console.info("SUB_AA_OpenHarmony_EnvChange_0300 abilityContext.config.screenDensity:" + abilityContext.config.screenDensity); + expect(abilityContext.config.screenDensity==160).assertTrue(); + done(); + }); + /* + * @tc.number SUB_AA_OpenHarmony_EnvChange_0400 + * @tc.name Call direction to get the displayId + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_AA_OpenHarmony_EnvChange_0400", 0, async function (done) { + console.info("------------------logMessage SUB_AA_OpenHarmony_EnvChange_0400-------------------"); + console.info("SUB_AA_OpenHarmony_EnvChange_0400 abilityContext.config.displayId:" + abilityContext.config.displayId); + expect(abilityContext.config.displayId==0).assertTrue(); + done(); + }); + /* + * @tc.number SUB_AA_OpenHarmony_AbilityStart_6200 + * @tc.name Verify the enumeration values LaunchReason. CONTINUATION + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_AA_OpenHarmony_AbilityStart_6200", 0, async function (done) { + console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6300-------------------"); + console.info("SUB_AA_OpenHarmony_AbilityStart_6200 LaunchReason.CONTINUATION: " + AbilityConstant.LaunchReason.CONTINUATION); + expect(AbilityConstant.LaunchReason.CONTINUATION==3).assertTrue(); + done(); + }); + /* + * @tc.number SUB_AA_OpenHarmony_AbilityStart_6300 + * @tc.name Verify the enumeration value launchreason.start UNKNOWN + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_AA_OpenHarmony_AbilityStart_6300", 0, async function (done) { + console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6300-------------------"); + console.info("SUB_AA_OpenHarmony_AbilityStart_6300 LaunchReason.UNKNOWN: " + AbilityConstant.LaunchReason.UNKNOWN); + expect(AbilityConstant.LaunchReason.UNKNOWN==0).assertTrue(); + done(); + }); + /* + * @tc.number SUB_AA_OpenHarmony_AbilityStart_6400 + * @tc.name Verify the enumeration value launchreason.START_ABILITY + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_AA_OpenHarmony_AbilityStart_6400", 0, async function (done) { + console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6400-------------------"); + console.info("SUB_AA_OpenHarmony_AbilityStart_6400 LaunchReason.START_ABILITY: " + AbilityConstant.LaunchReason.START_ABILITY); + expect(AbilityConstant.LaunchReason.START_ABILITY==1).assertTrue(); + done(); + }); + /* + * @tc.number SUB_AA_OpenHarmony_AbilityStart_6500 + * @tc.name Verify the enumeration values LaunchReason. CALL + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_AA_OpenHarmony_AbilityStart_6500", 0, async function (done) { + console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6500-------------------"); + console.info("SUB_AA_OpenHarmony_AbilityStart_6500 LaunchReason.CALL: " + AbilityConstant.LaunchReason.CALL); + expect(AbilityConstant.LaunchReason.CALL==2).assertTrue(); + done(); + }); + /* + * @tc.number SUB_AA_OpenHarmony_AbilityStart_6600 + * @tc.name Verify the enumeration values LastExitReason.UNKNOWN + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_AA_OpenHarmony_AbilityStart_6600", 0, async function (done) { + console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6600-------------------"); + console.info("SUB_AA_OpenHarmony_AbilityStart_6600 LastExitReason.UNKNOWN: " + AbilityConstant.LastExitReason.UNKNOWN); + expect(AbilityConstant.LastExitReason.UNKNOWN==0).assertTrue(); + done(); + }); + /* + * @tc.number SUB_AA_OpenHarmony_AbilityStart_6700 + * @tc.name Verify the enumeration values LastExitReason.ABILITY_NOT_RESPONDING + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_AA_OpenHarmony_AbilityStart_6700", 0, async function (done) { + console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6700-------------------"); + console.info("SUB_AA_OpenHarmony_AbilityStart_6700 LastExitReason.ABILITY_NOT_RESPONDING: " + AbilityConstant.LastExitReason.ABILITY_NOT_RESPONDING); + expect(AbilityConstant.LastExitReason.ABILITY_NOT_RESPONDING==1).assertTrue(); + done(); + }); + /* + * @tc.number SUB_AA_OpenHarmony_AbilityStart_6700 + * @tc.name Verify the enumeration values LastExitReason.NORMAL + * @tc.desc Function test + * @tc.level 0 + */ + it("SUB_AA_OpenHarmony_AbilityStart_6800", 0, async function (done) { + console.info("------------------logMessage SUB_AA_OpenHarmony_AbilityStart_6800-------------------"); + console.info("SUB_AA_OpenHarmony_AbilityStart_6800 LastExitReason.NORMAL: " + AbilityConstant.LastExitReason.NORMAL); + expect(AbilityConstant.LastExitReason.NORMAL==2).assertTrue(); + done(); + }); + }) +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/resources/base/element/string.json b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..8df972c7bf35296326de60f58e1cb79e4c827ccd --- /dev/null +++ b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "entry_MainAbility" + }, + { + "name": "description_mainability", + "value": "eTS_Empty Ability" + } + ] +} \ No newline at end of file diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/resources/base/media/icon.png b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/aafwk/aafwk_standard/stage/stageenvchangetest/entry/src/main/resources/base/media/icon.png differ diff --git a/aafwk/aafwk_standard/stage/stageenvchangetest/signature/openharmony_sx.p7b b/aafwk/aafwk_standard/stage/stageenvchangetest/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/aafwk/aafwk_standard/stage/stageenvchangetest/signature/openharmony_sx.p7b differ