From 15492985734aca8f6f42c5841c567c34317d1c06 Mon Sep 17 00:00:00 2001 From: inter515 Date: Wed, 20 Apr 2022 17:44:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=97=A0=E6=9D=83=E9=99=90et?= =?UTF-8?q?s=E6=B5=8B=E8=AF=95=E5=A5=97=E5=92=8C=E9=9D=9E=E7=B3=BB?= =?UTF-8?q?=E7=BB=9Fapi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: inter515 --- .../bundle_standard/bundlemanager/BUILD.gn | 1 + .../actsbmsetsunpermissiontest/BUILD.gn | 32 + .../actsbmsetsunpermissiontest/Test.json | 18 + .../entry/src/main/config.json | 72 ++ .../entry/src/main/ets/MainAbility/app.ets | 23 + .../src/main/ets/MainAbility/pages/index.ets | 69 ++ .../test/ActsBmsEtsUnPermissionTest.test.ets | 180 +++++ .../main/ets/MainAbility/test/List.test.ets | 20 + .../main/resources/base/element/string.json | 12 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../entry/src/main/resources/rawfile/hand.png | Bin 0 -> 976 bytes .../entry/src/main/resources/rawfile/icon.png | Bin 0 -> 6790 bytes .../src/main/resources/rawfile/images.jpg | Bin 0 -> 3377 bytes .../src/main/resources/rawfile/person.png | Bin 0 -> 1636 bytes .../src/main/resources/rawfile/star-1-1.png | Bin 0 -> 5326 bytes .../src/main/resources/rawfile/star-1-2.png | Bin 0 -> 8295 bytes .../src/main/resources/rawfile/star-1-3.png | Bin 0 -> 5545 bytes .../src/main/resources/rawfile/video/show.mp4 | 0 .../signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes .../main/js/test/ActsBmsHapModuleTest.test.js | 2 +- .../bundlemanager/actsbmsjstest/Test.json | 13 +- .../js/test/ActsBmsJsUnPermissionTest.test.js | 143 ++-- .../actsbundlemanageretstest/Test.json | 27 + .../entry/src/main/config.json | 3 + .../MainAbility/test/GetAbilityIcon.test.ets | 56 ++ .../test/GetAbilityLabelJsUnit.test.ets | 353 +++++---- .../test/GetLaunchWantForBundle.test.ets | 138 ++++ .../MainAbility/test/GetNameForUid.test.ets | 106 +++ .../MainAbility/test/GetabilityInfo.test.ets | 591 +++++++------- .../test/IsAbilityEnabledETSUnit.ets | 469 ++++++----- .../test/IsApplicationEnabledETSUnit.ets | 338 ++++---- .../main/ets/MainAbility/test/List.test.ets | 6 + .../src/main/ets/MainAbility/test/Utils.ets | 193 ++--- .../test/getAllApplicationInfoJsunit.test.ets | 568 +++++++------- .../test/getApplicationInfoJsunit.test.ets | 738 +++++++++--------- 35 files changed, 2442 insertions(+), 1729 deletions(-) create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/BUILD.gn create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/Test.json create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/config.json create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/app.ets create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/pages/index.ets create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/test/ActsBmsEtsUnPermissionTest.test.ets create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/test/List.test.ets create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/base/element/string.json create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/base/media/icon.png create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/rawfile/hand.png create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/rawfile/icon.png create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/rawfile/images.jpg create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/rawfile/person.png create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/rawfile/star-1-1.png create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/rawfile/star-1-2.png create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/rawfile/star-1-3.png create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/rawfile/video/show.mp4 create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/signature/openharmony_sx.p7b create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityIcon.test.ets create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetLaunchWantForBundle.test.ets create mode 100644 appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetNameForUid.test.ets diff --git a/appexecfwk/bundle_standard/bundlemanager/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/BUILD.gn index c4bc98900..077406df6 100644 --- a/appexecfwk/bundle_standard/bundlemanager/BUILD.gn +++ b/appexecfwk/bundle_standard/bundlemanager/BUILD.gn @@ -18,6 +18,7 @@ group("bundlemanager") { if (is_standard_system) { deps = [ "actsbmsaccesstokentest:ActsBmsAccessTokenTest", + "actsbmsetsunpermissiontest:ActsBmsEtsUnPermissionTest", "actsbmsgetinfostest:ActsBmsGetInfosTest", "actsbmshapmoduletest:ActsBmsHapModuleTest", "actsbmsjstest:ActsBmsJsTest", diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/BUILD.gn new file mode 100644 index 000000000..02db04171 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/BUILD.gn @@ -0,0 +1,32 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//test/xts/tools/build/suite.gni") + +ohos_js_hap_suite("ActsBmsEtsUnPermissionTest") { + hap_profile = "./entry/src/main/config.json" + deps = [ + ":bms_ets_assets", + ":bms_ets_resources", + ] + ets2abc = true + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "ActsBmsEtsUnPermissionTest" +} +ohos_js_assets("bms_ets_assets") { + source_dir = "./entry/src/main/ets/MainAbility" +} +ohos_resources("bms_ets_resources") { + sources = [ "./entry/src/main/resources" ] + hap_profile = "./entry/src/main/config.json" +} diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/Test.json b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/Test.json new file mode 100644 index 000000000..1fa471400 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/Test.json @@ -0,0 +1,18 @@ +{ + "description": "Configuration for hjunit demo Tests", + "driver": { + "type": "JSUnitTest", + "test-timeout": "120000", + "package": "com.example.actsbmsetsunpermissiontest", + "shell-timeout": "60000" + }, + "kits": [ + { + "test-file-name": [ + "ActsBmsEtsUnPermissionTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + } + ] +} diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/config.json new file mode 100644 index 000000000..6d78230a9 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/config.json @@ -0,0 +1,72 @@ +{ + "app": { + "bundleName": "com.example.actsbmsetsunpermissiontest", + "vendor": "example", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 7, + "releaseType": "Release", + "target": 7 + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.actsbmsetsunpermissiontest", + "name": ".MyApplication", + "mainAbility": ".MainAbility", + "srcPath": "MainAbility", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": false + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "orientation": "unspecified", + "visible": true, + "srcPath": "MainAbility", + "name": ".MainAbility", + "srcLanguage": "ets", + "icon": "$media:icon", + "description": "$string:description_mainability", + "formsEnabled": false, + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": ".MainAbility", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/app.ets b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/app.ets new file mode 100644 index 000000000..261fadca2 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/app.ets @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default { + onCreate() { + console.info('Application onCreate') + }, + onDestroy() { + console.info('Application onDestroy') + }, +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/pages/index.ets b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/pages/index.ets new file mode 100644 index 000000000..613631a79 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/pages/index.ets @@ -0,0 +1,69 @@ +/* + * 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. + */ + +import file from '@system.file'; + +import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index.ets" +import testsuite from "../test/List.test.ets" +import featureAbility from "@ohos.ability.featureAbility" + + +@Entry +@Component +struct MyComponent { + aboutToAppear() { + console.info("start run testcase!!!!") + featureAbility.getWant() + .then((Want) => { + const core = Core.getInstance() + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }) + core.addService('expect', expectExtend) + const reportExtend = new ReportExtend(file) + + core.addService('report', reportExtend) + core.init() + core.subscribeEvent('task', reportExtend) + const configService = core.getDefaultService('config') + const timeout=10000 + configService.setConfig(timeout) + console.info('parameters---->' + JSON.stringify(Want.parameters)) + configService.setConfig(Want.parameters) + testsuite() + core.execute() + console.info('Operation successful. Data: ' + JSON.stringify(Want)); + console.info('Operation successful. Data: ' + JSON.stringify(Want)); + }) + .catch((error) => { + console.error('Operation failed. Cause: ' + JSON.stringify(error)); + }) + } + + build() { + Flex({ + direction: FlexDirection.Column, + alignItems: ItemAlign.Center, + justifyContent: FlexAlign.Center + }) { + Text('ccc World') + .fontSize(50) + .fontWeight(FontWeight.Bold) + } + .width('100%') + .height('100%') + } +} + diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/test/ActsBmsEtsUnPermissionTest.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/test/ActsBmsEtsUnPermissionTest.test.ets new file mode 100644 index 000000000..b63bd6bd8 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/test/ActsBmsEtsUnPermissionTest.test.ets @@ -0,0 +1,180 @@ +/* + * 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. + */ + +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "deccjsunit/index.ets" +import bundle from '@ohos.bundle' + +const DEFAULT_FLAG = bundle.BundleFlag.GET_BUNDLE_DEFAULT; +const INVALID_CODE = 1; +const LAUNCHER_BUNDLE_NAME = "com.ohos.launcher"; +const SELF_BUNDLENAME = "com.example.actsbmsetsunpermissiontest"; +const SELF_ABILITYNAME = "com.example.actsbmsetsunpermissiontest.MainAbility"; + +export default function actsBmsJsUnPermissionTest() { + describe('actsBmsJsUnPermissionTest', function () { + + /** + * @tc.number getApplicationInfos_1300 + * @tc.name getApplicationInfos_1300 + * @tc.desc test getAllApplicationInfo + */ + it('getApplicationInfos_1300', 0, async function (done) { + await bundle.getAllApplicationInfo(DEFAULT_FLAG).then(data => { + expect().assertFail(); + done(); + }).catch(err => { + expect(err).assertEqual(INVALID_CODE); + done(); + }); + bundle.getAllApplicationInfo(DEFAULT_FLAG, (err, data) => { + expect(err).assertEqual(INVALID_CODE); + expect(data).assertEqual(undefined); + done(); + }); + }); + + /** + * @tc.number getBundleInfo_2000 + * @tc.name getBundleInfo_2000 + * @tc.desc test getBundleInfo + */ + it('getBundleInfo_2000', 0, async function (done) { + await bundle.getBundleInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG, { userId: 100 }).then(data => { + expect().assertFail(); + done(); + }).catch(err => { + expect(err).assertEqual(INVALID_CODE); + done(); + }); + bundle.getBundleInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG, { userId: 100 }, (err, data) => { + expect(err).assertEqual(INVALID_CODE); + expect(data).assertEqual(undefined); + done(); + }); + }); + + /** + * @tc.number getApplicationInfo_1800 + * @tc.name getApplicationInfo_1800 + * @tc.desc test getApplicationInfo + */ + it('getApplicationInfo_1800', 0, async function (done) { + await bundle.getApplicationInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG).then(data => { + expect().assertFail(); + done(); + }).catch(err => { + expect(err).assertEqual(INVALID_CODE); + done(); + }); + bundle.getApplicationInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG, (err, data) => { + expect(err).assertEqual(INVALID_CODE); + expect(data).assertEqual(undefined); + done(); + }); + }); + + /* + * @tc.number: getAbilityInfo_100 + * @tc.name: test getAbilityInfo + * @tc.desc: test getAbilityInfo + */ + it('getAbilityInfo_200', 0, async function (done) { + await bundle.getAbilityInfo(SELF_BUNDLENAME, SELF_ABILITYNAME).then(res => { + console.info('actwsBundleManager getAbilityInfo promise success res:' + JSON.stringify(res)); + for (const item in res) { + const a = res[item]; + console.info(item + ":" + JSON.stringify(a)); + }; + checkAbilityInfo(res); + }).catch(err => { + expect(err).assertFail(); + }); + bundle.getAbilityInfo(SELF_BUNDLENAME, SELF_ABILITYNAME, (err, res) => { + if (err) { + expect(err).assertFail(); + done(); + return; + } + console.info('actwsBundleManager getAbilityInfo callback success res:' + JSON.stringify(res)); + for (const item in res) { + const a = res[item]; + console.info(item + ":" + JSON.stringify(a)); + }; + checkAbilityInfo(res); + done(); + }); + }); + + async function checkAbilityInfo(data) { + console.info("checkAbilityInfo start !!!"); + expect(data.bundleName).assertEqual("com.example.actsbmsetsunpermissiontest"); + expect(data.name).assertEqual("com.example.actsbmsetsunpermissiontest.MainAbility"); + expect(data.label).assertEqual("$string:entry_MainAbility"); + expect(data.description).assertEqual("$string:description_mainability"); + expect(data.icon).assertEqual("$media:icon"); + expect(data.srcPath).assertEqual("MainAbility"); + expect(data.srcLanguage).assertEqual("ets"); + expect(data.isVisible).assertEqual(true); + expect(data.deviceTypes[0]).assertEqual("phone"); + expect(data.process).assertEqual(""); + expect(data.uri).assertEqual(""); + expect(data.moduleName).assertEqual("entry"); + expect(data.type).assertEqual(1); + expect(data.orientation).assertEqual(0); + expect(data.launchMode).assertEqual(1); + expect(data.backgroundModes).assertEqual(0); + expect(data.descriptionId).assertLarger(0); + expect(data.formEnabled).assertEqual(false); + expect(data.iconId).assertLarger(0); + except(data.labelId).assertLarger(0); + expect(data.subType).assertEqual(0); + except(data.enabled).assertEqual(true); + expect(data.readPermission).assertEqual(""); + expect(data.writePermission).assertEqual(""); + expect(data.targetAbility).assertEqual(""); + expect(data.theme).assertEqual(""); + expect(data.metaData).assertEqual([]); + expect(data.metadata).assertEqual([]); + checkApplicationInfo(data.applicationInfo); + console.log("---checkAbilityInfo_other End--- "); + } + + async function checkApplicationInfo(info) { + console.info("checkApplicationInfo start !!!"); + expect(info.name).assertEqual("com.example.actsbmsetsunpermissiontest"); + expect(info.codePath).assertEqual("/data/app/el1/bundle/public/com.example.actsbmsetsunpermissiontest"); + expect(info.accessTokenId > 0).assertTrue(); + expect(info.description).assertEqual("$string:description_mainability"); + expect(info.descriptionId > 0).assertTrue(); + expect(info.icon).assertEqual("$media:icon"); + expect(info.iconId > 0).assertTrue(); + expect(info.label).assertEqual("$string:entry_MainAbility"); + expect(info.labelId > 0).assertTrue(); + expect(info.systemApp).assertEqual(true); + expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.example.actsbmsetsunpermissiontest/com.example.actsbmsetsunpermissiontest"); + expect(info.supportedModes).assertEqual(0); + expect(info.process).assertEqual(""); + expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.example.actsbmsetsunpermissiontest/com.example.actsbmsetsunpermissiontest"); + expect(info.metaData).expect({}); + expect(info.metadata).expect({}); + expect(info.enabled).expect(true); + expect(info.flags).expect(0); + expect(info.uid).assertLarger(0); + expect(info.entityType).assertEqual("unspecified"); + expect(info.removable).assertEqual(true); + console.info("checkApplicationInfo end !!!"); + } + }) +} diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/test/List.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/test/List.test.ets new file mode 100644 index 000000000..c6b87e8a4 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/ets/MainAbility/test/List.test.ets @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import actsBmsEtsUnPermissionTest from './ActsBmsEtsUnPermissionTest.test.ets'; + +export default function testsuite() { + actsBmsEtsUnPermissionTest(); +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..03b8532c5 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "entry_MainAbility" + }, + { + "name": "description_mainability", + "value": "ETS_Empty Ability" + } + ] +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y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V#}`+uu3TK`_GLGEAH6-}!7+gP8V$ z7a!V3qrpV33gMMuno|cXUM@6Qcx-aT?t@4ED0$2S@#?)rC7Fh3j(i;L&54!|0FMe3x*bXtFnlJzLL3aH zpi;lr6%&X;C%SVM=P%MJ6(}KH>m0w_WKuWy{X2p4!2Pqrwm;>=<2o}Dhu*bisL!?5 z)6?@AU&4YWUN)^*jr!Ozt&JdTDOw)?fw~F17S(d{|7GG(G(KeJZ0N2`FVv?5 NG*q?mAC)bG{|A+36q*14 literal 0 HcmV?d00001 diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/rawfile/star-1-2.png b/appexecfwk/bundle_standard/bundlemanager/actsbmsetsunpermissiontest/entry/src/main/resources/rawfile/star-1-2.png new file mode 100644 index 0000000000000000000000000000000000000000..450c3dd3ca68bf601bd08e5f41797d376e20d00d GIT binary patch literal 8295 zcma)iby!qi)GiDI3@ITfJq#cs(xo6VIK9g0Is58cut9YYAhAky89NJ&c$4N6Nm zw8Wj?_uaqmbN@K!?C070th3LGz1Mo*9j&FIL_x|(iid|s0au1;Ejqu(x%6MX}UcP^pVq^MKx?9Z3<6HZSZ(YTWwl+ z4})r2h&L?_5Z3xL9JTpl$1We;HwOfV*U2Dd;4VathABE2mL~&90=s!A z17A=j029Bxgn&sP{lPFWGr*0ABr?l!nhT^H>H*JtEAfpTOhQ8`F<+vJ8@ZDt_v2l} zOF0@&=65xE>0mI)Bv(k<5_x1Wr}DE!>r#HG91U6(z}Lz^i4RY3X&Tfw3&nM%1C5a) z%(ySExg?jj0C8QEq$g*CpQ*Xk7yhNiNn@bzJnMOrz${d^ZW9+zK}FP6Wt)@*prd*F z(rz`Qjq{pA&L7Hx1K?P`{_=|>e3O_&^n>(;eRI>{gq^xXjKN& z@MCLic)gQH^`1Je&lNP6cFPmo@#}YJ&*-b0%L%rIiIEC%K9b2VMf24JMlrxCU;4bM9NM`z%7*&=MO^=(k?eYD|N0NSRUq1vD*l*s- z4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yy=F+)pNTf{ny3cy>7Rkd3o*TS?TZJ`NS^NF2%HMkyS{?uJ$`!P4_L^ z1`NFDUbNyg_qREifgktnp1_v{Jbb`7m}2PTyUdOmtJj~m z9bB=ecw4_^rw1IW=of+>nrW5=d3k`3qHCxsIN_F{T1A545};;+fsyC&qChi+YV zr~M63H8ZLCPYmsjY>ls9cL%I)F|JIW-#+48$+lD4k*(P*kDM%zx_fvu4u5ZYUnI}5 zdrycFq>xFU)&X3p@pP2u%$o}}YcRn(MhJ&B2o?KS@cIVz>Ye%o^xV?CB{_Qhu z;}_q1bvO^g{8<3!gYbo4Di{8qzV+(9 zdlmksohQmRTs@qB;(Wo?dER_ux6XQb@q$tQPW?CMu6GVQd;R=iR;-S{Kr%Zks7>b1 zNs{|-+jhObYE}NR&`TGGr^h^4bjh%c>R#@=8nM&Md>_a+zVulsl;){flFekV1t9ob z+SqfV_Pv3$2f)bQ8%Ul2>fdYR^1zs0BQF~olsOj5AodC&Q_7SMFzsz2 z9newxE&jodk~tNHwl%LBMMDbrk=(^b literal 0 HcmV?d00001 diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/entry/src/main/js/test/ActsBmsHapModuleTest.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/entry/src/main/js/test/ActsBmsHapModuleTest.test.js index cb81b8ca9..8784ae80f 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/entry/src/main/js/test/ActsBmsHapModuleTest.test.js +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/entry/src/main/js/test/ActsBmsHapModuleTest.test.js @@ -98,6 +98,7 @@ describe('ActsBmsHapModuleTest', function () { let hapModuleInfo1 = result.hapModuleInfos[1]; checkHapMoudleInfos(hapModuleInfo); checkHapMoudleInfos(hapModuleInfo1); + expect(hapModuleInfo.label).assertEqual('$string:app_name'); expect(hapModuleInfo.name).assertEqual(BUNDLE_NAME1); expect(hapModuleInfo1.name).assertEqual(BUNDLE_NAME6); expect(hapModuleInfo.moduleName).assertEqual('entry'); @@ -288,7 +289,6 @@ describe('ActsBmsHapModuleTest', function () { expect(info.descriptionId).assertEqual(0); expect(info.iconPath).assertEqual("$media:icon"); expect(info.icon).assertEqual(''); - expect(info.label).assertEqual('$string:app_name'); expect(info.labelId).assertEqual(0); expect(info.iconId).assertEqual(0); expect(info.backgroundImg).assertEqual(""); diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/Test.json b/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/Test.json index 64709c85c..8674d3328 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/Test.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/Test.json @@ -33,7 +33,18 @@ { "type": "ShellKit", "run-command": [ - "chmod 644 /data/test/*.hap" + "chmod 644 /data/test/*.hap", + "bm install -p /data/test/bmsThirdBundleTest2.hap", + "bm install -p /data/test/bmsThirdBundleTest5.hap", + "bm install -p /data/test/bmsThirdBundleJs.hap", + "bm install -p /data/test/bmsThirdBundleC.hap" + ], + "teardown-command":[ + "bm uninstall -n com.example.third2", + "bm uninstall -n com.example.third5", + "bm uninstall -n com.example.js", + "bm uninstall -n com.example.c", + "rm -rf /data/test/" ] } ] diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/entry/src/main/js/test/ActsBmsJsUnPermissionTest.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/entry/src/main/js/test/ActsBmsJsUnPermissionTest.test.js index 76cb62ae7..f04dd3da7 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/entry/src/main/js/test/ActsBmsJsUnPermissionTest.test.js +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsjsunpermissiontest/entry/src/main/js/test/ActsBmsJsUnPermissionTest.test.js @@ -14,58 +14,16 @@ */ import bundle from '@ohos.bundle' -import innerBundleManager from '@ohos.bundle.innerBundleManager' import { describe, it, expect } from 'deccjsunit/index' -const STATUS_INSTALL_PERMISSION_DENIED = 0X44; -const STATUS_UNINSTALL_PERMISSION_DENIED = 0X45; const LAUNCHER_BUNDLE_NAME = 'com.ohos.launcher'; const LAUNCHER_MAIN_ABILITY = 'com.ohos.launcher.MainAbility'; -const DEFAULT_FLAG = 0; +const DEFAULT_FLAG = bundle.BundleFlag.GET_BUNDLE_DEFAULT; const DEFAULT_USER_ID = 100; const INVALID_CODE = 1; -const BUNDLE_PATH = ['/data/test/bmsJstest1.hap']; -const BUNDLE_NAME1 = 'com.example.myapplication1'; -let installParam = { - userId: 100, - installFlag: 1, - isKeepData: false -}; describe('ActsBmsJsUnPermissionTest', function () { - /* - * @tc.number: bms_JsInstallPermissionTest_0100 - * @tc.name: test js install - * @tc.desc: test js install - */ - it('bms_JsInstallPermissionTest_0100', 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install(BUNDLE_PATH, installParam, OnReceiveInstallEvent); - async function OnReceiveInstallEvent(err, data) { - expect(err.code).assertEqual(-1); - expect(data.status).assertEqual(STATUS_INSTALL_PERMISSION_DENIED); - expect(data.statusMessage).assertEqual("STATUS_INSTALL_PERMISSION_DENIED"); - done(); - } - }); - - /* - * @tc.number: bms_JsUnInstallPermissionTest_0100 - * @tc.name: test js uninstall - * @tc.desc: test js uninstall - */ - it('bms_JsUnInstallPermissionTest_0100', 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.uninstall(BUNDLE_NAME1, installParam, OnReceiveUnInstallEvent); - async function OnReceiveUnInstallEvent(err, data) { - expect(err.code).assertEqual(-1); - expect(data.status).assertEqual(STATUS_UNINSTALL_PERMISSION_DENIED); - expect(data.statusMessage).assertEqual("STATUS_UNINSTALL_PERMISSION_DENIED"); - done(); - } - }); - /* * @tc.number: getApplicationInfoTest_100 * @tc.name: test getApplicationInfo @@ -79,6 +37,11 @@ describe('ActsBmsJsUnPermissionTest', function () { expect(err).assertEqual(INVALID_CODE); done(); }); + bundle.getApplicationInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_FLAG, DEFAULT_USER_ID, (err, data) => { + expect(err).assertEqual(INVALID_CODE); + expect(data).assertEqual(undefined); + done(); + }); }); /* @@ -94,6 +57,11 @@ describe('ActsBmsJsUnPermissionTest', function () { expect(err).assertEqual(INVALID_CODE); done(); }); + bundle.getAllApplicationInfo(DEFAULT_FLAG, DEFAULT_USER_ID, (err, data) => { + expect(err).assertEqual(INVALID_CODE); + expect(data).assertEqual(undefined); + done(); + }); }); /* @@ -109,6 +77,11 @@ describe('ActsBmsJsUnPermissionTest', function () { expect(err).assertEqual(INVALID_CODE); done(); }); + bundle.getBundleInfo(LAUNCHER_BUNDLE_NAME, DEFAULT_USER_ID, (err, data) => { + expect(err).assertEqual(INVALID_CODE); + expect(data).assertEqual(undefined); + done(); + }); }); /* @@ -124,6 +97,11 @@ describe('ActsBmsJsUnPermissionTest', function () { expect(err).assertEqual(INVALID_CODE); done(); }); + bundle.getAllBundleInfo(DEFAULT_FLAG, (err, data) => { + expect(err).assertEqual(INVALID_CODE); + expect(data).assertEqual(undefined); + done(); + }); }); /* @@ -142,6 +120,15 @@ describe('ActsBmsJsUnPermissionTest', function () { expect(err).assertEqual(INVALID_CODE); done(); }); + bundle.queryAbilityByWant({ + bundleName: LAUNCHER_BUNDLE_NAME, + abilityName: LAUNCHER_MAIN_ABILITY + }, DEFAULT_FLAG, DEFAULT_USER_ID, (err, data) => { + console.info("data ===================:" + data); + expect(err).assertEqual(INVALID_CODE); + expect(data).assertEqual("QueryAbilityInfos failed"); + done(); + }); }); /* @@ -157,6 +144,11 @@ describe('ActsBmsJsUnPermissionTest', function () { expect(err).assertEqual(INVALID_CODE); done(); }); + bundle.getLaunchWantForBundle(LAUNCHER_BUNDLE_NAME, (err, data) => { + expect(err).assertEqual(INVALID_CODE); + expect(data).assertEqual(undefined); + done(); + }); }); /* @@ -194,56 +186,11 @@ describe('ActsBmsJsUnPermissionTest', function () { }); /* - * @tc.number: getLauncherAbilityInfosTest_100 - * @tc.name: test getLauncherAbilityInfos - * @tc.desc: test getLauncherAbilityInfos - */ - it('getLauncherAbilityInfosTest_100', 0, async function (done) { - await innerBundleManager.getLauncherAbilityInfos(LAUNCHER_BUNDLE_NAME, DEFAULT_USER_ID).then(data => { - expect().assertFail(); - done(); - }).catch(err => { - expect(err).assertEqual(INVALID_CODE); - done(); - }); - }); - - /* - * @tc.number: getAllLauncherAbilityInfosTest_100 - * @tc.name: test getAllLauncherAbilityInfos - * @tc.desc: test getAllLauncherAbilityInfos - */ - it('getAllLauncherAbilityInfosTest_100', 0, async function (done) { - await innerBundleManager.getAllLauncherAbilityInfos(DEFAULT_USER_ID).then(data => { - expect().assertFail(); - done(); - }).catch(err => { - expect(err).assertEqual(INVALID_CODE); - done(); - }); - }); - - /* - * @tc.number: getShortcutInfosTest_100 - * @tc.name: test getShortcutInfos - * @tc.desc: test getShortcutInfos - */ - it('getShortcutInfosTest_100', 0, async function (done) { - await innerBundleManager.getShortcutInfos(LAUNCHER_BUNDLE_NAME).then(data => { - expect().assertFail(); - done(); - }).catch(err => { - expect(err).assertEqual(INVALID_CODE); - done(); - }); - }); - - /* - * @tc.number: getAbilityLabelTest_100 - * @tc.name: getAbilityLabel : Gets the specified ability label - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ + * @tc.number: getAbilityLabelTest_100 + * @tc.name: getAbilityLabel : Gets the specified ability label + * @tc.desc: Check the return value of the interface + * @tc.level 0 + */ it('getAbilityLabelTest_100', 0, async function (done) { await bundle.getAbilityLabel(LAUNCHER_BUNDLE_NAME, LAUNCHER_MAIN_ABILITY) .then((data) => { @@ -254,6 +201,11 @@ describe('ActsBmsJsUnPermissionTest', function () { expect(error).assertEqual(INVALID_CODE); done(); }); + bundle.getAbilityLabel(LAUNCHER_BUNDLE_NAME, LAUNCHER_MAIN_ABILITY, (err, data) => { + expect(err).assertEqual(INVALID_CODE); + expect(data).assertEqual(undefined); + done(); + }); }); /* @@ -269,5 +221,10 @@ describe('ActsBmsJsUnPermissionTest', function () { expect(err).assertEqual(INVALID_CODE); done(); }); + bundle.getAbilityInfo(LAUNCHER_BUNDLE_NAME, LAUNCHER_MAIN_ABILITY, (err, data) => { + expect(err).assertEqual(INVALID_CODE); + expect(data).assertEqual(undefined); + done(); + }); }); }) diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/Test.json b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/Test.json index c916382f6..168166f99 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/Test.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/Test.json @@ -13,6 +13,33 @@ ], "type": "AppInstallKit", "cleanup-apps": true + }, + { + "type": "ShellKit", + "run-command": [ + "remount", + "mkdir /data/test/" + ] + }, + { + "type": "PushKit", + "push":[ + "bmsThirdBundleTest1.hap -> /data/bmsThirdBundleTest1.hap ", + "first_right.hap -> /data/test/first_right.hap", + "second_right.hap -> /data/second_right.hap" + ] + }, + { + "type": "ShellKit", + "run-command": [ + "bm install -p /data/bmsThirdBundleTest1.hap", + "bm install -p /data/test/first_right.hap", + "bm install -p /data/second_right.hap" + ], + "teardown-command":[ + "bm uninstall -n com.example.third1", + "bm uninstall -n com.example.l3jsdemo" + ] } ] } diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/config.json index 983a51d06..2b6dec181 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/config.json @@ -29,6 +29,9 @@ }, { "name": "ohos.permission.CHANGE_ABILITY_ENABLED_STATE" + }, + { + "name": "ohos.permission.INSTALL_BUNDLE" } ], "distro": { diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityIcon.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityIcon.test.ets new file mode 100644 index 000000000..60b610e57 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityIcon.test.ets @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import bundle from '@ohos.bundle' +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' + +const BUNDLE_NAME = "com.ohos.callui" +const ABILITIY_NAME = "com.ohos.callui.MainAbility" + +export default function getAbilityIcon() { + describe('ActsBmsGetAbilityIconTest', function () { + + /* + * @tc.number: bms_getAbilityIcon_0100 + * @tc.name: test getAbilityIcon` + * @tc.desc: get the abilityIcon + */ + it('bms_getAbilityIcon_0100', 0, async function (done) { + bundle.getAbilityIcon(BUNDLE_NAME, ABILITIY_NAME).then(pixelmap => { + console.log('bms_getAbilityIcon_0100 success: ' + pixelmap); + expect(pixelmap !== null).assertTrue(); + done(); + }) + .catch(err => { + console.info("getAbilityIcon fail:" + JSON.stringify(err)) + expect(err).assertFail(); + done(); + }); + }); + + /* + * @tc.number: bms_getAbilityIcon_0200 + * @tc.name: test getAbilityIcon + * @tc.desc: get the abilityIcon + */ + it('bms_getAbilityIcon_0200', 0, async function (done) { + bundle.getAbilityIcon(BUNDLE_NAME, ABILITIY_NAME, (err, pixelmap) => { + expect(err).assertEqual(0); + expect(pixelmap !== null).assertTrue(); + done(); + }); + }); + }); +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityLabelJsUnit.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityLabelJsUnit.test.ets index 6424c7ab5..89be8576a 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityLabelJsUnit.test.ets +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityLabelJsUnit.test.ets @@ -12,203 +12,198 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {describe, it, expect} from 'deccjsunit/index.ets'; +import { describe, it, expect } from 'deccjsunit/index.ets'; import Utils from './Utils'; import Bundle from '@ohos.bundle'; -const BUNDLE_NAME = 'com.open.harmony.packagemag' -const ABILITY_NAME = 'com.open.harmony.packagemag.MainAbility' -const SERVICE_ABILITY_NAME = 'com.open.harmony.packagemag.ServiceAbility' +const BUNDLE_NAME = 'com.open.harmony.packagemag'; +const ABILITY_NAME = 'com.open.harmony.packagemag.MainAbility'; +const SERVICE_ABILITY_NAME = 'com.open.harmony.packagemag.ServiceAbility'; +const OTHER_BUNDLE_NAME = 'com.ohos.acepackage'; +const OTHER_ABILITY_NAME = 'com.ohos.acepackage.MainAbility'; +const BUNDLE_NAME_ERROR = 'com.ohos.acepackage.error'; +const ABILITY_NAME_ERROR = 'com.ohos.acepackage.error.MainAbility'; -const OTHER_BUNDLE_NAME = 'com.ohos.acepackage' -const OTHER_ABILITY_NAME = 'com.ohos.acepackage.MainAbility' +export default function getAbilityLabelJsUnit() { -const BUNDLE_NAME_ERROR = 'com.ohos.acepackage.error' -const ABILITY_NAME_ERROR = 'com.ohos.acepackage.error.MainAbility' + describe('context_getAbilityLabel_test', function () { -export default function getAbilityLabelJsUnit() { + /* + * @tc.number: context_getAbilityLabel_test_0100 + * @tc.name: getAbilityLabel : Gets the specified ability label + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('context_getAbilityLabel_test_0100', 0, async function (done) { + let mData; + let timeOldStamp = await Utils.getNowTime(); + await Bundle.getAbilityLabel(BUNDLE_NAME, ABILITY_NAME).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_getAbilityLabel_test_0100]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_getAbilityLabel_test_0100] promise data is: ' + JSON.stringify(data)); + }).catch((error) => { + console.info('[context_getAbilityLabel_test_0100] promise error is: ' + error); + expect(error).assertFail(); + }); + getAbilityLabelSuccess('[context_getAbilityLabel_test_0100]', mData); + done(); + }); - describe('context_getAbilityLabel_test', function () { - /* - * @tc.number: context_getAbilityLabel_test_0100 - * @tc.name: getAbilityLabel : Gets the specified ability label - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it('context_getAbilityLabel_test_0100', 0, async function (done) { - let mData; - var timeOldStamp = await Utils.getNowTime(); - await Bundle.getAbilityLabel(BUNDLE_NAME, ABILITY_NAME) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_getAbilityLabel_test_0100]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_getAbilityLabel_test_0100] promise data is: ' + JSON.stringify(data)); - }) - .catch((error) => { - console.info('[context_getAbilityLabel_test_0100] promise error is: ' + error); - expect(error).assertFail(); + /* + * @tc.number: context_getAbilityLabel_test_0200 + * @tc.name: getAbilityLabel : Gets the specified ability label + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('context_getAbilityLabel_test_0200', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + let mData; + Bundle.getAbilityLabel(BUNDLE_NAME, ABILITY_NAME, (error, data) => { + if (error) { + console.error('[context_getAbilityLabel_test_0200]Operation failed. Cause: ' + JSON.stringify(error)); + expect(error).assertFail(); + } + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_getAbilityLabel_test_0200]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_getAbilityLabel_test_0200] callBack error: ' + error); + console.info('[context_getAbilityLabel_test_0200] callBack data is:' + JSON.stringify(data)); + }); + await Utils.sleep(2000); + getAbilityLabelSuccess('[context_getAbilityLabel_test_0200]', mData); + done(); }); - getAbilityLabelSuccess('[context_getAbilityLabel_test_0100]', mData); - done(); - }); - /* - * @tc.number: context_getAbilityLabel_test_0200 - * @tc.name: getAbilityLabel : Gets the specified ability label - * @tc.desc: Check the return value of the interface (by callbac) - * @tc.level 0 - */ - it('context_getAbilityLabel_test_0200', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - let mData; - Bundle.getAbilityLabel(BUNDLE_NAME, ABILITY_NAME, (error, data) => { - if(error){ - console.error('[context_getAbilityLabel_test_0200]Operation failed. Cause: ' + JSON.stringify(error)); - expect(error).assertFail(); - } - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_getAbilityLabel_test_0200]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_getAbilityLabel_test_0200] callBack error: ' + error); - console.info('[context_getAbilityLabel_test_0200] callBack data is:' + JSON.stringify(data)); - }); - await Utils.sleep(2000); - getAbilityLabelSuccess('[context_getAbilityLabel_test_0200]', mData); - done(); - }); + /* + * @tc.number: context_getAbilityLabel_test_0300 + * @tc.name: getAbilityLabel : Gets the specified ability label + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('context_getAbilityLabel_test_0300', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + let mError; + await Bundle.getAbilityLabel(BUNDLE_NAME_ERROR, ABILITY_NAME_ERROR).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_getAbilityLabel_test_0300]', timeOldStamp, timeNewStamp); + console.info('[context_getAbilityLabel_test_0300] promise data is: ' + JSON.stringify(data)); + }).catch((error) => { + let timeNewStamp = Utils.getNowTime(); + mError = error; + Utils.getDurationTime('[context_getAbilityLabel_test_0300]', timeOldStamp, timeNewStamp); + console.info('[context_getAbilityLabel_test_0300] promise error is: ' + error); + expect(mError).assertEqual(1); + }); + await Utils.sleep(2000); + getAbilityLabelFailure('[context_getAbilityLabel_test_0300]', mError); + done(); + }); - /* - * @tc.number: context_getAbilityLabel_test_0300 - * @tc.name: getAbilityLabel : Gets the specified ability label - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it('context_getAbilityLabel_test_0300', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - let mError; - await Bundle.getAbilityLabel(BUNDLE_NAME_ERROR, ABILITY_NAME_ERROR) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_getAbilityLabel_test_0300]', timeOldStamp, timeNewStamp); - console.info('[context_getAbilityLabel_test_0300] promise data is: ' + JSON.stringify(data)); - }) - .catch((error) => { - var timeNewStamp = Utils.getNowTime(); - mError = error; - Utils.getDurationTime('[context_getAbilityLabel_test_0300]', timeOldStamp, timeNewStamp); - console.info('[context_getAbilityLabel_test_0300] promise error is: ' + error); - expect(mError).assertEqual(1); + /* + * @tc.number: context_getAbilityLabel_test_0400 + * @tc.name: getAbilityLabel : Gets the specified ability label + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('context_getAbilityLabel_test_0400', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + let mError; + Bundle.getAbilityLabel(BUNDLE_NAME_ERROR, ABILITY_NAME_ERROR, (error, data) => { + if (error !== null) { + console.info('[context_getAbilityLabel_test_0400] callBack error: ' + error); + expect(error).assertEqual(1); + } + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_getAbilityLabel_test_0400]', timeOldStamp, timeNewStamp); + mError = error; + console.info('[context_getAbilityLabel_test_0400] callBack data is:' + JSON.stringify(data)); + }); + await Utils.sleep(2000); + getAbilityLabelFailure('[context_getAbilityLabel_test_0400]', mError); + done(); }); - await Utils.sleep(2000); - getAbilityLabelFailure('[context_getAbilityLabel_test_0300]', mError); - done(); - }); - /* - * @tc.number: context_getAbilityLabel_test_0400 - * @tc.name: getAbilityLabel : Gets the specified ability label - * @tc.desc: Check the return value of the interface (by callback) - * @tc.level 0 - */ - it('context_getAbilityLabel_test_0400', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - let mError; - Bundle.getAbilityLabel(BUNDLE_NAME_ERROR, ABILITY_NAME_ERROR, (error, data) => { - if(error !== null){ - console.info('[context_getAbilityLabel_test_0400] callBack error: ' + error); - expect(error).assertEqual(1); - } - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_getAbilityLabel_test_0400]', timeOldStamp, timeNewStamp); - mError = error; - console.info('[context_getAbilityLabel_test_0400] callBack data is:' + JSON.stringify(data)); - }); - await Utils.sleep(2000); - getAbilityLabelFailure('[context_getAbilityLabel_test_0400]', mError); - done(); - }); + /* + * @tc.number: context_getAbilityLabel_test_0500 + * @tc.name: getAbilityLabel : Gets the specified ability label + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('context_getAbilityLabel_test_0500', 0, async function (done) { + let mData; + let mError = null; + let timeOldStamp = await Utils.getNowTime(); + await Bundle.getAbilityLabel(OTHER_BUNDLE_NAME, OTHER_ABILITY_NAME).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_getAbilityLabel_test_0500]', timeOldStamp, timeNewStamp); + mData = data; + expect(mData).assertFail(); + console.info('[context_getAbilityLabel_test_0500] promise data is: ' + JSON.stringify(data)); + }).catch((error) => { + mError = error; + console.info('[context_getAbilityLabel_test_0500] promise error is: ' + error); + getAbilityLabelFailure('[context_getAbilityLabel_test_0500]', mError); + }); + done(); + }); - /* - * @tc.number: context_getAbilityLabel_test_0500 - * @tc.name: getAbilityLabel : Gets the specified ability label - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it('context_getAbilityLabel_test_0500', 0, async function (done) { - let mData; - let mError = null; - var timeOldStamp = await Utils.getNowTime(); - await Bundle.getAbilityLabel(OTHER_BUNDLE_NAME, OTHER_ABILITY_NAME) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_getAbilityLabel_test_0500]', timeOldStamp, timeNewStamp); - mData = data; - expect(mData).assertFail(); - console.info('[context_getAbilityLabel_test_0500] promise data is: ' + JSON.stringify(data)); - }) - .catch((error) => { - mError = error; - console.info('[context_getAbilityLabel_test_0500] promise error is: ' + error); - getAbilityLabelFailure('[context_getAbilityLabel_test_0500]', mError); + /* + * @tc.number: context_getAbilityLabel_test_0600 + * @tc.name: getAbilityLabel : Gets the specified ability label + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('context_getAbilityLabel_test_0600', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + Bundle.getAbilityLabel(OTHER_BUNDLE_NAME, OTHER_ABILITY_NAME, (error, data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_getAbilityLabel_test_0600]', timeOldStamp, timeNewStamp); + console.info('[context_getAbilityLabel_test_0600] callBack error: ' + error); + getAbilityLabelFailure('[context_getAbilityLabel_test_0600]', error); + expect(data).assertEqual(undefined); + }); + done(); }); - done(); - }); - /* - * @tc.number: context_getAbilityLabel_test_0600 - * @tc.name: getAbilityLabel : Gets the specified ability label - * @tc.desc: Check the return value of the interface (by callback) - * @tc.level 0 - */ - it('context_getAbilityLabel_test_0600', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - Bundle.getAbilityLabel(OTHER_BUNDLE_NAME, OTHER_ABILITY_NAME, (error, data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_getAbilityLabel_test_0600]', timeOldStamp, timeNewStamp); - console.info('[context_getAbilityLabel_test_0600] callBack error: ' + error); - getAbilityLabelFailure('[context_getAbilityLabel_test_0600]', error); - expect(data).assertEqual(undefined); - }); - done(); - }); + /* + * @tc.number: context_getAbilityLabel_test_0700 + * @tc.name: getAbilityLabel : Gets the specified ability label + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('context_getAbilityLabel_test_0700', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + let mError; + Bundle.getAbilityLabel(BUNDLE_NAME, SERVICE_ABILITY_NAME, (error, data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_getAbilityLabel_test_0700]', timeOldStamp, timeNewStamp); + mError = error; + if (mError !== null) { + console.info('[context_getAbilityLabel_test_0600] callBack error: ' + error); + } + console.info('[context_getAbilityLabel_test_0700] callBack data is:' + JSON.stringify(data)); + }); + await Utils.sleep(2000); + getAbilityLabelFailure('[context_getAbilityLabel_test_0700]', mError); + done(); + }); + + function getAbilityLabelSuccess(msg, data) { + console.log(msg + ' start ' + JSON.stringify(data)); + console.log(msg + ' result ' + data); + expect(typeof (data)).assertEqual('string'); + expect(data).assertEqual("entry_MainAbility"); + } - /* - * @tc.number: context_getAbilityLabel_test_0700 - * @tc.name: getAbilityLabel : Gets the specified ability label - * @tc.desc: Check the return value of the interface (by callback) - * @tc.level 0 - */ - it('context_getAbilityLabel_test_0700', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - let mError; - Bundle.getAbilityLabel(BUNDLE_NAME, SERVICE_ABILITY_NAME, (error, data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_getAbilityLabel_test_0700]', timeOldStamp, timeNewStamp); - mError = error; - if(mError !== null){ - console.info('[context_getAbilityLabel_test_0600] callBack error: ' + error); + function getAbilityLabelFailure(msg, error) { + console.log(msg + ' Failure '); + console.log(msg + ' error ' + JSON.stringify(error)); + expect(typeof (error)).assertEqual('number'); + expect(error).assertEqual(1) } - console.info('[context_getAbilityLabel_test_0700] callBack data is:' + JSON.stringify(data)); - }); - await Utils.sleep(2000); - getAbilityLabelFailure('[context_getAbilityLabel_test_0700]', mError); - done(); - }); - function getAbilityLabelSuccess(msg, data) { - console.log(msg + ' start ' + JSON.stringify(data)); - console.log(msg + ' result ' + data); - expect(typeof (data)).assertEqual('string'); - expect(data).assertEqual("entry_MainAbility"); - } + }) - function getAbilityLabelFailure(msg, error) { - console.log(msg + ' Failure '); - console.log(msg + ' error ' + JSON.stringify(error)); - expect(typeof (error)).assertEqual('number'); - expect(error).assertEqual(1) - } - }) } \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetLaunchWantForBundle.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetLaunchWantForBundle.test.ets new file mode 100644 index 000000000..b45134fa8 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetLaunchWantForBundle.test.ets @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file expect 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 bundleMgr from '@ohos.bundle'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'; + +const NAME1 = "com.example.third1"; +const NAME2 = "com.example.l3jsdemo"; +const NAME3 = "com.notexist.com"; +const ABILITYNAME1 = "com.example.third1.MainAbility"; +const ABILITYNAME2 = "com.example.l3jsdemo.MainAbility"; + +export default function getLaunchWantForBundle() { + describe('GetLaunchWantForBundleTest', function () { + + /* + * @tc.number: SUB_BMS_APPINFO_QUERY_0069 + * @tc.name: testGetLaunchWantForBundle. + * @tc.desc: Test getLaunchWantForBundle api by promise and callback. + * @tc.author renyi 00559040 + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 1 + */ + it('testGetLaunchWantForBundle', 0, async function (done) { + await bundleMgr.getLaunchWantForBundle(NAME1).then(res => { + expect(res.bundleName).assertEqual(NAME1); + expect(res.abilityName).assertEqual(ABILITYNAME1); + expect(res.deviceId).assertEqual(''); + expect(res.action).assertEqual('action.system.home'); + expect(res.entities[0]).assertEqual('entity.system.home'); + }).catch(err => { + expect(err).assertFail(); + }); + bundleMgr.getLaunchWantForBundle(NAME1, (err, res) => { + expect(err).assertEqual(0); + expect(res.bundleName).assertEqual(NAME1); + expect(res.abilityName).assertEqual(ABILITYNAME1); + expect(res.deviceId).assertEqual(''); + expect(res.action).assertEqual('action.system.home'); + expect(res.entities[0]).assertEqual('entity.system.home'); + done(); + }); + }); + + /* + * @tc.number: SUB_BMS_APPINFO_QUERY_0012 + * @tc.name: testGetLaunchWantForBundleWithManyHaps. + * @tc.desc: Test getLaunchWantForBundle api by promise and callback. + * @tc.author renyi 00559040 + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 1 + */ + it('testGetLaunchWantForBundleWithManyHaps', 0, async function (done) { + await bundleMgr.getLaunchWantForBundle(NAME2).then(res => { + expect(res.bundleName).assertEqual(NAME2); + expect(res.abilityName).assertEqual(ABILITYNAME2); + expect(res.deviceId).assertEqual(''); + expect(res.action).assertEqual('action.system.home'); + expect(res.entities[0]).assertEqual('entity.system.home'); + }).catch(err => { + expect(err).assertFail(); + }); + bundleMgr.getLaunchWantForBundle(NAME2, (err, res) => { + expect(err).assertEqual(0); + expect(res.bundleName).assertEqual(NAME2); + expect(res.abilityName).assertEqual(ABILITYNAME2); + expect(res.deviceId).assertEqual(''); + expect(res.action).assertEqual('action.system.home'); + expect(res.entities[0]).assertEqual('entity.system.home'); + done(); + }); + }); + /* + * @tc.number: SUB_BMS_APPINFO_QUERY_0013 + * @tc.name: testGetLaunchWantForBundleWithNotExist. + * @tc.desc: Test getLaunchWantForBundle api by promise and callback. + * @tc.author renyi 00559040 + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 2 + */ + it('testGetLaunchWantForBundleWithNotExist', 0, async function (done) { + await bundleMgr.getLaunchWantForBundle(NAME3).then(res => { + expect().assertFail(); + }).catch(err => { + expect(err).assertEqual(1); + }); + bundleMgr.getLaunchWantForBundle(NAME3, (err, res) => { + if (err) { + expect(err).assertEqual(1); + done(); + return; + } + expect().assertFail(); + done(); + }); + }); + + /* + * @tc.number: SUB_BMS_APPINFO_QUERY_0014 + * @tc.name: testGetLaunchWantForBundleWithInvalidParam. + * @tc.desc: Test getLaunchWantForBundle api by promise and callback. + * @tc.author renyi 00559040 + * @tc.size MediumTest + * @tc.type Function + * @tc.level Level 3 + */ + it('testGetLaunchWantForBundleWithInvalidParam', 0, async function (done) { + await bundleMgr.getLaunchWantForBundle(null).then(res => { + expect().assertFail(); + }).catch(err => { + expect(err).assertEqual(1); + }); + bundleMgr.getLaunchWantForBundle(null, (err, res) => { + if (err) { + expect(err).assertEqual(1); + done(); + return; + } + expect().assertFail(); + done(); + }); + }); + }); +} diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetNameForUid.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetNameForUid.test.ets new file mode 100644 index 000000000..580e79117 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetNameForUid.test.ets @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import bundle from '@ohos.bundle' +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' + +const BUNDLE_NAME1 = 'com.ohos.launcher'; +const BUNDLE_NAME2 = 'com.open.harmony.packagemag'; + +export default function getNameForUid() { + describe('ActsBmsgetNameForUidTest', function () { + + /** + * @tc.number getNameForUid_0100 + * @tc.name BUNDLE::getBundleInfo + * @tc.desc Test getBundleInfo interfaces with other hap. + */ + it('getNameForUid_0100', 0, async function (done) { + let dataInfo = await bundle.getBundleInfo(BUNDLE_NAME1); + await bundle.getNameForUid(dataInfo.uid).then(data => { + expect(data).assertEqual(BUNDLE_NAME1); + }).catch(err => { + console.info("getNameForUid fail:" + JSON.stringify(err)); + expect(err).assertFail(); + }); + bundle.getNameForUid(dataInfo.uid, (err, data) => { + console.info("getNameForUid result:" + JSON.stringify(data)); + expect(data).assertEqual(BUNDLE_NAME1); + expect(err).assertEqual(0); + done(); + }); + }); + + /** + * @tc.number getNameForUid_0200 + * @tc.name BUNDLE::getBundleInfo + * @tc.desc Test getBundleInfo interfaces with hap. + */ + it('getNameForUid_0200', 0, async function (done) { + let dataInfo = await bundle.getBundleInfo(BUNDLE_NAME2); + await bundle.getNameForUid(dataInfo.uid).then(data => { + expect(data).assertEqual(BUNDLE_NAME2); + }).catch(err => { + console.info("getNameForUid fail:" + JSON.stringify(err)); + expect(err).assertFail(); + }); + bundle.getNameForUid(dataInfo.uid, (err, data) => { + console.info("getNameForUid result:" + JSON.stringify(data)); + expect(data).assertEqual(BUNDLE_NAME2); + expect(err).assertEqual(0); + done(); + }); + }); + + /** + * @tc.number getNameForUid_0300 + * @tc.name BUNDLE::getBundleInfo + * @tc.desc Test getBundleInfo interfaces with notexist hap. + */ + it('getNameForUid_0300', 0, async function (done) { + await bundle.getNameForUid(123456).then(data => { + expect(data).assertFail(); + }).catch(err => { + console.info("getNameForUid fail:" + JSON.stringify(err)); + expect(err).assertEqual(1); + }); + bundle.getNameForUid(123456, (err, data) => { + console.info("getNameForUid result:" + JSON.stringify(data)); + expect(err).assertEqual(1); + done() + }); + }); + + /** + * @tc.number getNameForUid_0400 + * @tc.name BUNDLE::getBundleInfo + * @tc.desc Test getBundleInfo interfaces with error param. + */ + it('getNameForUid_0400', 0, async function (done) { + await bundle.getNameForUid(undefined).then(data => { + expect(data).assertFail(); + }).catch(err => { + console.info("getNameForUid fail:" + JSON.stringify(err)); + expect(err).assertEqual(2); + }); + bundle.getNameForUid(undefined, (err, data) => { + console.info("getNameForUid result:" + JSON.stringify(data)); + expect(err).assertEqual(2); + done() + }); + }); + + }); +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetabilityInfo.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetabilityInfo.test.ets index e9e441a62..512b37920 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetabilityInfo.test.ets +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetabilityInfo.test.ets @@ -13,295 +13,338 @@ * limitations under the License. */ -import {describe, it, expect} from 'deccjsunit/index.ets'; +import { describe, it, expect } from 'deccjsunit/index.ets'; import Utils from './Utils'; import bundleManager from '@ohos.bundle'; +const BUNDLE_NAME1 = 'com.open.harmony.packagemag'; +const BUNDLE_NAME_OTHER = 'com.ohos.acecollaboration'; +const BUNDLE_NAME2 = 'com.harmony.packagemag'; +const BUNDLE_NAME3 = ""; +const BUNDLE_NAME4 = 'com.example.third1'; +const ABILITY_NAME1 = 'com.open.harmony.packagemag.MainAbility'; +const ABILITY_NAME_OTHER = 'com.ohos.acecollaboration.MainAbility'; +const ABILITY_NAME2 = 'com.harmony.packagemag1.MainAbility'; +const ABILITY_NAME3 = 'com.example.third1.MainAbility'; + export default function GetabilityInfo() { - describe('GetabilityInfo', function () { - let bundleName = "com.open.harmony.packagemag"; - let abilityName = "com.open.harmony.packagemag.MainAbility"; - let bundleName_other = "com.ohos.acecollaboration"; - let abilityName_other = "com.ohos.acecollaboration.MainAbility"; + describe('GetabilityInfo', function () { - let bundleName1 = "com.harmony.packagemag"; - let abilityName1 = "com.harmony.packagemag1.MainAbility"; + /* + * @tc.number: bundle_GetabilityInfo_test_0100 + * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('bundle_GetabilityInfo_test_0100', 0, async function (done) { + let mData; + let timeOldStamp = await Utils.getNowTime(); + await bundleManager.getAbilityInfo(BUNDLE_NAME1, ABILITY_NAME1).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('bundle_GetabilityInfo_test_0100', timeOldStamp, timeNewStamp) + console.info('[bundle_GetabilityInfo_test_0100] getApplicationInfo promise data is: ' + JSON.stringify(data)); + for (const item in data) { + const a = data[item]; + console.info(item + ":" + JSON.stringify(a)); + }; + expect(typeof (data)).assertEqual("object"); + mData = data; + checkAbilityInfo(mData); + done(); + }).catch((error) => { + console.error('[bundle_GetabilityInfo_test_0100]Operation failed. Cause: ' + JSON.stringify(error)); + expect(error).assertFail(); + done(); + }); + }); - /* - * @tc.number: bundle_GetabilityInfo_test_0100 - * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it('bundle_GetabilityInfo_test_0100', 0, async function (done) { - let mData; - var timeOldStamp = await Utils.getNowTime(); - await bundleManager.getAbilityInfo(bundleName, abilityName) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('bundle_GetabilityInfo_test_0100', timeOldStamp, timeNewStamp) - console.info('[bundle_GetabilityInfo_test_0100] getApplicationInfo promise data is: ' + JSON.stringify(data)); - expect(typeof (data)).assertEqual("object"); - mData = data; - }).catch((error) => { - console.error('[bundle_GetabilityInfo_test_0100]Operation failed. Cause: ' + JSON.stringify(error)); - expect(error).assertFail(); - }) - checkAbilityInfo(mData); - done(); - }); + /* + * @tc.number: bundle_GetabilityInfo_test_0200 + * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('bundle_GetabilityInfo_test_0200', 0, async function (done) { + let mData; + let timeOldStamp = await Utils.getNowTime(); + bundleManager.getAbilityInfo(BUNDLE_NAME1, ABILITY_NAME1, (err, data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('bundle_GetabilityInfo_test_0200', timeOldStamp, timeNewStamp); + if (err) { + console.error('[bundle_GetabilityInfo_test_0200]Operation failed. Cause: ' + JSON.stringify(err)); + expect(err).assertFail(); + } + console.info('[bundle_GetabilityInfo_test_0200] getApplicationInfo callback data is: ' + JSON.stringify(data)); + mData = data; + Utils.sleep(2000); + checkAbilityInfo(mData); + done(); + }); + }); + + /* + * @tc.number: testgetAbilityInfoOtherBundle + * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('testgetAbilityInfoOtherBundle', 0, async function (done) { + await bundleManager.getAbilityInfo(BUNDLE_NAME4, ABILITY_NAME3).then(res => { + checkAbilityInfo_other(res); + console.info('actwsBundleManager getAbilityInfo promise success res:' + JSON.stringify(res)); + for (const item in res) { + const a = res[item]; + console.info(item + ":" + JSON.stringify(a)); + }; + }).catch(err => { + console.info('actwsBundleManager getAbilityInfo promise err:' + JSON.stringify(err)); + expect().assertFail(); + }); + bundleManager.getAbilityInfo(BUNDLE_NAME4, ABILITY_NAME3, (err, res) => { + if (err) { + console.info('actwsBundleManager getAbilityInfo callback err:' + JSON.stringify(err)); + expect().assertFail(); + done(); + return; + } + checkAbilityInfo_other(res); + console.info('actwsBundleManager getAbilityInfo callback success res:' + JSON.stringify(res)); + for (const item in res) { + const a = res[item]; + console.info(item + ":" + JSON.stringify(a)); + }; + done(); + }); + }); - /* - * @tc.number: bundle_GetabilityInfo_test_0200 - * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information - * @tc.desc: Check the return value of the interface (by callback) - * @tc.level 0 - */ - it('bundle_GetabilityInfo_test_0200', 0, async function (done) { - let mData; - var timeOldStamp = await Utils.getNowTime(); - await bundleManager.getAbilityInfo(bundleName, abilityName, (err, data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('bundle_GetabilityInfo_test_0200', timeOldStamp, timeNewStamp) - if (err) { - console.error('[bundle_GetabilityInfo_test_0200]Operation failed. Cause: ' + JSON.stringify(err)); - expect(err).assertFail(); - } - console.info('[bundle_GetabilityInfo_test_0200] getApplicationInfo callback data is: ' + JSON.stringify(data)); - mData = data; - }) - await Utils.sleep(2000); - checkAbilityInfo(mData); - done(); - }); - /* - * @tc.number: bundle_GetabilityInfo_test_0300 - * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it('bundle_GetabilityInfo_test_0300', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - await bundleManager.getAbilityInfo(bundleName_other, abilityName_other) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('bundle_GetabilityInfo_test_0300',timeOldStamp,timeNewStamp) - expect(data).assertFail(); - }).catch((error) => { - console.error('[bundle_GetabilityInfo_test_0300]Operation failed. Cause: ' + JSON.stringify(error)); - expect(error).assertEqual(1); + /* + * @tc.number: bundle_GetabilityInfo_test_0300 + * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('bundle_GetabilityInfo_test_0300', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + await bundleManager.getAbilityInfo(BUNDLE_NAME_OTHER, ABILITY_NAME_OTHER).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('bundle_GetabilityInfo_test_0300', timeOldStamp, timeNewStamp); + expect(data).assertFail(); + }).catch((error) => { + console.error('[bundle_GetabilityInfo_test_0300]Operation failed. Cause: ' + JSON.stringify(error)); + expect(error).assertEqual(1); + }); + done(); }); - done(); - }); - /* - * @tc.number: bundle_GetabilityInfo_test_0400 - * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it('bundle_GetabilityInfo_test_0400', 0, async function (done) { - let error1; - var timeOldStamp = await Utils.getNowTime(); - bundleManager.getAbilityInfo(bundleName1, abilityName) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('bundle_GetabilityInfo_test_0400', timeOldStamp, timeNewStamp) - console.info('[bundle_GetabilityInfo_test_0400] getApplicationInfo data is: ' + JSON.stringify(data)); - expect(typeof (data)).assertEqual("object"); - }).catch((error) => { - console.error('[bundle_GetabilityInfo_test_0400]Operation failed. Cause: ' + JSON.stringify(error)); - error1 = error; - }) - await Utils.sleep(1000); - await expect(error1).assertEqual(1); - done(); - }); + /* + * @tc.number: bundle_GetabilityInfo_test_0400 + * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('bundle_GetabilityInfo_test_0400', 0, async function (done) { + let error1; + let timeOldStamp = await Utils.getNowTime(); + await bundleManager.getAbilityInfo(BUNDLE_NAME2, ABILITY_NAME1).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('bundle_GetabilityInfo_test_0400', timeOldStamp, timeNewStamp); + console.info('[bundle_GetabilityInfo_test_0400] getApplicationInfo data is: ' + JSON.stringify(data)); + expect(typeof (data)).assertEqual("object"); + }).catch((error) => { + console.error('[bundle_GetabilityInfo_test_0400]Operation failed. Cause: ' + JSON.stringify(error)); + error1 = error; + }); + await Utils.sleep(1000); + await expect(error1).assertEqual(1); + done(); + }); - /* - * @tc.number: bundle_GetabilityInfo_test_0500 - * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information - * @tc.desc: Check the return value of the interface (by callback) - * @tc.level 0 - */ - it('bundle_GetabilityInfo_test_0500', 0, async function (done) { - let error - await bundleManager.getAbilityInfo(bundleName, abilityName1).then((data) => { - console.info('[bundle_GetabilityInfo_test_0500] START' + JSON.stringify(data)); - }).catch((err) => { - console.info('[bundle_GetabilityInfo_test_0500] err = ' + JSON.stringify(err)); - error = err - }) - expect(error).assertEqual(1); - done(); - console.info('[bundle_GetabilityInfo_test_0500] END'); - }); + /* + * @tc.number: bundle_GetabilityInfo_test_0500 + * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('bundle_GetabilityInfo_test_0500', 0, async function (done) { + let error + await bundleManager.getAbilityInfo(BUNDLE_NAME1, ABILITY_NAME2).then((data) => { + console.info('[bundle_GetabilityInfo_test_0500] START' + JSON.stringify(data)); + }).catch((err) => { + console.info('[bundle_GetabilityInfo_test_0500] err = ' + JSON.stringify(err)); + error = err; + }) + expect(error).assertEqual(1); + done(); + console.info('[bundle_GetabilityInfo_test_0500] END'); + }); - /* - * @tc.number: bundle_GetabilityInfo_test_0600 - * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - let bundleName2 = ""; - it('bundle_GetabilityInfo_test_0600', 0, async function (done) { - let error1; - var timeOldStamp = await Utils.getNowTime(); - bundleManager.getAbilityInfo(bundleName2, abilityName) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('bundle_GetabilityInfo_test_0600', timeOldStamp, timeNewStamp) - console.info('[bundle_GetabilityInfo_test_0600] getApplicationInfo data promise is: ' + JSON.stringify(data)); - expect(typeof (data)).assertEqual("object"); - }).catch((error) => { - console.error('[bundle_GetabilityInfo_test_0600]Operation failed. Cause: ' + JSON.stringify(error)); - error1 = error; - }) - await Utils.sleep(1000); - await expect(error1).assertEqual(1); - done(); - }); + /* + * @tc.number: bundle_GetabilityInfo_test_0600 + * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('bundle_GetabilityInfo_test_0600', 0, async function (done) { + let error1; + let timeOldStamp = await Utils.getNowTime(); + await bundleManager.getAbilityInfo(BUNDLE_NAME3, ABILITY_NAME1).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('bundle_GetabilityInfo_test_0600', timeOldStamp, timeNewStamp); + console.info('[bundle_GetabilityInfo_test_0600] getApplicationInfo data promise is: ' + JSON.stringify(data)); + expect(typeof (data)).assertEqual("object"); + }).catch((error) => { + console.error('[bundle_GetabilityInfo_test_0600]Operation failed. Cause: ' + JSON.stringify(error)); + error1 = error; + }) + await Utils.sleep(1000); + await expect(error1).assertEqual(1); + done(); + }); - /** - * 打印AbilityInfo属性信息 - * @param data - */ - function checkAbilityInfo(data) { - expect(typeof (data.bundleName)).assertEqual("string"); - expect(data.bundleName).assertEqual("com.open.harmony.packagemag") - expect(typeof (data.name)).assertEqual("string"); - expect(data.name).assertEqual("com.open.harmony.packagemag.MainAbility"); - expect(data.label).assertEqual("$string:entry_MainAbility"); - expect(typeof (data.label)).assertEqual("string"); - expect(data.description).assertEqual("$string:mainability_description"); - expect(typeof (data.description)).assertEqual("string"); - expect(data.icon).assertEqual("$media:icon"); - expect(typeof (data.icon)).assertEqual("string"); - expect(data.srcPath).assertEqual("MainAbility"); - expect(typeof (data.srcPath)).assertEqual("string"); - expect(data.srcLanguage).assertEqual("ets"); - expect(typeof (data.srcLanguage)).assertEqual("string"); - expect(data.isVisible).assertEqual(true); - expect(Array.isArray(data.permissions)).assertEqual(true); - expect(Array.isArray(data.deviceCapabilities)).assertEqual(true); - expect(data.deviceTypes[0]).assertEqual("phone"); - expect(typeof (data.process)).assertEqual("string"); - expect(data.process).assertEqual(""); - expect(typeof (data.uri)).assertEqual("string"); - expect(data.uri).assertEqual(""); - expect(data.moduleName).assertEqual("entry"); - expect(typeof (data.moduleName)).assertEqual("string"); - expect(typeof (data.applicationInfo)).assertEqual("object"); - checkApplicationInfo(data.applicationInfo); - console.log("---checkAbilityInfo End--- "); - } + /* + * @tc.number: testgetAbilityInfoOtherBundle + * @tc.name: getAbilityInfo : The basic ability is enhanced to obtain the specified Ability information + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('testgetAbilityInfoUndefined', 0, async function (done) { + await bundleManager.getAbilityInfo(undefined, undefined).then(res => { + console.info('actwsBundleManager getAbilityInfo promise success res:' + JSON.stringify(res)); + expect().assertFail(); + }).catch(err => { + expect(err).assertEqual(2); + }); + bundleManager.getAbilityInfo(null, null, (err, res) => { + if (err) { + expect(err).assertEqual(2); + done(); + return; + } + console.info('actwsBundleManager getAbilityInfo callback success res:' + JSON.stringify(res)); + expect().assertFail(); + done(); + }); + }); - /** - * 打印ApplicationInfo属性信息 - * @param data - */ - function checkApplicationInfo(info) { - expect(typeof (info)).assertEqual("object") - expect(typeof (info.name)).assertEqual("string") - expect(info.name).assertEqual("com.open.harmony.packagemag"); - expect(typeof (info.codePath)).assertEqual("string") - expect(info.codePath).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag"); - expect(typeof (info.accessTokenId)).assertEqual("number") - expect(info.accessTokenId > 0).assertTrue() - expect(typeof (info.description)).assertEqual("string") - expect(info.description).assertEqual("$string:mainability_description") - expect(typeof (info.descriptionId)).assertEqual("number") - expect(info.descriptionId > 0).assertTrue() - expect(typeof (info.icon)).assertEqual("string") - expect(info.icon).assertEqual("$media:icon") - expect(typeof (info.iconId)).assertEqual("number") - expect(info.iconId > 0).assertTrue() - expect(typeof (info.label)).assertEqual("string") - expect(info.label).assertEqual("$string:entry_MainAbility") - expect(typeof (info.labelId)).assertEqual("number") - expect(info.labelId > 0).assertTrue() - expect(info.systemApp).assertEqual(true) - expect(typeof (info.entryDir)).assertEqual("string") - expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag/com.open.harmony.packagemag"); - expect(typeof (info.supportedModes)).assertEqual("number") - expect(info.supportedModes).assertEqual(0) - expect(typeof (info.process)).assertEqual("string") - expect(info.process).assertEqual("") - expect(Array.isArray(info.moduleSourceDirs)).assertEqual(true); - expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag/com.open.harmony.packagemag"); - expect(Array.isArray(info.permissions)).assertEqual(true); - } + function checkAbilityInfo(data) { + expect(typeof (data.bundleName)).assertEqual("string"); + expect(data.bundleName).assertEqual("com.open.harmony.packagemag"); + expect(typeof (data.name)).assertEqual("string"); + expect(data.name).assertEqual("com.open.harmony.packagemag.MainAbility"); + expect(data.label).assertEqual("$string:entry_MainAbility"); + expect(typeof (data.label)).assertEqual("string"); + expect(data.description).assertEqual("$string:mainability_description"); + expect(typeof (data.description)).assertEqual("string"); + expect(data.icon).assertEqual("$media:icon"); + expect(typeof (data.icon)).assertEqual("string"); + expect(data.srcPath).assertEqual("MainAbility"); + expect(typeof (data.srcPath)).assertEqual("string"); + expect(data.srcLanguage).assertEqual("ets"); + expect(typeof (data.srcLanguage)).assertEqual("string"); + expect(data.isVisible).assertEqual(true); + expect(Array.isArray(data.permissions)).assertEqual(true); + expect(Array.isArray(data.deviceCapabilities)).assertEqual(true); + expect(data.deviceTypes[0]).assertEqual("phone"); + expect(typeof (data.process)).assertEqual("string"); + expect(data.process).assertEqual(""); + expect(typeof (data.uri)).assertEqual("string"); + expect(data.uri).assertEqual(""); + expect(data.moduleName).assertEqual("entry"); + expect(typeof (data.moduleName)).assertEqual("string"); + expect(typeof (data.applicationInfo)).assertEqual("object"); + checkApplicationInfo(data.applicationInfo); + console.log("---checkAbilityInfo End--- "); + } - /** - * 打印ApplicationInfo属性信息 - * @param data - */ - function checkAbilityInfo_other(data) { - expect(typeof (data.bundleName)).assertEqual("string"); - expect(data.bundleName).assertEqual("com.ohos.acecollaboration"); - expect(typeof (data.name)).assertEqual("string"); - expect(data.name).assertEqual("com.ohos.acecollaboration.MainAbility"); - expect(data.label).assertEqual("$string:entry_MainAbility"); - expect(typeof (data.label)).assertEqual("string"); - expect(data.description).assertEqual("$string:mainability_description"); - expect(typeof (data.description)).assertEqual("string"); - expect(data.icon).assertEqual("$media:icon"); - expect(typeof (data.icon)).assertEqual("string"); - expect(data.srcPath).assertEqual("MainAbility"); - expect(typeof (data.srcPath)).assertEqual("string"); - expect(data.srcLanguage).assertEqual("ets"); - expect(typeof (data.srcLanguage)).assertEqual("string"); - expect(data.isVisible).assertEqual(true); - expect(Array.isArray(data.permissions)).assertEqual(true); - expect(Array.isArray(data.deviceCapabilities)).assertEqual(true); - expect(data.deviceTypes[0]).assertEqual("phone"); - expect(typeof (data.process)).assertEqual("string"); - expect(data.process).assertEqual(""); - expect(typeof (data.uri)).assertEqual("string"); - expect(data.uri).assertEqual(""); - expect(data.moduleName).assertEqual("entry"); - expect(typeof (data.moduleName)).assertEqual("string"); - expect(typeof (data.applicationInfo)).assertEqual("object"); - checkApplicationInfo_other(data.applicationInfo); - console.log("---checkAbilityInfo_other End--- "); - } + function checkApplicationInfo(info) { + expect(typeof (info)).assertEqual("object"); + expect(typeof (info.name)).assertEqual("string"); + expect(info.name).assertEqual("com.open.harmony.packagemag"); + expect(typeof (info.codePath)).assertEqual("string"); + expect(info.codePath).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag"); + expect(typeof (info.accessTokenId)).assertEqual("number"); + expect(info.accessTokenId > 0).assertTrue(); + expect(typeof (info.description)).assertEqual("string"); + expect(info.description).assertEqual("$string:mainability_description"); + expect(typeof (info.descriptionId)).assertEqual("number"); + expect(info.descriptionId > 0).assertTrue(); + expect(typeof (info.icon)).assertEqual("string"); + expect(info.icon).assertEqual("$media:icon"); + expect(typeof (info.iconId)).assertEqual("number"); + expect(info.iconId > 0).assertTrue(); + expect(typeof (info.label)).assertEqual("string"); + expect(info.label).assertEqual("$string:entry_MainAbility"); + expect(typeof (info.labelId)).assertEqual("number"); + expect(info.labelId > 0).assertTrue(); + expect(info.systemApp).assertEqual(true); + expect(typeof (info.entryDir)).assertEqual("string"); + expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag/com.open.harmony.packagemag"); + expect(typeof (info.supportedModes)).assertEqual("number"); + expect(info.supportedModes).assertEqual(0); + expect(typeof (info.process)).assertEqual("string"); + expect(info.process).assertEqual(""); + expect(Array.isArray(info.moduleSourceDirs)).assertEqual(true); + expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.open.harmony.packagemag/com.open.harmony.packagemag"); + expect(Array.isArray(info.permissions)).assertEqual(true); + } + + async function checkAbilityInfo_other(data) { + expect(data.bundleName).assertEqual("com.example.third1"); + expect(data.name).assertEqual("com.example.third1.MainAbility"); + expect(data.label).assertEqual("$string:app_name"); + expect(data.description).assertEqual("$string:mainability_description"); + expect(data.icon).assertEqual("$media:icon"); + expect(data.srcPath).assertEqual(""); + expect(data.srcLanguage).assertEqual("js"); + expect(data.isVisible).assertEqual(true); + expect(data.deviceTypes[0]).assertEqual("phone"); + expect(data.process).assertEqual(""); + expect(data.uri).assertEqual(""); + expect(data.moduleName).assertEqual("entry"); + expect(data.type).assertEqual(1); + expect(data.orientation).assertEqual(0); + expect(data.launchMode).assertEqual(1); + expect(data.backgroundModes).assertEqual(0); + expect(data.descriptionId).assertLarger(0); + expect(data.formEnabled).assertEqual(false); + expect(data.iconId).assertLarger(0); + except(data.labelId).assertLarger(0); + expect(data.subType).assertEqual(0); + except(data.enabled).assertEqual(true); + expect(data.readPermission).assertEqual(""); + expect(data.writePermission).assertEqual(""); + expect(data.targetAbility).assertEqual(""); + expect(data.theme).assertEqual(""); + expect(data.metaData).assertEqual([]); + expect(data.metadata).assertEqual([]); + checkApplicationInfo_other(data.applicationInfo); + console.log("---checkAbilityInfo_other End--- "); + } - /** - * 打印ApplicationInfo属性信息 - * @param data - */ - function checkApplicationInfo_other(info) { - expect(typeof (info)).assertEqual("object") - expect(typeof (info.name)).assertEqual("string") - expect(info.name).assertEqual("com.ohos.acecollaboration"); - expect(typeof (info.codePath)).assertEqual("string") - expect(info.codePath).assertEqual("/data/app/el1/bundle/public/com.ohos.acecollaboration"); - expect(typeof (info.accessTokenId)).assertEqual("number") - expect(info.accessTokenId > 0).assertTrue() - expect(typeof (info.description)).assertEqual("string") - expect(info.description).assertEqual("$string:mainability_description") - expect(typeof (info.descriptionId)).assertEqual("number") - expect(info.descriptionId > 0).assertTrue() - expect(typeof (info.icon)).assertEqual("string") - expect(info.icon).assertEqual("$media:icon") - expect(typeof (info.iconId)).assertEqual("number") - expect(info.iconId > 0).assertTrue() - expect(typeof (info.label)).assertEqual("string") - expect(info.label).assertEqual("$string:entry_MainAbility") - expect(typeof (info.labelId)).assertEqual("number") - expect(info.labelId > 0).assertTrue() - expect(info.systemApp).assertEqual(true) - expect(typeof (info.entryDir)).assertEqual("string") - expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.ohos.acecollaboration/com.ohos.acecollaboration"); - expect(typeof (info.supportedModes)).assertEqual("number") - expect(info.supportedModes).assertEqual(0) - expect(typeof (info.process)).assertEqual("string") - expect(info.process).assertEqual("") - expect(Array.isArray(info.moduleSourceDirs)).assertEqual(true); - expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.ohos.acecollaboration/com.ohos.acecollaboration"); - expect(Array.isArray(info.permissions)).assertEqual(true); - } - }); + async function checkApplicationInfo_other(info) { + expect(info.name).assertEqual("com.example.third1"); + expect(info.codePath).assertEqual("/data/app/el1/bundle/public/com.example.third1"); + expect(info.accessTokenId > 0).assertTrue(); + expect(info.description).assertEqual("$string:mainability_description"); + expect(info.descriptionId > 0).assertTrue(); + expect(info.icon).assertEqual("$media:icon"); + expect(info.iconId > 0).assertTrue(); + expect(info.label).assertEqual("$string:app_name"); + expect(info.labelId > 0).assertTrue(); + expect(info.systemApp).assertEqual(true); + expect(info.entryDir).assertEqual("/data/app/el1/bundle/public/com.ohos.acecollaboration/com.ohos.acecollaboration"); + expect(info.supportedModes).assertEqual(0); + expect(info.process).assertEqual(""); + expect(info.moduleSourceDirs[0]).assertEqual("/data/app/el1/bundle/public/com.ohos.acecollaboration/com.ohos.acecollaboration"); + expect(info.metaData).expect({}); + expect(info.metadata).expect({}); + expect(info.enabled).expect(true); + expect(info.flags).expect(0); + expect(info.uid).assertLarger(0); + expect(info.entityType).assertEqual("unspecified"); + expect(info.removable).assertEqual(true); + } + }); } \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/IsAbilityEnabledETSUnit.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/IsAbilityEnabledETSUnit.ets index 275d03f20..d3f3a4d40 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/IsAbilityEnabledETSUnit.ets +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/IsAbilityEnabledETSUnit.ets @@ -12,274 +12,259 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {describe, it, expect} from 'deccjsunit/index.ets'; +import { describe, it, expect } from 'deccjsunit/index.ets'; import Utils from './Utils'; import Bundle from '@ohos.bundle'; -const BUNDLE_NAME = 'com.open.harmony.packagemag' -const ABILITY_NAME = 'com.open.harmony.packagemag.MainAbility' +const BUNDLE_NAME = 'com.open.harmony.packagemag'; +const BUNDLE_NAME_ERROR = 'com.ohos.acepackage.error'; +const ABILITY_NAME = 'com.open.harmony.packagemag.MainAbility'; +const ABILITY_NAME_ERROR = 'com.ohos.acepackage.error.MainAbility'; const ABILITY = { - bundleName: BUNDLE_NAME, - name: ABILITY_NAME + bundleName: BUNDLE_NAME, + name: ABILITY_NAME } - -const BUNDLE_NAME_ERROR = 'com.ohos.acepackage.error' -const ABILITY_NAME_ERROR = 'com.ohos.acepackage.error.MainAbility' const ABILITY_ERROR = { - bundleName: BUNDLE_NAME_ERROR, - name: ABILITY_NAME_ERROR + bundleName: BUNDLE_NAME_ERROR, + name: ABILITY_NAME_ERROR } export default function isAbilityEnabledETSUnit() { - describe('context_isAbilityEnabled_test', function () { - /* - * @tc.number: context_isAbilityEnabled_test_0100 - * @tc.name: isAbilityEnabled : Get whether to enable a specified ability - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it('context_isAbilityEnabled_test_0100', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - let mData; - await Bundle.isAbilityEnabled(ABILITY) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isAbilityEnabled_test_0100]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isAbilityEnabled_test_0100] promise data is: ' + JSON.stringify(data)); - }) - .catch((error) => { - console.info('[context_isAbilityEnabled_test_0100] promise error is: ' + error); - expect(error).assertFail(); - }); - getAbilityEnabledSuccess('[context_isAbilityEnabled_test_0100]', mData); - done(); - }); - /* - * @tc.number: context_isAbilityEnabled_test_0200 - * @tc.name: isAbilityEnabled : Get whether to enable a specified ability - * @tc.desc: Check the return value of the interface (by callback) - * @tc.level 0 - */ - it('context_isAbilityEnabled_test_0200', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - let mData; - Bundle.isAbilityEnabled(ABILITY, (error, data) => { - if(error){ - console.error('[context_isAbilityEnabled_test_0200]Operation failed. Cause: ' + JSON.stringify(error)); - expect(error).assertFail(); - } - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isAbilityEnabled_test_0200]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isAbilityEnabled_test_0200] callBack error: ' + error); - console.info('[context_isAbilityEnabled_test_0200] callBack data is:' + JSON.stringify(data)); - }); - await Utils.sleep(2000); - getAbilityEnabledSuccess('[context_isAbilityEnabled_test_0200]', mData); - done(); - }); + describe('context_isAbilityEnabled_test', function () { - /* - * @tc.number: context_isAbilityEnabled_test_0300 - * @tc.name: isAbilityEnabled : Get whether to enable a specified ability - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it('context_isAbilityEnabled_test_0300', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - let mData; - await Bundle.isAbilityEnabled(ABILITY_ERROR) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isAbilityEnabled_test_0300]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isAbilityEnabled_test_0300] promise data is: ' + JSON.stringify(data)); - }) - .catch((error) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isAbilityEnabled_test_0300]', timeOldStamp, timeNewStamp); - console.info('[context_isAbilityEnabled_test_0300] promise error is: ' + error); - expect(error).assertFail(); + /* + * @tc.number: context_isAbilityEnabled_test_0100 + * @tc.name: isAbilityEnabled : Get whether to enable a specified ability + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('context_isAbilityEnabled_test_0100', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + let mData; + await Bundle.isAbilityEnabled(ABILITY).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isAbilityEnabled_test_0100]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isAbilityEnabled_test_0100] promise data is: ' + JSON.stringify(data)); + }).catch((error) => { + console.info('[context_isAbilityEnabled_test_0100] promise error is: ' + error); + expect(error).assertFail(); + }); + getAbilityEnabledSuccess('[context_isAbilityEnabled_test_0100]', mData); + done(); }); - getAbilityEnabledFalse('[context_isAbilityEnabled_test_0300]', mData); - done(); - }); - - /* - * @tc.number: context_isAbilityEnabled_test_0400 - * @tc.name: isAbilityEnabled : Get whether to enable a specified ability - * @tc.desc: Check the return value of the interface (by callback) - * @tc.level 0 - */ - it('context_isAbilityEnabled_test_0400', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - let mData; - Bundle.isAbilityEnabled(ABILITY_ERROR, (error, data) => { - if(error){ - console.error('[context_isAbilityEnabled_test_0400]Operation failed. Cause: ' + JSON.stringify(error)); - expect(error).assertFail(); - } - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isAbilityEnabled_test_0300]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isAbilityEnabled_test_0400] callBack error: ' + error); - console.info('[context_isAbilityEnabled_test_0400] callBack data is:' + JSON.stringify(data)); - }); - await Utils.sleep(2000); - console.info('[context_isAbilityEnabled_test_0400] Failure '); - getAbilityEnabledFalse('[context_isAbilityEnabled_test_0300]', mData); - done(); - }); + /* + * @tc.number: context_isAbilityEnabled_test_0200 + * @tc.name: isAbilityEnabled : Get whether to enable a specified ability + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('context_isAbilityEnabled_test_0200', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + let mData; + Bundle.isAbilityEnabled(ABILITY, (error, data) => { + if (error) { + console.error('[context_isAbilityEnabled_test_0200]Operation failed. Cause: ' + JSON.stringify(error)); + expect(error).assertFail(); + } + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isAbilityEnabled_test_0200]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isAbilityEnabled_test_0200] callBack error: ' + error); + console.info('[context_isAbilityEnabled_test_0200] callBack data is:' + JSON.stringify(data)); + }); + await Utils.sleep(2000); + getAbilityEnabledSuccess('[context_isAbilityEnabled_test_0200]', mData); + done(); + }); - /* - * @tc.number: context_isAbilityEnabled_test_0500 - * @tc.name: isAbilityEnabled : Get whether to enable a specified ability - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it('context_isAbilityEnabled_test_0500', 0, async function (done) { - await Bundle.setAbilityEnabled(ABILITY, true) - .then((data) => { - console.info('[context_isAbilityEnabled_test_0500] set enable true data is: ' + JSON.stringify(data)); - }).catch((error) => { - console.info('[context_isAbilityEnabled_test_0500] set enable true error is: ' + error); - expect(error).assertFail(); - }) + /* + * @tc.number: context_isAbilityEnabled_test_0300 + * @tc.name: isAbilityEnabled : Get whether to enable a specified ability + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('context_isAbilityEnabled_test_0300', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + let mData; + await Bundle.isAbilityEnabled(ABILITY_ERROR).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isAbilityEnabled_test_0300]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isAbilityEnabled_test_0300] promise data is: ' + JSON.stringify(data)); + }).catch((error) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isAbilityEnabled_test_0300]', timeOldStamp, timeNewStamp); + console.info('[context_isAbilityEnabled_test_0300] promise error is: ' + error); + expect(error).assertFail(); + }); + getAbilityEnabledFalse('[context_isAbilityEnabled_test_0300]', mData); + done(); + }); - var timeOldStamp = await Utils.getNowTime(); - let mData; - await Bundle.isAbilityEnabled(ABILITY) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isAbilityEnabled_test_0500]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isAbilityEnabled_test_0500] promise data is: ' + JSON.stringify(data)); - }) - .catch((error) => { - console.info('[context_isAbilityEnabled_test_0500] promise error is: ' + error); - expect(error).assertFail(); + /* + * @tc.number: context_isAbilityEnabled_test_0400 + * @tc.name: isAbilityEnabled : Get whether to enable a specified ability + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('context_isAbilityEnabled_test_0400', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + let mData; + Bundle.isAbilityEnabled(ABILITY_ERROR, (error, data) => { + if (error) { + console.error('[context_isAbilityEnabled_test_0400]Operation failed. Cause: ' + JSON.stringify(error)); + expect(error).assertFail(); + } + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isAbilityEnabled_test_0300]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isAbilityEnabled_test_0400] callBack error: ' + error); + console.info('[context_isAbilityEnabled_test_0400] callBack data is:' + JSON.stringify(data)); + }); + await Utils.sleep(2000); + console.info('[context_isAbilityEnabled_test_0400] Failure '); + getAbilityEnabledFalse('[context_isAbilityEnabled_test_0300]', mData); + done(); }); - getAbilityEnabledTrue('[context_isAbilityEnabled_test_0500]', mData); - done(); - }); - /* - * @tc.number: context_isAbilityEnabled_test_0600 - * @tc.name: isAbilityEnabled : Get whether to enable a specified ability - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it('context_isAbilityEnabled_test_0600', 0, async function (done) { - await Bundle.setAbilityEnabled(ABILITY, false) - .then((data) => { - console.info('[context_isAbilityEnabled_test_0600] set enable false data is: ' + JSON.stringify(data)); - }).catch((error) => { - console.info('[context_isAbilityEnabled_test_0600] set enable false error is: ' + error); - expect(error).assertFail(); - }) - var timeOldStamp = await Utils.getNowTime(); - let mData; - await Bundle.isAbilityEnabled(ABILITY) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isAbilityEnabled_test_0600]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isAbilityEnabled_test_0600] promise data is: ' + JSON.stringify(data)); - }) - .catch((error) => { - console.info('[context_isAbilityEnabled_test_0600] promise error is: ' + error); - expect(error).assertFail(); + /* + * @tc.number: context_isAbilityEnabled_test_0500 + * @tc.name: isAbilityEnabled : Get whether to enable a specified ability + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('context_isAbilityEnabled_test_0500', 0, async function (done) { + await Bundle.setAbilityEnabled(ABILITY, true).then((data) => { + console.info('[context_isAbilityEnabled_test_0500] set enable true data is: ' + JSON.stringify(data)); + }).catch((error) => { + console.info('[context_isAbilityEnabled_test_0500] set enable true error is: ' + error); + expect(error).assertFail(); + }) + let timeOldStamp = await Utils.getNowTime(); + let mData; + await Bundle.isAbilityEnabled(ABILITY).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isAbilityEnabled_test_0500]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isAbilityEnabled_test_0500] promise data is: ' + JSON.stringify(data)); + }).catch((error) => { + console.info('[context_isAbilityEnabled_test_0500] promise error is: ' + error); + expect(error).assertFail(); + }); + getAbilityEnabledTrue('[context_isAbilityEnabled_test_0500]', mData); + done(); }); - getAbilityEnabledFalse('[context_isAbilityEnabled_test_0600]', mData); - done(); - }); - /* - * @tc.number: context_isAbilityEnabled_test_0700 - * @tc.name: isAbilityEnabled : Get whether to enable a specified ability - * @tc.desc: Check the return value of the interface (by callback) - * @tc.level 0 - */ - it('context_isAbilityEnabled_test_0700', 0, async function (done) { - await Bundle.setAbilityEnabled(ABILITY, true) - .then((data) => { - console.info('[context_isAbilityEnabled_test_0700] set enable true data is: ' + JSON.stringify(data)); - }).catch((error) => { - console.info('[context_isAbilityEnabled_test_0700] set enable true error is: ' + error); - expect(error).assertFail(); - }) + /* + * @tc.number: context_isAbilityEnabled_test_0600 + * @tc.name: isAbilityEnabled : Get whether to enable a specified ability + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('context_isAbilityEnabled_test_0600', 0, async function (done) { + await Bundle.setAbilityEnabled(ABILITY, false).then((data) => { + console.info('[context_isAbilityEnabled_test_0600] set enable false data is: ' + JSON.stringify(data)); + }).catch((error) => { + console.info('[context_isAbilityEnabled_test_0600] set enable false error is: ' + error); + expect(error).assertFail(); + }) + let timeOldStamp = await Utils.getNowTime(); + let mData; + await Bundle.isAbilityEnabled(ABILITY).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isAbilityEnabled_test_0600]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isAbilityEnabled_test_0600] promise data is: ' + JSON.stringify(data)); + }).catch((error) => { + console.info('[context_isAbilityEnabled_test_0600] promise error is: ' + error); + expect(error).assertFail(); + }); + getAbilityEnabledFalse('[context_isAbilityEnabled_test_0600]', mData); + done(); + }); - var timeOldStamp = await Utils.getNowTime(); - let mData; - Bundle.isAbilityEnabled(ABILITY, (error, data) => { - if(error){ - console.error('[context_isAbilityEnabled_test_0700]Operation failed. Cause: ' + JSON.stringify(error)); - expect(error).assertFail(); - } - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isAbilityEnabled_test_0700]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isAbilityEnabled_test_0700] callBack error: ' + error); - console.info('[context_isAbilityEnabled_test_0700] callBack data is:' + JSON.stringify(data)); - }); - await Utils.sleep(2000); - getAbilityEnabledTrue('[context_isAbilityEnabled_test_0700]', mData); - done(); - }); + /* + * @tc.number: context_isAbilityEnabled_test_0700 + * @tc.name: isAbilityEnabled : Get whether to enable a specified ability + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('context_isAbilityEnabled_test_0700', 0, async function (done) { + await Bundle.setAbilityEnabled(ABILITY, true).then((data) => { + console.info('[context_isAbilityEnabled_test_0700] set enable true data is: ' + JSON.stringify(data)); + }).catch((error) => { + console.info('[context_isAbilityEnabled_test_0700] set enable true error is: ' + error); + expect(error).assertFail(); + }) + let timeOldStamp = await Utils.getNowTime(); + let mData; + Bundle.isAbilityEnabled(ABILITY, (error, data) => { + if (error) { + console.error('[context_isAbilityEnabled_test_0700]Operation failed. Cause: ' + JSON.stringify(error)); + expect(error).assertFail(); + } + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isAbilityEnabled_test_0700]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isAbilityEnabled_test_0700] callBack error: ' + error); + console.info('[context_isAbilityEnabled_test_0700] callBack data is:' + JSON.stringify(data)); + }); + await Utils.sleep(2000); + getAbilityEnabledTrue('[context_isAbilityEnabled_test_0700]', mData); + done(); + }); - /* - * @tc.number: context_isAbilityEnabled_test_0800 - * @tc.name: isAbilityEnabled : Get whether to enable a specified ability - * @tc.desc: Check the return value of the interface (by callback) - * @tc.level 0 - */ - it('context_isAbilityEnabled_test_0800', 0, async function (done) { - await Bundle.setAbilityEnabled(ABILITY, false) - .then((data) => { - console.info('[context_isAbilityEnabled_test_0800] set enable false data is: ' + JSON.stringify(data)); - }).catch((error) => { - console.info('[context_isAbilityEnabled_test_0800] set enable false error is: ' + error); - expect(error).assertFail(); - }) + /* + * @tc.number: context_isAbilityEnabled_test_0800 + * @tc.name: isAbilityEnabled : Get whether to enable a specified ability + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('context_isAbilityEnabled_test_0800', 0, async function (done) { + await Bundle.setAbilityEnabled(ABILITY, false).then((data) => { + console.info('[context_isAbilityEnabled_test_0800] set enable false data is: ' + JSON.stringify(data)); + }).catch((error) => { + console.info('[context_isAbilityEnabled_test_0800] set enable false error is: ' + error); + expect(error).assertFail(); + }) + let timeOldStamp = await Utils.getNowTime(); + let mData; + Bundle.isAbilityEnabled(ABILITY, (error, data) => { + if (error) { + console.error('[context_isAbilityEnabled_test_0800]Operation failed. Cause: ' + JSON.stringify(error)); + expect(error).assertFail(); + } + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isAbilityEnabled_test_0800]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isAbilityEnabled_test_0800] callBack error: ' + error); + console.info('[context_isAbilityEnabled_test_0800] callBack data is:' + JSON.stringify(data)); + }); + await Utils.sleep(2000); + getAbilityEnabledFalse('[context_isAbilityEnabled_test_0800]', mData); + done(); + }); - var timeOldStamp = await Utils.getNowTime(); - let mData; - Bundle.isAbilityEnabled(ABILITY, (error, data) => { - if(error){ - console.error('[context_isAbilityEnabled_test_0800]Operation failed. Cause: ' + JSON.stringify(error)); - expect(error).assertFail(); + function getAbilityEnabledSuccess(msg, data) { + console.log(msg + ' start ' + JSON.stringify(data)); + console.log(msg + ' data : ' + data); + expect(typeof (data)).assertEqual('boolean') } - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isAbilityEnabled_test_0800]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isAbilityEnabled_test_0800] callBack error: ' + error); - console.info('[context_isAbilityEnabled_test_0800] callBack data is:' + JSON.stringify(data)); - }); - await Utils.sleep(2000); - getAbilityEnabledFalse('[context_isAbilityEnabled_test_0800]', mData); - done(); - }); + function getAbilityEnabledTrue(msg, data) { + getAbilityEnabledSuccess(msg, data); + expect(data).assertEqual(true); + } - function getAbilityEnabledSuccess(msg, data) { - console.log(msg + ' start ' + JSON.stringify(data)); - console.log(msg + ' data : ' + data); - expect(typeof (data)).assertEqual('boolean') - } - - function getAbilityEnabledTrue(msg, data) { - getAbilityEnabledSuccess(msg, data); - expect(data).assertEqual(true); - } + function getAbilityEnabledFalse(msg, data) { + getAbilityEnabledSuccess(msg, data); + expect(data).assertEqual(false); + } - function getAbilityEnabledFalse(msg, data) { - getAbilityEnabledSuccess(msg, data); - expect(data).assertEqual(false); - } + }) - }) } \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/IsApplicationEnabledETSUnit.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/IsApplicationEnabledETSUnit.ets index 769052791..19f9aec60 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/IsApplicationEnabledETSUnit.ets +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/IsApplicationEnabledETSUnit.ets @@ -12,197 +12,191 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {describe, it, expect} from 'deccjsunit/index.ets'; +import { describe, it, expect } from 'deccjsunit/index.ets'; import Utils from './Utils'; import Bundle from '@ohos.bundle'; const BUNDLE_NAME = 'com.open.harmony.packagemag' - const BUNDLE_NAME_ERROR = 'com.ohos.acepackage.error' export default function IsApplicationEnabledETSUnit() { - describe('context_isApplicationEnabled_test', function () { - /* - * @tc.number: context_isApplicationEnabled_test_0100 - * @tc.name: isApplicationEnabled : Get whether to enable a specified application - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it('context_isApplicationEnabled_test_0100', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - let mData; - await Bundle.isApplicationEnabled(BUNDLE_NAME) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isApplicationEnabled_test_0100]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isApplicationEnabled_test_0100] promise data is: ' + JSON.stringify(data)); - }) - .catch((error) => { - console.info('[context_isApplicationEnabled_test_0100] promise error is: ' + error); - expect(error).assertFail(); - }); - getApplicationEnabledSuccess('[context_isApplicationEnabled_test_0100]', mData); - done(); - }); - /* - * @tc.number: context_isApplicationEnabled_test_0200 - * @tc.name: isApplicationEnabled : Get whether to enable a specified application - * @tc.desc: Check the return value of the interface (by callback) - * @tc.level 0 - */ - it('context_isApplicationEnabled_test_0200', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - let mData; - Bundle.isApplicationEnabled(BUNDLE_NAME, (error, data) => { - if(error){ - console.error('[context_isApplicationEnabled_test_0200]Operation failed. Cause: ' + JSON.stringify(error)); - expect(error).assertFail(); - } - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isApplicationEnabled_test_0200]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isApplicationEnabled_test_0200] callBack error: ' + error); - console.info('[context_isApplicationEnabled_test_0200] callBack data is:' + JSON.stringify(data)); - }); - await Utils.sleep(2000); - getApplicationEnabledSuccess('[context_isApplicationEnabled_test_0200]', mData); - done(); - }); + describe('context_isApplicationEnabled_test', function () { - /* - * @tc.number: context_isApplicationEnabled_test_0300 - * @tc.name: isApplicationEnabled : Get whether to enable a specified application - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it('context_isApplicationEnabled_test_0300', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - let mData; - await Bundle.isApplicationEnabled(BUNDLE_NAME_ERROR) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isApplicationEnabled_test_0300]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isApplicationEnabled_test_0300] promise data is: ' + JSON.stringify(data)); - }) - .catch((error) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isApplicationEnabled_test_0300]', timeOldStamp, timeNewStamp); - console.info('[context_isApplicationEnabled_test_0300] promise error is: ' + error); - expect(error).assertFail(); + /* + * @tc.number: context_isApplicationEnabled_test_0100 + * @tc.name: isApplicationEnabled : Get whether to enable a specified application + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('context_isApplicationEnabled_test_0100', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + let mData; + await Bundle.isApplicationEnabled(BUNDLE_NAME).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isApplicationEnabled_test_0100]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isApplicationEnabled_test_0100] promise data is: ' + JSON.stringify(data)); + }).catch((error) => { + console.info('[context_isApplicationEnabled_test_0100] promise error is: ' + error); + expect(error).assertFail(); + }); + getApplicationEnabledSuccess('[context_isApplicationEnabled_test_0100]', mData); + done(); }); - getApplicationEnabledFalse('[context_isApplicationEnabled_test_0300]', mData); - done(); - }); - /* - * @tc.number: context_isApplicationEnabled_test_0400 - * @tc.name: isApplicationEnabled : Get whether to enable a specified application - * @tc.desc: Check the return value of the interface (by callback) - * @tc.level 0 - */ - it('context_isApplicationEnabled_test_0400', 0, async function (done) { - var timeOldStamp = await Utils.getNowTime(); - let mData; - Bundle.isApplicationEnabled(BUNDLE_NAME_ERROR, (error, data) => { - if(error){ - console.error('[context_isApplicationEnabled_test_0400]Operation failed. Cause: ' + JSON.stringify(error)); - expect(error).assertFail(); - } - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isApplicationEnabled_test_0400]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isApplicationEnabled_test_0400] callBack error: ' + error); - console.info('[context_isApplicationEnabled_test_0400] callBack data is:' + JSON.stringify(data)); - }); - await Utils.sleep(2000); - getApplicationEnabledFalse('[context_isApplicationEnabled_test_0300]', mData); - console.info('[context_isApplicationEnabled_test_0400] Failure '); - done(); - }); + /* + * @tc.number: context_isApplicationEnabled_test_0200 + * @tc.name: isApplicationEnabled : Get whether to enable a specified application + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('context_isApplicationEnabled_test_0200', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + let mData; + Bundle.isApplicationEnabled(BUNDLE_NAME, (error, data) => { + if (error) { + console.error('[context_isApplicationEnabled_test_0200]Operation failed. Cause: ' + JSON.stringify(error)); + expect(error).assertFail(); + } + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isApplicationEnabled_test_0200]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isApplicationEnabled_test_0200] callBack error: ' + error); + console.info('[context_isApplicationEnabled_test_0200] callBack data is:' + JSON.stringify(data)); + }); + await Utils.sleep(2000); + getApplicationEnabledSuccess('[context_isApplicationEnabled_test_0200]', mData); + done(); + }); - /* - * @tc.number: context_isApplicationEnabled_test_0500 - * @tc.name: isApplicationEnabled : Get whether to enable a specified application - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it('context_isApplicationEnabled_test_0500', 0, async function (done) { - await Bundle.setApplicationEnabled(BUNDLE_NAME, true) - .then((data) => { - console.info('[context_isApplicationEnabled_test_0500] set enable true data is: ' + JSON.stringify(data)); - }).catch((error) => { - console.info('[context_isApplicationEnabled_test_0500] set enable true error is: ' + error); - expect(error).assertFail(); + /* + * @tc.number: context_isApplicationEnabled_test_0300 + * @tc.name: isApplicationEnabled : Get whether to enable a specified application + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('context_isApplicationEnabled_test_0300', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + let mData; + await Bundle.isApplicationEnabled(BUNDLE_NAME_ERROR).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isApplicationEnabled_test_0300]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isApplicationEnabled_test_0300] promise data is: ' + JSON.stringify(data)); + }).catch((error) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isApplicationEnabled_test_0300]', timeOldStamp, timeNewStamp); + console.info('[context_isApplicationEnabled_test_0300] promise error is: ' + error); + expect(error).assertFail(); + }); + getApplicationEnabledFalse('[context_isApplicationEnabled_test_0300]', mData); + done(); }); - await Utils.sleep(1000); - var timeOldStamp = await Utils.getNowTime(); - let mData; - await Bundle.isApplicationEnabled(BUNDLE_NAME) - .then((data) => { - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isApplicationEnabled_test_0500]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isApplicationEnabled_test_0500] promise data is: ' + JSON.stringify(data)); - }) - .catch((error) => { - console.info('[context_isApplicationEnabled_test_0500] promise error is: ' + error); - expect(error).assertFail(); + + /* + * @tc.number: context_isApplicationEnabled_test_0400 + * @tc.name: isApplicationEnabled : Get whether to enable a specified application + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('context_isApplicationEnabled_test_0400', 0, async function (done) { + let timeOldStamp = await Utils.getNowTime(); + let mData; + Bundle.isApplicationEnabled(BUNDLE_NAME_ERROR, (error, data) => { + if (error) { + console.error('[context_isApplicationEnabled_test_0400]Operation failed. Cause: ' + JSON.stringify(error)); + expect(error).assertFail(); + } + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isApplicationEnabled_test_0400]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isApplicationEnabled_test_0400] callBack error: ' + error); + console.info('[context_isApplicationEnabled_test_0400] callBack data is:' + JSON.stringify(data)); + }); + await Utils.sleep(2000); + getApplicationEnabledFalse('[context_isApplicationEnabled_test_0300]', mData); + console.info('[context_isApplicationEnabled_test_0400] Failure '); + done(); }); - getApplicationEnabledTrue('[context_isApplicationEnabled_test_0500]', mData); - done(); - }); - /* - * @tc.number: context_isApplicationEnabled_test_0600 - * @tc.name: isApplicationEnabled : Get whether to enable a specified application - * @tc.desc: Check the return value of the interface (by callback) - * @tc.level 0 - */ - it('context_isApplicationEnabled_test_0600', 0, async function (done) { - await Bundle.setApplicationEnabled(BUNDLE_NAME, false) - .then((data) => { - console.info('[context_isApplicationEnabled_test_0600] set enable false data is: ' + JSON.stringify(data)); - }).catch((error) => { - console.info('[context_isApplicationEnabled_test_0600] set enable false error is: ' + error); - expect(error).assertFail(); + /* + * @tc.number: context_isApplicationEnabled_test_0500 + * @tc.name: isApplicationEnabled : Get whether to enable a specified application + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it('context_isApplicationEnabled_test_0500', 0, async function (done) { + await Bundle.setApplicationEnabled(BUNDLE_NAME, true).then((data) => { + console.info('[context_isApplicationEnabled_test_0500] set enable true data is: ' + JSON.stringify(data)); + }).catch((error) => { + console.info('[context_isApplicationEnabled_test_0500] set enable true error is: ' + error); + expect(error).assertFail(); + }); + await Utils.sleep(1000); + let timeOldStamp = await Utils.getNowTime(); + let mData; + await Bundle.isApplicationEnabled(BUNDLE_NAME).then((data) => { + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isApplicationEnabled_test_0500]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isApplicationEnabled_test_0500] promise data is: ' + JSON.stringify(data)); + }).catch((error) => { + console.info('[context_isApplicationEnabled_test_0500] promise error is: ' + error); + expect(error).assertFail(); + }); + getApplicationEnabledTrue('[context_isApplicationEnabled_test_0500]', mData); + done(); }); - await Utils.sleep(1000); - var timeOldStamp = await Utils.getNowTime(); - let mData; - Bundle.isApplicationEnabled(BUNDLE_NAME, (error, data) => { - if(error){ - console.error('[context_isApplicationEnabled_test_0600]Operation failed. Cause: ' + JSON.stringify(error)); - expect(error).assertFail(); + /* + * @tc.number: context_isApplicationEnabled_test_0600 + * @tc.name: isApplicationEnabled : Get whether to enable a specified application + * @tc.desc: Check the return value of the interface (by callback) + * @tc.level 0 + */ + it('context_isApplicationEnabled_test_0600', 0, async function (done) { + await Bundle.setApplicationEnabled(BUNDLE_NAME, false).then((data) => { + console.info('[context_isApplicationEnabled_test_0600] set enable false data is: ' + JSON.stringify(data)); + }).catch((error) => { + console.info('[context_isApplicationEnabled_test_0600] set enable false error is: ' + error); + expect(error).assertFail(); + }); + await Utils.sleep(1000); + let timeOldStamp = await Utils.getNowTime(); + let mData; + Bundle.isApplicationEnabled(BUNDLE_NAME, (error, data) => { + if (error) { + console.error('[context_isApplicationEnabled_test_0600]Operation failed. Cause: ' + JSON.stringify(error)); + expect(error).assertFail(); + } + let timeNewStamp = Utils.getNowTime(); + Utils.getDurationTime('[context_isApplicationEnabled_test_0600]', timeOldStamp, timeNewStamp); + mData = data; + console.info('[context_isApplicationEnabled_test_0600] callBack error: ' + error); + console.info('[context_isApplicationEnabled_test_0600] callBack data is:' + JSON.stringify(data)); + }); + await Utils.sleep(2000); + getApplicationEnabledFalse('[context_isApplicationEnabled_test_0600]', mData); + done(); + }); + + function getApplicationEnabledSuccess(msg, data) { + console.log(msg + ' start ' + JSON.stringify(data)); + console.log(msg + ' data : ' + data); + expect(typeof (data)).assertEqual('boolean') } - var timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isApplicationEnabled_test_0600]', timeOldStamp, timeNewStamp); - mData = data; - console.info('[context_isApplicationEnabled_test_0600] callBack error: ' + error); - console.info('[context_isApplicationEnabled_test_0600] callBack data is:' + JSON.stringify(data)); - }); - await Utils.sleep(2000); - getApplicationEnabledFalse('[context_isApplicationEnabled_test_0600]', mData); - done(); - }); - function getApplicationEnabledSuccess(msg, data) { - console.log(msg + ' start ' + JSON.stringify(data)); - console.log(msg + ' data : ' + data); - expect(typeof (data)).assertEqual('boolean') - } + function getApplicationEnabledTrue(msg, data) { + getApplicationEnabledSuccess(msg, data); + expect(data).assertEqual(true); + } + + function getApplicationEnabledFalse(msg, data) { + getApplicationEnabledSuccess(msg, data); + expect(data).assertEqual(false); + } - function getApplicationEnabledTrue(msg, data) { - getApplicationEnabledSuccess(msg, data); - expect(data).assertEqual(true); - } + }) - function getApplicationEnabledFalse(msg, data) { - getApplicationEnabledSuccess(msg, data); - expect(data).assertEqual(false); - } - }) } \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/List.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/List.test.ets index a962e2f54..0d567bdf1 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/List.test.ets +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/List.test.ets @@ -12,14 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import getLaunchWantForBundle from './GetLaunchWantForBundle.test.ets'; import getabilityInfo from './GetabilityInfo.test.ets'; import getApplicationInfoJsunit from './getApplicationInfoJsunit.test.ets'; import getAllAppInfoJsunit from './getAllApplicationInfoJsunit.test.ets'; import getAbilityLabelJsUnit from "./GetAbilityLabelJsUnit.test.ets"; import isAbilityEnableETSUnit from "./IsAbilityEnabledETSUnit.ets"; import isApplicationEnabledETSUnit from "./IsApplicationEnabledETSUnit.ets"; +import getAbilityIcon from "./GetAbilityIcon.test.ets"; +import getNameForUid from "./GetNameForUid.test.ets"; export default function testsuite() { + getAbilityIcon(); + getLaunchWantForBundle(); + getNameForUid(); //RM.007 getApplicationInfoJsunit(); getAllAppInfoJsunit(); diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/Utils.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/Utils.ets index 4d9553a5c..4437fa06f 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/Utils.ets +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/Utils.ets @@ -15,114 +15,115 @@ */ export default class Utils { - static rect_left; - static rect_top; - static rect_right; - static rect_bottom; - static rect_value; + static rect_left; + static rect_top; + static rect_right; + static rect_bottom; + static rect_value; - static sleep(time) { - return new Promise((resolve, reject) => { - setTimeout(() => { - resolve() - }, time) + static sleep(time) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve() + }, time) }).then(() => { - console.info(`sleep ${time} over...`) + console.info(`sleep ${time} over...`) }) - } - - static getComponentRect(key) { - let strJson = getInspectorByKey(key); - let obj = JSON.parse(strJson); - console.info("[getInspectorByKey] current component obj is: " + JSON.stringify(obj)); - let rectInfo = JSON.parse('[' + obj.$rect + ']') - console.info("[getInspectorByKey] rectInfo is: " + rectInfo); - this.rect_left = JSON.parse('[' + rectInfo[0] + ']')[0] - this.rect_top = JSON.parse('[' + rectInfo[0] + ']')[1] - this.rect_right = JSON.parse('[' + rectInfo[1] + ']')[0] - this.rect_bottom = JSON.parse('[' + rectInfo[1] + ']')[1] - return this.rect_value = { - "left": this.rect_left, "top": this.rect_top, "right": this.rect_right, "bottom": this.rect_bottom } - } - - static async swipe(downX, downY, upX, upY, steps) { - console.info('start to swipe') - this.drags(downX, downY, upX, upY, steps, false) - } - - static async drag(downX, downY, upX, upY, steps) { - console.info('start to drag') - this.drags(downX, downY, upX, upY, steps, true) - } - static async drags(downX, downY, upX, upY, steps, drag) { - var xStep; - var yStep; - var swipeSteps; - var ret; - xStep = 0; - yStep = 0; - ret = false; - swipeSteps = steps; - if (swipeSteps == 0) { - swipeSteps = 1; + static getComponentRect(key) { + let strJson = getInspectorByKey(key); + let obj = JSON.parse(strJson); + console.info("[getInspectorByKey] current component obj is: " + JSON.stringify(obj)); + let rectInfo = JSON.parse('[' + obj.$rect + ']') + console.info("[getInspectorByKey] rectInfo is: " + rectInfo); + this.rect_left = JSON.parse('[' + rectInfo[0] + ']')[0] + this.rect_top = JSON.parse('[' + rectInfo[0] + ']')[1] + this.rect_right = JSON.parse('[' + rectInfo[1] + ']')[0] + this.rect_bottom = JSON.parse('[' + rectInfo[1] + ']')[1] + return this.rect_value = { + "left": this.rect_left, "top": this.rect_top, "right": this.rect_right, "bottom": this.rect_bottom + } } - xStep = (upX - downX) / swipeSteps; - yStep = (upY - downY) / swipeSteps; - console.info('move step is: ' + 'xStep: ' + xStep + ' yStep: ' + yStep) - var downPonit: TouchObject = { - id: 1, - x: downX, - y: downY, - type: TouchType.Down, - } - console.info('down touch started: ' + JSON.stringify(downPonit)) - sendTouchEvent(downPonit); - console.info('start to move') - if (drag) { - await this.sleep(500) + + static async swipe(downX, downY, upX, upY, steps) { + console.info('start to swipe') + this.drags(downX, downY, upX, upY, steps, false) } - for (var i = 1;i <= swipeSteps; i++) { - var movePoint: TouchObject = { - id: 1, - x: downX + (xStep * i), - y: downY + (yStep * i), - type: TouchType.Move - } - console.info('move touch started: ' + JSON.stringify(movePoint)) - ret = sendTouchEvent(movePoint) - if (ret == false) { - break; - } - await this.sleep(5) + + static async drag(downX, downY, upX, upY, steps) { + console.info('start to drag') + this.drags(downX, downY, upX, upY, steps, true) } - console.info('start to up') - if (drag) { - await this.sleep(100) + + static async drags(downX, downY, upX, upY, steps, drag) { + let xStep; + let yStep; + let swipeSteps; + let ret; + xStep = 0; + yStep = 0; + ret = false; + swipeSteps = steps; + if (swipeSteps == 0) { + swipeSteps = 1; + } + xStep = (upX - downX) / swipeSteps; + yStep = (upY - downY) / swipeSteps; + console.info('move step is: ' + 'xStep: ' + xStep + ' yStep: ' + yStep) + let downPonit: TouchObject = { + id: 1, + x: downX, + y: downY, + type: TouchType.Down, + } + console.info('down touch started: ' + JSON.stringify(downPonit)) + sendTouchEvent(downPonit); + console.info('start to move') + if (drag) { + await this.sleep(500) + } + for (let i = 1;i <= swipeSteps; i++) { + let movePoint: TouchObject = { + id: 1, + x: downX + (xStep * i), + y: downY + (yStep * i), + type: TouchType.Move + } + console.info('move touch started: ' + JSON.stringify(movePoint)) + ret = sendTouchEvent(movePoint) + if (ret == false) { + break; + } + await this.sleep(5) + } + console.info('start to up') + if (drag) { + await this.sleep(100) + } + let upPoint: TouchObject = { + id: 1, + x: upX, + y: upY, + type: TouchType.Up, + } + console.info('up touch started: ' + JSON.stringify(upPoint)) + sendTouchEvent(upPoint) + await this.sleep(500) } - var upPoint: TouchObject = { - id: 1, - x: upX, - y: upY, - type: TouchType.Up, + + static getNowTime() { + return new Date().getTime(); } - console.info('up touch started: ' + JSON.stringify(upPoint)) - sendTouchEvent(upPoint) - await this.sleep(500) - } - static getNowTime() { - return new Date().getTime(); - } + static getDurationTime(log,startTime, endTime) { + console.info("Get Interface startTime: " + startTime); + console.info("Get Interface endTime: " + endTime); + let duration = (endTime - startTime); + console.info("Get Interface duration: " + duration); + return duration; + } - static getDurationTime(log,startTime, endTime) { - console.info("Get Interface startTime: " + startTime); - console.info("Get Interface endTime: " + endTime); - var duration = (endTime - startTime); - console.info("Get Interface duration: " + duration); - return duration; - } } diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/getAllApplicationInfoJsunit.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/getAllApplicationInfoJsunit.test.ets index 10a824ae6..02234bba2 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/getAllApplicationInfoJsunit.test.ets +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/getAllApplicationInfoJsunit.test.ets @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {describe, it, expect} from 'deccjsunit/index.ets'; +import { describe, it, expect } from 'deccjsunit/index.ets'; import Utils from './Utils'; import Bundle from '@ohos.bundle'; @@ -29,315 +29,303 @@ const TAG_TEST_0500_002 = ' bundle_getAllApplicationInfo_test_0500_0010 '; const USER_ID_100 = 100; export default function applicationBundleJsunit() { - describe('appInfoTest', function () { - /** - * @tc.number: bundle_getApplicationInfo_test_0100_001 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0100_001, 0, async function (done) { - var startTime = await Utils.getNowTime(); - let data = await Bundle.getAllApplicationInfo(Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, USER_ID_100) - .catch((error) => { - console.info(TAG_TEST_0100_001 + 'UserId promise error is: ' + error); - expect(error).assertFail(); + + describe('appInfoTest', function () { + + /** + * @tc.number: bundle_getApplicationInfo_test_0100_001 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0100_001, 0, async function (done) { + let startTime = await Utils.getNowTime(); + let data = await Bundle.getAllApplicationInfo( + Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, USER_ID_100).catch((error) => { + console.info(TAG_TEST_0100_001 + 'UserId promise error is: ' + error); + expect(error).assertFail(); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0100_001, startTime, endTime); + console.info(TAG_TEST_0100_001 + ' UserId promise data is: ' + JSON.stringify(data)); + expectData(TAG_TEST_0100_001, data) + getApplicationInfoSuccess(TAG_TEST_0100_001, data); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0100_001, startTime, endTime); - console.info(TAG_TEST_0100_001 + ' UserId promise data is: ' + JSON.stringify(data)); - expectData(TAG_TEST_0100_001, data) - getApplicationInfoSuccess(TAG_TEST_0100_001, data); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0100_002 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0100_002, 0, async function (done) { - var startTime = await Utils.getNowTime(); - let data = await Bundle.getAllApplicationInfo(Bundle.BundleFlag.GET_ALL_APPLICATION_INFO, USER_ID_100) - .catch((error) => { - console.info(TAG_TEST_0100_002 + 'UserId promise error is: ' + error); - expect(error).assertFail(); + /** + * @tc.number: bundle_getApplicationInfo_test_0100_002 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0100_002, 0, async function (done) { + let startTime = await Utils.getNowTime(); + let data = await Bundle.getAllApplicationInfo( + Bundle.BundleFlag.GET_ALL_APPLICATION_INFO, USER_ID_100).catch((error) => { + console.info(TAG_TEST_0100_002 + 'UserId promise error is: ' + error); + expect(error).assertFail(); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0100_002, startTime, endTime); + console.info(TAG_TEST_0100_002 + ' UserId promise data is: ' + JSON.stringify(data)); + expectData(TAG_TEST_0100_002, data) + getApplicationInfoSuccess(TAG_TEST_0100_002, data); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0100_002, startTime, endTime); - console.info(TAG_TEST_0100_002 + ' UserId promise data is: ' + JSON.stringify(data)); - expectData(TAG_TEST_0100_002, data) - getApplicationInfoSuccess(TAG_TEST_0100_002, data); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0100_003 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0100_003, 0, async function (done) { - var startTime = await Utils.getNowTime(); - let data = await Bundle.getAllApplicationInfo(Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_DISABLE, USER_ID_100) - .catch((error) => { - console.info(TAG_TEST_0100_003 + 'UserId promise error is: ' + error); - expect(error).assertFail(); + /** + * @tc.number: bundle_getApplicationInfo_test_0100_003 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0100_003, 0, async function (done) { + let startTime = await Utils.getNowTime(); + let data = await Bundle.getAllApplicationInfo( + Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_DISABLE, USER_ID_100).catch((error) => { + console.info(TAG_TEST_0100_003 + 'UserId promise error is: ' + error); + expect(error).assertFail(); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0100_003, startTime, endTime); + console.info(TAG_TEST_0100_003 + ' UserId promise data is: ' + JSON.stringify(data)); + expectData(TAG_TEST_0100_003, data) + getApplicationInfoSuccess(TAG_TEST_0100_003, data); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0100_003, startTime, endTime); - console.info(TAG_TEST_0100_003 + ' UserId promise data is: ' + JSON.stringify(data)); - expectData(TAG_TEST_0100_003, data) - getApplicationInfoSuccess(TAG_TEST_0100_003, data); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0200_004 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0200_001, 0, async function (done) { - var startTime = await Utils.getNowTime(); - let data = await Bundle.getAllApplicationInfo(Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION) - .catch((error) => { - console.info(TAG_TEST_0200_001 + 'onUserId promise error is: ' + error); - expect(error).assertFail(); + /** + * @tc.number: bundle_getApplicationInfo_test_0200_004 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0200_001, 0, async function (done) { + let startTime = await Utils.getNowTime(); + let data = await Bundle.getAllApplicationInfo( + Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION).catch((error) => { + console.info(TAG_TEST_0200_001 + 'onUserId promise error is: ' + error); + expect(error).assertFail(); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0200_001, startTime, endTime); + console.info(TAG_TEST_0200_001 + ' onUserId promise data is: ' + JSON.stringify(data)); + expectData(TAG_TEST_0200_001, data) + getApplicationInfoSuccess(TAG_TEST_0200_001, data); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0200_001, startTime, endTime); - console.info(TAG_TEST_0200_001 + ' onUserId promise data is: ' + JSON.stringify(data)); - expectData(TAG_TEST_0200_001, data) - getApplicationInfoSuccess(TAG_TEST_0200_001, data); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0200_005 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0200_002, 0, async function (done) { - var startTime = await Utils.getNowTime(); - let data = await Bundle.getAllApplicationInfo(Bundle.BundleFlag.GET_ALL_APPLICATION_INFO) - .catch((error) => { - console.info(TAG_TEST_0200_002 + 'onUserId promise error is: ' + error); - expect(error).assertFail(); + /** + * @tc.number: bundle_getApplicationInfo_test_0200_005 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0200_002, 0, async function (done) { + let startTime = await Utils.getNowTime(); + let data = await Bundle.getAllApplicationInfo( + Bundle.BundleFlag.GET_ALL_APPLICATION_INFO).catch((error) => { + console.info(TAG_TEST_0200_002 + 'onUserId promise error is: ' + error); + expect(error).assertFail(); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0200_002, startTime, endTime); + console.info(TAG_TEST_0200_002 + ' onUserId promise data is: ' + JSON.stringify(data)); + expectData(TAG_TEST_0200_002, data) + getApplicationInfoSuccess(TAG_TEST_0200_002, data); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0200_002, startTime, endTime); - console.info(TAG_TEST_0200_002 + ' onUserId promise data is: ' + JSON.stringify(data)); - expectData(TAG_TEST_0200_002, data) - getApplicationInfoSuccess(TAG_TEST_0200_002, data); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0200_006 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0200_003, 0, async function (done) { - var startTime = await Utils.getNowTime(); - let data = await Bundle.getAllApplicationInfo(Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_DISABLE) - .catch((error) => { - console.info(TAG_TEST_0200_003 + 'onUserId promise error is: ' + error); - expect(error).assertFail(); + /** + * @tc.number: bundle_getApplicationInfo_test_0200_006 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0200_003, 0, async function (done) { + let startTime = await Utils.getNowTime(); + let data = await Bundle.getAllApplicationInfo( + Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_DISABLE).catch((error) => { + console.info(TAG_TEST_0200_003 + 'onUserId promise error is: ' + error); + expect(error).assertFail(); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0200_003, startTime, endTime); + console.info(TAG_TEST_0200_003 + ' onUserId promise data is: ' + JSON.stringify(data)); + expectData(TAG_TEST_0200_003, data) + getApplicationInfoSuccess(TAG_TEST_0200_003, data); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0200_003, startTime, endTime); - console.info(TAG_TEST_0200_003 + ' onUserId promise data is: ' + JSON.stringify(data)); - expectData(TAG_TEST_0200_003, data) - getApplicationInfoSuccess(TAG_TEST_0200_003, data); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0300_007 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by callBack) - * @tc.level 0 - */ - it(TAG_TEST_0300_001, 0, async function (done) { - let datas; - var startTime = await Utils.getNowTime(); - Bundle.getAllApplicationInfo(Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, USER_ID_100, - (error, data) => { - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0300_001, startTime, endTime); - if(error){ - expect(error).assertFail(); - console.info(TAG_TEST_0300_001 + 'UserId callBack error: ' + error); - } - console.info(TAG_TEST_0300_001 + 'UserId callBack error: ' + error); - console.info(TAG_TEST_0300_001 + 'UserId callBack data is:' + JSON.stringify(data)); - datas = data; + /** + * @tc.number: bundle_getApplicationInfo_test_0300_007 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by callBack) + * @tc.level 0 + */ + it(TAG_TEST_0300_001, 0, async function (done) { + let datas; + let startTime = await Utils.getNowTime(); + Bundle.getAllApplicationInfo( + Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, USER_ID_100, (error, data) => { + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0300_001, startTime, endTime); + if (error) { + expect(error).assertFail(); + console.info(TAG_TEST_0300_001 + 'UserId callBack error: ' + error); + } + console.info(TAG_TEST_0300_001 + 'UserId callBack error: ' + error); + console.info(TAG_TEST_0300_001 + 'UserId callBack data is:' + JSON.stringify(data)); + datas = data; + }); + await Utils.sleep(2000); + console.info(TAG_TEST_0300_001 + 'UserId callBack datas is:' + JSON.stringify(datas)); + expectData(TAG_TEST_0300_001, datas) + getApplicationInfoSuccess(TAG_TEST_0300_001, datas); + done(); }); - await Utils.sleep(2000); - console.info(TAG_TEST_0300_001 + 'UserId callBack datas is:' + JSON.stringify(datas)); - expectData(TAG_TEST_0300_001, datas) - getApplicationInfoSuccess(TAG_TEST_0300_001, datas); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0400_008 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by callBack) - * @tc.level 0 - */ - it(TAG_TEST_0400_001, 0, async function (done) { - let datas; - var startTime = await Utils.getNowTime(); - Bundle.getAllApplicationInfo(Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, (error, data) => { - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0400_001, startTime, endTime); - if(error){ - expect(error).assertFail(); - console.info(TAG_TEST_0400_001 + 'UserId callBack error: ' + error); - } - console.info(TAG_TEST_0400_001 + 'noUserId callBack error: ' + error); - console.info(TAG_TEST_0400_001 + 'noUserId callBack data is:' + JSON.stringify(data)); - datas = data; - }); - await Utils.sleep(2000); - console.info(TAG_TEST_0400_001 + 'noUserId callBack datas is:' + JSON.stringify(datas)); - expectData(TAG_TEST_0400_001, datas) - getApplicationInfoSuccess(TAG_TEST_0400_001, datas); - done(); - }); - - /** - * @tc.number: bundle_getApplicationInfo_test_0500_009 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0500_001, 0, async function (done) { - let errors; - var startTime = await Utils.getNowTime(); - await Bundle.getAllApplicationInfo('0') - .then((data) => { - console.info(TAG_TEST_0500_001 + 'noUserId promise data is: ' + data); - expect(data).assertFail(); - }) - .catch((error) => { - console.info(TAG_TEST_0500_001 + 'noUserId promise error is: ' + error); - errors = error; - expect(errors).assertEqual(1); + /** + * @tc.number: bundle_getApplicationInfo_test_0400_008 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by callBack) + * @tc.level 0 + */ + it(TAG_TEST_0400_001, 0, async function (done) { + let datas; + let startTime = await Utils.getNowTime(); + Bundle.getAllApplicationInfo(Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, (error, data) => { + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0400_001, startTime, endTime); + if (error) { + expect(error).assertFail(); + console.info(TAG_TEST_0400_001 + 'UserId callBack error: ' + error); + } + console.info(TAG_TEST_0400_001 + 'noUserId callBack error: ' + error); + console.info(TAG_TEST_0400_001 + 'noUserId callBack data is:' + JSON.stringify(data)); + datas = data; + }); + await Utils.sleep(2000); + console.info(TAG_TEST_0400_001 + 'noUserId callBack datas is:' + JSON.stringify(datas)); + expectData(TAG_TEST_0400_001, datas) + getApplicationInfoSuccess(TAG_TEST_0400_001, datas); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0500_001, startTime, endTime); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0500_0010 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0500_002, 0, async function (done) { - let errors; - var startTime = await Utils.getNowTime(); - await Bundle.getAllApplicationInfo('0', USER_ID_100) - .then((data) => { - console.info(TAG_TEST_0500_002 + 'noUserId promise data is: ' + data); - expect(data).assertFail(); - }) - .catch((error) => { - console.info(TAG_TEST_0500_002 + 'UserId promise error is: ' + error); - errors = error; - expect(errors).assertEqual(1); + /** + * @tc.number: bundle_getApplicationInfo_test_0500_009 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0500_001, 0, async function (done) { + let errors; + let startTime = await Utils.getNowTime(); + await Bundle.getAllApplicationInfo('Bundle.BundleFlag.GET_BUNDLE_DEFAULT').then((data) => { + console.info(TAG_TEST_0500_001 + 'noUserId promise data is: ' + data); + expect(data).assertFail(); + }).catch((error) => { + console.info(TAG_TEST_0500_001 + 'noUserId promise error is: ' + error); + errors = error; + expect(errors).assertEqual(1); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0500_001, startTime, endTime); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0500_002, startTime, endTime); - done(); - }); + /** + * @tc.number: bundle_getApplicationInfo_test_0500_0010 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0500_002, 0, async function (done) { + let errors; + let startTime = await Utils.getNowTime(); + await Bundle.getAllApplicationInfo('Bundle.BundleFlag.GET_BUNDLE_DEFAULT', USER_ID_100).then((data) => { + console.info(TAG_TEST_0500_002 + 'noUserId promise data is: ' + data); + expect(data).assertFail(); + }).catch((error) => { + console.info(TAG_TEST_0500_002 + 'UserId promise error is: ' + error); + errors = error; + expect(errors).assertEqual(1); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0500_002, startTime, endTime); + done(); + }); - /** - * expect属性 - * @param msg log信息 - * @param data 数据源 - */ - function expectData(msg, data) { - console.info(msg + 'commonTest data length [' + data.length + ']'); - for (var i = 0; i < data.length; i++) { - expect(typeof (data)).assertEqual('object'); - expect(typeof (data[i].name)).assertEqual('string'); - expect(typeof (data[i].codePath)).assertEqual('string'); - expect(typeof (data[i].accessTokenId)).assertEqual('number'); - expect(typeof (data[i].description)).assertEqual('string'); - expect(typeof (data[i].descriptionId)).assertEqual('number'); - expect(typeof (data[i].icon)).assertEqual('string'); - expect(typeof (data[i].iconId)).assertEqual('number'); - expect(typeof (data[i].label)).assertEqual('string'); - expect(typeof (data[i].labelId)).assertEqual('number'); - expect(typeof (data[i].systemApp)).assertEqual('boolean') - expect(typeof (data[i].supportedModes)).assertEqual('number'); - expect(typeof (data[i].process)).assertEqual('string'); - expect(typeof (data[i].entryDir)).assertEqual('string'); - expect(typeof (data[i].metaData)).assertEqual('object'); - expect(typeof (data[i].metadata)).assertEqual('object'); - expect(typeof (data[i].enabled)).assertEqual('boolean'); - expect(typeof (data[i].flags)).assertEqual('number'); - expect(typeof (data[i].uid)).assertEqual('number'); - expect(typeof (data[i].entityType)).assertEqual('string'); - expect(typeof (data[i].removable)).assertEqual('boolean'); - expect(Array.isArray(data[i].permissions)).assertEqual(true); - expect(Array.isArray(data[i].moduleSourceDirs)).assertEqual(true); - expect(Array.isArray(data[i].moduleInfos)).assertEqual(true); - } - } + function expectData(msg, data) { + console.info(msg + 'commonTest data length [' + data.length + ']'); + for (let i = 0; i < data.length; i++) { + expect(typeof (data)).assertEqual('object'); + expect(typeof (data[i].name)).assertEqual('string'); + expect(typeof (data[i].codePath)).assertEqual('string'); + expect(typeof (data[i].accessTokenId)).assertEqual('number'); + expect(typeof (data[i].description)).assertEqual('string'); + expect(typeof (data[i].descriptionId)).assertEqual('number'); + expect(typeof (data[i].icon)).assertEqual('string'); + expect(typeof (data[i].iconId)).assertEqual('number'); + expect(typeof (data[i].label)).assertEqual('string'); + expect(typeof (data[i].labelId)).assertEqual('number'); + expect(typeof (data[i].systemApp)).assertEqual('boolean') + expect(typeof (data[i].supportedModes)).assertEqual('number'); + expect(typeof (data[i].process)).assertEqual('string'); + expect(typeof (data[i].metaData)).assertEqual('object'); + expect(typeof (data[i].metadata)).assertEqual('object'); + expect(typeof (data[i].enabled)).assertEqual('boolean'); + expect(typeof (data[i].flags)).assertEqual('number'); + expect(typeof (data[i].uid)).assertEqual('number'); + expect(typeof (data[i].entityType)).assertEqual('string'); + expect(typeof (data[i].removable)).assertEqual('boolean'); + expect(Array.isArray(data[i].permissions)).assertEqual(true); + expect(Array.isArray(data[i].moduleSourceDirs)).assertEqual(true); + expect(Array.isArray(data[i].moduleInfos)).assertEqual(true); + } + } - /** - * expect指定数据属性值 - * @param msg log信息 - * @param data 数据源 - */ - function getApplicationInfoSuccess(msg, data) { - console.info(msg + 'getApplicationInfoSuccess data length [' + data.length + ']'); - for (var i = 0; i < data.length; i++) { - if (data[i].name === 'com.open.harmony.packagemag' || i === 0 && data[i].name === '') { - console.info(msg + JSON.stringify(data[i])); - expect(data[i].name).assertEqual('com.open.harmony.packagemag'); - expect(data[i].codePath).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag'); - expect(data[i].description).assertEqual('$string:mainability_description'); - if (data[i].descriptionId !== 0) { - expect(data[i].descriptionId > 0).assertEqual(true); - } - expect(data[i].icon).assertEqual('$media:icon'); - expect(data[i].iconId > 0).assertEqual(true); - expect(data[i].label).assertEqual('$string:entry_MainAbility'); - expect(data[i].accessTokenId > 0).assertEqual(true); - if (data[i].label !== 0) { - expect(data[i].labelId > 0).assertEqual(true); - }; - if (data[i].uid !== 0) { - expect(data[i].uid > 0).assertEqual(true); - }; - expect(data[i].systemApp).assertEqual(true); - expect(data[i].supportedModes).assertEqual(0); - expect(data[i].process).assertEqual(""); - expect(data[i].entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' + - '/com.open.harmony.packagemag'); - expect(data[i].enabled).assertEqual(true); - expect(data[i].flags).assertEqual(0); - expect(data[i].entityType).assertEqual('unspecified'); - expect(data[i].removable).assertEqual(true); - expect(data[i].moduleInfos[0].moduleName).assertEqual('entry'); - expect(data[i].moduleInfos[0].moduleSourceDir).assertEqual('/data/app/el1/bundle/public/' + - 'com.open.harmony.packagemag/com.open.harmony.packagemag'); - expect(data[i].moduleSourceDirs[0]).assertEqual('/data/app/el1/bundle/public/' + - 'com.open.harmony.packagemag/com.open.harmony.packagemag'); + function getApplicationInfoSuccess(msg, data) { + console.info(msg + 'getApplicationInfoSuccess data length [' + data.length + ']'); + for (let i = 0; i < data.length; i++) { + if (data[i].name === 'com.open.harmony.packagemag' || i === 0 && data[i].name === '') { + console.info(msg + JSON.stringify(data[i])); + expect(data[i].name).assertEqual('com.open.harmony.packagemag'); + expect(data[i].codePath).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag'); + expect(data[i].description).assertEqual('$string:mainability_description'); + if (data[i].descriptionId !== 0) { + expect(data[i].descriptionId > 0).assertEqual(true); + } + expect(data[i].icon).assertEqual('$media:icon'); + expect(data[i].iconId > 0).assertEqual(true); + expect(data[i].label).assertEqual('$string:entry_MainAbility'); + expect(data[i].accessTokenId > 0).assertEqual(true); + if (data[i].label !== 0) { + expect(data[i].labelId > 0).assertEqual(true); + }; + if (data[i].uid !== 0) { + expect(data[i].uid > 0).assertEqual(true); + }; + expect(data[i].systemApp).assertEqual(true); + expect(data[i].supportedModes).assertEqual(0); + expect(data[i].process).assertEqual(""); + expect(data[i].entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' + + '/com.open.harmony.packagemag'); + expect(data[i].enabled).assertEqual(true); + expect(data[i].flags).assertEqual(0); + expect(data[i].entityType).assertEqual('unspecified'); + expect(data[i].removable).assertEqual(true); + expect(data[i].moduleInfos[0].moduleName).assertEqual('entry'); + expect(data[i].moduleInfos[0].moduleSourceDir).assertEqual('/data/app/el1/bundle/public/' + + 'com.open.harmony.packagemag/com.open.harmony.packagemag'); + expect(data[i].moduleSourceDirs[0]).assertEqual('/data/app/el1/bundle/public/' + + 'com.open.harmony.packagemag/com.open.harmony.packagemag'); + } + } } - } - } - }); + + }); + } \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/getApplicationInfoJsunit.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/getApplicationInfoJsunit.test.ets index f39646991..a9bcb952a 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/getApplicationInfoJsunit.test.ets +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/getApplicationInfoJsunit.test.ets @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {describe, it, expect} from 'deccjsunit/index.ets'; +import { describe, it, expect } from 'deccjsunit/index.ets'; import Utils from './Utils'; import Bundle from '@ohos.bundle'; @@ -33,413 +33,389 @@ const BUNDLE_NAME = 'com.open.harmony.packagemag'; const BUNDLE_NAME_OTHER = 'com.ohos.acepackage'; const USER_ID_100 = 100; - export default function applicationBundleJsunit() { - describe('appInfoTest', function () { - /** - * @tc.number: bundle_getApplicationInfo_test_0100_001 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0100_001, 0, async function (done) { - var startTime = await Utils.getNowTime(); - let data = await Bundle.getApplicationInfo(BUNDLE_NAME, Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, - USER_ID_100) - .catch((error) => { - console.info(TAG_TEST_0100_001 + 'UserId promise error is: ' + error); - expect(error).assertFail(); + + describe('appInfoTest', function () { + + /** + * @tc.number: bundle_getApplicationInfo_test_0100_001 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0100_001, 0, async function (done) { + let startTime = await Utils.getNowTime(); + let data = await Bundle.getApplicationInfo(BUNDLE_NAME, + Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, USER_ID_100).catch((error) => { + console.info(TAG_TEST_0100_001 + 'UserId promise error is: ' + error); + expect(error).assertFail(); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0100_001, startTime, endTime); + console.info(TAG_TEST_0100_001 + ' UserId promise data is: ' + JSON.stringify(data)); + expectData(TAG_TEST_0100_001, data); + getApplicationInfoSuccess(TAG_TEST_0100_001, data); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0100_001, startTime, endTime); - console.info(TAG_TEST_0100_001 + ' UserId promise data is: ' + JSON.stringify(data)); - expectData(TAG_TEST_0100_001, data); - getApplicationInfoSuccess(TAG_TEST_0100_001, data); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0100_002 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0100_002, 0, async function (done) { - var startTime = await Utils.getNowTime(); - let data = await Bundle.getApplicationInfo(BUNDLE_NAME, Bundle.BundleFlag.GET_ALL_APPLICATION_INFO, USER_ID_100) - .catch((error) => { - console.info(TAG_TEST_0100_002 + 'UserId promise error is: ' + error); - expect(error).assertFail(); + /** + * @tc.number: bundle_getApplicationInfo_test_0100_002 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0100_002, 0, async function (done) { + let startTime = await Utils.getNowTime(); + let data = await Bundle.getApplicationInfo(BUNDLE_NAME, + Bundle.BundleFlag.GET_ALL_APPLICATION_INFO, USER_ID_100).catch((error) => { + console.info(TAG_TEST_0100_002 + 'UserId promise error is: ' + error); + expect(error).assertFail(); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0100_002, startTime, endTime); + console.info(TAG_TEST_0100_002 + ' UserId promise data is: ' + JSON.stringify(data)); + expectData(TAG_TEST_0100_002, data); + getApplicationInfoSuccess_plus(TAG_TEST_0100_002, data); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0100_002, startTime, endTime); - console.info(TAG_TEST_0100_002 + ' UserId promise data is: ' + JSON.stringify(data)); - expectData(TAG_TEST_0100_002, data); - getApplicationInfoSuccess_plus(TAG_TEST_0100_002, data); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0100_003 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0100_003, 0, async function (done) { - var startTime = await Utils.getNowTime(); - let data = await Bundle.getApplicationInfo(BUNDLE_NAME, Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_DISABLE, - USER_ID_100) - .catch((error) => { - console.info(TAG_TEST_0100_003 + 'UserId promise error is: ' + error); - expect(error).assertFail(); + /** + * @tc.number: bundle_getApplicationInfo_test_0100_003 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0100_003, 0, async function (done) { + let startTime = await Utils.getNowTime(); + let data = await Bundle.getApplicationInfo(BUNDLE_NAME, + Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_DISABLE, USER_ID_100).catch((error) => { + console.info(TAG_TEST_0100_003 + 'UserId promise error is: ' + error); + expect(error).assertFail(); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0100_003, startTime, endTime); + console.info(TAG_TEST_0100_003 + ' UserId promise data is: ' + JSON.stringify(data)); + expectData(TAG_TEST_0100_003, data); + getApplicationInfoSuccess_plus(TAG_TEST_0100_003, data); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0100_003, startTime, endTime); - console.info(TAG_TEST_0100_003 + ' UserId promise data is: ' + JSON.stringify(data)); - expectData(TAG_TEST_0100_003, data); - getApplicationInfoSuccess_plus(TAG_TEST_0100_003, data); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0200_004 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0200_001, 0, async function (done) { - var startTime = await Utils.getNowTime(); - let data = await Bundle.getApplicationInfo(BUNDLE_NAME, Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION) - .catch((error) => { - console.info(TAG_TEST_0200_001 + 'onUserId promise error is: ' + error); - expect(error).assertFail(); + /** + * @tc.number: bundle_getApplicationInfo_test_0200_001 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0200_001, 0, async function (done) { + let startTime = await Utils.getNowTime(); + let data = await Bundle.getApplicationInfo(BUNDLE_NAME, + Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION).catch((error) => { + console.info(TAG_TEST_0200_001 + 'onUserId promise error is: ' + error); + expect(error).assertFail(); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0200_001, startTime, endTime); + console.info(TAG_TEST_0200_001 + ' onUserId promise data is: ' + JSON.stringify(data)); + expectData(TAG_TEST_0200_001, data); + getApplicationInfoSuccess(TAG_TEST_0200_001, data); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0200_001, startTime, endTime); - console.info(TAG_TEST_0200_001 + ' onUserId promise data is: ' + JSON.stringify(data)); - expectData(TAG_TEST_0200_001, data); - getApplicationInfoSuccess(TAG_TEST_0200_001, data); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0200_005 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0200_002, 0, async function (done) { - var startTime = await Utils.getNowTime(); - let data = await Bundle.getApplicationInfo(BUNDLE_NAME, Bundle.BundleFlag.GET_ALL_APPLICATION_INFO) - .catch((error) => { - console.info(TAG_TEST_0200_002 + 'onUserId promise error is: ' + error); - expect(error).assertFail(); + /** + * @tc.number: bundle_getApplicationInfo_test_0200_002 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0200_002, 0, async function (done) { + let startTime = await Utils.getNowTime(); + let data = await Bundle.getApplicationInfo(BUNDLE_NAME, + Bundle.BundleFlag.GET_ALL_APPLICATION_INFO).catch((error) => { + console.info(TAG_TEST_0200_002 + 'onUserId promise error is: ' + error); + expect(error).assertFail(); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0200_002, startTime, endTime); + console.info(TAG_TEST_0200_002 + ' onUserId promise data is: ' + JSON.stringify(data)); + expectData(TAG_TEST_0200_002, data); + getApplicationInfoSuccess_plus(TAG_TEST_0200_002, data); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0200_002, startTime, endTime); - console.info(TAG_TEST_0200_002 + ' onUserId promise data is: ' + JSON.stringify(data)); - expectData(TAG_TEST_0200_002, data); - getApplicationInfoSuccess_plus(TAG_TEST_0200_002, data); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0200_006 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0200_003, 0, async function (done) { - var startTime = await Utils.getNowTime(); - let data = await Bundle.getApplicationInfo(BUNDLE_NAME, Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_DISABLE) - .catch((error) => { - console.info(TAG_TEST_0200_003 + 'onUserId promise error is: ' + error); - expect(error).assertFail(); + /** + * @tc.number: bundle_getApplicationInfo_test_0200_003 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0200_003, 0, async function (done) { + let startTime = await Utils.getNowTime(); + let data = await Bundle.getApplicationInfo(BUNDLE_NAME, + Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_DISABLE).catch((error) => { + console.info(TAG_TEST_0200_003 + 'onUserId promise error is: ' + error); + expect(error).assertFail(); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0200_003, startTime, endTime); + console.info(TAG_TEST_0200_003 + ' onUserId promise data is: ' + JSON.stringify(data)); + expectData(TAG_TEST_0200_003, data); + getApplicationInfoSuccess_plus(TAG_TEST_0200_003, data); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0200_003, startTime, endTime); - console.info(TAG_TEST_0200_003 + ' onUserId promise data is: ' + JSON.stringify(data)); - expectData(TAG_TEST_0200_003, data); - getApplicationInfoSuccess_plus(TAG_TEST_0200_003, data); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0300_007 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by callBack) - * @tc.level 0 - */ - it(TAG_TEST_0300_001, 0, async function (done) { - let errors; - let datas; - var startTime = await Utils.getNowTime(); - Bundle.getApplicationInfo(BUNDLE_NAME, Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, - USER_ID_100, (error, data) => { - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0300_001, startTime, endTime); - errors = error; - if(errors){ - expect(errors).assertFail(); - console.info(TAG_TEST_0300_001 + 'UserId callBack error: ' + error); - } - console.info(TAG_TEST_0300_001 + 'UserId callBack data is:' + JSON.stringify(data)); - datas = data; + /** + * @tc.number: bundle_getApplicationInfo_test_0300_001 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by callBack) + * @tc.level 0 + */ + it(TAG_TEST_0300_001, 0, async function (done) { + let errors; + let datas; + let startTime = await Utils.getNowTime(); + Bundle.getApplicationInfo(BUNDLE_NAME, + Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, USER_ID_100, (error, data) => { + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0300_001, startTime, endTime); + errors = error; + if (errors) { + expect(errors).assertFail(); + console.info(TAG_TEST_0300_001 + 'UserId callBack error: ' + error); + } + console.info(TAG_TEST_0300_001 + 'UserId callBack data is:' + JSON.stringify(data)); + datas = data; + }); + await Utils.sleep(2000); + console.info(TAG_TEST_0300_001 + 'UserId callBack data is: ' + JSON.stringify(datas)); + expectData(TAG_TEST_0300_001, datas); + getApplicationInfoSuccess(TAG_TEST_0300_001, datas); + done(); }); - await Utils.sleep(2000); - console.info(TAG_TEST_0300_001 + 'UserId callBack data is: ' + JSON.stringify(datas)); - expectData(TAG_TEST_0300_001, datas); - getApplicationInfoSuccess(TAG_TEST_0300_001, datas); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0400_008 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by callBack) - * @tc.level 0 - */ - it(TAG_TEST_0400_001, 0, async function (done) { - let errors; - let datas; - var startTime = await Utils.getNowTime(); - Bundle.getApplicationInfo(BUNDLE_NAME, Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, (error, data) => { - var endTime = Utils.getNowTime(); - errors = error; - if(errors){ - expect(errors).assertFail(); - console.info(TAG_TEST_0400_001 + 'UserId callBack error: ' + error); - } - Utils.getDurationTime(TAG_TEST_0400_001, startTime, endTime); - console.info(TAG_TEST_0400_001 + 'noUserId callBack data is:' + JSON.stringify(data)); - datas = data; - }); - await Utils.sleep(2000); - console.info(TAG_TEST_0400_001 + 'noUserId callBack data is: ' + JSON.stringify(datas)); - expectData(TAG_TEST_0400_001, datas); - getApplicationInfoSuccess(TAG_TEST_0400_001, datas); - done(); - }); + /** + * @tc.number: bundle_getApplicationInfo_test_0400_001 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by callBack) + * @tc.level 0 + */ + it(TAG_TEST_0400_001, 0, async function (done) { + let errors; + let datas; + let startTime = await Utils.getNowTime(); + Bundle.getApplicationInfo(BUNDLE_NAME, + Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, (error, data) => { + let endTime = Utils.getNowTime(); + errors = error; + if (errors) { + expect(errors).assertFail(); + console.info(TAG_TEST_0400_001 + 'UserId callBack error: ' + error); + } + Utils.getDurationTime(TAG_TEST_0400_001, startTime, endTime); + console.info(TAG_TEST_0400_001 + 'noUserId callBack data is:' + JSON.stringify(data)); + datas = data; + }); + await Utils.sleep(2000); + console.info(TAG_TEST_0400_001 + 'noUserId callBack data is: ' + JSON.stringify(datas)); + expectData(TAG_TEST_0400_001, datas); + getApplicationInfoSuccess(TAG_TEST_0400_001, datas); + done(); + }); - /** - * @tc.number: bundle_getApplicationInfo_test_0500_009 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0500_001, 0, async function (done) { - var startTime = await Utils.getNowTime(); - await Bundle.getApplicationInfo('', 0) - .then((data) => { - console.info(TAG_TEST_0500_001 + 'noUserId promise data is: ' + data); - expect(data).assertFail(); - }) - .catch((error) => { - console.info(TAG_TEST_0500_001 + 'noUserId promise error is: ' + error); - expect(error).assertEqual(1); + /** + * @tc.number: bundle_getApplicationInfo_test_0500_001 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0500_001, 0, async function (done) { + let startTime = await Utils.getNowTime(); + await Bundle.getApplicationInfo('', Bundle.BundleFlag.GET_BUNDLE_DEFAULT).then((data) => { + console.info(TAG_TEST_0500_001 + 'noUserId promise data is: ' + data); + expect(data).assertFail(); + }).catch((error) => { + console.info(TAG_TEST_0500_001 + 'noUserId promise error is: ' + error); + expect(error).assertEqual(1); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0500_001, startTime, endTime); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0500_001, startTime, endTime); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0500_0010 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0500_002, 0, async function (done) { - var startTime = await Utils.getNowTime(); - await Bundle.getApplicationInfo('', '0', USER_ID_100) - .then((data) => { - console.info(TAG_TEST_0500_002 + 'UserId promise data is: ' + data); - expect(data).assertFail(); - }) - .catch((error) => { - console.info(TAG_TEST_0500_002 + 'UserId promise error is: ' + error); - expect(error).assertEqual(1); + /** + * @tc.number: bundle_getApplicationInfo_test_0500_002 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0500_002, 0, async function (done) { + let startTime = await Utils.getNowTime(); + await Bundle.getApplicationInfo('', 'Bundle.BundleFlag.GET_BUNDLE_DEFAULT', USER_ID_100).then((data) => { + console.info(TAG_TEST_0500_002 + 'UserId promise data is: ' + data); + expect(data).assertFail(); + }).catch((error) => { + console.info(TAG_TEST_0500_002 + 'UserId promise error is: ' + error); + expect(error).assertEqual(1); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0500_002, startTime, endTime); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0500_002, startTime, endTime); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0600_0011 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0600_001, 0, async function (done) { - let errors - var startTime = await Utils.getNowTime(); - await Bundle.getApplicationInfo(BUNDLE_NAME_OTHER, - Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION) - .then((data) => { - console.info(TAG_TEST_0600_001 + 'other bundleName noUserId promise data is: ' + data); - expect(data).assertFail(); - }) - .catch((error) => { - console.info(TAG_TEST_0600_001 + 'other bundleName noUserId promise error is: ' + error); - errors = error - expect(errors).assertEqual(1); + /** + * @tc.number: bundle_getApplicationInfo_test_0600_001 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0600_001, 0, async function (done) { + let errors + let startTime = await Utils.getNowTime(); + await Bundle.getApplicationInfo(BUNDLE_NAME_OTHER, + Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION).then((data) => { + console.info(TAG_TEST_0600_001 + 'other bundleName noUserId promise data is: ' + data); + expect(data).assertFail(); + }).catch((error) => { + console.info(TAG_TEST_0600_001 + 'other bundleName noUserId promise error is: ' + error); + errors = error + expect(errors).assertEqual(1); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0600_001, startTime, endTime); + done(); }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0600_001, startTime, endTime); - done(); - }); - /** - * @tc.number: bundle_getApplicationInfo_test_0600_0012 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0600_002, 0, async function (done) { - var startTime = await Utils.getNowTime(); - let errors - await Bundle.getApplicationInfo(BUNDLE_NAME_OTHER, Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, - USER_ID_100) - .then((data) => { - console.info(TAG_TEST_0600_002 + 'other bundleName UserId promise data is: ' + data); - expect(data).assertFail(); - }) - .catch((error) => { - console.info(TAG_TEST_0600_002 + 'other bundleName UserId promise error is: ' + error); - errors = error - expect(errors).assertEqual(1); - }); - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0600_002, startTime, endTime); - done(); - }); + /** + * @tc.number: bundle_getApplicationInfo_test_0600_002 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0600_002, 0, async function (done) { + let startTime = await Utils.getNowTime(); + let errors + await Bundle.getApplicationInfo(BUNDLE_NAME_OTHER, + Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, USER_ID_100).then((data) => { + console.info(TAG_TEST_0600_002 + 'other bundleName UserId promise data is: ' + data); + expect(data).assertFail(); + }).catch((error) => { + console.info(TAG_TEST_0600_002 + 'other bundleName UserId promise error is: ' + error); + errors = error + expect(errors).assertEqual(1); + }); + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0600_002, startTime, endTime); + done(); + }); - /** - * @tc.number: bundle_getApplicationInfo_test_0500_009 - * @tc.name: getApplicationInfo : Obtains based on a given bundle name. - * @tc.desc: Check the return value of the interface (by promise) - * @tc.level 0 - */ - it(TAG_TEST_0600_003, 0, async function (done) { - var startTime = await Utils.getNowTime(); - await Bundle.getApplicationInfo(BUNDLE_NAME, 0) - .then((data) => { - var endTime = Utils.getNowTime(); - Utils.getDurationTime(TAG_TEST_0600_003, startTime, endTime); - console.info(TAG_TEST_0600_003 + 'noUserId promise data is: ' + data); - expect(typeof (data)).assertEqual("object"); - expectData(TAG_TEST_0600_003, data); - getApplicationInfoSuccess_plus(TAG_TEST_0600_003, data); - }) - .catch((error) => { - console.info(TAG_TEST_0600_003 + 'noUserId promise error is: ' + error); - expect(error).assertFail(); + /** + * @tc.number: bundle_getApplicationInfo_test_0600_003 + * @tc.name: getApplicationInfo : Obtains based on a given bundle name. + * @tc.desc: Check the return value of the interface (by promise) + * @tc.level 0 + */ + it(TAG_TEST_0600_003, 0, async function (done) { + let startTime = await Utils.getNowTime(); + await Bundle.getApplicationInfo(BUNDLE_NAME, Bundle.BundleFlag.GET_BUNDLE_DEFAULT).then((data) => { + let endTime = Utils.getNowTime(); + Utils.getDurationTime(TAG_TEST_0600_003, startTime, endTime); + console.info(TAG_TEST_0600_003 + 'noUserId promise data is: ' + data); + expect(typeof (data)).assertEqual("object"); + expectData(TAG_TEST_0600_003, data); + getApplicationInfoSuccess_plus(TAG_TEST_0600_003, data); + }).catch((error) => { + console.info(TAG_TEST_0600_003 + 'noUserId promise error is: ' + error); + expect(error).assertFail(); + }); + done(); }); - done(); - }); + function expectData(msg, data) { + expect(typeof (data)).assertEqual('object'); + expect(typeof (data.name)).assertEqual('string'); + expect(typeof (data.codePath)).assertEqual('string'); + expect(typeof (data.accessTokenId)).assertEqual('number'); + expect(typeof (data.description)).assertEqual('string'); + expect(typeof (data.descriptionId)).assertEqual('number'); + expect(typeof (data.icon)).assertEqual('string'); + expect(typeof (data.iconId)).assertEqual('number'); + expect(typeof (data.label)).assertEqual('string'); + expect(typeof (data.labelId)).assertEqual('number'); + expect(typeof (data.systemApp)).assertEqual('boolean') + expect(typeof (data.supportedModes)).assertEqual('number'); + expect(typeof (data.process)).assertEqual('string'); + expect(typeof (data.entryDir)).assertEqual('string'); + expect(typeof (data.metaData)).assertEqual('object'); + expect(typeof (data.metadata)).assertEqual('object'); + expect(typeof (data.enabled)).assertEqual('boolean'); + expect(typeof (data.flags)).assertEqual('number'); + expect(typeof (data.uid)).assertEqual('number'); + expect(typeof (data.entityType)).assertEqual('string'); + expect(typeof (data.removable)).assertEqual('boolean'); + expect(Array.isArray(data.permissions)).assertEqual(true); + expect(Array.isArray(data.moduleSourceDirs)).assertEqual(true); + expect(Array.isArray(data.moduleInfos)).assertEqual(true); + } + + function getApplicationInfoSuccess(msg, data) { + expect(data.name).assertEqual('com.open.harmony.packagemag'); + expect(data.codePath).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag'); + expect(data.accessTokenId > 0).assertEqual(true); + expect(data.description).assertEqual('$string:mainability_description'); + expect(data.descriptionId > 0).assertEqual(true); + expect(data.icon).assertEqual('$media:icon'); + expect(data.iconId > 0).assertEqual(true); + expect(data.uid > 0).assertEqual(true); + expect(data.label).assertEqual('$string:entry_MainAbility'); + expect(data.labelId > 0).assertEqual(true); + expect(data.systemApp).assertEqual(true); + expect(data.supportedModes).assertEqual(0); + expect(data.flags).assertEqual(0); + expect(data.process).assertEqual(""); + expect(data.entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' + + '/com.open.harmony.packagemag'); + expect(data.enabled).assertEqual(true); + expect(data.entityType).assertEqual('unspecified'); + expect(data.removable).assertEqual(true); + expect(data.moduleInfos[0].moduleName).assertEqual('entry'); + expect(data.moduleInfos[0].moduleSourceDir).assertEqual('/data/app/el1/bundle/public/' + + 'com.open.harmony.packagemag/com.open.harmony.packagemag'); + expect(data.moduleSourceDirs[0]).assertEqual('/data/app/el1/bundle/public/' + + 'com.open.harmony.packagemag/com.open.harmony.packagemag'); + expect(data.permissions[0]).assertEqual("ohos.permission.CHANGE_ABILITY_ENABLED_STATE"); + expect(data.permissions[1]).assertEqual("ohos.permission.GET_BUNDLE_INFO"); + expect(data.permissions[2]).assertEqual("ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"); + console.log(msg + ' end ' + JSON.stringify(data)); + } - /** - * expect属性 - * @param msg log信息 - * @param data 数据源 - */ - function expectData(msg, data) { - expect(typeof (data)).assertEqual('object'); - expect(typeof (data.name)).assertEqual('string'); - expect(typeof (data.codePath)).assertEqual('string'); - expect(typeof (data.accessTokenId)).assertEqual('number'); - expect(typeof (data.description)).assertEqual('string'); - expect(typeof (data.descriptionId)).assertEqual('number'); - expect(typeof (data.icon)).assertEqual('string'); - expect(typeof (data.iconId)).assertEqual('number'); - expect(typeof (data.label)).assertEqual('string'); - expect(typeof (data.labelId)).assertEqual('number'); - expect(typeof (data.systemApp)).assertEqual('boolean') - expect(typeof (data.supportedModes)).assertEqual('number'); - expect(typeof (data.process)).assertEqual('string'); - expect(typeof (data.entryDir)).assertEqual('string'); - expect(typeof (data.metaData)).assertEqual('object'); - expect(typeof (data.metadata)).assertEqual('object'); - expect(typeof (data.enabled)).assertEqual('boolean'); - expect(typeof (data.flags)).assertEqual('number'); - expect(typeof (data.uid)).assertEqual('number'); - expect(typeof (data.entityType)).assertEqual('string'); - expect(typeof (data.removable)).assertEqual('boolean'); - expect(Array.isArray(data.permissions)).assertEqual(true); - expect(Array.isArray(data.moduleSourceDirs)).assertEqual(true); - expect(Array.isArray(data.moduleInfos)).assertEqual(true); - } + function getApplicationInfoSuccess_plus(msg, data) { + expect(data.name).assertEqual('com.open.harmony.packagemag'); + expect(data.codePath).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag'); + expect(data.accessTokenId > 0).assertEqual(true); + expect(data.description).assertEqual('$string:mainability_description'); + expect(data.descriptionId > 0).assertEqual(true); + expect(data.icon).assertEqual('$media:icon'); + expect(data.iconId > 0).assertEqual(true); + expect(data.uid > 0).assertEqual(true); + expect(data.label).assertEqual('$string:entry_MainAbility'); + expect(data.labelId > 0).assertEqual(true); + expect(data.systemApp).assertEqual(true); + expect(data.supportedModes).assertEqual(0); + expect(data.flags).assertEqual(0); + expect(data.process).assertEqual(""); + expect(data.entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' + + '/com.open.harmony.packagemag'); + expect(data.enabled).assertEqual(true); + expect(data.entityType).assertEqual('unspecified'); + expect(data.removable).assertEqual(true); + expect(data.moduleInfos[0].moduleName).assertEqual('entry'); + expect(data.moduleInfos[0].moduleSourceDir).assertEqual('/data/app/el1/bundle/public/' + + 'com.open.harmony.packagemag/com.open.harmony.packagemag'); + expect(data.moduleSourceDirs[0]).assertEqual('/data/app/el1/bundle/public/' + + 'com.open.harmony.packagemag/com.open.harmony.packagemag'); + console.log(msg + ' end ' + JSON.stringify(data)); + } - /** - * expect属性值 - * @param msg log信息 - * @param data 数据源 - */ - function getApplicationInfoSuccess(msg, data) { - expect(data.name).assertEqual('com.open.harmony.packagemag'); - expect(data.codePath).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag'); - expect(data.accessTokenId > 0).assertEqual(true); - expect(data.description).assertEqual('$string:mainability_description'); - expect(data.descriptionId > 0).assertEqual(true); - expect(data.icon).assertEqual('$media:icon'); - expect(data.iconId > 0).assertEqual(true); - expect(data.uid > 0).assertEqual(true); - expect(data.label).assertEqual('$string:entry_MainAbility'); - expect(data.labelId > 0).assertEqual(true); - expect(data.systemApp).assertEqual(true); - expect(data.supportedModes).assertEqual(0); - expect(data.flags).assertEqual(0); - expect(data.process).assertEqual(""); - expect(data.entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' + - '/com.open.harmony.packagemag'); - expect(data.enabled).assertEqual(true); - expect(data.entityType).assertEqual('unspecified'); - expect(data.removable).assertEqual(true); - expect(data.moduleInfos[0].moduleName).assertEqual('entry'); - expect(data.moduleInfos[0].moduleSourceDir).assertEqual('/data/app/el1/bundle/public/' + - 'com.open.harmony.packagemag/com.open.harmony.packagemag'); - expect(data.moduleSourceDirs[0]).assertEqual('/data/app/el1/bundle/public/' + - 'com.open.harmony.packagemag/com.open.harmony.packagemag'); - expect(data.permissions[0]).assertEqual("ohos.permission.CHANGE_ABILITY_ENABLED_STATE"); - expect(data.permissions[1]).assertEqual("ohos.permission.GET_BUNDLE_INFO"); - expect(data.permissions[2]).assertEqual("ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"); - console.log(msg + ' end ' + JSON.stringify(data)); - } + }); - /** - * expect属性值 - * @param msg log信息 - * @param data 数据源 - */ - function getApplicationInfoSuccess_plus(msg, data) { - expect(data.name).assertEqual('com.open.harmony.packagemag'); - expect(data.codePath).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag'); - expect(data.accessTokenId > 0).assertEqual(true); - expect(data.description).assertEqual('$string:mainability_description'); - expect(data.descriptionId > 0).assertEqual(true); - expect(data.icon).assertEqual('$media:icon'); - expect(data.iconId > 0).assertEqual(true); - expect(data.uid > 0).assertEqual(true); - expect(data.label).assertEqual('$string:entry_MainAbility'); - expect(data.labelId > 0).assertEqual(true); - expect(data.systemApp).assertEqual(true); - expect(data.supportedModes).assertEqual(0); - expect(data.flags).assertEqual(0); - expect(data.process).assertEqual(""); - expect(data.entryDir).assertEqual('/data/app/el1/bundle/public/com.open.harmony.packagemag' + - '/com.open.harmony.packagemag'); - expect(data.enabled).assertEqual(true); - expect(data.entityType).assertEqual('unspecified'); - expect(data.removable).assertEqual(true); - expect(data.moduleInfos[0].moduleName).assertEqual('entry'); - expect(data.moduleInfos[0].moduleSourceDir).assertEqual('/data/app/el1/bundle/public/' + - 'com.open.harmony.packagemag/com.open.harmony.packagemag'); - expect(data.moduleSourceDirs[0]).assertEqual('/data/app/el1/bundle/public/' + - 'com.open.harmony.packagemag/com.open.harmony.packagemag'); - console.log(msg + ' end ' + JSON.stringify(data)); - } - }); } \ No newline at end of file -- GitLab