diff --git a/services/dbms/test/sceneProject/unittest/system_module/AppScope/app.json b/services/dbms/test/sceneProject/unittest/system_module/AppScope/app.json5 similarity index 41% rename from services/dbms/test/sceneProject/unittest/system_module/AppScope/app.json rename to services/dbms/test/sceneProject/unittest/system_module/AppScope/app.json5 index 309d304163a6f0221d28b5f5bcf955eef1d7ed16..9fcfa57126f0dab690d311969ed00a73e3a2f720 100644 --- a/services/dbms/test/sceneProject/unittest/system_module/AppScope/app.json +++ b/services/dbms/test/sceneProject/unittest/system_module/AppScope/app.json5 @@ -1,13 +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.query.test", "debug": true, "icon": "$media:app_icon", - "iconId": 16777217, "label": "$string:app_name", - "labelId": 16777216, "description":"$string:description_application", - "descriptionId":1010, "vendor": "huawei", "versionCode": 1, "versionName": "1.0", @@ -15,9 +27,6 @@ "minAPIVersion": 8, "targetAPIVersion":8, "apiReleaseType":"Beta2", - "keepAlive":true, - "removable":false, - "userDataClearable":false, "accessible":true } } diff --git a/services/dbms/test/sceneProject/unittest/system_module/AppScope/resources/base/media/app_icon.png b/services/dbms/test/sceneProject/unittest/system_module/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/services/dbms/test/sceneProject/unittest/system_module/AppScope/resources/base/media/app_icon.png differ diff --git a/services/dbms/test/sceneProject/unittest/system_module/BUILD.gn b/services/dbms/test/sceneProject/unittest/system_module/BUILD.gn index 89192e44b70bf70b5bc7922500e57603f5dd16b7..01feb9c43ce575a260b94995f02c58674947d7cd 100644 --- a/services/dbms/test/sceneProject/unittest/system_module/BUILD.gn +++ b/services/dbms/test/sceneProject/unittest/system_module/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023-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 @@ -14,31 +14,18 @@ import("//build/ohos.gni") import("../../../../../../dbms.gni") -ohos_hap("distributed_system_module") { - hap_profile = "entry/src/main/module.json" +ohos_app("distributed_system_module") { + certificate_profile = "signature/com.query.test.p7b" hap_name = "distributed_system_module" - subsystem_name = "bundlemanager" - final_hap_path = "$root_out_dir/tests/unittest/distributed_bundle_framework/distributed_bundle_framework/resource/test_bundle/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = - "${dbms_services_path}/test/sceneProject/signature/com.query.test.p7b" -} - -ohos_app_scope("bmsstagedemoone_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} + hap_out_dir = "$root_out_dir/tests/unittest/distributed_bundle_framework/distributed_bundle_framework/resource/test_bundle" -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "entry/src/main/ets" -} + subsystem_name = "bundlemanager" + part_name = "distributed_bundle_framework" -ohos_resources("hjs_demo_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":bmsstagedemoone_app_profile" ] - hap_profile = "entry/src/main/module.json" + js_build_mode = "release" + sdk_home = "//prebuilts/ohos-sdk/linux" + sdk_type_name = [ "sdk.dir" ] + assemble_type = "assembleHap" + build_level = "module" + build_modules = [ "module01" ] } diff --git a/services/dbms/test/sceneProject/unittest/system_module/build-profile.json5 b/services/dbms/test/sceneProject/unittest/system_module/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..9c6e42f73c0ecc78a2d3fdce232bad7ac82b3b59 --- /dev/null +++ b/services/dbms/test/sceneProject/unittest/system_module/build-profile.json5 @@ -0,0 +1,45 @@ +/* + * 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": { + "products": [ + { + "name": "default", + "compileSdkVersion": 20, + "compatibleSdkVersion": 20, + "targetSdkVersion": 20, + "runtimeOS": "OpenHarmony", + "signingConfig": "default" + } + ], + "signingConfigs": [ + ] + }, + "modules": [ + { + "name": "module01", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} diff --git a/services/dbms/test/sceneProject/unittest/system_module/entry/build-profile.json5 b/services/dbms/test/sceneProject/unittest/system_module/entry/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..b4d65d490ef6cbe22d933b9231555210f1555786 --- /dev/null +++ b/services/dbms/test/sceneProject/unittest/system_module/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/services/dbms/test/sceneProject/unittest/system_module/entry/hvigorfile.ts b/services/dbms/test/sceneProject/unittest/system_module/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..8774588471ede4c1563f09d9a1d22f764bb1fd9e --- /dev/null +++ b/services/dbms/test/sceneProject/unittest/system_module/entry/hvigorfile.ts @@ -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 { 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/services/dbms/test/sceneProject/unittest/system_module/entry/obfuscation-rules.txt b/services/dbms/test/sceneProject/unittest/system_module/entry/obfuscation-rules.txt new file mode 100644 index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b --- /dev/null +++ b/services/dbms/test/sceneProject/unittest/system_module/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/services/dbms/test/sceneProject/unittest/system_module/entry/oh-package.json5 b/services/dbms/test/sceneProject/unittest/system_module/entry/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..4bf3e2a9b1ae7381cf9363dff1cbcc1861a41e7b --- /dev/null +++ b/services/dbms/test/sceneProject/unittest/system_module/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/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/ets/pages/index/index.ets b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/ets/pages/index/index.ets index a07d7d96fc47571da6e55f34ebf286b9bcdb1e10..bfe87b3d6e43247e4a2fc4fbbada26eeb438c102 100644 --- a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/ets/pages/index/index.ets +++ b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/ets/pages/index/index.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-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 @@ -14,29 +14,12 @@ */ import file from '@system.file'; -import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets" -import GlobalContext from "../MainAbility/GlobalContext.ts" - @Entry @Component struct Index { aboutToAppear(){ console.info("start run testcase!!!!") - const core:Core = Core.getInstance() - const expectExtend:ExpectExtend = new ExpectExtend({ - id: 'extend' - }) - core.addService('expect', expectExtend) - const reportExtend:ReportExtend = new ReportExtend(file) - - core.addService('report', reportExtend) - core.init() - core.subscribeEvent('task', reportExtend) - - const globalContext:GlobalContext = new GlobalContext() - globalContext.globalContext(core) - core.execute() } build() { diff --git a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/module.json b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/module.json5 similarity index 50% rename from services/dbms/test/sceneProject/unittest/system_module/entry/src/main/module.json rename to services/dbms/test/sceneProject/unittest/system_module/entry/src/main/module.json5 index 390c6a2708a8201524c2fdb21cde908db7185fa4..c874599a6a84a2b872970deb4e21073d85d7e5c2 100644 --- a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/module.json +++ b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/module.json5 @@ -1,62 +1,53 @@ +/* + * 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":"module01", "type":"entry", - "srcEntry":"./MyAbilityStage.ts", + "srcEntry":"./ets/MainAbility/MainAbility.ts", "description":"$string:description_application", - "descriptionId": 2020, "process":"bba", "mainElement":"MainAbility", "deviceTypes":[ "2in1", "tablet", "default", - "car", - "liteWearable", - "phone", - "smartVision", - "tablet", "tv", "wearable", - "router" ], "deliveryWithInstall":true, "installationFree":false, "virtualMachine":"ark", - "pages":"$profile:page_config", - "metadata":[ - { - "name":"string", - "value":"string", - "resource":"@profile:config_file" - }, - { - "name":"string", - "value":"string", - "resource":"@profile:config_file" - } - ], + "pages":"$profile:main_pages", "abilities": [ { "name": "MainAbility", - "srcEntry": "./login/MyLoginAbility.ts", + "srcEntry": "./ets/MainAbility/MainAbility.ts", "description": "$string:description_main_ability", - "descriptionId": 3030, "icon": "$media:icon", - "iconId": 4040, - "label": "Login", - "labelId": 16777216, + "label": "$string:Login", "permissions":["ext","sql"], "metadata":[ { "name":"a01", "value":"v01", - "resource":"hello" }, { "name":"a02", "value":"v02", - "resource":"world" } ], "exported": true, @@ -94,71 +85,25 @@ "audioRecording", "location", "bluetoothInteraction", - "multDeviceConnection", "wifiInteraction", "voip", "taskKeeping" - ] - } - ], - "extensionAbilities": [ - { - "name": "FormName", - "srcEntry": "./form/MyForm.ts", - "icon": "$media:icon", - "iconId": 16777223, - "label": "$string:extension_name", - "labelId": 6060, - "description": "$string:form_description", - "descriptionId": 7070, - "type": "form", - "readPermission":"readPermission---", - "writePermission":"writePermission---", - "permissions":["aaa","ccc"], - "exported": true, - "skills": [ - { - "actions": ["action001"], - "entities": ["entity001"], - "uris":[ - { - "scheme":"content", - "host":"www.test.com", - "pathRegex":"query/.*/name", - "port":"8080", - "path":"hello", - "pathStartWith":"cc/jac" - }, - { - "scheme":"aaaaa", - "host":"bbbbb", - "port":"10", - "pathRegex":"ccc", - "path":"ddd", - "pathStartWith":"eee" - } - ] + ], + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background" } ], - "metadata": [ - { - "name": "ohos.extablility.form", - "resource": "$profile:form_config" - } - ] - } - ], - "requestPermissions": [ + "requestPermissions": [ { - "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason": "$string:reason", - "usedScene": { - "abilities": ["FormAbility"], - "when": "inuse" - } - }, + "name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", + "reason": "$string:reason", + "usedScene": { + "abilities": ["FormAbility"], + "when": "inuse" + } + }, { - "reason": "use ohos.permission.INSTALL_BUNDLE", + "reason": "$string:reason", "name": "ohos.permission.INSTALL_BUNDLE" } ], @@ -170,9 +115,7 @@ "provisionEnable":true, "distributedSceneEnable":true, "label":"$string:permlab_provider", - "labelId":12, "description":"$string:permdesc_provider", - "descriptionId":13 }, { "name":"ohos.abilitydemo.permission.PROVIDER002", @@ -181,9 +124,7 @@ "provisionEnable":true, "distributedSceneEnable":true, "label":"$string:permlab_provider", - "labelId":112, "description":"$string:permdesc_provider002", - "descriptionId":113 } ] } diff --git a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/element/color.json b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/element/color.json index 8ab41dcca1ad079e8d94f49627b9cdcdc650b0d8..6a32ed27449c9c9e06a71398cbdc98e6fbfa6814 100644 --- a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/element/color.json +++ b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/element/color.json @@ -5,4 +5,4 @@ "value": "#16777221" } ] -} +} \ No newline at end of file diff --git a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/element/float.json b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/element/float.json new file mode 100644 index 0000000000000000000000000000000000000000..a8a5d404dcd8b0466194afc3aa25d90a8a327470 --- /dev/null +++ b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/element/float.json @@ -0,0 +1,8 @@ +{ + "float": [ + { + "name": "page_text_font_size", + "value": "50fp" + } + ] +} diff --git a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/element/string.json b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/element/string.json index d005a7c3d91893013274b2c0897bde887f4d88a3..721ccd6509f6a7694d9260f5bc9fc1b1dd1fa765 100644 --- a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/element/string.json +++ b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/element/string.json @@ -1,40 +1,45 @@ -{ - "string": [ - { - "name": "description_application", - "value": "description" - }, - { - "name": "extension_name", - "value": "label" - }, - { - "name": "description_main_ability", - "value": "description" - }, - { - "name": "permlab_provider", - "value": "label" - }, - { - "name": "form_description", - "value": "description" - }, - { - "name": "reason", - "value": "reason" - }, - { - "name": "permdesc_provider", - "value": "description" - }, - { - "name": "permdesc_provider002", - "value": "description" - }, - { - "name": "16777219", - "value": "description" - } - ] -} +{ + "string": [ + { + "name": "description_application", + "value": "description" + }, + { + "name": "extension_name", + "value": "label" + }, + { + "name": "description_main_ability", + "value": "description" + }, + { + "name": "permlab_provider", + "value": "label" + }, + { + "name": "form_description", + "value": "description" + }, + { + "name": "reason", + "value": "reason" + }, + { + "name": "permdesc_provider", + "value": "description" + }, + { + "name": "permdesc_provider002", + "value": "description" + }, + { + "name": "16777219", + "value": "description" + }, + { + "name": "Login", + "value": "Login" + } + + ] +} \ No newline at end of file diff --git a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/media/background.png b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/media/background.png differ diff --git a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/media/foreground.png b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f Binary files /dev/null and b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/media/foreground.png differ diff --git a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/media/layered_image.json b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/services/dbms/test/sceneProject/unittest/system_module/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/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/media/startIcon.png b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/media/startIcon.png differ diff --git a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/profile/backup_config.json b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/profile/backup_config.json new file mode 100644 index 0000000000000000000000000000000000000000..d742c2f96e7dd0f406f499941f3147345e998f95 --- /dev/null +++ b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/profile/form_config.json b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/profile/form_config.json deleted file mode 100644 index 3fd6a0513f497250c799ae10559bc550a00c0b6b..0000000000000000000000000000000000000000 --- a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/profile/form_config.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "forms": [ - { - "colorMode": "auto", - "defaultDimension": "2*2", - "description": "$string:16777219", - "formConfigAbility": "ability://xxxxx", - "formVisibleNotify": false, - "isDefault": true, - "name": "Form_Js", - "scheduledUpdateTime": "10:30", - "src": "", - "supportDimensions": [ - "2*2" - ], - "updateDuration": 1, - "updateEnabled": true, - "window": { - "autoDesignWidth": true, - "designWidth": 720 - } - } - ] -} \ No newline at end of file diff --git a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/profile/main_pages.json b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/profile/main_pages.json index 96b478210df9884592229ae2db6f6bb7f86c14f4..ae231ba6ddcfbdfdcb3648055e256939888a69af 100644 --- a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/profile/main_pages.json +++ b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/base/profile/main_pages.json @@ -1,6 +1,5 @@ -{ - "src": [ - "pages/index/index", - "pages/second/second" - ] -} \ No newline at end of file +{ + "src": [ + "pages/index/index" + ] +} diff --git a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/dark/element/color.json b/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/resources/dark/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..438d5bc43bb23c59c210d586b96635a72da5b64a --- /dev/null +++ b/services/dbms/test/sceneProject/unittest/system_module/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/services/dbms/test/sceneProject/unittest/system_module/hvigor/hvigor-config.json5 b/services/dbms/test/sceneProject/unittest/system_module/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..c61d3eed60978a00d9a67b754ec36c0c9dcde929 --- /dev/null +++ b/services/dbms/test/sceneProject/unittest/system_module/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/services/dbms/test/sceneProject/unittest/system_module/hvigorfile.ts b/services/dbms/test/sceneProject/unittest/system_module/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..2a5e543f190732c159beb574dfc9fa37bc94e156 --- /dev/null +++ b/services/dbms/test/sceneProject/unittest/system_module/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/services/dbms/test/sceneProject/unittest/system_module/oh-package-lock.json5 b/services/dbms/test/sceneProject/unittest/system_module/oh-package-lock.json5 new file mode 100644 index 0000000000000000000000000000000000000000..481ff7da55052f3fa4f05892d25646ede1f142f2 --- /dev/null +++ b/services/dbms/test/sceneProject/unittest/system_module/oh-package-lock.json5 @@ -0,0 +1,42 @@ +/* + * 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. + */ + +{ + "meta": { + "stableOrder": true + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", + "@ohos/hypium@1.0.21": "@ohos/hypium@1.0.21" + }, + "packages": { + "@ohos/hamock@1.0.0": { + "name": "@ohos/hamock", + "version": "1.0.0", + "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==", + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hamock/-/hamock-1.0.0.har", + "registryType": "ohpm" + }, + "@ohos/hypium@1.0.21": { + "name": "@ohos/hypium", + "version": "1.0.21", + "integrity": "sha512-iyKGMXxE+9PpCkqEwu0VykN/7hNpb+QOeIuHwkmZnxOpI+dFZt6yhPB7k89EgV1MiSK/ieV/hMjr5Z2mWwRfMQ==", + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.21.har", + "registryType": "ohpm" + } + } +} \ No newline at end of file diff --git a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/ets/MainAbility/GlobalContext.ts b/services/dbms/test/sceneProject/unittest/system_module/oh-package.json5 similarity index 50% rename from services/dbms/test/sceneProject/unittest/system_module/entry/src/main/ets/MainAbility/GlobalContext.ts rename to services/dbms/test/sceneProject/unittest/system_module/oh-package.json5 index 0a0a885f3e2610c79645c247880b0675dc905ad8..1b3c765c42e79ebfb3da99db65c8f99f2c4cae7c 100644 --- a/services/dbms/test/sceneProject/unittest/system_module/entry/src/main/ets/MainAbility/GlobalContext.ts +++ b/services/dbms/test/sceneProject/unittest/system_module/oh-package.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 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,17 +12,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {Core} from "deccjsunit/index.ets" -import testsuite from "../../test/List.test.ets" -export default class GlobalContext { - constructor(){ +{ + "modelVersion": "5.0.0", + "description": "Please describe the basic information.", + "dependencies": { + }, + "devDependencies": { + "@ohos/hypium": "1.0.21", + "@ohos/hamock": "1.0.0" } - globalContext(core:Core) { - const configService = core.getDefaultService('config') - console.info('parameters---->' + JSON.stringify(globalThis.abilityWant.parameters)) - globalThis.abilityWant.parameters.timeout = 70000; - configService.setConfig(globalThis.abilityWant.parameters) - testsuite(globalThis.abilityContext) - } -} \ No newline at end of file +} diff --git a/services/dbms/test/sceneProject/unittest/system_module/signature/com.query.test.p7b b/services/dbms/test/sceneProject/unittest/system_module/signature/com.query.test.p7b new file mode 100644 index 0000000000000000000000000000000000000000..4440231e360e150a9e2c02c2583da6c5feaf0f6d Binary files /dev/null and b/services/dbms/test/sceneProject/unittest/system_module/signature/com.query.test.p7b differ