diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/app.json b/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/app.json new file mode 100755 index 0000000000000000000000000000000000000000..f1ea04f6f3a6525bc220417edc9aacd43153e674 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/app.json @@ -0,0 +1,10 @@ +{ + "app": { + "bundleName": "com.ohos.tools.pageAbilityBundleForInstall", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:layered_image", + "label": "$string:app_name" + } +} diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/app.json5 b/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/app.json5 new file mode 100755 index 0000000000000000000000000000000000000000..514e3d64e2790d280a29ad321a00d773a6991c11 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/app.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "app": { + "bundleName": "com.ohos.tools.pageAbilityBundleForInstall", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:layered_image", + "label": "$string:app_name" + } +} diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/resources/base/element/string.json b/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/resources/base/element/string.json old mode 100644 new mode 100755 similarity index 32% rename from test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/resources/base/element/string.json rename to test/systemtest/bm/pageAbilityBundleForInstall/AppScope/resources/base/element/string.json index 226a4d8d2d7c7fc737f22ec14b2cd236253fbd28..fea5073d9005c49164d05dac3c820520c40a2b21 --- a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/resources/base/element/string.json +++ b/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/resources/base/element/string.json @@ -1,12 +1,8 @@ -{ - "string": [ - { - "name": "mainability_description", - "value": "mainability_description" - }, - { - "name": "app_name", - "value": "demo" - } - ] -} \ No newline at end of file +{ + "string": [ + { + "name": "app_name", + "value": "pageAbilityBundleForInstall" + } + ] +} diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/resources/base/media/background.png b/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/resources/base/media/background.png new file mode 100755 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/resources/base/media/background.png differ diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/resources/base/media/foreground.png b/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/resources/base/media/foreground.png new file mode 100755 index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f Binary files /dev/null and b/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/resources/base/media/foreground.png differ diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/resources/base/media/layered_image.json b/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/resources/base/media/layered_image.json new file mode 100755 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/AppScope/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/BUILD.gn b/test/systemtest/bm/pageAbilityBundleForInstall/BUILD.gn index 07b1dd01e2593bc5e3ba23fe6e7df8b61e898207..418f01902fd3ca22d1925ba38dfca2b8b1cf9e2c 100755 --- a/test/systemtest/bm/pageAbilityBundleForInstall/BUILD.gn +++ b/test/systemtest/bm/pageAbilityBundleForInstall/BUILD.gn @@ -14,23 +14,30 @@ import("//build/ohos.gni") import("../../../../bundletool.gni") -ohos_hap("pageAbilityBundleForInstall") { - hap_profile = "./src/main/config.json" - hap_name = "pageAbilityBundleForInstall" - subsystem_name = "bundlemanager" - part_name = "bundle_tool" - final_hap_path = "$root_out_dir/tests/systemtest/bundle_tool/bundle_tool/resource/bm/${hap_name}.hap" - testonly = true +ohos_app("pageAbilityBundleForInstall") { deps = [ ":hjs_demo_js_assets", ":hjs_demo_resources", ] certificate_profile = "${bundletool_test_path}/signature/com.ohos.tools.pageAbilityBundleForInstall.p7b" + hap_name = "pageAbilityBundleForInstall" + part_name = "bundle_tool" + subsystem_name = "bundlemanager" + hap_out_dir = "$root_out_dir/tests/systemtest/bundle_tool/bundle_tool/resource/bm" + testonly = true +} + +ohos_app_scope("hjs_demo_app_profile") { + app_profile = "AppScope/app.json" + sources = [ "AppScope/resources" ] } + ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" + source_dir = "entry/src/main/ets" } + ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" + sources = [ "entry/src/main/resources" ] + deps = [ ":hjs_demo_app_profile" ] + hap_profile = "entry/src/main/module.json" } diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/build-profile.json5 b/test/systemtest/bm/pageAbilityBundleForInstall/build-profile.json5 new file mode 100755 index 0000000000000000000000000000000000000000..d1617435d8b37a643a2f8f16a8919d24f8fe44e7 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/build-profile.json5 @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "app": { + "signingConfigs": [ + ], + "products": [ + { + "name": "default", + "signingConfig": "default", + "compatibleSdkVersion": 19, + "compileSdkVersion": 19, + "runtimeOS": "OpenHarmony", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" + } + ] + }, + "modules": [ + { + "name": "entry", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/.gitignore b/test/systemtest/bm/pageAbilityBundleForInstall/entry/.gitignore new file mode 100755 index 0000000000000000000000000000000000000000..e2713a2779c5a3e0eb879efe6115455592caeea5 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/build-profile.json5 b/test/systemtest/bm/pageAbilityBundleForInstall/entry/build-profile.json5 new file mode 100755 index 0000000000000000000000000000000000000000..b4d65d490ef6cbe22d933b9231555210f1555786 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/build-profile.json5 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/pages/index/index.js b/test/systemtest/bm/pageAbilityBundleForInstall/entry/hvigorfile.ts old mode 100644 new mode 100755 similarity index 67% rename from test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/pages/index/index.js rename to test/systemtest/bm/pageAbilityBundleForInstall/entry/hvigorfile.ts index eb5be916aa414adb35cf8541635725d702a893dc..e4f43d54667f8327c367c8096bd08bb8c75aff54 --- a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/pages/index/index.js +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/hvigorfile.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2025 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 @@ -12,14 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') + +import { hapTasks } from '@ohos/hvigor-ohos-plugin'; export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ } diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/obfuscation-rules.txt b/test/systemtest/bm/pageAbilityBundleForInstall/entry/obfuscation-rules.txt new file mode 100755 index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/obfuscation-rules.txt @@ -0,0 +1,23 @@ +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/oh-package.json5 b/test/systemtest/bm/pageAbilityBundleForInstall/entry/oh-package.json5 new file mode 100755 index 0000000000000000000000000000000000000000..4bf3e2a9b1ae7381cf9363dff1cbcc1861a41e7b --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/oh-package.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} + diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/ets/entryability/EntryAbility.ets b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100755 index 0000000000000000000000000000000000000000..03de9ddeb4315b230a1965f1c50fd9f5e2024ef5 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2025 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 { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +const DOMAIN = 0x0000; + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy(): void { + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); + return; + } + hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets new file mode 100755 index 0000000000000000000000000000000000000000..1fca37ecc34e1079aaf6557f1272cd694aa0068c --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2025 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 { hilog } from '@kit.PerformanceAnalysisKit'; +import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; + +const DOMAIN = 0x0000; + +export default class EntryBackupAbility extends BackupExtensionAbility { + async onBackup() { + hilog.info(DOMAIN, 'testTag', 'onBackup ok'); + await Promise.resolve(); + } + + async onRestore(bundleVersion: BundleVersion) { + hilog.info(DOMAIN, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion)); + await Promise.resolve(); + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/ets/pages/Index.ets b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/ets/pages/Index.ets new file mode 100755 index 0000000000000000000000000000000000000000..0f481f696485b8c840d49ad9e7d7dff7f6b71241 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct Index { + @State message: string = 'Hello World'; + + build() { + RelativeContainer() { + Text(this.message) + .id('HelloWorld') + .fontSize($r('app.float.page_text_font_size')) + .fontWeight(FontWeight.Bold) + .alignRules({ + center: { anchor: '__container__', align: VerticalAlign.Center }, + middle: { anchor: '__container__', align: HorizontalAlign.Center } + }) + .onClick(() => { + this.message = 'Welcome'; + }) + } + .height('100%') + .width('100%') + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/module.json b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/module.json new file mode 100755 index 0000000000000000000000000000000000000000..81e36fa1cf0312bd206d3ceab0af57cd38f98e08 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/module.json @@ -0,0 +1,51 @@ +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ], + "extensionAbilities": [ + { + "name": "EntryBackupAbility", + "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [ + { + "name": "ohos.extension.backup", + "resource": "$profile:backup_config" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/module.json5 b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/module.json5 new file mode 100755 index 0000000000000000000000000000000000000000..776ce01475229d674487a2830790c4c87b777379 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/module.json5 @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ], + "extensionAbilities": [ + { + "name": "EntryBackupAbility", + "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [ + { + "name": "ohos.extension.backup", + "resource": "$profile:backup_config" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/element/color.json b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/element/color.json new file mode 100755 index 0000000000000000000000000000000000000000..d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/element/float.json b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/element/float.json new file mode 100755 index 0000000000000000000000000000000000000000..a8a5d404dcd8b0466194afc3aa25d90a8a327470 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/element/float.json @@ -0,0 +1,8 @@ +{ + "float": [ + { + "name": "page_text_font_size", + "value": "50fp" + } + ] +} diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/element/string.json b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/element/string.json new file mode 100755 index 0000000000000000000000000000000000000000..f94595515a99e0c828807e243494f57f09251930 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/media/background.png b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/media/background.png new file mode 100755 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/media/background.png differ diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/media/foreground.png b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/media/foreground.png new file mode 100755 index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f Binary files /dev/null and b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/media/foreground.png differ diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/media/layered_image.json b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/media/layered_image.json new file mode 100755 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/media/startIcon.png b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/media/startIcon.png new file mode 100755 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/media/startIcon.png differ diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/profile/backup_config.json b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/profile/backup_config.json new file mode 100755 index 0000000000000000000000000000000000000000..d742c2f96e7dd0f406f499941f3147345e998f95 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/profile/main_pages.json b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/profile/main_pages.json new file mode 100755 index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/dark/element/color.json b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/dark/element/color.json new file mode 100755 index 0000000000000000000000000000000000000000..438d5bc43bb23c59c210d586b96635a72da5b64a --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/main/resources/dark/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#000000" + } + ] +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/app.js b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/mock/mock-config.json5 old mode 100644 new mode 100755 similarity index 72% rename from test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/app.js rename to test/systemtest/bm/pageAbilityBundleForInstall/entry/src/mock/mock-config.json5 index 2d316a0a089b332c5c28729be9ff937aa46618c5..b9a78e201535765168a92d3543c690273ecdc019 --- a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/app.js +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/mock/mock-config.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2025 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 @@ -12,11 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; + +{ +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/ohosTest/ets/test/Ability.test.ets b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/ohosTest/ets/test/Ability.test.ets new file mode 100755 index 0000000000000000000000000000000000000000..0f8ce9a2c012f8fe36114cef65216ef0b6254f41 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/ohosTest/ets/test/Ability.test.ets @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 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 { hilog } from '@kit.PerformanceAnalysisKit'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; + +export default function abilityTest() { + describe('ActsAbilityTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }) + beforeEach(() => { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }) + afterEach(() => { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }) + afterAll(() => { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }) + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); + }) + }) +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/app.js b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/ohosTest/ets/test/List.test.ets old mode 100644 new mode 100755 similarity index 72% rename from test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/app.js rename to test/systemtest/bm/pageAbilityBundleForInstall/entry/src/ohosTest/ets/test/List.test.ets index 2d316a0a089b332c5c28729be9ff937aa46618c5..1eac52fcebe8958e19a7b8fed2e8f39c520a3e42 --- a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/app.js +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/ohosTest/ets/test/List.test.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2025 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 @@ -12,11 +12,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; + +import abilityTest from './Ability.test'; + +export default function testsuite() { + abilityTest(); +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/ohosTest/module.json5 b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/ohosTest/module.json5 new file mode 100755 index 0000000000000000000000000000000000000000..9983b2ba4e55e31a172f0328c82c9a75bfa00ded --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/ohosTest/module.json5 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "module": { + "name": "entry_test", + "type": "feature", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false + } +} diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/test/List.test.ets b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/test/List.test.ets new file mode 100755 index 0000000000000000000000000000000000000000..f1186b1f53c3a70930921c5dbd1417332bec56c9 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/test/List.test.ets @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 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 localUnitTest from './LocalUnit.test'; + +export default function testsuite() { + localUnitTest(); +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/test/LocalUnit.test.ets b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/test/LocalUnit.test.ets new file mode 100755 index 0000000000000000000000000000000000000000..7fc57c77dbf76d8df08a2b802a55b948e3fcf968 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/entry/src/test/LocalUnit.test.ets @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2025 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 '@ohos/hypium'; + +export default function localUnitTest() { + describe('localUnitTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }); + beforeEach(() => { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }); + afterEach(() => { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }); + afterAll(() => { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }); + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); + }); + }); +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/hvigor/hvigor-config.json5 b/test/systemtest/bm/pageAbilityBundleForInstall/hvigor/hvigor-config.json5 new file mode 100755 index 0000000000000000000000000000000000000000..c61d3eed60978a00d9a67b754ec36c0c9dcde929 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/hvigor/hvigor-config.json5 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "modelVersion": "5.0.0", + "dependencies": { + }, + "execution": { + // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */ + // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ + // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ + // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ + }, + "nodeOptions": { + // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ + // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ + } +} diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/pages/index/index.js b/test/systemtest/bm/pageAbilityBundleForInstall/hvigorfile.ts old mode 100644 new mode 100755 similarity index 67% rename from test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/pages/index/index.js rename to test/systemtest/bm/pageAbilityBundleForInstall/hvigorfile.ts index eb5be916aa414adb35cf8541635725d702a893dc..2a5e543f190732c159beb574dfc9fa37bc94e156 --- a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/pages/index/index.js +++ b/test/systemtest/bm/pageAbilityBundleForInstall/hvigorfile.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2025 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 @@ -12,14 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') + +import { appTasks } from '@ohos/hvigor-ohos-plugin'; export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ } diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/local.properties b/test/systemtest/bm/pageAbilityBundleForInstall/local.properties new file mode 100755 index 0000000000000000000000000000000000000000..9d645832a6d2a384ba6cae8fc2c35308bcf91817 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/local.properties @@ -0,0 +1,2 @@ +sdk.dir=/work/openharmony/prebuilts/ohos-sdk/linux +nodejs.dir=/work/openharmony/prebuilts/build-tools/common/nodejs/node-v16.20.2-linux-x64 diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/oh-package.json5 b/test/systemtest/bm/pageAbilityBundleForInstall/oh-package.json5 new file mode 100755 index 0000000000000000000000000000000000000000..1b3c765c42e79ebfb3da99db65c8f99f2c4cae7c --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForInstall/oh-package.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "modelVersion": "5.0.0", + "description": "Please describe the basic information.", + "dependencies": { + }, + "devDependencies": { + "@ohos/hypium": "1.0.21", + "@ohos/hamock": "1.0.0" + } +} diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/config.json b/test/systemtest/bm/pageAbilityBundleForInstall/src/main/config.json deleted file mode 100644 index f957b7648e5c39daaed22e439e6f0ecb596f927a..0000000000000000000000000000000000000000 --- a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "app": { - "apiVersion": { - "compatible": 4, - "releaseType": "Beta1", - "target": 5 - }, - "vendor": "ohos", - "bundleName": "com.ohos.tools.pageAbilityBundleForInstall", - "version": { - "code": 1, - "name": "1.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 16777218, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "descriptionId": 16777217, - "labelId": 16777216, - "icon": "$media:icon", - "name": "com.ohos.tools.pageAbilityForInstall.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard" - } - ], - "deviceType": [ - "2in1", - "tablet", - "default" - ], - "distro": { - "moduleType": "entry", - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.ohos.tools.pageAbilityForInstall", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/i18n/en-US.json b/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/i18n/zh-CN.json b/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/pages/index/index.css b/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 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. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/pages/index/index.hml b/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/resources/base/media/icon.png b/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/resources/base/media/icon.png deleted file mode 100644 index 8966a1e3de00956d251d5c1497aa251ea7b5c49f..0000000000000000000000000000000000000000 Binary files a/test/systemtest/bm/pageAbilityBundleForInstall/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/app.json b/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/app.json new file mode 100755 index 0000000000000000000000000000000000000000..683a457354a4516310f89b94b00ad90fd9e4a40f --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/app.json @@ -0,0 +1,10 @@ +{ + "app": { + "bundleName": "com.ohos.tools.pageAbilityBundleForUninstall", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:layered_image", + "label": "$string:app_name" + } +} diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/app.json5 b/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/app.json5 new file mode 100755 index 0000000000000000000000000000000000000000..3ac3df8c35f1d1c264f4643de9c2526255c221df --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/app.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "app": { + "bundleName": "com.ohos.tools.pageAbilityBundleForUninstall", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:layered_image", + "label": "$string:app_name" + } +} diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/resources/base/element/string.json b/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/resources/base/element/string.json old mode 100644 new mode 100755 similarity index 32% rename from test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/resources/base/element/string.json rename to test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/resources/base/element/string.json index 226a4d8d2d7c7fc737f22ec14b2cd236253fbd28..c63244299f3af826e278a75d63f3026ab9abb586 --- a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/resources/base/element/string.json +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/resources/base/element/string.json @@ -1,12 +1,8 @@ -{ - "string": [ - { - "name": "mainability_description", - "value": "mainability_description" - }, - { - "name": "app_name", - "value": "demo" - } - ] -} \ No newline at end of file +{ + "string": [ + { + "name": "app_name", + "value": "pageAbilityBundleForUninstall" + } + ] +} diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/resources/base/media/background.png b/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/resources/base/media/background.png new file mode 100755 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/resources/base/media/background.png differ diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/resources/base/media/foreground.png b/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/resources/base/media/foreground.png new file mode 100755 index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f Binary files /dev/null and b/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/resources/base/media/foreground.png differ diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/resources/base/media/layered_image.json b/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/resources/base/media/layered_image.json new file mode 100755 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/AppScope/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/BUILD.gn b/test/systemtest/bm/pageAbilityBundleForUninstall/BUILD.gn index 3ddd0845224049aa49934bc378ac5afff22a8a37..06e2e9a534c8dc3060945262031f1f68cceb63be 100755 --- a/test/systemtest/bm/pageAbilityBundleForUninstall/BUILD.gn +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/BUILD.gn @@ -14,23 +14,30 @@ import("//build/ohos.gni") import("../../../../bundletool.gni") -ohos_hap("pageAbilityBundleForUninstall") { - hap_profile = "./src/main/config.json" - hap_name = "pageAbilityBundleForUninstall" - subsystem_name = "bundlemanager" - part_name = "bundle_tool" - final_hap_path = "$root_out_dir/tests/systemtest/bundle_tool/bundle_tool/resource/bm/${hap_name}.hap" - testonly = true +ohos_app("pageAbilityBundleForUninstall") { deps = [ ":hjs_demo_js_assets", ":hjs_demo_resources", ] certificate_profile = "${bundletool_test_path}/signature/com.ohos.tools.pageAbilityBundleForUninstall.p7b" + hap_name = "pageAbilityBundleForUninstall" + part_name = "bundle_tool" + subsystem_name = "bundlemanager" + hap_out_dir = "$root_out_dir/tests/systemtest/bundle_tool/bundle_tool/resource/bm" + testonly = true +} + +ohos_app_scope("hjs_demo_app_profile") { + app_profile = "AppScope/app.json" + sources = [ "AppScope/resources" ] } + ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" + source_dir = "entry/src/main/ets" } + ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" + sources = [ "entry/src/main/resources" ] + deps = [ ":hjs_demo_app_profile" ] + hap_profile = "entry/src/main/module.json" } diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/build-profile.json5 b/test/systemtest/bm/pageAbilityBundleForUninstall/build-profile.json5 new file mode 100755 index 0000000000000000000000000000000000000000..d1617435d8b37a643a2f8f16a8919d24f8fe44e7 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/build-profile.json5 @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "app": { + "signingConfigs": [ + ], + "products": [ + { + "name": "default", + "signingConfig": "default", + "compatibleSdkVersion": 19, + "compileSdkVersion": 19, + "runtimeOS": "OpenHarmony", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" + } + ] + }, + "modules": [ + { + "name": "entry", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/.gitignore b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/.gitignore new file mode 100755 index 0000000000000000000000000000000000000000..e2713a2779c5a3e0eb879efe6115455592caeea5 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/build-profile.json5 b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/build-profile.json5 new file mode 100755 index 0000000000000000000000000000000000000000..294c948db1c7f44237748bb49305719cc6b7bb3f --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/build-profile.json5 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 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. + */ + + { + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/hvigorfile.ts b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/hvigorfile.ts new file mode 100755 index 0000000000000000000000000000000000000000..e4f43d54667f8327c367c8096bd08bb8c75aff54 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 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 { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +} diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/obfuscation-rules.txt b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/obfuscation-rules.txt new file mode 100755 index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/obfuscation-rules.txt @@ -0,0 +1,23 @@ +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/oh-package.json5 b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/oh-package.json5 new file mode 100755 index 0000000000000000000000000000000000000000..4bf3e2a9b1ae7381cf9363dff1cbcc1861a41e7b --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/oh-package.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} + diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/ets/entryability/EntryAbility.ets b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100755 index 0000000000000000000000000000000000000000..03de9ddeb4315b230a1965f1c50fd9f5e2024ef5 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2025 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 { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +const DOMAIN = 0x0000; + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy(): void { + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); + return; + } + hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets new file mode 100755 index 0000000000000000000000000000000000000000..1fca37ecc34e1079aaf6557f1272cd694aa0068c --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2025 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 { hilog } from '@kit.PerformanceAnalysisKit'; +import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; + +const DOMAIN = 0x0000; + +export default class EntryBackupAbility extends BackupExtensionAbility { + async onBackup() { + hilog.info(DOMAIN, 'testTag', 'onBackup ok'); + await Promise.resolve(); + } + + async onRestore(bundleVersion: BundleVersion) { + hilog.info(DOMAIN, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion)); + await Promise.resolve(); + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/ets/pages/Index.ets b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/ets/pages/Index.ets new file mode 100755 index 0000000000000000000000000000000000000000..0f481f696485b8c840d49ad9e7d7dff7f6b71241 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2025 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. + */ + +@Entry +@Component +struct Index { + @State message: string = 'Hello World'; + + build() { + RelativeContainer() { + Text(this.message) + .id('HelloWorld') + .fontSize($r('app.float.page_text_font_size')) + .fontWeight(FontWeight.Bold) + .alignRules({ + center: { anchor: '__container__', align: VerticalAlign.Center }, + middle: { anchor: '__container__', align: HorizontalAlign.Center } + }) + .onClick(() => { + this.message = 'Welcome'; + }) + } + .height('100%') + .width('100%') + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/module.json b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/module.json new file mode 100755 index 0000000000000000000000000000000000000000..81e36fa1cf0312bd206d3ceab0af57cd38f98e08 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/module.json @@ -0,0 +1,51 @@ +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ], + "extensionAbilities": [ + { + "name": "EntryBackupAbility", + "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [ + { + "name": "ohos.extension.backup", + "resource": "$profile:backup_config" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/module.json5 b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/module.json5 new file mode 100755 index 0000000000000000000000000000000000000000..776ce01475229d674487a2830790c4c87b777379 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/module.json5 @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ], + "extensionAbilities": [ + { + "name": "EntryBackupAbility", + "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [ + { + "name": "ohos.extension.backup", + "resource": "$profile:backup_config" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/element/color.json b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/element/color.json new file mode 100755 index 0000000000000000000000000000000000000000..d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/element/float.json b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/element/float.json new file mode 100755 index 0000000000000000000000000000000000000000..a8a5d404dcd8b0466194afc3aa25d90a8a327470 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/element/float.json @@ -0,0 +1,8 @@ +{ + "float": [ + { + "name": "page_text_font_size", + "value": "50fp" + } + ] +} diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/element/string.json b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/element/string.json new file mode 100755 index 0000000000000000000000000000000000000000..f94595515a99e0c828807e243494f57f09251930 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/media/background.png b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/media/background.png new file mode 100755 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/media/background.png differ diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/media/foreground.png b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/media/foreground.png new file mode 100755 index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f Binary files /dev/null and b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/media/foreground.png differ diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/media/layered_image.json b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/media/layered_image.json new file mode 100755 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/media/startIcon.png b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/media/startIcon.png new file mode 100755 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/media/startIcon.png differ diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/profile/backup_config.json b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/profile/backup_config.json new file mode 100755 index 0000000000000000000000000000000000000000..d742c2f96e7dd0f406f499941f3147345e998f95 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/profile/main_pages.json b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/profile/main_pages.json new file mode 100755 index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/dark/element/color.json b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/dark/element/color.json new file mode 100755 index 0000000000000000000000000000000000000000..438d5bc43bb23c59c210d586b96635a72da5b64a --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/main/resources/dark/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#000000" + } + ] +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/mock/mock-config.json5 b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/mock/mock-config.json5 new file mode 100755 index 0000000000000000000000000000000000000000..b9a78e201535765168a92d3543c690273ecdc019 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/mock/mock-config.json5 @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2025 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. + */ + +{ +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/ohosTest/ets/test/Ability.test.ets b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/ohosTest/ets/test/Ability.test.ets new file mode 100755 index 0000000000000000000000000000000000000000..0f8ce9a2c012f8fe36114cef65216ef0b6254f41 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/ohosTest/ets/test/Ability.test.ets @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 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 { hilog } from '@kit.PerformanceAnalysisKit'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; + +export default function abilityTest() { + describe('ActsAbilityTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }) + beforeEach(() => { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }) + afterEach(() => { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }) + afterAll(() => { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }) + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); + }) + }) +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/ohosTest/ets/test/List.test.ets b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/ohosTest/ets/test/List.test.ets new file mode 100755 index 0000000000000000000000000000000000000000..1eac52fcebe8958e19a7b8fed2e8f39c520a3e42 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/ohosTest/ets/test/List.test.ets @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 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 abilityTest from './Ability.test'; + +export default function testsuite() { + abilityTest(); +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/ohosTest/module.json5 b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/ohosTest/module.json5 new file mode 100755 index 0000000000000000000000000000000000000000..9983b2ba4e55e31a172f0328c82c9a75bfa00ded --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/ohosTest/module.json5 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "module": { + "name": "entry_test", + "type": "feature", + "deviceTypes": [ + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false + } +} diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/test/List.test.ets b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/test/List.test.ets new file mode 100755 index 0000000000000000000000000000000000000000..f1186b1f53c3a70930921c5dbd1417332bec56c9 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/test/List.test.ets @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 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 localUnitTest from './LocalUnit.test'; + +export default function testsuite() { + localUnitTest(); +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/test/LocalUnit.test.ets b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/test/LocalUnit.test.ets new file mode 100755 index 0000000000000000000000000000000000000000..7fc57c77dbf76d8df08a2b802a55b948e3fcf968 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/entry/src/test/LocalUnit.test.ets @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2025 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 '@ohos/hypium'; + +export default function localUnitTest() { + describe('localUnitTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }); + beforeEach(() => { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }); + afterEach(() => { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }); + afterAll(() => { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }); + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); + }); + }); +} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/hvigor/hvigor-config.json5 b/test/systemtest/bm/pageAbilityBundleForUninstall/hvigor/hvigor-config.json5 new file mode 100755 index 0000000000000000000000000000000000000000..c61d3eed60978a00d9a67b754ec36c0c9dcde929 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/hvigor/hvigor-config.json5 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "modelVersion": "5.0.0", + "dependencies": { + }, + "execution": { + // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */ + // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ + // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ + // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ + }, + "nodeOptions": { + // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ + // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ + } +} diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/hvigorfile.ts b/test/systemtest/bm/pageAbilityBundleForUninstall/hvigorfile.ts new file mode 100755 index 0000000000000000000000000000000000000000..2a5e543f190732c159beb574dfc9fa37bc94e156 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 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 { appTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +} diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/local.properties b/test/systemtest/bm/pageAbilityBundleForUninstall/local.properties new file mode 100755 index 0000000000000000000000000000000000000000..9d645832a6d2a384ba6cae8fc2c35308bcf91817 --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/local.properties @@ -0,0 +1,2 @@ +sdk.dir=/work/openharmony/prebuilts/ohos-sdk/linux +nodejs.dir=/work/openharmony/prebuilts/build-tools/common/nodejs/node-v16.20.2-linux-x64 diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/oh-package.json5 b/test/systemtest/bm/pageAbilityBundleForUninstall/oh-package.json5 new file mode 100755 index 0000000000000000000000000000000000000000..1b3c765c42e79ebfb3da99db65c8f99f2c4cae7c --- /dev/null +++ b/test/systemtest/bm/pageAbilityBundleForUninstall/oh-package.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "modelVersion": "5.0.0", + "description": "Please describe the basic information.", + "dependencies": { + }, + "devDependencies": { + "@ohos/hypium": "1.0.21", + "@ohos/hamock": "1.0.0" + } +} diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/config.json b/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/config.json deleted file mode 100644 index 2dd6104ca1c8dd97ef240913404452b4ff763c97..0000000000000000000000000000000000000000 --- a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "app": { - "apiVersion": { - "compatible": 4, - "releaseType": "Beta1", - "target": 5 - }, - "vendor": "ohos", - "bundleName": "com.ohos.tools.pageAbilityBundleForUninstall", - "version": { - "code": 1, - "name": "1.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 16777218, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "descriptionId": 16777217, - "labelId": 16777216, - "icon": "$media:icon", - "name": "com.ohos.tools.pageAbilityForUninstall.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard" - } - ], - "deviceType": [ - "2in1", - "tablet", - "default" - ], - "distro": { - "moduleType": "entry", - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.ohos.tools.pageAbilityForUninstall", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/i18n/en-US.json b/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/i18n/zh-CN.json b/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/pages/index/index.css b/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 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. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/pages/index/index.hml b/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/resources/base/media/icon.png b/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/resources/base/media/icon.png deleted file mode 100644 index 8966a1e3de00956d251d5c1497aa251ea7b5c49f..0000000000000000000000000000000000000000 Binary files a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/resources/base/media/icon_entry.png b/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/resources/base/media/icon_entry.png deleted file mode 100644 index 8966a1e3de00956d251d5c1497aa251ea7b5c49f..0000000000000000000000000000000000000000 Binary files a/test/systemtest/bm/pageAbilityBundleForUninstall/src/main/js/resources/base/media/icon_entry.png and /dev/null differ