diff --git a/appexecfwk/bundle_standard/bundlemanager/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/BUILD.gn index 077406df6f2079db4f1e8445a919084f8fc9cddd..bb2c809e111b9c879fd0cc99a3701c05306d81d5 100644 --- a/appexecfwk/bundle_standard/bundlemanager/BUILD.gn +++ b/appexecfwk/bundle_standard/bundlemanager/BUILD.gn @@ -26,18 +26,12 @@ group("bundlemanager") { "actsbmsmetadatatest:ActsBmsMetaDataTest", "actsbundlemanageretstest:ActsBundleManagerEtsTest", "actsbundlemanagertest:ActsBundleManagerTest", - "actsbundlemanageruninstall:ActsBundleManagerUninstallTest", - "actsbundlemgrmultipleinstalltest:ActsBundleMgrMultipleInstallTest", + "sceneProject/bmsaccesstokenfive:bmsAccessTokenTest5", + "sceneProject/bmsaccesstokenfour:bmsAccessTokenTest4", "sceneProject/bmsaccesstokenone:bmsAccessTokenTest1", "sceneProject/bmsaccesstokenthree:bmsAccessTokenTest3", "sceneProject/bmsaccesstokentwo:bmsAccessTokenTest2", - "sceneProject/bmseighthright:eighth_right", - "sceneProject/bmseleventhright:eleventh_right", - "sceneProject/bmsfifthright:fifth_right", - "sceneProject/bmsfirstrequestpermissions:FirstRequestPermissions", "sceneProject/bmsfirstright:first_right", - "sceneProject/bmsfourteenthright:fourteenth_right", - "sceneProject/bmsfourthright:fourth_right", "sceneProject/bmsgetinfosfifthscene:bmsThirdBundleTest5", "sceneProject/bmsgetinfosfirstscene:bmsThirdBundleTest1", "sceneProject/bmsgetinfosfirstsceneupdate:bmsThirdBundleTestA1", @@ -45,34 +39,20 @@ group("bundlemanager") { "sceneProject/bmsgetinfoshapc:bmsThirdBundleC", "sceneProject/bmsgetinfosjsscene:bmsThirdBundleJs", "sceneProject/bmsgetinfosscenesystem:bmsSystemBundleTest1", - "sceneProject/bmsgetinfosscenesystemfeature:bmsSystemBundleTest2Feature", "sceneProject/bmsgetinfosscenesystemtwo:bmsSystemBundleTest2", - "sceneProject/bmsgetinfosscenesystemupdate:bmsSystemBundleTest2Update", "sceneProject/bmsgetinfosscenevendor:bmsVendorBundleTest1", "sceneProject/bmsgetinfossecondscene:bmsThirdBundleTest2", "sceneProject/bmsgetinfossixthscene:bmsThirdBundleTest6", "sceneProject/bmsgetinfosthirdscene:bmsThirdBundleTest3", "sceneProject/bmsmainabilityfirstscene:bmsMainAbilityFirstScene", "sceneProject/bmsmainabilitysecondscene:bmsMainAbilitySecondScene", - "sceneProject/bmsninthright:ninth_right", - "sceneProject/bmssceneeight:bmsJstest8", "sceneProject/bmsscenefive:bmsJstest5", "sceneProject/bmsscenefour:bmsJstest4", - "sceneProject/bmsscenenine:bmsJstest9", "sceneProject/bmssceneone:bmsJstest1", - "sceneProject/bmssceneseven:bmsJstest7", "sceneProject/bmsscenesix:bmsJstest6", "sceneProject/bmsscenethree:bmsJstest3", "sceneProject/bmsscenetwo:bmsJstest2", - "sceneProject/bmssecondbackupright:second_backup_right", - "sceneProject/bmssecondrequestpermissions:SecondRequestPermissions", "sceneProject/bmssecondright:second_right", - "sceneProject/bmssixteenthright:sixteenth_right", - "sceneProject/bmssixthright:sixth_right", - "sceneProject/bmstenthright:tenth_right", - "sceneProject/bmsthirdright:third_right", - "sceneProject/bmsthirteenthright:thirteenth_right", - "sceneProject/bmstwelfthright:twelfth_right", ] } } diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsaccesstokentest/Test.json b/appexecfwk/bundle_standard/bundlemanager/actsbmsaccesstokentest/Test.json index 29a7021a723d5fb5b81168d02cebf82ae2ddef5a..57d4ce4df06ac1781af17c8685ed04a3a19aa4f0 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsaccesstokentest/Test.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsaccesstokentest/Test.json @@ -26,13 +26,25 @@ "push": [ "bmsAccessTokenTest1.hap->/data/test/bmsAccessTokenTest1.hap", "bmsAccessTokenTest2.hap->/data/test/bmsAccessTokenTest2.hap", - "bmsAccessTokenTest3.hap->/data/test/bmsAccessTokenTest3.hap" + "bmsAccessTokenTest3.hap->/data/test/bmsAccessTokenTest3.hap", + "bmsAccessTokenTest4.hap->/data/test/bmsAccessTokenTest4.hap", + "bmsAccessTokenTest5.hap->/data/test/bmsAccessTokenTest5.hap" ] }, { "type": "ShellKit", "run-command": [ - "chmod 644 /data/test/*.hap" + "bm install -p /data/test/bmsAccessTokenTest1.hap", + "bm install -p /data/test/bmsAccessTokenTest4.hap", + "bm install -p /data/test/bmsAccessTokenTest3.hap", + "bm install -p /data/test/bmsAccessTokenTest2.hap", + "bm install -p /data/test/bmsAccessTokenTest5.hap" + ], + "teardown-command":[ + "bm uninstall -n com.example.bmsaccesstoken1", + "bm uninstall -n com.example.bmsaccesstoken2", + "bm uninstall -n com.example.bmsaccesstoken3", + "rm -rf /data/test/" ] } ] diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsaccesstokentest/entry/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/actsbmsaccesstokentest/entry/src/main/config.json index 958bf7b92427b9fd0acb7ecee6b5cbe430526b7a..a5cbfb6c915f6575bb8bad9fd5d293449b92edfe 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsaccesstokentest/entry/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsaccesstokentest/entry/src/main/config.json @@ -47,10 +47,6 @@ } ], "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, { "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" @@ -58,18 +54,6 @@ { "name":"ohos.permission.GET_BUNDLE_INFO", "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" } ], "js": [ diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsaccesstokentest/entry/src/main/js/test/ActsBmsAccessTokenTest.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbmsaccesstokentest/entry/src/main/js/test/ActsBmsAccessTokenTest.test.js index e8d6279769763902d220dccb651b417fcad77ace..2bbbc3185b76c7d784ea423127d41b7de2883d26 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsaccesstokentest/entry/src/main/js/test/ActsBmsAccessTokenTest.test.js +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsaccesstokentest/entry/src/main/js/test/ActsBmsAccessTokenTest.test.js @@ -16,16 +16,10 @@ import bundle from '@ohos.bundle' import { describe, it, expect } from 'deccjsunit/index' -const BUNDLE_PATH1 = ['/data/test/bmsAccessTokenTest1.hap']; -const BUNDLE_PATH2 = ['/data/test/bmsAccessTokenTest2.hap']; -const BUNDLE_PATH3 = ['/data/test/bmsAccessTokenTest3.hap']; const BUNDLE_NAME1 = 'com.example.bmsaccesstoken1'; +const BUNDLE_NAME2 = 'com.example.bmsaccesstoken2'; +const BUNDLE_NAME3 = 'com.example.bmsaccesstoken3'; const USERID = 100; -let installParam = { - userId: 100, - installFlag: 1, - isKeepData: false -}; describe('ActsBmsAccessTokenTest', function () { @@ -35,23 +29,16 @@ describe('ActsBmsAccessTokenTest', function () { * @tc.desc: get the accessTokenId */ it('bms_AccessTokenId_0100', 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install(BUNDLE_PATH1, installParam, OnReceiveInstallEvent); - async function OnReceiveInstallEvent(err, data) { - checkInstallOrUninstall(err, data); - await bundle.getApplicationInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID) - .then(applicationInfo => { - console.info('accessTokenId: ' + applicationInfo.accessTokenId); - expect(applicationInfo.name).assertEqual(BUNDLE_NAME1); - expect(applicationInfo.accessTokenId).assertLarger(0); - }).catch((err) => { - expect(err).assertFail(); - }); - installer.uninstall(BUNDLE_NAME1, installParam, (err, data) => { - checkInstallOrUninstall(err, data); + await bundle.getApplicationInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID) + .then(applicationInfo => { + console.info('accessTokenId: ' + applicationInfo.accessTokenId); + expect(applicationInfo.name).assertEqual(BUNDLE_NAME1); + expect(applicationInfo.accessTokenId).assertLarger(0); + done(); + }).catch((err) => { + expect(err).assertFail(); done(); }); - } }); /* @@ -60,29 +47,22 @@ describe('ActsBmsAccessTokenTest', function () { * @tc.desc: get the reqPermissions and reqPermissionStates */ it('bms_AccessTokenId_0200', 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install(BUNDLE_PATH1, installParam, OnReceiveInstallEvent); - async function OnReceiveInstallEvent(err, data) { - checkInstallOrUninstall(err, data); - await bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION) - .then(bundleInfo => { - expect(bundleInfo.name).assertEqual(BUNDLE_NAME1); - expect(bundleInfo.reqPermissions.length).assertEqual(3); - expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.ALPHA"); - expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.BETA"); - expect(bundleInfo.reqPermissions[2]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING"); - expect(bundleInfo.reqPermissionStates.length).assertEqual(3); - expect(bundleInfo.reqPermissionStates[0]).assertEqual(-1); - expect(bundleInfo.reqPermissionStates[1]).assertEqual(-1); - expect(bundleInfo.reqPermissionStates[2]).assertEqual(0); - }).catch((err) => { - expect(err).assertFail(); - }); - installer.uninstall(BUNDLE_NAME1, installParam, (err, data) => { - checkInstallOrUninstall(err, data); + await bundle.getBundleInfo(BUNDLE_NAME3, bundle.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION) + .then(bundleInfo => { + expect(bundleInfo.name).assertEqual(BUNDLE_NAME3); + expect(bundleInfo.reqPermissions.length).assertEqual(3); + expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.ALPHA"); + expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.BETA"); + expect(bundleInfo.reqPermissions[2]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING"); + expect(bundleInfo.reqPermissionStates.length).assertEqual(3); + expect(bundleInfo.reqPermissionStates[0]).assertEqual(-1); + expect(bundleInfo.reqPermissionStates[1]).assertEqual(-1); + expect(bundleInfo.reqPermissionStates[2]).assertEqual(0); + done(); + }).catch((err) => { + expect(err).assertFail(); done(); }); - } }); /* @@ -91,37 +71,26 @@ describe('ActsBmsAccessTokenTest', function () { * @tc.desc: get the reqPermissions and reqPermissionStates */ it('bms_AccessTokenId_0300', 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install(BUNDLE_PATH1, installParam, OnReceiveInstallEvent); - async function OnReceiveInstallEvent(err, data) { - checkInstallOrUninstall(err, data); - installer.install(BUNDLE_PATH2, installParam, OnReceiveUpdateEvent); - } - async function OnReceiveUpdateEvent(err, data) { - checkInstallOrUninstall(err, data); - await bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION) - .then(bundleInfo => { - expect(bundleInfo.name).assertEqual(BUNDLE_NAME1); - expect(bundleInfo.reqPermissions.length).assertEqual(5); - expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.ALPHA"); - expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING"); - expect(bundleInfo.reqPermissions[2]).assertEqual("ohos.permission.LOCATION_IN_BACKGROUND"); - expect(bundleInfo.reqPermissions[3]).assertEqual("ohos.permission.SYSTEM_FLOAT_WINDOW"); - expect(bundleInfo.reqPermissions[4]).assertEqual("ohos.permission.USE_BLUETOOTH"); - expect(bundleInfo.reqPermissionStates.length).assertEqual(5); - expect(bundleInfo.reqPermissionStates[0]).assertEqual(-1); - expect(bundleInfo.reqPermissionStates[1]).assertEqual(0); - expect(bundleInfo.reqPermissionStates[2]).assertEqual(-1); - expect(bundleInfo.reqPermissionStates[3]).assertEqual(0); - expect(bundleInfo.reqPermissionStates[4]).assertEqual(0); - }).catch((err) => { - expect(err).assertFail(); - }); - installer.uninstall(BUNDLE_NAME1, installParam, (err, data) => { - checkInstallOrUninstall(err, data); + await bundle.getBundleInfo(BUNDLE_NAME2, bundle.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION) + .then(bundleInfo => { + expect(bundleInfo.name).assertEqual(BUNDLE_NAME2); + expect(bundleInfo.reqPermissions.length).assertEqual(5); + expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.ALPHA"); + expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING"); + expect(bundleInfo.reqPermissions[2]).assertEqual("ohos.permission.LOCATION_IN_BACKGROUND"); + expect(bundleInfo.reqPermissions[3]).assertEqual("ohos.permission.SYSTEM_FLOAT_WINDOW"); + expect(bundleInfo.reqPermissions[4]).assertEqual("ohos.permission.USE_BLUETOOTH"); + expect(bundleInfo.reqPermissionStates.length).assertEqual(5); + expect(bundleInfo.reqPermissionStates[0]).assertEqual(-1); + expect(bundleInfo.reqPermissionStates[1]).assertEqual(0); + expect(bundleInfo.reqPermissionStates[2]).assertEqual(-1); + expect(bundleInfo.reqPermissionStates[3]).assertEqual(0); + expect(bundleInfo.reqPermissionStates[4]).assertEqual(0); + done(); + }).catch((err) => { + expect(err).assertFail(); done(); }); - } }); /* @@ -130,39 +99,28 @@ describe('ActsBmsAccessTokenTest', function () { * @tc.desc: get the reqPermissions and reqPermissionStates */ it('bms_AccessTokenId_0400', 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install(BUNDLE_PATH1, installParam, OnReceiveInstallEvent); - async function OnReceiveInstallEvent(err, data) { - checkInstallOrUninstall(err, data); - installer.install(BUNDLE_PATH3, installParam, OnReceiveUpdateEvent); - } - async function OnReceiveUpdateEvent(err, data) { - checkInstallOrUninstall(err, data); - await bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION) - .then(bundleInfo => { - expect(bundleInfo.name).assertEqual(BUNDLE_NAME1); - expect(bundleInfo.reqPermissions.length).assertEqual(6); - expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.ALPHA"); - expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.BETA"); - expect(bundleInfo.reqPermissions[2]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING"); - expect(bundleInfo.reqPermissions[3]).assertEqual("ohos.permission.LOCATION_IN_BACKGROUND"); - expect(bundleInfo.reqPermissions[4]).assertEqual("ohos.permission.SYSTEM_FLOAT_WINDOW"); - expect(bundleInfo.reqPermissions[5]).assertEqual("ohos.permission.USE_BLUETOOTH"); - expect(bundleInfo.reqPermissionStates.length).assertEqual(6); - expect(bundleInfo.reqPermissionStates[0]).assertEqual(-1); - expect(bundleInfo.reqPermissionStates[1]).assertEqual(-1); - expect(bundleInfo.reqPermissionStates[2]).assertEqual(0); - expect(bundleInfo.reqPermissionStates[3]).assertEqual(-1); - expect(bundleInfo.reqPermissionStates[4]).assertEqual(0); - expect(bundleInfo.reqPermissionStates[5]).assertEqual(0); - }).catch((err) => { - expect(err).assertFail(); - }); - installer.uninstall(BUNDLE_NAME1, installParam, (err, data) => { - checkInstallOrUninstall(err, data); + await bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION) + .then(bundleInfo => { + expect(bundleInfo.name).assertEqual(BUNDLE_NAME1); + expect(bundleInfo.reqPermissions.length).assertEqual(6); + expect(bundleInfo.reqPermissions[0]).assertEqual("ohos.permission.ALPHA"); + expect(bundleInfo.reqPermissions[1]).assertEqual("ohos.permission.BETA"); + expect(bundleInfo.reqPermissions[2]).assertEqual("ohos.permission.KEEP_BACKGROUND_RUNNING"); + expect(bundleInfo.reqPermissions[3]).assertEqual("ohos.permission.LOCATION_IN_BACKGROUND"); + expect(bundleInfo.reqPermissions[4]).assertEqual("ohos.permission.SYSTEM_FLOAT_WINDOW"); + expect(bundleInfo.reqPermissions[5]).assertEqual("ohos.permission.USE_BLUETOOTH"); + expect(bundleInfo.reqPermissionStates.length).assertEqual(6); + expect(bundleInfo.reqPermissionStates[0]).assertEqual(-1); + expect(bundleInfo.reqPermissionStates[1]).assertEqual(-1); + expect(bundleInfo.reqPermissionStates[2]).assertEqual(0); + expect(bundleInfo.reqPermissionStates[3]).assertEqual(-1); + expect(bundleInfo.reqPermissionStates[4]).assertEqual(0); + expect(bundleInfo.reqPermissionStates[5]).assertEqual(0); + done(); + }).catch((err) => { + expect(err).assertFail(); done(); }); - } }); /** @@ -171,30 +129,16 @@ describe('ActsBmsAccessTokenTest', function () { * @tc.desc Test getBundleInfos interfaces with with a flag */ it("bms_AccessTokenId_0500", 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install( - BUNDLE_PATH1, - installParam, - OnReceiveInstallEvent - ); - async function OnReceiveInstallEvent(err, data) { - checkInstallOrUninstall(err, data); - await bundle.getApplicationInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_DEFAULT) - .then((applicationInfo) => { - console.info("bms_AccessTokenId_0500 accessTokenId: " + applicationInfo.accessTokenId); - expect(applicationInfo.name).assertEqual(BUNDLE_NAME1); - expect(applicationInfo.accessTokenId).assertLarger(0); - }).catch((err) => { - expect(err).assertFail(); - }); - installer.uninstall( - BUNDLE_NAME1, - installParam, - (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); - } + await bundle.getApplicationInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_DEFAULT) + .then((applicationInfo) => { + console.info("bms_AccessTokenId_0500 accessTokenId: " + applicationInfo.accessTokenId); + expect(applicationInfo.name).assertEqual(BUNDLE_NAME1); + expect(applicationInfo.accessTokenId).assertLarger(0); + done(); + }).catch((err) => { + expect(err).assertFail(); + done(); + }); }); /** @@ -203,30 +147,16 @@ describe('ActsBmsAccessTokenTest', function () { * @tc.desc Test getBundleInfos interfaces with a flag */ it("bms_AccessTokenId_0600", 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install( - BUNDLE_PATH1, - installParam, - OnReceiveInstallEvent - ); - async function OnReceiveInstallEvent(err, data) { - checkInstallOrUninstall(err, data); - await bundle.getApplicationInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES) - .then((applicationInfo) => { - console.info("bms_AccessTokenId_0600 accessTokenId: " + applicationInfo.accessTokenId); - expect(applicationInfo.name).assertEqual(BUNDLE_NAME1); - expect(applicationInfo.accessTokenId).assertLarger(0); - }).catch((err) => { - expect(err).assertFail(); - }); - installer.uninstall( - BUNDLE_NAME1, - installParam, - (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); - } + await bundle.getApplicationInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES) + .then((applicationInfo) => { + console.info("bms_AccessTokenId_0600 accessTokenId: " + applicationInfo.accessTokenId); + expect(applicationInfo.name).assertEqual(BUNDLE_NAME1); + expect(applicationInfo.accessTokenId).assertLarger(0); + done(); + }).catch((err) => { + expect(err).assertFail(); + done(); + }); }); /** @@ -235,68 +165,16 @@ describe('ActsBmsAccessTokenTest', function () { * @tc.desc Test getBundleInfos interfaces with a flag */ it("bms_AccessTokenId_0700", 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install( - BUNDLE_PATH1, - installParam, - OnReceiveInstallEvent - ); - async function OnReceiveInstallEvent(err, data) { - checkInstallOrUninstall(err, data); - await bundle.getApplicationInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION) - .then((applicationInfo) => { - console.info("bms_AccessTokenId_0700 accessTokenId: " + applicationInfo.accessTokenId); - expect(applicationInfo.name).assertEqual(BUNDLE_NAME1); - expect(applicationInfo.accessTokenId).assertLarger(0); - }).catch((err) => { - expect(err).assertFail(); - }); - installer.uninstall( - BUNDLE_NAME1, - installParam, - (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); - } - }); - - /** - * @tc.number bms_AccessTokenId_0800 - * @tc.name BUNDLE::getBundleInfos - * @tc.desc Test getBundleInfos interfaces with a flag - */ - it("bms_AccessTokenId_0800", 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install( - BUNDLE_PATH1, - installParam, - OnReceiveInstallEvent - ); - async function OnReceiveInstallEvent(err, data) { - checkInstallOrUninstall(err, data); - await bundle.getApplicationInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION) - .then((applicationInfo) => { - console.info("bms_AccessTokenId_0800 accessTokenId: " + applicationInfo.accessTokenId); - expect(applicationInfo.name).assertEqual(BUNDLE_NAME1); - expect(applicationInfo.accessTokenId).assertLarger(0); - }).catch((err) => { - expect(err).assertFail(); - }); - installer.uninstall( - BUNDLE_NAME1, - installParam, - (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); - } + await bundle.getApplicationInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION) + .then((applicationInfo) => { + console.info("bms_AccessTokenId_0700 accessTokenId: " + applicationInfo.accessTokenId); + expect(applicationInfo.name).assertEqual(BUNDLE_NAME1); + expect(applicationInfo.accessTokenId).assertLarger(0); + done(); + }).catch((err) => { + expect(err).assertFail(); + done(); + }); }); - function checkInstallOrUninstall(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - } - }); 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 index b63bd6bd88a089edc22e2a1431daf875457f6644..2ffbfebb577f24e637c4afd398f11e985601fa0b 100644 --- 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 @@ -15,6 +15,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "deccjsunit/index.ets" import bundle from '@ohos.bundle' +import pkg from '@system.package' const DEFAULT_FLAG = bundle.BundleFlag.GET_BUNDLE_DEFAULT; const INVALID_CODE = 1; @@ -85,6 +86,58 @@ export default function actsBmsJsUnPermissionTest() { }); }); + /* + * @tc.number: SUB_BMS_HAP_STATUS_0011 + * @tc.name: test hasInstalled + * @tc.desc: test hasInstalled without permission + */ + it('SUB_BMS_HAP_STATUS_0011', 0, async function (done) { + pkg.hasInstalled({ + bundleName: SELF_BUNDLENAME, + success: function success(data) { + console.info("get hasInstalled success" + JSON.stringify(data)); + expect(data.result).assertTrue(); + done(); + }, + fail: function fail(data, code) { + console.info("get hasInstalled fail" + JSON.stringify(data)); + expect(data).assertFail(); + done(); + }, + complete: function complete() { + console.info("get hasInstalled complete"); + expect(data).assertFail(); + done(); + } + }) + }); + + /* + * @tc.number: SUB_BMS_HAP_STATUS_0012 + * @tc.name: test hasInstalled + * @tc.desc: test hasInstalled without permission + */ + it('SUB_BMS_HAP_STATUS_0012', 0, async function (done) { + pkg.hasInstalled({ + bundleName: LAUNCHER_BUNDLE_NAME, + success: function success(data) { + console.info("get hasInstalled success" + JSON.stringify(data)); + expect(data.result).assertFalse(); + done(); + }, + fail: function fail(data, code) { + console.info("get hasInstalled fail" + JSON.stringify(data)); + expect(data).assertFail(); + done(); + }, + complete: function complete() { + console.info("get hasInstalled complete"); + expect(data).assertFail(); + done(); + } + }) + }); + /* * @tc.number: getAbilityInfo_100 * @tc.name: test getAbilityInfo diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/Test.json b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/Test.json index c4815b28f7675fbc7a9dd662b49a381997735e76..ab8c7e7ee5ea91d208e5e0cead4e5e2088a10c1f 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/Test.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/Test.json @@ -33,15 +33,28 @@ "bmsThirdBundleTest5.hap->/data/test/bmsThirdBundleTest5.hap", "bmsThirdBundleTest6.hap->/data/test/bmsThirdBundleTest6.hap", "bmsThirdBundleTestA1.hap->/data/test/bmsThirdBundleTestA1.hap", - "bmsSystemBundleTest2.hap->/data/test/bmsSystemBundleTest2.hap", - "bmsSystemBundleTest2Feature.hap->/data/test/bmsSystemBundleTest2Feature.hap", - "bmsSystemBundleTest2Update.hap->/data/test/bmsSystemBundleTest2Update.hap" + "bmsSystemBundleTest2.hap->/data/test/bmsSystemBundleTest2.hap" ] }, { "type": "ShellKit", "run-command": [ - "chmod 644 /data/test/*.hap" + "bm install -p /data/test/bmsThirdBundleTest1.hap", + "bm install -p /data/test/bmsThirdBundleTest2.hap", + "bm install -p /data/test/bmsThirdBundleTest3.hap", + "bm install -p /data/test/bmsThirdBundleTest4.hap", + "bm install -p /data/test/bmsThirdBundleTest5.hap", + "bm install -p /data/test/bmsThirdBundleTest6.hap", + "bm install -p /data/test/bmsSystemBundleTest2.hap" + ], + "teardown-command":[ + "bm uninstall -n com.example.third1", + "bm uninstall -n com.example.third2", + "bm uninstall -n com.example.third4", + "bm uninstall -n com.example.third5", + "bm uninstall -n com.example.third6", + "bm uninstall -n com.example.system2", + "rm -rf /data/test/" ] } ] diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/config.json index 3619fade607932d393d7fc086b58b0d25662ab0d..a0d07e3447bc1a2e043628bcd2080f576c8c1116 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/config.json @@ -47,10 +47,6 @@ } ], "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, { "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" @@ -58,18 +54,6 @@ { "name":"ohos.permission.GET_BUNDLE_INFO", "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" } ], "js": [ diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js index 625c859f794c1b6c0c1f7bda1fe85370b310bd00..bf85eb643b687f6419abfd75955d8151f4ac7ff3 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsGetBackGroundModes.test.js @@ -16,13 +16,6 @@ import bundle from '@ohos.bundle' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit' -const BUNDLE_PATH1 = '/data/test/bmsThirdBundleTest1.hap'; -const BUNDLE_PATH2 = '/data/test/bmsThirdBundleTest2.hap'; -const BUNDLE_PATH3 = '/data/test/bmsThirdBundleTest3.hap'; -const BUNDLE_PATH4 = '/data/test/bmsThirdBundleTest4.hap'; -const BUNDLE_PATH5 = '/data/test/bmsThirdBundleTest5.hap'; -const BUNDLE_PATH6 = '/data/test/bmsThirdBundleTest6.hap'; -const BUNDLE_PATHUPDATE = '/data/test/bmsThirdBundleTestA1.hap'; const BUNDLE_NAME1 = 'com.example.third1'; const BUNDLE_NAME2 = 'com.example.third2'; const BUNDLE_NAME4 = 'com.example.third4'; @@ -34,7 +27,6 @@ const ABILITIY_NAME3 = "com.example.third2.MainAbilityA"; const ABILITIY_NAME4 = "com.example.third4.MainAbility"; const ABILITIY_NAME5 = "com.example.third1.MainAbilityA"; const ABILITIY_NAME6 = "com.example.third3.MainAbilityA"; -const ABILITIY_NAME7 = "com.example.third1.AMainAbilityA"; const NUM_TWO = 2; const NUM_THREE = 3; const NUM_FOUR = 4; @@ -49,11 +41,6 @@ const MULTIDEVICECONNECTION = 32; const WIFIINTERACTION = 64; const VOIP = 128; const TASKKEEPING = 256; -let installParam = { - userId: USERID, - installFlag: 1, - isKeepData: false -}; describe('ActsBmsGetBackGroundModes', function () { @@ -63,50 +50,42 @@ describe('ActsBmsGetBackGroundModes', function () { * @tc.desc: Get the information of the background modes from multi-ability application */ it('bms_backGroundModes_0100', 0, async function (done) { - let bundlePath = [BUNDLE_PATH5]; - let installer = await bundle.getBundleInstaller(); - installer.install(bundlePath, installParam, async (err, data) => { - checkInstallOrUninstall(err, data); - let dataInfos = await bundle.queryAbilityByWant({ - action: 'action.system.home', - entities: ['entity.system.home'], - elementName: { - deviceId: '0', - bundleName: BUNDLE_NAME5, - abilityName: '', - }, - }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); - expect(dataInfos.length).assertEqual(NUM_FOUR); - if (dataInfos.length == NUM_FOUR) { - expect(dataInfos[NUM_TWO].name).assertEqual(ABILITIY_NAME1); - expect(dataInfos[NUM_TWO].backgroundModes).assertEqual(DATATRANSFER | AUDIOPLAYBACK | AUDIORECORDING | - LOCATION | BLUETOOTHINTERACTION | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING); - expect(dataInfos[NUM_THREE].name).assertEqual(ABILITIY_NAME2); - expect(dataInfos[NUM_THREE].backgroundModes).assertEqual(DATATRANSFER | VOIP); - } - let bundleInfos = await bundle.getAllBundleInfo(bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, USERID); - for (let i = 0; i < bundleInfos.length; i++) { - if (bundleInfos[i].name == BUNDLE_NAME5) { - for (let j = 0; j < bundleInfos[i].abilityInfos.length; j++) { - if (bundleInfos[i].abilityInfos[j].name == ABILITIY_NAME1) { - expect(bundleInfos[i].abilityInfos[j].backgroundModes).assertEqual(DATATRANSFER | - AUDIOPLAYBACK | AUDIORECORDING | LOCATION | BLUETOOTHINTERACTION | - MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING); - } else if (bundleInfos[i].abilityInfos[j].name == ABILITIY_NAME2) { - expect(bundleInfos[i].abilityInfos[j].backgroundModes).assertEqual(DATATRANSFER | VOIP); - } + let dataInfos = await bundle.queryAbilityByWant({ + action: 'action.system.home', + entities: ['entity.system.home'], + elementName: { + deviceId: '0', + bundleName: BUNDLE_NAME5, + abilityName: '', + }, + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); + expect(dataInfos.length).assertEqual(NUM_FOUR); + if (dataInfos.length == NUM_FOUR) { + expect(dataInfos[NUM_TWO].name).assertEqual(ABILITIY_NAME1); + expect(dataInfos[NUM_TWO].backgroundModes).assertEqual(DATATRANSFER | AUDIOPLAYBACK | AUDIORECORDING | + LOCATION | BLUETOOTHINTERACTION | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING); + expect(dataInfos[NUM_THREE].name).assertEqual(ABILITIY_NAME2); + expect(dataInfos[NUM_THREE].backgroundModes).assertEqual(DATATRANSFER | VOIP); + } + let bundleInfos = await bundle.getAllBundleInfo(bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, USERID); + for (let i = 0; i < bundleInfos.length; i++) { + if (bundleInfos[i].name == BUNDLE_NAME5) { + for (let j = 0; j < bundleInfos[i].abilityInfos.length; j++) { + if (bundleInfos[i].abilityInfos[j].name == ABILITIY_NAME1) { + expect(bundleInfos[i].abilityInfos[j].backgroundModes).assertEqual(DATATRANSFER | + AUDIOPLAYBACK | AUDIORECORDING | LOCATION | BLUETOOTHINTERACTION | + MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING); + } else if (bundleInfos[i].abilityInfos[j].name == ABILITIY_NAME2) { + expect(bundleInfos[i].abilityInfos[j].backgroundModes).assertEqual(DATATRANSFER | VOIP); } } } - let data3 = await bundle.getBundleInfo(BUNDLE_NAME5, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES); - expect(data3.abilityInfos[2].backgroundModes).assertEqual(DATATRANSFER | AUDIOPLAYBACK | AUDIORECORDING | - LOCATION | BLUETOOTHINTERACTION | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING); - expect(data3.abilityInfos[3].backgroundModes).assertEqual(DATATRANSFER | VOIP); - installer.uninstall(BUNDLE_NAME5, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); - }); + } + let data3 = await bundle.getBundleInfo(BUNDLE_NAME5, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES); + expect(data3.abilityInfos[2].backgroundModes).assertEqual(DATATRANSFER | AUDIOPLAYBACK | AUDIORECORDING | + LOCATION | BLUETOOTHINTERACTION | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING); + expect(data3.abilityInfos[3].backgroundModes).assertEqual(DATATRANSFER | VOIP); + done(); }); /* @@ -116,28 +95,20 @@ describe('ActsBmsGetBackGroundModes', function () { * contains one of the background mode */ it('bms_backGroundModes_0200', 0, async function (done) { - let bundlePath = [BUNDLE_PATH6]; - let installer = await bundle.getBundleInstaller(); - installer.install(bundlePath, installParam, async (err, data) => { - checkInstallOrUninstall(err, data); - let dataInfos = await bundle.queryAbilityByWant({ - action: 'action.system.home', - entities: ['entity.system.home'], - elementName: { - deviceId: '0', - bundleName: BUNDLE_NAME6, - abilityName: '', - }, - }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); - expect(dataInfos.length).assertEqual(NUM_NINE); - for (let i = 0, len = dataInfos.length; i < len; i++) { - expect(dataInfos[i].backgroundModes).assertEqual(1 << i); - } - installer.uninstall(BUNDLE_NAME6, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); - }); + let dataInfos = await bundle.queryAbilityByWant({ + action: 'action.system.home', + entities: ['entity.system.home'], + elementName: { + deviceId: '0', + bundleName: BUNDLE_NAME6, + abilityName: '', + }, + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); + expect(dataInfos.length).assertEqual(NUM_NINE); + for (let i = 0, len = dataInfos.length; i < len; i++) { + expect(dataInfos[i].backgroundModes).assertEqual(1 << i); + } + done(); }); /* @@ -146,47 +117,39 @@ describe('ActsBmsGetBackGroundModes', function () { * @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes */ it('bms_backGroundModes_0300', 0, async function (done) { - let bundlePath = [BUNDLE_PATH2]; - let installer = await bundle.getBundleInstaller(); - installer.install(bundlePath, installParam, async (err, data) => { - checkInstallOrUninstall(err, data); - let dataInfos = await bundle.queryAbilityByWant({ - action: 'action.system.home', - entities: ['entity.system.home'], - elementName: { - deviceId: '0', - bundleName: BUNDLE_NAME2, - abilityName: '', - }, - }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); - expect(dataInfos.length).assertEqual(NUM_TWO); - if (dataInfos.length == NUM_TWO) { - expect(dataInfos[1].name).assertEqual(ABILITIY_NAME3) - expect(dataInfos[1].backgroundModes).assertEqual(AUDIOPLAYBACK | AUDIORECORDING | LOCATION - | BLUETOOTHINTERACTION | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING) - } - bundle.getAllBundleInfo(bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, USERID, (err, bundleInfos) => { - for (let i = 0; i < bundleInfos.length; i++) { - if (bundleInfos[i].name == BUNDLE_NAME2) { - for (let j = 0; j < bundleInfos[i].abilityInfos.length; j++) { - if (bundleInfos[i].abilityInfos[j].name == ABILITIY_NAME3) { - expect(bundleInfos[i].abilityInfos[j].backgroundModes).assertEqual( - AUDIOPLAYBACK | AUDIORECORDING | LOCATION | BLUETOOTHINTERACTION - | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING); - } + let dataInfos = await bundle.queryAbilityByWant({ + action: 'action.system.home', + entities: ['entity.system.home'], + elementName: { + deviceId: '0', + bundleName: BUNDLE_NAME2, + abilityName: '', + }, + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); + expect(dataInfos.length).assertEqual(NUM_TWO); + if (dataInfos.length == NUM_TWO) { + expect(dataInfos[1].name).assertEqual(ABILITIY_NAME3) + expect(dataInfos[1].backgroundModes).assertEqual(AUDIOPLAYBACK | AUDIORECORDING | LOCATION + | BLUETOOTHINTERACTION | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING) + } + bundle.getAllBundleInfo(bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, USERID, (err, bundleInfos) => { + for (let i = 0; i < bundleInfos.length; i++) { + if (bundleInfos[i].name == BUNDLE_NAME2) { + for (let j = 0; j < bundleInfos[i].abilityInfos.length; j++) { + if (bundleInfos[i].abilityInfos[j].name == ABILITIY_NAME3) { + expect(bundleInfos[i].abilityInfos[j].backgroundModes).assertEqual( + AUDIOPLAYBACK | AUDIORECORDING | LOCATION | BLUETOOTHINTERACTION + | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING); } } } - }); - bundle.getBundleInfo(BUNDLE_NAME2, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, (err, data3) => { - expect(data3.abilityInfos[1].backgroundModes).assertEqual(AUDIOPLAYBACK | AUDIORECORDING | LOCATION - | BLUETOOTHINTERACTION | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING) - }); - installer.uninstall(BUNDLE_NAME2, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); + } }); + bundle.getBundleInfo(BUNDLE_NAME2, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, (err, data3) => { + expect(data3.abilityInfos[1].backgroundModes).assertEqual(AUDIOPLAYBACK | AUDIORECORDING | LOCATION + | BLUETOOTHINTERACTION | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING) + }); + done(); }); /* @@ -195,29 +158,21 @@ describe('ActsBmsGetBackGroundModes', function () { * @tc.desc: Read the backgroundModes information of the app's ability and replace invalid attributes */ it('bms_backGroundModes_0400', 0, async function (done) { - let bundlePath1 = [BUNDLE_PATH4]; - let installer = await bundle.getBundleInstaller(); - installer.install(bundlePath1, installParam, async (err, data) => { - checkInstallOrUninstall(err, data); - let dataInfos = await bundle.queryAbilityByWant({ - action: 'action.system.home', - entities: ['entity.system.home'], - elementName: { - deviceId: '0', - bundleName: BUNDLE_NAME4, - abilityName: '', - }, - }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); - expect(dataInfos.length).assertEqual(1); - if (dataInfos.length == 1) { - expect(dataInfos[0].name).assertEqual(ABILITIY_NAME4) - expect(dataInfos[0].backgroundModes).assertEqual(0) - } - installer.uninstall(BUNDLE_NAME4, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); - }); + let dataInfos = await bundle.queryAbilityByWant({ + action: 'action.system.home', + entities: ['entity.system.home'], + elementName: { + deviceId: '0', + bundleName: BUNDLE_NAME4, + abilityName: '', + }, + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); + expect(dataInfos.length).assertEqual(1); + if (dataInfos.length == 1) { + expect(dataInfos[0].name).assertEqual(ABILITIY_NAME4) + expect(dataInfos[0].backgroundModes).assertEqual(0) + } + done(); }); /* @@ -226,89 +181,25 @@ describe('ActsBmsGetBackGroundModes', function () { * @tc.desc: Get the backgroundModes information of the multi-hap package of the application */ it('bms_backGroundModes_0500', 0, async function (done) { - let bundlePath = [BUNDLE_PATH1, BUNDLE_PATH3]; - let installer = await bundle.getBundleInstaller(); - installer.install(bundlePath, installParam, async (err, data) => { - checkInstallOrUninstall(err, data); - let dataInfos = await bundle.queryAbilityByWant({ - action: 'action.system.home', - entities: ['entity.system.home'], - elementName: { - deviceId: '0', - bundleName: BUNDLE_NAME1, - abilityName: '', - }, - }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); - expect(dataInfos.length).assertEqual(NUM_FOUR); - if (dataInfos.length == NUM_FOUR) { - expect(dataInfos[1].name).assertEqual(ABILITIY_NAME5) - expect(dataInfos[1].backgroundModes).assertEqual(DATATRANSFER | AUDIOPLAYBACK | AUDIORECORDING | - LOCATION | BLUETOOTHINTERACTION | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING) - expect(dataInfos[3].name).assertEqual(ABILITIY_NAME6) - expect(dataInfos[3].backgroundModes).assertEqual(DATATRANSFER | AUDIOPLAYBACK | AUDIORECORDING | - LOCATION | BLUETOOTHINTERACTION | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING) - } - installer.uninstall(BUNDLE_NAME1, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); - }); - }); - - /* - * @tc.number: bms_backGroundModes_0600 - * @tc.name: Get the backgroundModes information of the application through queryAbilityByWant - * @tc.desc: Get the backgroundModes information of the upgraded application's ability - */ - it('bms_backGroundModes_0600', 0, async function (done) { - let bundlePath1 = [BUNDLE_PATH1]; - let bundlePath2 = [BUNDLE_PATHUPDATE]; - let installer = await bundle.getBundleInstaller(); - installer.install(bundlePath1, installParam, async (err, data) => { - checkInstallOrUninstall(err, data); - let dataInfos = await bundle.queryAbilityByWant({ - action: 'action.system.home', - entities: ['entity.system.home'], - elementName: { - deviceId: '0', - bundleName: BUNDLE_NAME1, - abilityName: '', - }, - }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); - expect(dataInfos.length).assertEqual(NUM_TWO); - if (dataInfos.length == NUM_TWO) { - expect(dataInfos[1].name).assertEqual(ABILITIY_NAME5); - expect(dataInfos[1].backgroundModes).assertEqual(DATATRANSFER | AUDIOPLAYBACK | AUDIORECORDING | - LOCATION | BLUETOOTHINTERACTION | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING); - } - installer.install(bundlePath2, installParam, async (err, data) => { - checkInstallOrUninstall(err, data); - let dataInfos = await bundle.queryAbilityByWant({ - action: 'action.system.home', - entities: ['entity.system.home'], - elementName: { - deviceId: '0', - bundleName: BUNDLE_NAME1, - abilityName: '', - }, - }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); - expect(dataInfos.length).assertEqual(NUM_TWO); - if (dataInfos.length == NUM_TWO) { - expect(dataInfos[1].name).assertEqual(ABILITIY_NAME7); - expect(dataInfos[1].backgroundModes).assertEqual(AUDIORECORDING | LOCATION | BLUETOOTHINTERACTION | - MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING); - } - installer.uninstall(BUNDLE_NAME1, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); - }); - }); + let dataInfos = await bundle.queryAbilityByWant({ + action: 'action.system.home', + entities: ['entity.system.home'], + elementName: { + deviceId: '0', + bundleName: BUNDLE_NAME1, + abilityName: '', + }, + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); + expect(dataInfos.length).assertEqual(NUM_FOUR); + if (dataInfos.length == NUM_FOUR) { + expect(dataInfos[1].name).assertEqual(ABILITIY_NAME5) + expect(dataInfos[1].backgroundModes).assertEqual(DATATRANSFER | AUDIOPLAYBACK | AUDIORECORDING | + LOCATION | BLUETOOTHINTERACTION | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING) + expect(dataInfos[3].name).assertEqual(ABILITIY_NAME6) + expect(dataInfos[3].backgroundModes).assertEqual(DATATRANSFER | AUDIOPLAYBACK | AUDIORECORDING | + LOCATION | BLUETOOTHINTERACTION | MULTIDEVICECONNECTION | WIFIINTERACTION | VOIP | TASKKEEPING) + } + done(); }); - function checkInstallOrUninstall(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - } }) \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsQueryAbilityByWant.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsQueryAbilityByWant.test.js index a2bfa3a185920e733181d2d25e0fe2276759a5cc..cbb24fe8a548a6456e867263f0a47818ab716ea8 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsQueryAbilityByWant.test.js +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsQueryAbilityByWant.test.js @@ -16,16 +16,9 @@ import bundle from '@ohos.bundle' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit' const BUNDLE_NAME1 = 'com.example.third1'; -const BUNDLE_PATH1 = ['/data/test/bmsThirdBundleTest1.hap']; -const SYSTEM_PATH = '/data/test/bmsSystemBundleTest2.hap'; const SYSTEM_NAME = 'com.example.system2'; const ABILITIY_NAME8 = 'com.example.system2.MainAbility'; const USERID = 100; -let installParam = { - userId: 100, - installFlag: 1, - isKeepData: false -}; describe('ActsBmsQueryAbilityByWant', function () { @@ -36,35 +29,26 @@ describe('ActsBmsQueryAbilityByWant', function () { * 2.queryAbilityByWant for third app */ it('bms_queryAbilityByWant_0100', 0, async function (done) { - await bundle.getBundleInstaller().then(installer => { - installer.install(BUNDLE_PATH1, installParam, onReceiveinstallEvent); - async function onReceiveinstallEvent(err, data) { - checkInstallOrUninstall(err, data); - await bundle.queryAbilityByWant({ - action: ['action.system.home'], - entities: ['entity.system.home'], - bundleName: BUNDLE_NAME1 - }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_APPLICATION | bundle.BundleFlag.GET_ABILITY_INFO_SYSTEMAPP_ONLY, - USERID).then(data => { - expect(data).assertFail(); - }).catch(err => { - expect(err).assertEqual(1); - }); - bundle.queryAbilityByWant({ - action: ['action.system.home'], - entities: ['entity.system.home'], - bundleName: BUNDLE_NAME1 - }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_APPLICATION | bundle.BundleFlag.GET_ABILITY_INFO_SYSTEMAPP_ONLY, - USERID, (err, data) => { - expect(err).assertEqual(1); - expect(data).assertEqual("QueryAbilityInfos failed"); - installer.uninstall(BUNDLE_NAME1, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); - }); - } - }); + await bundle.queryAbilityByWant({ + action: ['action.system.home'], + entities: ['entity.system.home'], + bundleName: BUNDLE_NAME1 + }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_APPLICATION | bundle.BundleFlag.GET_ABILITY_INFO_SYSTEMAPP_ONLY, + USERID).then(data => { + expect(data).assertFail(); + }).catch(err => { + expect(err).assertEqual(1); + }); + bundle.queryAbilityByWant({ + action: ['action.system.home'], + entities: ['entity.system.home'], + bundleName: BUNDLE_NAME1 + }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_APPLICATION | bundle.BundleFlag.GET_ABILITY_INFO_SYSTEMAPP_ONLY, + USERID, (err, data) => { + expect(err).assertEqual(1); + expect(data).assertEqual("QueryAbilityInfos failed"); + done(); + }); }); /* @@ -113,52 +97,45 @@ describe('ActsBmsQueryAbilityByWant', function () { * @tc.desc: The entities in the parameter want pass in the new field, and use the implicit query to get abilitInfos */ it('bms_queryAbilityByEntities_0300', 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install([SYSTEM_PATH], installParam, async (err, data) => { - checkInstallOrUninstall(err, data); - let dataInfos = await bundle.queryAbilityByWant({ - action: 'action.system.home', - entities: ["entity.app.music", - "entity.app.email", - "entity.app.contacts", - "entity.app.maps", - "entity.app.browser", - "entity.app.calendar", - "entity.app.messaging", - "entity.app.files", - "entity.app.gallery"], - elementName: { - deviceId: '0', - bundleName: '', - abilityName: '', - }, - }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); - expect(dataInfos.length).assertEqual(1); - cheackAbilityInfos(dataInfos[0]); - bundle.queryAbilityByWant({ - action: 'action.system.home', - entities: ["entity.app.music", - "entity.app.email", - "entity.app.contacts", - "entity.app.maps", - "entity.app.browser", - "entity.app.calendar", - "entity.app.messaging", - "entity.app.files", - "entity.app.gallery"], - elementName: { - deviceId: '0', - bundleName: '', - abilityName: '', - }, - }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID, (err, data) => { - expect(data.length).assertEqual(1); - cheackAbilityInfos(data[0]); - }); - installer.uninstall(SYSTEM_NAME, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); + let dataInfos = await bundle.queryAbilityByWant({ + action: 'action.system.home', + entities: ["entity.app.music", + "entity.app.email", + "entity.app.contacts", + "entity.app.maps", + "entity.app.browser", + "entity.app.calendar", + "entity.app.messaging", + "entity.app.files", + "entity.app.gallery"], + elementName: { + deviceId: '0', + bundleName: '', + abilityName: '', + }, + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID); + expect(dataInfos.length).assertEqual(1); + cheackAbilityInfos(dataInfos[0]); + bundle.queryAbilityByWant({ + action: 'action.system.home', + entities: ["entity.app.music", + "entity.app.email", + "entity.app.contacts", + "entity.app.maps", + "entity.app.browser", + "entity.app.calendar", + "entity.app.messaging", + "entity.app.files", + "entity.app.gallery"], + elementName: { + deviceId: '0', + bundleName: '', + abilityName: '', + }, + }, bundle.BundleFlag.GET_BUNDLE_DEFAULT, USERID, (err, data) => { + expect(data.length).assertEqual(1); + cheackAbilityInfos(data[0]); + done(); }); }); @@ -196,9 +173,4 @@ describe('ActsBmsQueryAbilityByWant', function () { expect(data.enabled).assertEqual(true); } - function checkInstallOrUninstall(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - } }) \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/Test.json b/appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/Test.json index 88fdfcc2c81e6368bf02ed48e488bdfd9fdef6cc..e6bd773adfd51507f86c277f9f4768bbe66b90e4 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/Test.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/Test.json @@ -27,8 +27,6 @@ "push": [ "bmsMainAbilityFirstScene.hap->/data/test/bmsMainAbilityFirstScene.hap", "bmsMainAbilitySecondScene.hap->/data/test/bmsMainAbilitySecondScene.hap", - "bmsThirdBundleTest1.hap->/data/test/bmsThirdBundleTest1.hap", - "bmsThirdBundleTestA1.hap->/data/test/bmsThirdBundleTestA1.hap", "bmsThirdBundleTest2.hap->/data/test/bmsThirdBundleTest2.hap", "bmsThirdBundleTest5.hap->/data/test/bmsThirdBundleTest5.hap" ] @@ -36,7 +34,17 @@ { "type": "ShellKit", "run-command": [ - "chmod 644 /data/test/*.hap" + "chmod 644 /data/test/*.hap", + "bm install -p /data/test/bmsMainAbilityFirstScene.hap", + "bm install -p /data/test/bmsMainAbilitySecondScene.hap", + "bm install -p /data/test/bmsThirdBundleTest2.hap", + "bm install -p /data/test/bmsThirdBundleTest5.hap" + ], + "teardown-command":[ + "bm uninstall -n com.example.third2", + "bm uninstall -n com.example.third5", + "bm uninstall -n com.example.bmsmainabilityfirstscene", + "rm -rf /data/test/" ] } ] diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/entry/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/entry/src/main/config.json index eab4af19deb8d67b8288e2094e21efb2387df47e..32b247a8b35cc39bcca4f44b794afb18f5bb1152 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/entry/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmshapmoduletest/entry/src/main/config.json @@ -47,10 +47,6 @@ } ], "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, { "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" @@ -58,18 +54,6 @@ { "name":"ohos.permission.GET_BUNDLE_INFO", "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" } ], "js": [ 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 8784ae80f43d546570edda16a5c7bd3a9194061b..793f8f5565392416df18733ce7908fa61feb7f20 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 @@ -16,25 +16,13 @@ import bundle from '@ohos.bundle' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' -const BUNDLE_PATH1 = ['/data/test/bmsMainAbilityFirstScene.hap']; -const BUNDLE_PATH2 = ['/data/test/bmsMainAbilityFirstScene.hap', '/data/test/bmsMainAbilitySecondScene.hap']; -const BUNDLE_PATH3 = ['/data/test/bmsThirdBundleTest2.hap']; -const BUNDLE_PATH4 = ['/data/test/bmsThirdBundleTest5.hap']; -const BUNDLE_PATH5 = ['/data/test/bmsThirdBundleTest1.hap']; -const BUNDLE_PATH6 = ['/data/test/bmsThirdBundleTestA1.hap']; const BUNDLE_NAME1 = 'com.example.bmsmainabilityfirstscene'; const BUNDLE_NAME2 = 'com.example.third2'; const BUNDLE_NAME3 = 'com.example.third5'; -const BUNDLE_NAME4 = 'com.example.third1'; const BUNDLE_NAME5 = 'com.example.system1'; const BUNDLE_NAME6 = "com.example.bmsmainabilitysecondscene"; const FIRSTMAINABILITY = 'com.example.bmsmainabilityfirstscene.MainAbility'; const SECONDMAINABILITY = 'com.example.bmsmainabilitysecondscene.MainAbility'; -let installParam = { - userId: 100, - installFlag: 1, - isKeepData: false -}; describe('ActsBmsHapModuleTest', function () { @@ -44,40 +32,34 @@ describe('ActsBmsHapModuleTest', function () { * @tc.desc: get the module information of the hap with type of entry */ it('bms_getHapModuleInfo_0100', 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install(BUNDLE_PATH1, installParam, onReceiveInstallEvent); - function onReceiveInstallEvent(err, data) { - checkInstallOrUninstall(err, data); - bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, callback); - async function callback(err, result) { - expect(result.hapModuleInfos.length).assertEqual(1); - if (result.hapModuleInfos.length > 0) { - let hapModuleInfo = result.hapModuleInfos[0]; - expect(hapModuleInfo.name).assertEqual(BUNDLE_NAME1); - expect(hapModuleInfo.moduleName).assertEqual('entry'); - expect(hapModuleInfo.description).assertEqual(''); - expect(hapModuleInfo.descriptionId).assertEqual(0); - expect(hapModuleInfo.iconPath).assertEqual("$media:icon"); - expect(hapModuleInfo.icon).assertEqual(''); - expect(hapModuleInfo.label).assertEqual('$string:app_name'); - expect(hapModuleInfo.labelId).assertEqual(0); - expect(hapModuleInfo.iconId).assertEqual(0); - expect(hapModuleInfo.backgroundImg).assertEqual(""); - expect(hapModuleInfo.supportedModes).assertEqual(0); - expect(hapModuleInfo.reqCapabilities.length).assertEqual(0); - expect(hapModuleInfo.deviceTypes[0]).assertEqual('phone'); - expect(hapModuleInfo.mainAbilityName).assertEqual(FIRSTMAINABILITY); - expect(hapModuleInfo.mainElementName).assertEqual(FIRSTMAINABILITY); - expect(hapModuleInfo.abilityInfo.length).assertLarger(0); - expect(hapModuleInfo.colorMode).assertEqual(-1); - expect(hapModuleInfo.extensionAbilityInfo.length).assertEqual(0); - expect(hapModuleInfo.metadata.length).assertEqual(0); - expect(hapModuleInfo.installationFree).assertEqual(false); - } - installer.uninstall(BUNDLE_NAME1, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); + let dataInfo = await bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES); + bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, callback); + async function callback(err, result) { + expect(JSON.stringify(result)).assertEqual(JSON.stringify(dataInfo)); + expect(result.hapModuleInfos.length).assertEqual(2); + if (result.hapModuleInfos.length > 0) { + let hapModuleInfo = result.hapModuleInfos[0]; + expect(hapModuleInfo.name).assertEqual(BUNDLE_NAME1); + expect(hapModuleInfo.moduleName).assertEqual('entry'); + expect(hapModuleInfo.description).assertEqual(''); + expect(hapModuleInfo.descriptionId).assertEqual(0); + expect(hapModuleInfo.iconPath).assertEqual("$media:icon"); + expect(hapModuleInfo.icon).assertEqual(''); + expect(hapModuleInfo.label).assertEqual('$string:app_name'); + expect(hapModuleInfo.labelId).assertEqual(0); + expect(hapModuleInfo.iconId).assertEqual(0); + expect(hapModuleInfo.backgroundImg).assertEqual(""); + expect(hapModuleInfo.supportedModes).assertEqual(0); + expect(hapModuleInfo.reqCapabilities.length).assertEqual(0); + expect(hapModuleInfo.deviceTypes[0]).assertEqual('phone'); + expect(hapModuleInfo.mainAbilityName).assertEqual(FIRSTMAINABILITY); + expect(hapModuleInfo.mainElementName).assertEqual(FIRSTMAINABILITY); + expect(hapModuleInfo.abilityInfo.length).assertLarger(0); + expect(hapModuleInfo.colorMode).assertEqual(-1); + expect(hapModuleInfo.extensionAbilityInfo.length).assertEqual(0); + expect(hapModuleInfo.metadata.length).assertEqual(0); + expect(hapModuleInfo.installationFree).assertEqual(false); + done(); } } }); @@ -88,31 +70,26 @@ describe('ActsBmsHapModuleTest', function () { * @tc.desc: get the module information of the hap with type of feature */ it('bms_getHapModuleInfo_0200', 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install(BUNDLE_PATH2, installParam, async (err, data) => { - checkInstallOrUninstall(err, data); - bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, async (err, result) => { - expect(result.hapModuleInfos.length).assertEqual(2); - if (result.hapModuleInfos.length == 2) { - let hapModuleInfo = result.hapModuleInfos[0]; - 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'); - expect(hapModuleInfo.mainAbilityName).assertEqual(FIRSTMAINABILITY); - expect(hapModuleInfo.mainElementName).assertEqual(FIRSTMAINABILITY); - expect(hapModuleInfo1.moduleName).assertEqual('bmsmainabilitysecondscene'); - expect(hapModuleInfo1.mainAbilityName).assertEqual(SECONDMAINABILITY); - expect(hapModuleInfo1.mainElementName).assertEqual(SECONDMAINABILITY); - } - installer.uninstall(BUNDLE_NAME1, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); - }); + let dataInfo = await bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES); + bundle.getBundleInfo(BUNDLE_NAME1, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, async (err, result) => { + expect(JSON.stringify(result)).assertEqual(JSON.stringify(dataInfo)); + expect(result.hapModuleInfos.length).assertEqual(2); + if (result.hapModuleInfos.length == 2) { + let hapModuleInfo = result.hapModuleInfos[0]; + 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'); + expect(hapModuleInfo.mainAbilityName).assertEqual(FIRSTMAINABILITY); + expect(hapModuleInfo.mainElementName).assertEqual(FIRSTMAINABILITY); + expect(hapModuleInfo1.moduleName).assertEqual('bmsmainabilitysecondscene'); + expect(hapModuleInfo1.mainAbilityName).assertEqual(SECONDMAINABILITY); + expect(hapModuleInfo1.mainElementName).assertEqual(SECONDMAINABILITY); + done(); + } }); }); @@ -122,42 +99,35 @@ describe('ActsBmsHapModuleTest', function () { * @tc.desc: get the module information of the hap without mainAbility */ it('bms_getHapModuleInfo_0300', 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install(BUNDLE_PATH3, installParam, onReceiveInstallEvent); - async function onReceiveInstallEvent(err, data) { - checkInstallOrUninstall(err, data); - await bundle.getBundleInfo(BUNDLE_NAME2, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES) - .then(async (result) => { - expect(result.hapModuleInfos.length).assertEqual(1); - if (result.hapModuleInfos.length > 0) { - let hapModuleInfo = result.hapModuleInfos[0]; - expect(hapModuleInfo.name).assertEqual(BUNDLE_NAME2); - expect(hapModuleInfo.moduleName).assertEqual('entry'); - expect(hapModuleInfo.description).assertEqual(''); - expect(hapModuleInfo.descriptionId).assertEqual(0); - expect(hapModuleInfo.iconPath).assertEqual("$media:icon"); - expect(hapModuleInfo.icon).assertEqual(''); - expect(hapModuleInfo.label).assertEqual('$string:app_name'); - expect(hapModuleInfo.labelId).assertEqual(0); - expect(hapModuleInfo.iconId).assertEqual(0); - expect(hapModuleInfo.backgroundImg).assertEqual(""); - expect(hapModuleInfo.supportedModes).assertEqual(0); - expect(hapModuleInfo.reqCapabilities.length).assertEqual(0); - expect(hapModuleInfo.deviceTypes[0]).assertEqual('phone'); - expect(hapModuleInfo.mainAbilityName).assertEqual(""); - expect(hapModuleInfo.mainElementName).assertEqual(""); - expect(hapModuleInfo.abilityInfo.length).assertLarger(0); - expect(hapModuleInfo.colorMode).assertEqual(-1); - expect(hapModuleInfo.extensionAbilityInfo.length).assertEqual(0); - expect(hapModuleInfo.metadata.length).assertEqual(0); - expect(hapModuleInfo.installationFree).assertEqual(false); - } - installer.uninstall(BUNDLE_NAME2, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); - }); - } + let result = await bundle.getBundleInfo(BUNDLE_NAME2, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES); + bundle.getBundleInfo(BUNDLE_NAME2, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, (err, data) => { + expect(JSON.stringify(result)).assertEqual(JSON.stringify(data)); + expect(result.hapModuleInfos.length).assertEqual(1); + if (result.hapModuleInfos.length > 0) { + let hapModuleInfo = result.hapModuleInfos[0]; + expect(hapModuleInfo.name).assertEqual(BUNDLE_NAME2); + expect(hapModuleInfo.moduleName).assertEqual('entry'); + expect(hapModuleInfo.description).assertEqual(''); + expect(hapModuleInfo.descriptionId).assertEqual(0); + expect(hapModuleInfo.iconPath).assertEqual("$media:icon"); + expect(hapModuleInfo.icon).assertEqual(''); + expect(hapModuleInfo.label).assertEqual('$string:app_name'); + expect(hapModuleInfo.labelId).assertEqual(0); + expect(hapModuleInfo.iconId).assertEqual(0); + expect(hapModuleInfo.backgroundImg).assertEqual(""); + expect(hapModuleInfo.supportedModes).assertEqual(0); + expect(hapModuleInfo.reqCapabilities.length).assertEqual(0); + expect(hapModuleInfo.deviceTypes[0]).assertEqual('phone'); + expect(hapModuleInfo.mainAbilityName).assertEqual(""); + expect(hapModuleInfo.mainElementName).assertEqual(""); + expect(hapModuleInfo.abilityInfo.length).assertLarger(0); + expect(hapModuleInfo.colorMode).assertEqual(-1); + expect(hapModuleInfo.extensionAbilityInfo.length).assertEqual(0); + expect(hapModuleInfo.metadata.length).assertEqual(0); + expect(hapModuleInfo.installationFree).assertEqual(false); + done(); + } + }); }); /* @@ -166,61 +136,13 @@ describe('ActsBmsHapModuleTest', function () { * @tc.desc: get the module information of the hap with the added field mainAbility */ it('bms_getHapModuleInfo_0400', 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install(BUNDLE_PATH4, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - bundle.getBundleInfo(BUNDLE_NAME3, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, async (err, result) => { - expect(result.hapModuleInfos.length).assertEqual(1); - if (result.hapModuleInfos.length == 1) { - let hapModuleInfo = result.hapModuleInfos[0]; - expect(hapModuleInfo.name).assertEqual(BUNDLE_NAME3); - expect(hapModuleInfo.moduleName).assertEqual('entry'); - expect(hapModuleInfo.description).assertEqual(''); - expect(hapModuleInfo.descriptionId).assertEqual(0); - expect(hapModuleInfo.iconPath).assertEqual("$media:icon"); - expect(hapModuleInfo.icon).assertEqual(''); - expect(hapModuleInfo.label).assertEqual('$string:app_name'); - expect(hapModuleInfo.labelId).assertEqual(0); - expect(hapModuleInfo.iconId).assertEqual(0); - expect(hapModuleInfo.backgroundImg).assertEqual(""); - expect(hapModuleInfo.supportedModes).assertEqual(0); - expect(hapModuleInfo.reqCapabilities.length).assertEqual(0); - expect(hapModuleInfo.deviceTypes[0]).assertEqual('phone'); - expect(hapModuleInfo.mainAbilityName).assertEqual("com.example.third5.AMainAbility"); - expect(hapModuleInfo.mainElementName).assertEqual("com.example.third5.AMainAbility"); - expect(hapModuleInfo.abilityInfo.length).assertLarger(0); - expect(hapModuleInfo.colorMode).assertEqual(-1); - expect(hapModuleInfo.extensionAbilityInfo.length).assertEqual(0); - expect(hapModuleInfo.metadata.length).assertEqual(0); - expect(hapModuleInfo.installationFree).assertEqual(false); - } - installer.uninstall(BUNDLE_NAME3, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - done(); - }); - }); - }); - }); - - /* - * @tc.number: bms_getHapModuleInfo_0500 - * @tc.name: get the hapModuleInfo of the upgraded hap package from an application through getBundleInfo - * @tc.desc: get the module information of the mainAbility upgrade hap - */ - it('bms_getHapModuleInfo_0500', 0, async function (done) { - let installer = await bundle.getBundleInstaller(); - installer.install(BUNDLE_PATH5, installParam, async (err, data) => { - checkInstallOrUninstall(err, data); - installer.install(BUNDLE_PATH6, installParam, (err, data) => { - checkInstallOrUninstall(err, data); - bundle.getBundleInfo(BUNDLE_NAME4, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, callback); - }) - }); - function callback(err, result) { + let dataInfo = await bundle.getBundleInfo(BUNDLE_NAME3, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES); + bundle.getBundleInfo(BUNDLE_NAME3, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, async (err, result) => { + expect(JSON.stringify(result)).assertEqual(JSON.stringify(dataInfo)); expect(result.hapModuleInfos.length).assertEqual(1); if (result.hapModuleInfos.length == 1) { let hapModuleInfo = result.hapModuleInfos[0]; - expect(hapModuleInfo.name).assertEqual("com.example.third1.entry"); + expect(hapModuleInfo.name).assertEqual(BUNDLE_NAME3); expect(hapModuleInfo.moduleName).assertEqual('entry'); expect(hapModuleInfo.description).assertEqual(''); expect(hapModuleInfo.descriptionId).assertEqual(0); @@ -233,19 +155,16 @@ describe('ActsBmsHapModuleTest', function () { expect(hapModuleInfo.supportedModes).assertEqual(0); expect(hapModuleInfo.reqCapabilities.length).assertEqual(0); expect(hapModuleInfo.deviceTypes[0]).assertEqual('phone'); - expect(hapModuleInfo.mainAbilityName).assertEqual("com.example.third1.AMainAbility"); - expect(hapModuleInfo.mainElementName).assertEqual("com.example.third1.AMainAbility"); + expect(hapModuleInfo.mainAbilityName).assertEqual("com.example.third5.AMainAbility"); + expect(hapModuleInfo.mainElementName).assertEqual("com.example.third5.AMainAbility"); expect(hapModuleInfo.abilityInfo.length).assertLarger(0); - expect(hapModuleInfo.colorMode).assertEqual(0); + expect(hapModuleInfo.colorMode).assertEqual(-1); expect(hapModuleInfo.extensionAbilityInfo.length).assertEqual(0); expect(hapModuleInfo.metadata.length).assertEqual(0); expect(hapModuleInfo.installationFree).assertEqual(false); - } - installer.uninstall(BUNDLE_NAME4, installParam, (err, data) => { - checkInstallOrUninstall(err, data); done(); - }); - } + } + }); }); /* @@ -254,8 +173,10 @@ describe('ActsBmsHapModuleTest', function () { * @tc.desc: get module information of mainAbility system application */ it('bms_getHapModuleInfo_0600', 0, async function (done) { + let dataInfo = await bundle.getBundleInfo(BUNDLE_NAME5, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES); bundle.getBundleInfo(BUNDLE_NAME5, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, callback); function callback(err, data) { + expect(JSON.stringify(data)).assertEqual(JSON.stringify(dataInfo)); expect(data.hapModuleInfos.length).assertEqual(1); if (data.hapModuleInfos.length == 1) { let hapModuleInfo = data.hapModuleInfos[0]; @@ -301,10 +222,4 @@ describe('ActsBmsHapModuleTest', function () { expect(info.metadata.length).assertEqual(0); expect(info.installationFree).assertEqual(false); } - - function checkInstallOrUninstall(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - } }) \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/config.json index c3cfa9d1e9013088a341d42f2fc8a421c2d40ac7..5c95ebd7e15220be76618fda6024476dd5b45c41 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/config.json @@ -48,10 +48,6 @@ } ], "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, { "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" @@ -59,18 +55,6 @@ { "name":"ohos.permission.GET_BUNDLE_INFO", "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" } ], "js": [ diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/js/test/ActsBmsHasInstalldTest.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/js/test/ActsBmsHasInstalldTest.test.js index d6db86a80a6eef10862a11c86878c8fb8e271028..ec2e4476eb9bfc1954c53ec88f0fbbdec903954b 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/js/test/ActsBmsHasInstalldTest.test.js +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsjstest/entry/src/main/js/test/ActsBmsHasInstalldTest.test.js @@ -118,4 +118,48 @@ describe('ActsBmsHasInstalldTest', function () { } }); }); + + /* + * @tc.number: hasInstalled_0500 + * @tc.name: test hasInstalled bundleName is number + * @tc.desc: test hasInstalled bundleName is number without function fail + * @tc.level 3 + */ + it('hasInstalled_0500', 0, async function (done) { + pkg.hasInstalled({ + bundleName: NUM_TWO, + success: function success(data) { + console.info('hasInstalled success' + JSON.stringify(data)); + expect(error).assertFail(); + done(); + }, + complete: function complete() { + console.info('hasInstalled complete'); + done(); + } + }) + }); + + /* + * @tc.number: hasInstalled_0600 + * @tc.name: test hasInstalled bundleName is number + * @tc.desc: test hasInstalled bundleName is number without function complete + * @tc.level 3 + */ + it('hasInstalled_0600', 0, async function (done) { + pkg.hasInstalled({ + bundleName: NUM_TWO, + success: function success(data) { + console.info('hasInstalled success' + JSON.stringify(data)); + expect(error).assertFail(); + done(); + }, + fail: function fail(data, code) { + console.info('hasInstalled fail'); + expect(data).assertEqual("value is not an available number"); + expect(code).assertEqual(202); + done(); + } + }) + }); }) \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/Test.json b/appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/Test.json index 67795b25f9ef2016ce4f815e0de6d754a0257ef1..20a4a1b6a6c028a0af7ba6b686d0344c0fc99e9b 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/Test.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/Test.json @@ -27,15 +27,25 @@ "type": "PushKit", "push": [ "bmsThirdBundleTest1.hap->/data/test/bmsThirdBundleTest1.hap", - "bmsThirdBundleTest3.hap->/data/test/bmsThirdBundleTest3.hap", "bmsThirdBundleTest5.hap->/data/test/bmsThirdBundleTest5.hap", - "bmsThirdBundleTestA1.hap->/data/test/bmsThirdBundleTestA1.hap" + "bmsSystemBundleTest1.hap->/data/test/bmsSystemBundleTest1.hap", + "bmsVendorBundleTest1.hap->/data/test/bmsVendorBundleTest1.hap" ] }, { "type": "ShellKit", "run-command": [ - "chmod 644 /data/test/*.hap" + "bm install -p /data/test/bmsThirdBundleTest1.hap", + "bm install -p /data/test/bmsSystemBundleTest1.hap", + "bm install -p /data/test/bmsVendorBundleTest1.hap", + "bm install -p /data/test/bmsThirdBundleTest5.hap" + ], + "teardown-command":[ + "bm uninstall -n com.example.third1", + "bm uninstall -n com.example.system1", + "bm uninstall -n com.example.vendor1", + "bm uninstall -n com.example.third5", + "rm -rf /data/test/" ] } ] diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/entry/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/entry/src/main/config.json index 63e7ac92774a16a446024a89ede9ae14223ea850..4a960a6f89545b94ba3a02a2e8f1fffadebd6e6a 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/entry/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/entry/src/main/config.json @@ -47,10 +47,6 @@ } ], "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, { "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" @@ -58,18 +54,6 @@ { "name":"ohos.permission.GET_BUNDLE_INFO", "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" } ], "js": [ diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/entry/src/main/js/test/ActsBmsMetaDataTest.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/entry/src/main/js/test/ActsBmsMetaDataTest.test.js index cc537a3b7709ba2b3fb4e4f2fa3caa547ba0938a..9599aaf04d213bd12faabdd08389410cd48b4898 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/entry/src/main/js/test/ActsBmsMetaDataTest.test.js +++ b/appexecfwk/bundle_standard/bundlemanager/actsbmsmetadatatest/entry/src/main/js/test/ActsBmsMetaDataTest.test.js @@ -16,6 +16,18 @@ import bundle from '@ohos.bundle' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' +const BUNDLE_NAME1 = 'com.example.third1'; +const BUNDLE_NAME2 = 'com.example.third5'; +const BUNDLE_NAME3 = 'com.example.noexist'; +const BUNDLE_NAME4 = 'com.example.system1'; +const BUNDLE_NAME5 = 'com.example.vendor1'; +const ABILITY_NAME1 = 'com.example.third1.MainAbility'; +const ABILITY_NAME3 = 'com.example.third5.AMainAbility'; +const ABILITY_NAME4 = 'com.example.noexist.MainAbility'; +const ABILITY_NAME5 = 'com.example.system1.MainAbility'; +const ABILITY_NAME6 = 'com.example.vendor1.MainAbility'; +const USERID = 100; + describe('ActsBmsMetaDataTest', function () { /* @@ -24,133 +36,22 @@ describe('ActsBmsMetaDataTest', function () { * @tc.desc: get an application's meta data which contains two HAP packages. */ it('bms_getMetaData_0100', 0, async function (done) { - console.info('=====================bms_getMetaData_0100=================='); - let bundlePath = ['/data/test/bmsThirdBundleTest1.hap'] - let installer = await bundle.getBundleInstaller(); - let abilityName1 = 'com.example.third1.MainAbility'; - let dataMap = new Map(); - installer.install(bundlePath, { - userId: 100, - installFlag: 1, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - bundle.queryAbilityByWant( - { - "bundleName": 'com.example.third1', - "abilityName": 'com.example.third1.MainAbility', - }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, 100).then(dataInfos => { - for (let i = 0, len = dataInfos.length; i < len; i++) { - dataMap.set(dataInfos[i].name, dataInfos[i].metaData) - } - }) - if (dataMap.has(abilityName1)) { - checkMetaData(dataMap.get(abilityName1), 'Data1'); - } - installer.uninstall('com.example.third1', { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); + await bundle.queryAbilityByWant( + { + "bundleName": BUNDLE_NAME1, + "abilityName": ABILITY_NAME1 + }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => { + console.info("dataInfos[0].metaData" + JSON.stringify(dataInfos[0].metaData)); + let metaData = dataInfos[0].metaData; + expect(metaData[0].name).assertEqual("Data1"); + expect(metaData[0].value).assertEqual("float"); + expect(metaData[0].extra).assertEqual("$string:mainability_description"); done(); - }); - }); - - }) - - /* - * @tc.number: bms_getMetaData_0200 - * @tc.name: test to get meta data for an update application. - * @tc.desc: get an application's meta data that is updated. - */ - it('bms_getMetaData_0200', 0, async function (done) { - console.info('=====================bms_getMetaData_0200=================='); - let bundlePath1 = ['/data/test/bmsThirdBundleTest1.hap'] - let bundlePath2 = ['/data/test/bmsThirdBundleTestA1.hap'] - let dataMap = new Map(); - let abilityName1 = 'com.example.third1.AMainAbility'; - let installer = await bundle.getBundleInstaller(); - installer.install(bundlePath1, { - userId: 100, - installFlag: 1, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - installer.install(bundlePath2, { - userId: 100, - installFlag: 1, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - bundle.queryAbilityByWant( - { - "bundleName": 'com.example.third1', - "abilityName": 'com.example.third1.AMainAbility', - }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, 100).then(dataInfos => { - for (let i = 0, len = dataInfos.length; i < len; i++) { - dataMap.set(dataInfos[i].name, dataInfos[i].metaData) - } - }) - if (dataMap.has(abilityName1)) { - checkMetaData(dataMap.get(abilityName1), 'DataA1'); - } - installer.uninstall('com.example.third1', { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }) - }) - }) - - /* - * @tc.number: bms_getMetaData_0300 - * @tc.name: test to get meta data for an uninstalled application. - * @tc.desc: get an application's meta data that is uninstalled. - */ - it('bms_getMetaData_0300', 0, async function (done) { - console.info('=====================bms_getMetaData_0300=================='); - let bundlePath = ['/data/test/bmsThirdBundleTest1.hap'] - let bundleName = 'com.example.third1'; - let installer = await bundle.getBundleInstaller(); - installer.install(bundlePath, { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - installer.uninstall(bundleName, { - userId: 100, - installFlag: 1, - isKeepData: false - }, async (err, data) => { - bundle.queryAbilityByWant( - { - bundleName: 'com.example.third1', - abilityName: 'com.example.third1.MainAbility', - }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, 100).then(dataInfos => { - expect(dataInfos.length).assertEqual(0); - }); + }).catch(err => { + expect(err).assertFail(); done(); }); - }); - }) + }); /* * @tc.number: bms_getMetaData_0400 @@ -158,44 +59,22 @@ describe('ActsBmsMetaDataTest', function () { * @tc.desc: get an application's meta data which has one ability. */ it('bms_getMetaData_0400', 0, async function (done) { - console.info('=====================bms_getMetaData_0400=================='); - let bundlePath = ['/data/test/bmsThirdBundleTest5.hap'] - let dataMap = new Map(); - let abilityName1 = 'com.example.third5.AMainAbility'; - let installer = await bundle.getBundleInstaller(); - installer.install(bundlePath, { - userId: 100, - installFlag: 1, - isKeepData: false - }, onReceiveinstallEvent); - async function onReceiveinstallEvent(err, data) { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - bundle.queryAbilityByWant( - { - bundleName: 'com.example.third5', - abilityName: 'com.example.third5.AMainAbility', - }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, 100).then(dataInfos => { - for (let i = 0, len = dataInfos.length; i < len; i++) { - dataMap.set(dataInfos[i].name, dataInfos[i].metaData) - } - }) - if (dataMap.has(abilityName1)) { - checkMetaData(dataMap.get(abilityName1), 'Data5A'); - } - installer.uninstall('com.example.third5', { - userId: 100, - installFlag: 1, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); + await bundle.queryAbilityByWant( + { + bundleName: BUNDLE_NAME2, + abilityName: ABILITY_NAME3, + }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => { + console.info("dataInfos[0].metaData" + JSON.stringify(dataInfos[0].metaData)); + let metaData = dataInfos[0].metaData; + expect(metaData[0].name).assertEqual("Data5A"); + expect(metaData[0].value).assertEqual("float"); + expect(metaData[0].extra).assertEqual("$string:mainability_description"); done(); - }) - } - }) + }).catch(err => { + expect(err).assertFail(); + done(); + }); + }); /* * @tc.number: bms_getMetaData_0500 @@ -203,16 +82,19 @@ describe('ActsBmsMetaDataTest', function () { * @tc.desc: get an application's meta data which does not exist. */ it('bms_getMetaData_0500', 0, async function (done) { - console.info('=====================bms_getMetaData_0500=================='); - bundle.queryAbilityByWant( + await bundle.queryAbilityByWant( { - bundleName: 'com.example.noexist', - abilityName: 'com.example.noexist.MainAbility', - }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, 100).then(dataInfos => { + bundleName: BUNDLE_NAME3, + abilityName: ABILITY_NAME4, + }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => { expect(dataInfos.length).assertEqual(0); - }) - done(); - }) + done(); + }).catch(err => { + console.info("err====: " + err); + expect(err).assertEqual(1); + done(); + }); + }); /* * @tc.number: bms_getMetaData_0600 @@ -220,23 +102,22 @@ describe('ActsBmsMetaDataTest', function () { * @tc.desc: get a system application's meta data. */ it('bms_getMetaData_0600', 0, async function (done) { - console.info('=====================bms_getMetaData_0600=================='); - let dataMap = new Map(); - let abilityName1 = 'com.example.system1.MainAbility'; - bundle.queryAbilityByWant( + await bundle.queryAbilityByWant( { - bundleName: 'com.example.system1', - abilityName: 'com.example.system1.MainAbility', - }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, 100).then(dataInfos => { - for (let i = 0, len = dataInfos.length; i < len; i++) { - dataMap.set(dataInfos[i].name, dataInfos[i].metaData) - } - }) - if (dataMap.has(abilityName1)) { - checkMetaData(dataMap.get(abilityName1), 'Data1S'); - } - done(); - }) + bundleName: BUNDLE_NAME4, + abilityName: ABILITY_NAME5, + }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => { + console.info("dataInfos[0].metaData" + JSON.stringify(dataInfos[0].metaData)); + let metaData = dataInfos[0].metaData; + expect(metaData[0].name).assertEqual("Data1S"); + expect(metaData[0].value).assertEqual("float"); + expect(metaData[0].extra).assertEqual("$string:mainability_description"); + done(); + }).catch(err => { + expect(err).assertFail(); + done(); + }); + }); /* * @tc.number: bms_getMetaData_0700 @@ -244,73 +125,21 @@ describe('ActsBmsMetaDataTest', function () { * @tc.desc: get a vendor application's meta data. */ it('bms_getMetaData_0700', 0, async function (done) { - console.info('=====================bms_getMetaData_0700=================='); - let dataMap = new Map(); - let abilityName1 = 'com.example.vendor1.MainAbility'; - bundle.queryAbilityByWant( + await bundle.queryAbilityByWant( { - bundleName: 'com.example.vendor1', - abilityName: 'com.example.vendor1.MainAbility', - }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, 100).then(dataInfos => { - for (let i = 0, len = dataInfos.length; i < len; i++) { - dataMap.set(dataInfos[i].name, dataInfos[i].metaData) - } + bundleName: BUNDLE_NAME5, + abilityName: ABILITY_NAME6, + }, bundle.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, USERID).then(dataInfos => { + console.info("dataInfos[0].metaData" + JSON.stringify(dataInfos[0].metaData)); + let metaData = dataInfos[0].metaData; + expect(metaData[0].name).assertEqual(""); + expect(metaData[0].value).assertEqual(""); + expect(metaData[0].extra).assertEqual(""); + done(); + }).catch(err => { + expect(err).assertFail(); + done(); }); - if (dataMap.has(abilityName1)) { - let data = dataMap.get(abilityName1); - let parameters = data.parameters; - let results = data.results; - let customizeDatas = data.customizeDatas; - expect(parameters.length).assertEqual(2); - expect(results.length).assertEqual(1); - expect(customizeDatas.length).assertEqual(1); - console.debug('=====customizeDatas length=====' + customizeDatas.length); - for (let i = 0; i < parameters.length; i++) { - expect(parameters[i].description).assertEqual('$string:mainability_description'); - expect(parameters[i].name).assertEqual("Data1V" + i); - expect(parameters[i].type).assertEqual('float'); - } - for (let i = 0; i < results.length; i++) { - expect(results[i].description).assertEqual('$string:mainability_description'); - expect(results[i].name).assertEqual('Data1V'); - expect(results[i].type).assertEqual('float'); - } - for (let i = 0; i < customizeDatas.length; i++) { - expect(customizeDatas[i].name).assertEqual(''); - expect(customizeDatas[i].value).assertEqual(''); - expect(customizeDatas[i].extra).assertEqual(''); - } - } - done(); - }) + }); - function checkMetaData(data, name) { - let parameters = data.parameters; - let results = data.results; - let customizeDatas = data.customizeDatas; - expect(typeof parameters).assertEqual('object'); - expect(typeof results).assertEqual('object'); - expect(typeof customizeDatas).assertEqual('object'); - expect(parameters.length).assertLarger(0); - expect(results.length).assertLarger(0); - expect(customizeDatas.length).assertLarger(0); - for (let i = 0; i < parameters.length; i++) { - expect(typeof parameters[i].description).assertEqual('string'); - expect(typeof parameters[i].name).assertEqual('string'); - expect(parameters[i].name).assertEqual(name); - expect(typeof parameters[i].type).assertEqual('string'); - } - for (let i = 0; i < results.length; i++) { - expect(typeof results[i].description).assertEqual('string'); - expect(typeof results[i].name).assertEqual('string'); - expect(results[i].name).assertEqual(name); - expect(typeof results[i].type).assertEqual('string'); - } - for (let i = 0; i < customizeDatas.length; i++) { - expect(typeof customizeDatas[i].name).assertEqual('string'); - expect(typeof customizeDatas[i].value).assertEqual('string'); - expect(customizeDatas[i].name).assertEqual(name); - expect(typeof customizeDatas[i].extra).assertEqual('string'); - } - } }) \ No newline at end of file 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 2b6dec181acab302658782fc2ebb22b19f69b374..983a51d061c5ef21f143c6499756ac381c1aaa6a 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/config.json @@ -29,9 +29,6 @@ }, { "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/GetAbilityLabelJsUnit.test.ets b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageretstest/entry/src/main/ets/MainAbility/test/GetAbilityLabelJsUnit.test.ets index 89be8576a48a1a9afc870c5ed305db7c60e2f6f6..3c3409b1cd6fc619f27d4a89802cfd1ff7452341 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 @@ -166,7 +166,6 @@ export default function getAbilityLabelJsUnit() { done(); }); - /* * @tc.number: context_getAbilityLabel_test_0700 * @tc.name: getAbilityLabel : Gets the specified ability label 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 512b379200874acd53d7e10a54197b96038435bb..4170948ff09e5b4acfcd90c4aaf905f6c49aa81d 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 @@ -42,12 +42,8 @@ export default function GetabilityInfo() { 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) + 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); @@ -93,10 +89,6 @@ export default function GetabilityInfo() { 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(); @@ -110,10 +102,6 @@ export default function GetabilityInfo() { } 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(); }); }); 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 d3f3a4d400158668e23dbda4ebe26c913dc2616b..b524f616865d6926a45053deae62cd6f22ec1de1 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 @@ -31,228 +31,107 @@ const ABILITY_ERROR = { export default function isAbilityEnabledETSUnit() { - describe('context_isAbilityEnabled_test', function () { + describe('isAbilityEnabled_test', function () { /* - * @tc.number: context_isAbilityEnabled_test_0100 + * @tc.number: 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) { + it('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); + Utils.getDurationTime('[isAbilityEnabled_test_0100]', timeOldStamp, timeNewStamp); mData = data; - console.info('[context_isAbilityEnabled_test_0100] promise data is: ' + JSON.stringify(data)); + console.info('[isAbilityEnabled_test_0100] promise data is: ' + JSON.stringify(data)); }).catch((error) => { - console.info('[context_isAbilityEnabled_test_0100] promise error is: ' + error); + console.info('[isAbilityEnabled_test_0100] promise error is: ' + error); expect(error).assertFail(); }); - getAbilityEnabledSuccess('[context_isAbilityEnabled_test_0100]', mData); + getAbilityEnabledTrue('[isAbilityEnabled_test_0100]', mData); done(); }); /* - * @tc.number: context_isAbilityEnabled_test_0200 + * @tc.number: 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) { + it('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)); + console.error('[isAbilityEnabled_test_0200]Operation failed. Cause: ' + JSON.stringify(error)); expect(error).assertFail(); } let timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isAbilityEnabled_test_0200]', timeOldStamp, timeNewStamp); + Utils.getDurationTime('[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)); + console.info('[isAbilityEnabled_test_0200] callBack data is:' + JSON.stringify(data)); }); await Utils.sleep(2000); - getAbilityEnabledSuccess('[context_isAbilityEnabled_test_0200]', mData); + getAbilityEnabledTrue('[isAbilityEnabled_test_0200]', mData); done(); }); /* - * @tc.number: context_isAbilityEnabled_test_0300 + * @tc.number: 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) { + it('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); + Utils.getDurationTime('[isAbilityEnabled_test_0300]', timeOldStamp, timeNewStamp); mData = data; - console.info('[context_isAbilityEnabled_test_0300] promise data is: ' + JSON.stringify(data)); + console.info('[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); + Utils.getDurationTime('[isAbilityEnabled_test_0300]', timeOldStamp, timeNewStamp); + console.info('[isAbilityEnabled_test_0300] promise error is: ' + error); expect(error).assertFail(); }); - getAbilityEnabledFalse('[context_isAbilityEnabled_test_0300]', mData); + getAbilityEnabledFalse('[isAbilityEnabled_test_0300]', mData); done(); }); /* - * @tc.number: context_isAbilityEnabled_test_0400 + * @tc.number: 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) { + it('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)); + console.error('[isAbilityEnabled_test_0400]Operation failed. Cause: ' + JSON.stringify(error)); expect(error).assertFail(); } let timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isAbilityEnabled_test_0300]', timeOldStamp, timeNewStamp); + Utils.getDurationTime('[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)); + console.info('[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); + console.info('[isAbilityEnabled_test_0400] Failure '); + getAbilityEnabledFalse('[isAbilityEnabled_test_0300]', 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(); - }) - 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(); - }); - - /* - * @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(); - }); - - /* - * @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(); - }) - 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(); - }); - function getAbilityEnabledSuccess(msg, data) { console.log(msg + ' start ' + JSON.stringify(data)); - console.log(msg + ' data : ' + data); - expect(typeof (data)).assertEqual('boolean') + expect(typeof (data)).assertEqual('boolean'); } function getAbilityEnabledTrue(msg, data) { 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 19f9aec604794ce886310bc0619c12bad0a05567..cbae1fb778fb22316e60315e1574d593f4282132 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 @@ -21,170 +21,105 @@ const BUNDLE_NAME_ERROR = 'com.ohos.acepackage.error' export default function IsApplicationEnabledETSUnit() { - describe('context_isApplicationEnabled_test', function () { + describe('isApplicationEnabled_test', function () { /* - * @tc.number: context_isApplicationEnabled_test_0100 + * @tc.number: 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) { + it('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); + Utils.getDurationTime('[isApplicationEnabled_test_0100]', timeOldStamp, timeNewStamp); mData = data; - console.info('[context_isApplicationEnabled_test_0100] promise data is: ' + JSON.stringify(data)); + console.info('[isApplicationEnabled_test_0100] promise data is: ' + JSON.stringify(data)); }).catch((error) => { - console.info('[context_isApplicationEnabled_test_0100] promise error is: ' + error); + console.info('[isApplicationEnabled_test_0100] promise error is: ' + error); expect(error).assertFail(); }); - getApplicationEnabledSuccess('[context_isApplicationEnabled_test_0100]', mData); + getApplicationEnabledTrue('[isApplicationEnabled_test_0100]', mData); done(); }); /* - * @tc.number: context_isApplicationEnabled_test_0200 + * @tc.number: 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) { + it('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)); + console.error('[isApplicationEnabled_test_0200]Operation failed. Cause: ' + JSON.stringify(error)); expect(error).assertFail(); } let timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isApplicationEnabled_test_0200]', timeOldStamp, timeNewStamp); + Utils.getDurationTime('[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)); + console.info('[isApplicationEnabled_test_0200] callBack data is:' + JSON.stringify(data)); }); await Utils.sleep(2000); - getApplicationEnabledSuccess('[context_isApplicationEnabled_test_0200]', mData); + getApplicationEnabledTrue('[isApplicationEnabled_test_0200]', mData); done(); }); /* - * @tc.number: context_isApplicationEnabled_test_0300 + * @tc.number: 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) { + it('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); + Utils.getDurationTime('[isApplicationEnabled_test_0300]', timeOldStamp, timeNewStamp); mData = data; - console.info('[context_isApplicationEnabled_test_0300] promise data is: ' + JSON.stringify(data)); + console.info('[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); + Utils.getDurationTime('[isApplicationEnabled_test_0300]', timeOldStamp, timeNewStamp); + console.info('[isApplicationEnabled_test_0300] promise error is: ' + error); expect(error).assertFail(); }); - getApplicationEnabledFalse('[context_isApplicationEnabled_test_0300]', mData); + getApplicationEnabledFalse('[isApplicationEnabled_test_0300]', mData); done(); }); /* - * @tc.number: context_isApplicationEnabled_test_0400 + * @tc.number: 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) { + it('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)); + console.error('[isApplicationEnabled_test_0400]Operation failed. Cause: ' + JSON.stringify(error)); expect(error).assertFail(); } let timeNewStamp = Utils.getNowTime(); - Utils.getDurationTime('[context_isApplicationEnabled_test_0400]', timeOldStamp, timeNewStamp); + Utils.getDurationTime('[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)); + console.info('[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_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(); - }); - - /* - * @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); + getApplicationEnabledFalse('[isApplicationEnabled_test_0300]', mData); done(); }); function getApplicationEnabledSuccess(msg, data) { console.log(msg + ' start ' + JSON.stringify(data)); - console.log(msg + ' data : ' + data); - expect(typeof (data)).assertEqual('boolean') + expect(typeof (data)).assertEqual('boolean'); } function getApplicationEnabledTrue(msg, data) { diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/Test.json b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/Test.json index c64f3635db4fe7615e00aefa38bf481b3727fc48..79ab9f87d44dad0998a77f14a1c51519deaf122b 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/Test.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/Test.json @@ -14,27 +14,42 @@ "type": "AppInstallKit", "cleanup-apps": true }, + { + "type": "ShellKit", + "run-command": [ + "remount", + "mkdir /data/test/" + ] + }, { "type": "PushKit", "push": [ - "bmsJstest1.hap->/data/bmsJstest1.hap", - "bmsJstest2.hap->/data/bmsJstest2.hap", - "bmsJstest3.hap->/data/bmsJstest3.hap", - "bmsJstest4.hap->/data/bmsJstest4.hap", - "bmsJstest5.hap->/data/bmsJstest5.hap", - "bmsJstest6.hap->/data/bmsJstest6.hap", - "bmsJstest7.hap->/data/bmsJstest7.hap", - "bmsJstest8.hap->/data/bmsJstest8.hap", - "bmsJstest9.hap->/data/bmsJstest9.hap" + "bmsJstest1.hap->/data/test/bmsJstest1.hap", + "bmsJstest2.hap->/data/test/bmsJstest2.hap", + "bmsJstest3.hap->/data/test/bmsJstest3.hap", + "bmsJstest4.hap->/data/test/bmsJstest4.hap", + "bmsJstest5.hap->/data/test/bmsJstest5.hap", + "bmsJstest6.hap->/data/test/bmsJstest6.hap" ] - }, { "type": "ShellKit", "run-command": [ - "chmod 644 /data/*.hap", - "chmod 600 /data/bmsJstest7.hap" + "bm install -p /data/test/bmsJstest1.hap", + "bm install -p /data/test/bmsJstest2.hap", + "bm install -p /data/test/bmsJstest3.hap", + "bm install -p /data/test/bmsJstest4.hap", + "bm install -p /data/test/bmsJstest5.hap", + "bm install -p /data/test/bmsJstest6.hap" + ], + "teardown-command":[ + "bm uninstall -n com.example.myapplication1", + "bm uninstall -n com.example.myapplication2", + "bm uninstall -n com.example.myapplication4", + "bm uninstall -n com.example.myapplication5", + "bm uninstall -n com.example.myapplication6", + "rm -rf /data/test/" ] - } + } ] } diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/config.json index 73066260c41629493c3090e0e08cbc6d9232233d..10dd96f9abbc1ce6becf0b0250f2f4b4670ce882 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/config.json @@ -70,10 +70,6 @@ } ], "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, { "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" @@ -81,18 +77,6 @@ { "name":"ohos.permission.GET_BUNDLE_INFO", "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" } ], "js": [ diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/js/test/ExampleJsunit.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/js/test/ExampleJsunit.test.js index 98b343125894d218c6e6499f43bc027ffe2aeb83..87f23fb954bc3538f67f26910ced667a7158c741 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/js/test/ExampleJsunit.test.js +++ b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanagertest/entry/src/main/js/test/ExampleJsunit.test.js @@ -17,37 +17,19 @@ import app from '@system.app' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' import demo from '@ohos.bundle' -const PATH = "/data/" const ERROR = "error.hap" -const BMSJSTEST1 = "bmsJstest1.hap" -const BMSJSTEST2 = "bmsJstest2.hap" -const BMSJSTEST3 = "bmsJstest3.hap" -const BMSJSTEST4 = "bmsJstest4.hap" -const BMSJSTEST5 = "bmsJstest5.hap" -const BMSJSTEST6 = "bmsJstest6.hap" -const BMSJSTEST7 = "bmsJstest7.hap" -const BMSJSTEST8 = "bmsJstest8.hap" -const BMSJSTEST9 = "bmsJstest9.hap" const NAME1 = "com.example.myapplication1" const NAME2 = "com.example.myapplication2" const NAME3 = "com.example.myapplication4" const NAME4 = "com.example.myapplication5" const NAME5 = "com.example.myapplication6" -const THIRD1 = "com.example.third1" const LAUNCHER = "com.ohos.launcher" const VERSIONCODE1 = 1 -const VERSIONCODE2 = 2 const OBJECT = "object" -const SUCCESS = "SUCCESS" const DIR1 = "/data/accounts/account_0/applications/com.example.myapplication1/com.example.myapplication1" const DIR2 = "/data/accounts/account_0/applications/com.example.myapplication2/com.example.myapplication2" const DESCRIPTION = "$string:mainability_description" -const START_ABILITY_TIMEOUT = 3000; -let installParam = { - userId: 100, - installFlag: 0, - isKeepData: false -}; +const USERID = 100; describe('ActsBundleManagerTest', function () { @@ -57,71 +39,53 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfo interfaces with one hap. */ it('getBundleInfo_0100', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - let datainfo = await demo.getBundleInfo(NAME1, - demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES|demo.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION) - expect(datainfo.name).assertEqual(NAME1) - expect(datainfo.vendor).assertEqual("example") - expect(datainfo.versionCode).assertEqual(VERSIONCODE1) - expect(datainfo.versionName).assertLarger(0) - expect(datainfo.entryModuleName).assertEqual("entry") - expect(datainfo.installTime).assertLarger(0) - expect(datainfo.appId).assertContain(NAME1) - expect(datainfo.type).assertEqual("") - expect(datainfo.cpuAbi).assertEqual("") - expect(datainfo.appInfo.name).assertEqual(NAME1) - expect(datainfo.appInfo.description).assertEqual(DESCRIPTION) - expect(datainfo.appInfo.descriptionId >= 0).assertTrue() - expect(datainfo.appInfo.icon).assertEqual("$media:icon") - expect(datainfo.appInfo.iconId >= 0).assertTrue() - expect(datainfo.appInfo.label).assertEqual("$string:app_name") - expect(datainfo.appInfo.labelId >= 0).assertTrue() - expect(datainfo.appInfo.systemApp).assertEqual(true) - expect(datainfo.appInfo.supportedModes).assertEqual(0) - expect(datainfo.updateTime).assertLarger(0) - expect(datainfo.reqPermissions[0]).assertEqual("com.permission.PERMISSION_A") - expect(datainfo.reqPermissionDetails[0].name).assertEqual("com.permission.PERMISSION_A") - expect(datainfo.reqPermissionDetails[0].reason).assertEqual("Need PERMISSION_A") - expect(datainfo.reqPermissionDetails[0].usedScene.abilities[0]).assertEqual(NAME1 + ".MainAbility") - expect(datainfo.reqPermissionDetails[0].usedScene.when).assertEqual("always") - expect(datainfo.compatibleVersion).assertEqual(5) - expect(datainfo.targetVersion).assertEqual(5) - expect(datainfo.isCompressNativeLibs).assertEqual(false) - for (let s = 0; s < datainfo.hapModuleInfos; s++) { - expect(datainfo.moduleInfos[s].name).assertEqual("com.example.myapplication1") - expect(datainfo.moduleInfos[s].moduleName).assertEqual("entry") - } - expect(datainfo.entryModuleName).assertEqual("entry") - expect(datainfo.isSilentInstallation.length).assertEqual(0) - expect(datainfo.minCompatibleVersionCode).assertEqual(0) - expect(datainfo.entryInstallationFree).assertEqual(false) - for (let j = 0; j < datainfo.appInfo.moduleInfos; j++) { - expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry") - expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1) - } - expect(datainfo.appInfo.enabled).assertEqual(true); - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); + let datainfo = await demo.getBundleInfo(NAME1, + demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES | demo.BundleFlag.GET_BUNDLE_WITH_REQUESTED_PERMISSION); + console.info("getBundleInfo_0100 dataInfo ====" + datainfo); + expect(datainfo.name).assertEqual(NAME1); + expect(datainfo.vendor).assertEqual("example"); + expect(datainfo.versionCode).assertEqual(VERSIONCODE1); + expect(datainfo.versionName).assertEqual("1.0"); + expect(datainfo.entryModuleName).assertEqual("entry"); + expect(datainfo.compatibleVersion).assertEqual(5); + expect(datainfo.targetVersion).assertEqual(5); + expect(datainfo.uid).assertLarger(0); + expect(datainfo.appId).assertContain(NAME1); + expect(datainfo.type).assertEqual(""); + expect(datainfo.cpuAbi).assertEqual(""); + expect(datainfo.appInfo.name).assertEqual(NAME1); + expect(datainfo.appInfo.description).assertEqual(DESCRIPTION); + expect(datainfo.appInfo.descriptionId >= 0).assertTrue(); + expect(datainfo.appInfo.icon).assertEqual("$media:icon"); + expect(datainfo.appInfo.iconId >= 0).assertTrue(); + expect(datainfo.appInfo.label).assertEqual("$string:app_name"); + expect(datainfo.appInfo.labelId >= 0).assertTrue(); + expect(datainfo.appInfo.systemApp).assertEqual(true); + expect(datainfo.appInfo.supportedModes).assertEqual(0); + expect(datainfo.installTime).assertLarger(0); + expect(datainfo.updateTime).assertLarger(0); + expect(datainfo.reqPermissions[0]).assertEqual("com.permission.PERMISSION_A"); + expect(datainfo.reqPermissionDetails[0].name).assertEqual("com.permission.PERMISSION_A"); + expect(datainfo.reqPermissionDetails[0].reason).assertEqual("Need PERMISSION_A"); + expect(datainfo.reqPermissionDetails[0].usedScene.abilities[0]).assertEqual(NAME1 + ".MainAbility"); + expect(datainfo.reqPermissionDetails[0].usedScene.when).assertEqual("always"); + expect(datainfo.compatibleVersion).assertEqual(5); + expect(datainfo.targetVersion).assertEqual(5); + expect(datainfo.isCompressNativeLibs).assertEqual(false); + for (let s = 0; s < datainfo.hapModuleInfos; s++) { + expect(datainfo.moduleInfos[s].name).assertEqual("com.example.myapplication1"); + expect(datainfo.moduleInfos[s].moduleName).assertEqual("entry"); + } + expect(datainfo.entryModuleName).assertEqual("entry"); + expect(datainfo.isSilentInstallation.length).assertEqual(0); + expect(datainfo.minCompatibleVersionCode).assertEqual(0); + expect(datainfo.entryInstallationFree).assertEqual(false); + for (let j = 0; j < datainfo.appInfo.moduleInfos; j++) { + expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); + expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } + expect(datainfo.appInfo.enabled).assertEqual(true); + done(); }) /** @@ -130,52 +94,44 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfo interfaces with one hap. */ it('getBundleInfo_0600', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - - async function getInfo() { - let datainfo = await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, OnReceiveEvent) - function OnReceiveEvent(err, datainfo) { - expect(datainfo.name).assertEqual(NAME1) - expect(datainfo.vendor).assertEqual("example") - expect(datainfo.versionCode).assertEqual(VERSIONCODE1) - expect(datainfo.versionName).assertLarger(0) - expect(datainfo.entryModuleName).assertEqual("entry") - expect(datainfo.appInfo.name).assertEqual(NAME1) - expect(datainfo.appInfo.description).assertEqual(DESCRIPTION) - expect(datainfo.appInfo.descriptionId >= 0).assertTrue() - expect(datainfo.appInfo.icon).assertEqual("$media:icon") - expect(datainfo.appInfo.iconId >= 0).assertTrue() - expect(datainfo.appInfo.label).assertEqual("$string:app_name") - expect(datainfo.appInfo.labelId >= 0).assertTrue() - expect(datainfo.appInfo.systemApp).assertEqual(true) - expect(datainfo.appInfo.supportedModes).assertEqual(0) - for (let j = 0; j < datainfo.appInfo.moduleInfos; j++) { - expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry") - expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1) - } - expect(datainfo.appInfo.enabled).assertEqual(true) - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); + await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, OnReceiveEvent); + function OnReceiveEvent(err, datainfo) { + console.info("getBundleInfo_0600 dataInfo ====" + datainfo); + expect(datainfo.name).assertEqual(NAME1); + expect(datainfo.vendor).assertEqual("example"); + expect(datainfo.versionCode).assertEqual(VERSIONCODE1); + expect(datainfo.versionName).assertEqual("1.0"); + expect(datainfo.type).assertEqual(""); + expect(datainfo.cpuAbi).assertEqual(""); + expect(datainfo.compatibleVersion).assertEqual(5); + expect(datainfo.targetVersion).assertEqual(5); + expect(datainfo.installTime).assertLarger(0); + expect(datainfo.updateTime).assertLarger(0); + expect(datainfo.uid).assertLarger(0); + expect(datainfo.entryModuleName).assertEqual("entry"); + expect(datainfo.minCompatibleVersionCode).assertEqual(0); + expect(datainfo.entryInstallationFree).assertEqual(false); + expect(datainfo.reqPermissions.length).assertEqual(0); + expect(datainfo.reqPermissionStates.length).assertEqual(0); + expect(datainfo.reqPermissionDetails.length).assertEqual(0); + expect(datainfo.extensionAbilityInfo.length).assertEqual(0); + expect(datainfo.appInfo.name).assertEqual(NAME1); + expect(datainfo.appInfo.description).assertEqual(DESCRIPTION); + expect(datainfo.appInfo.descriptionId >= 0).assertTrue(); + expect(datainfo.appInfo.icon).assertEqual("$media:icon"); + expect(datainfo.appInfo.iconId >= 0).assertTrue(); + expect(datainfo.appInfo.label).assertEqual("$string:app_name"); + expect(datainfo.appInfo.labelId >= 0).assertTrue(); + expect(datainfo.appInfo.systemApp).assertEqual(true); + expect(datainfo.appInfo.supportedModes).assertEqual(0); + for (let j = 0; j < datainfo.appInfo.moduleInfos; j++) { + expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); + expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } + expect(datainfo.appInfo.enabled).assertEqual(true); + done(); } + }) /** @@ -184,47 +140,24 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfo interfaces with one hap and different param. */ it('getBundleInfo_1100', 0, async function (done) { - let installData = await demo.getBundleInstaller() - await demo.getBundleInstaller().then((data) => { - data.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - }); - async function getInfo() { - let datainfo = await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_DEFAULT) - expect(datainfo.name).assertEqual(NAME1) - expect(datainfo.vendor).assertEqual("example") - expect(datainfo.versionCode).assertEqual(VERSIONCODE1) - expect(datainfo.versionName).assertLarger(0) - expect(datainfo.entryModuleName).assertEqual("entry") - expect(datainfo.appInfo.name).assertEqual(NAME1) - expect(datainfo.appInfo.description).assertEqual(DESCRIPTION) - expect(datainfo.appInfo.descriptionId >= 0).assertTrue() - expect(datainfo.appInfo.icon).assertEqual("$media:icon") - expect(datainfo.appInfo.iconId >= 0).assertTrue() - expect(datainfo.appInfo.label).assertEqual("$string:app_name") - expect(datainfo.appInfo.labelId >= 0).assertTrue() - expect(datainfo.appInfo.systemApp).assertEqual(true) - expect(datainfo.appInfo.supportedModes).assertEqual(0) - expect(datainfo.appInfo.enabled).assertEqual(true) - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - } + let datainfo = await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_DEFAULT) + console.info("getBundleInfo_1100 dataInfo ====" + datainfo); + expect(datainfo.name).assertEqual(NAME1); + expect(datainfo.vendor).assertEqual("example"); + expect(datainfo.versionCode).assertEqual(VERSIONCODE1); + expect(datainfo.versionName).assertLarger(0); + expect(datainfo.entryModuleName).assertEqual("entry"); + expect(datainfo.appInfo.name).assertEqual(NAME1); + expect(datainfo.appInfo.description).assertEqual(DESCRIPTION); + expect(datainfo.appInfo.descriptionId >= 0).assertTrue(); + expect(datainfo.appInfo.icon).assertEqual("$media:icon"); + expect(datainfo.appInfo.iconId >= 0).assertTrue(); + expect(datainfo.appInfo.label).assertEqual("$string:app_name"); + expect(datainfo.appInfo.labelId >= 0).assertTrue(); + expect(datainfo.appInfo.systemApp).assertEqual(true); + expect(datainfo.appInfo.supportedModes).assertEqual(0); + expect(datainfo.appInfo.enabled).assertEqual(true); + done(); }) /** @@ -233,52 +166,29 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfo interfaces with one hap and different param. */ it('getBundleInfo_1200', 0, async function (done) { - let installData = await demo.getBundleInstaller() - await demo.getBundleInstaller().then((data) => { - data.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - }); - async function getInfo() { - await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_DEFAULT, OnReceiveEvent) - function OnReceiveEvent(err, datainfo) { - expect(datainfo.name).assertEqual(NAME1) - expect(datainfo.vendor).assertEqual("example") - expect(datainfo.versionCode).assertEqual(VERSIONCODE1) - expect(datainfo.versionName).assertLarger(0) - expect(datainfo.entryModuleName).assertEqual("entry") - expect(datainfo.appInfo.name).assertEqual(NAME1) - expect(datainfo.appInfo.description).assertEqual(DESCRIPTION) - expect(datainfo.appInfo.descriptionId >= 0).assertTrue() - expect(datainfo.appInfo.icon).assertEqual("$media:icon") - expect(datainfo.appInfo.iconId >= 0).assertTrue() - expect(datainfo.appInfo.label).assertEqual("$string:app_name") - expect(datainfo.appInfo.labelId >= 0).assertTrue() - expect(datainfo.appInfo.systemApp).assertEqual(true) - expect(datainfo.appInfo.supportedModes).assertEqual(0) - for (let j = 0; j < datainfo.appInfo.moduleInfos; j++) { - expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry") - expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1) - } - expect(datainfo.appInfo.enabled).assertEqual(true) - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); + await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_DEFAULT, OnReceiveEvent) + function OnReceiveEvent(err, datainfo) { + console.info("getBundleInfo_1200 dataInfo ====" + datainfo); + expect(datainfo.name).assertEqual(NAME1); + expect(datainfo.vendor).assertEqual("example"); + expect(datainfo.versionCode).assertEqual(VERSIONCODE1); + expect(datainfo.versionName).assertLarger(0); + expect(datainfo.entryModuleName).assertEqual("entry"); + expect(datainfo.appInfo.name).assertEqual(NAME1); + expect(datainfo.appInfo.description).assertEqual(DESCRIPTION); + expect(datainfo.appInfo.descriptionId >= 0).assertTrue(); + expect(datainfo.appInfo.icon).assertEqual("$media:icon"); + expect(datainfo.appInfo.iconId >= 0).assertTrue(); + expect(datainfo.appInfo.label).assertEqual("$string:app_name"); + expect(datainfo.appInfo.labelId >= 0).assertTrue(); + expect(datainfo.appInfo.systemApp).assertEqual(true); + expect(datainfo.appInfo.supportedModes).assertEqual(0); + for (let j = 0; j < datainfo.appInfo.moduleInfos; j++) { + expect(datainfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); + expect(datainfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } + expect(datainfo.appInfo.enabled).assertEqual(true); + done(); } }) @@ -288,50 +198,28 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfos interfaces with one hap. */ it('getApplicationInfos_0100', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - let datainfo = await demo.getAllApplicationInfo(8, 100) - checkgetApplicationInfos(datainfo) - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - } + let datainfo = await demo.getAllApplicationInfo(demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, USERID); + checkgetApplicationInfos(datainfo); + done(); }) function checkgetApplicationInfos(datainfo) { - console.log("=============datainfo.length===============" + datainfo.length) - expect(datainfo.length).assertLarger(0) + console.log("=============datainfo.length===============" + datainfo.length); + expect(datainfo.length).assertLarger(0); for (let i = 0; i < datainfo.length; i++) { - expect(datainfo[i].name.length).assertLarger(0) + expect(datainfo[i].name.length).assertLarger(0); if (datainfo[i].name == NAME1 || datainfo[i].name == NAME2 || datainfo[i].name == NAME3 || datainfo[i].name == NAME4 || datainfo[i].name == NAME5) { - expect(datainfo[i].description.length).assertLarger(0) - expect(datainfo[i].icon.length).assertLarger(0) - expect(datainfo[i].label.length).assertLarger(0) + expect(datainfo[i].description.length).assertLarger(0); + expect(datainfo[i].icon.length).assertLarger(0); + expect(datainfo[i].label.length).assertLarger(0); } - expect(datainfo[i].moduleSourceDirs.length).assertLarger(0) - expect(datainfo[i].moduleInfos.length).assertLarger(0) - expect(datainfo[i].supportedModes).assertEqual(0) - expect(datainfo[i].flags).assertEqual(0) + expect(datainfo[i].moduleSourceDirs.length).assertLarger(0); + expect(datainfo[i].moduleInfos.length).assertLarger(0); + expect(datainfo[i].supportedModes).assertEqual(0); + expect(datainfo[i].flags).assertEqual(0); for (let j = 0; j < datainfo[i].moduleInfos; j++) { - expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0) - expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0) + expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); + expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0); } } @@ -343,48 +231,22 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfos interfaces with one hap. */ it('getApplicationInfos_0600', 0, async function (done) { - let installData = await demo.getBundleInstaller() - - installData.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - await demo.getAllApplicationInfo(8, 100, (error, datainfo) => { - expect(datainfo.length).assertLarger(0) + await demo.getAllApplicationInfo(demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, + USERID, (error, datainfo) => { + expect(datainfo.length).assertLarger(0); for (let i = 0; i < datainfo.length; i++) { - expect(datainfo[i].name.length).assertLarger(0) - - // expect(datainfo[i].description.length).assertLarger(0) - // expect(datainfo[i].icon.length).assertLarger(0) - // expect(datainfo[i].label.length).assertLarger(0) - expect(datainfo[i].moduleSourceDirs.length).assertLarger(0) - expect(datainfo[i].moduleInfos.length).assertLarger(0) - expect(datainfo[i].supportedModes).assertEqual(0) - expect(datainfo[i].flags).assertEqual(0) + expect(datainfo[i].name.length).assertLarger(0); + expect(datainfo[i].moduleSourceDirs.length).assertLarger(0); + expect(datainfo[i].moduleInfos.length).assertLarger(0); + expect(datainfo[i].supportedModes).assertEqual(0); + expect(datainfo[i].flags).assertEqual(0); for (let j = 0; j < datainfo[i].moduleInfos; j++) { - expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0) - expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0) + expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); + expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0); } } - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); + done(); }); - } }) /** @@ -393,45 +255,22 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfos interfaces with one hap. */ it('getBundleInfos_0100', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - - async function getInfo() { - let data = await demo.getAllBundleInfo(0) - expect(typeof data).assertEqual(OBJECT) - expect(data.length).assertLarger(0) - for (let i = 0; i < data.length; i++) { - expect(data[i].name.length).assertLarger(0) - expect(data[i].appInfo.name.length).assertLarger(0) - if (data[i].name == NAME1 || data[i].name == NAME2 - || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { - expect(data[i].appInfo.description.length).assertLarger(0) - expect(data[i].appInfo.icon.length).assertLarger(0) - expect(data[i].appInfo.label.length).assertLarger(0) - } - expect(data[i].appInfo.supportedModes).assertEqual(0) - expect(data[i].appInfo.moduleInfos.length).assertLarger(0) + let data = await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT); + expect(typeof data).assertEqual(OBJECT); + expect(data.length).assertLarger(0); + for (let i = 0; i < data.length; i++) { + expect(data[i].name.length).assertLarger(0); + expect(data[i].appInfo.name.length).assertLarger(0); + if (data[i].name == NAME1 || data[i].name == NAME2 + || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { + expect(data[i].appInfo.description.length).assertLarger(0); + expect(data[i].appInfo.icon.length).assertLarger(0); + expect(data[i].appInfo.label.length).assertLarger(0); } - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); + expect(data[i].appInfo.supportedModes).assertEqual(0); + expect(data[i].appInfo.moduleInfos.length).assertLarger(0); } + done(); }) /** @@ -440,52 +279,39 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfo interfaces with one hap. */ it('getApplicationInfo_0100', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - await demo.getApplicationInfo(NAME1, - demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION|demo.BundleFlag.GET_APPLICATION_INFO_WITH_METADATA, - 100).then(datainfo => { - expect(typeof datainfo).assertEqual(OBJECT) - console.info("getApplicationInfo success:" + JSON.stringify(datainfo)) - expect(datainfo.moduleSourceDirs.length).assertLarger(0) - expect(datainfo.moduleInfos.length).assertLarger(0) - expect(datainfo.name).assertEqual(NAME1) - expect(datainfo.description).assertEqual(DESCRIPTION) - expect(datainfo.icon).assertEqual("$media:icon") - expect(datainfo.label).assertEqual("$string:app_name") - expect(datainfo.systemApp).assertEqual(true) - expect(datainfo.descriptionId).assertLarger(0) - expect(parseInt(datainfo.iconId)).assertLarger(0) - expect(parseInt(datainfo.labelId)).assertLarger(0) - expect(datainfo.supportedModes).assertEqual(0) - expect(datainfo.process).assertEqual("") - expect(datainfo.enabled).assertEqual(true) - expect(datainfo.flags).assertEqual(0) - expect(datainfo.metaData.entry[0].name).assertEqual("metaDataName") - expect(datainfo.metaData.entry[0].value).assertEqual("metaDataValue") - expect(datainfo.metaData.entry[0].extra).assertEqual("$string:app_name") - expect(datainfo.moduleSourceDirs.length).assertLarger(0) + await demo.getApplicationInfo(NAME1, + demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION | demo.BundleFlag.GET_APPLICATION_INFO_WITH_METADATA, + USERID).then(datainfo => { + expect(typeof datainfo).assertEqual(OBJECT); + console.info("getApplicationInfo success:" + JSON.stringify(datainfo)); + expect(datainfo.moduleSourceDirs.length).assertLarger(0); + expect(datainfo.moduleInfos.length).assertLarger(0); + expect(datainfo.name).assertEqual(NAME1); + expect(datainfo.description).assertEqual(DESCRIPTION); + expect(datainfo.icon).assertEqual("$media:icon"); + expect(datainfo.label).assertEqual("$string:app_name"); + expect(datainfo.systemApp).assertEqual(true); + expect(datainfo.descriptionId).assertLarger(0); + expect(parseInt(datainfo.iconId)).assertLarger(0); + expect(parseInt(datainfo.labelId)).assertLarger(0); + expect(datainfo.supportedModes).assertEqual(0); + expect(datainfo.process).assertEqual(""); + expect(datainfo.enabled).assertEqual(true); + expect(datainfo.flags).assertEqual(0); + expect(datainfo.metaData.entry[0].name).assertEqual("metaDataName"); + expect(datainfo.metaData.entry[0].value).assertEqual("metaDataValue"); + expect(datainfo.metaData.entry[0].extra).assertEqual("$string:app_name"); + expect(datainfo.moduleSourceDirs.length).assertLarger(0); for (let j = 0; j < datainfo.moduleInfos; j++) { - expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry") - expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertLarger(0) + expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry"); + expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertLarger(0); } + done(); }).catch(err => { - console.info("getApplicationInfo fail:" + JSON.stringify(err)) + console.info("getApplicationInfo fail:" + JSON.stringify(err)); expect(err).assertFail(); - }) - installData.uninstall(NAME1, installParam, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); done(); - }); - } + }) }) /** @@ -494,44 +320,22 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfos interfaces with one hap. */ it('getBundleInfos_0600', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - await demo.getAllBundleInfo(0, (error, data) => { - expect(typeof data).assertEqual(OBJECT) - for (let i = 0; i < data.length; i++) { - expect(data[i].name.length).assertLarger(0) - expect(data[i].appInfo.name.length).assertLarger(0) - if (data[i].name == NAME1 || data[i].name == NAME2 - || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { - expect(data[i].appInfo.description.length).assertLarger(0) - expect(data[i].appInfo.icon.length).assertLarger(0) - expect(data[i].appInfo.label.length).assertLarger(0) - } - expect(data[i].appInfo.supportedModes).assertEqual(0) - expect(data[i].appInfo.moduleInfos.length).assertLarger(0) + await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT, (error, data) => { + expect(typeof data).assertEqual(OBJECT); + for (let i = 0; i < data.length; i++) { + expect(data[i].name.length).assertLarger(0); + expect(data[i].appInfo.name.length).assertLarger(0); + if (data[i].name == NAME1 || data[i].name == NAME2 + || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { + expect(data[i].appInfo.description.length).assertLarger(0); + expect(data[i].appInfo.icon.length).assertLarger(0); + expect(data[i].appInfo.label.length).assertLarger(0); } - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }) - } + expect(data[i].appInfo.supportedModes).assertEqual(0); + expect(data[i].appInfo.moduleInfos.length).assertLarger(0); + } + done(); + }); }) /** @@ -540,46 +344,30 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfo interfaces with one hap. */ it('getApplicationInfo_0600', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - await demo.getApplicationInfo(NAME1, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, 100, - (error, datainfo) => { + await demo.getApplicationInfo(NAME1, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, USERID, + (error, datainfo) => { if (error) { - console.info("getApplicationInfo fail:" + JSON.stringify(error)) + console.info("getApplicationInfo fail:" + JSON.stringify(error)); expect(error).assertFail(); } - console.info("getApplicationInfo success:" + JSON.stringify(datainfo)) - expect(typeof datainfo).assertEqual(OBJECT) - expect(datainfo.name).assertEqual(NAME1) - expect(datainfo.label).assertEqual("$string:app_name") - expect(datainfo.description).assertEqual(DESCRIPTION) - expect(datainfo.icon).assertEqual("$media:icon") - expect(datainfo.descriptionId >= 0).assertTrue() - expect(parseInt(datainfo.iconId)).assertLarger(0) - expect(parseInt(datainfo.labelId)).assertLarger(0) - expect(datainfo.systemApp).assertEqual(true) - expect(datainfo.supportedModes).assertEqual(0) - expect(datainfo.enabled).assertEqual(true) + console.info("getApplicationInfo success:" + JSON.stringify(datainfo)); + expect(typeof datainfo).assertEqual(OBJECT); + expect(datainfo.name).assertEqual(NAME1); + expect(datainfo.label).assertEqual("$string:app_name"); + expect(datainfo.description).assertEqual(DESCRIPTION); + expect(datainfo.icon).assertEqual("$media:icon"); + expect(datainfo.descriptionId >= 0).assertTrue(); + expect(parseInt(datainfo.iconId)).assertLarger(0); + expect(parseInt(datainfo.labelId)).assertLarger(0); + expect(datainfo.systemApp).assertEqual(true); + expect(datainfo.supportedModes).assertEqual(0); + expect(datainfo.enabled).assertEqual(true); for (let j = 0; j < datainfo.moduleInfos; j++) { - expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry") - expect(datainfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1) - + expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry"); + expect(datainfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } - installData.uninstall(NAME1, installParam, (err, data) => { - console.info("uninstall success:" + JSON.stringify(data)) - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); + done(); }) - } }) /** @@ -588,38 +376,23 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfo interfaces with one hap and different param. */ it('getApplicationInfo_1100', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - await demo.getApplicationInfo(NAME1, demo.BundleFlag.GET_BUNDLE_DEFAULT, 100).then(datainfo => { - console.info("getApplicationInfo success" + JSON.stringify(datainfo)) - expect(typeof datainfo).assertEqual(OBJECT) - expect(datainfo.name).assertEqual(NAME1) - expect(datainfo.label).assertEqual("$string:app_name") - expect(datainfo.description).assertEqual(DESCRIPTION) - expect(datainfo.icon).assertEqual("$media:icon") - expect(datainfo.descriptionId).assertLarger(0) - expect(parseInt(datainfo.iconId)).assertLarger(0) - expect(parseInt(datainfo.labelId)).assertLarger(0) - expect(datainfo.systemApp).assertEqual(true) - expect(datainfo.supportedModes).assertEqual(0) - }).catch(err => { - console.info("getApplicationInfo fail" + JSON.stringify(err)) - expect(err).assertFail() - }) - installData.uninstall(NAME1, installParam, (err, data) => { - console.info("uninstall success" + JSON.stringify(data)) - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - } + await demo.getApplicationInfo(NAME1, demo.BundleFlag.GET_BUNDLE_DEFAULT, USERID).then(datainfo => { + console.info("getApplicationInfo success" + JSON.stringify(datainfo)); + expect(typeof datainfo).assertEqual(OBJECT); + expect(datainfo.name).assertEqual(NAME1); + expect(datainfo.label).assertEqual("$string:app_name"); + expect(datainfo.description).assertEqual(DESCRIPTION); + expect(datainfo.icon).assertEqual("$media:icon"); + expect(datainfo.descriptionId).assertLarger(0); + expect(parseInt(datainfo.iconId)).assertLarger(0); + expect(parseInt(datainfo.labelId)).assertLarger(0); + expect(datainfo.systemApp).assertEqual(true); + expect(datainfo.supportedModes).assertEqual(0); + }).catch(err => { + console.info("getApplicationInfo fail" + JSON.stringify(err)); + expect(err).assertFail(); + }) + done(); }) /** @@ -628,39 +401,24 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfo interfaces with one hap and different param. */ it('getApplicationInfo_1200', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + BMSJSTEST1], installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - await demo.getApplicationInfo(NAME1, demo.BundleFlag.GET_BUNDLE_DEFAULT, 100, (error, datainfo) => { - if (error) { - console.info("getApplicationInfo fail" + JSON.stringify(error)) - expect(error).assertFail() - } - console.info("getApplicationInfo success" + JSON.stringify(datainfo)) - expect(typeof datainfo).assertEqual(OBJECT) - expect(datainfo.name).assertEqual(NAME1) - expect(datainfo.label).assertEqual("$string:app_name") - expect(datainfo.description).assertEqual(DESCRIPTION) - expect(datainfo.icon).assertEqual("$media:icon") - expect(datainfo.descriptionId).assertLarger(0) - expect(parseInt(datainfo.iconId)).assertLarger(0) - expect(parseInt(datainfo.labelId)).assertLarger(0) - expect(datainfo.systemApp).assertEqual(true) - expect(datainfo.supportedModes).assertEqual(0) - installData.uninstall(NAME1, installParam, (err, data) => { - console.info("uninstall success" + JSON.stringify(data)) - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }) - } + await demo.getApplicationInfo(NAME1, demo.BundleFlag.GET_BUNDLE_DEFAULT, USERID, (error, datainfo) => { + if (error) { + console.info("getApplicationInfo fail" + JSON.stringify(error)); + expect(error).assertFail(); + } + console.info("getApplicationInfo success" + JSON.stringify(datainfo)); + expect(typeof datainfo).assertEqual(OBJECT); + expect(datainfo.name).assertEqual(NAME1); + expect(datainfo.label).assertEqual("$string:app_name"); + expect(datainfo.description).assertEqual(DESCRIPTION); + expect(datainfo.icon).assertEqual("$media:icon"); + expect(datainfo.descriptionId).assertLarger(0); + expect(parseInt(datainfo.iconId)).assertLarger(0); + expect(parseInt(datainfo.labelId)).assertLarger(0); + expect(datainfo.systemApp).assertEqual(true); + expect(datainfo.supportedModes).assertEqual(0); + done(); + }) }) /** @@ -669,43 +427,21 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfo interfaces with two haps. */ it('getBundleInfo_0200', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - let datainfo = await demo.getBundleInfo(NAME2, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES) - expect(datainfo.name).assertEqual(NAME2) - expect(datainfo.vendor).assertEqual("example") - expect(datainfo.versionCode).assertEqual(1) - expect(datainfo.versionName).assertLarger(0) - expect(datainfo.entryModuleName).assertEqual("entry") - expect(datainfo.appInfo.name).assertEqual(NAME2) - expect(datainfo.appInfo.description).assertEqual(DESCRIPTION) - expect(datainfo.appInfo.descriptionId >= 0).assertTrue() - expect(datainfo.appInfo.icon).assertEqual("$media:icon") - expect(datainfo.appInfo.iconId >= 0).assertTrue() - expect(datainfo.appInfo.label).assertEqual("$string:app_name") - expect(datainfo.appInfo.labelId >= 0).assertTrue() - expect(datainfo.appInfo.systemApp).assertEqual(true) - installData.uninstall(NAME2, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - } + let datainfo = await demo.getBundleInfo(NAME2, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); + expect(datainfo.name).assertEqual(NAME2); + expect(datainfo.vendor).assertEqual("example"); + expect(datainfo.versionCode).assertEqual(1); + expect(datainfo.versionName).assertLarger(0); + expect(datainfo.entryModuleName).assertEqual("entry"); + expect(datainfo.appInfo.name).assertEqual(NAME2); + expect(datainfo.appInfo.description).assertEqual(DESCRIPTION); + expect(datainfo.appInfo.descriptionId >= 0).assertTrue(); + expect(datainfo.appInfo.icon).assertEqual("$media:icon"); + expect(datainfo.appInfo.iconId >= 0).assertTrue(); + expect(datainfo.appInfo.label).assertEqual("$string:app_name"); + expect(datainfo.appInfo.labelId >= 0).assertTrue(); + expect(datainfo.appInfo.systemApp).assertEqual(true); + done(); }) /** @@ -714,44 +450,22 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfo interfaces with two haps. */ it('getBundleInfo_0700', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - await demo.getBundleInfo(NAME2, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, OnReceiveEvent) - function OnReceiveEvent(err, datainfo) { - expect(datainfo.name).assertEqual(NAME2) - expect(datainfo.vendor).assertEqual("example") - expect(datainfo.versionCode).assertEqual(1) - expect(datainfo.versionName).assertLarger(0) - expect(datainfo.entryModuleName).assertEqual("entry") - expect(datainfo.appInfo.name).assertEqual(NAME2) - expect(datainfo.appInfo.description).assertEqual(DESCRIPTION) - expect(datainfo.appInfo.descriptionId >= 0).assertTrue() - expect(datainfo.appInfo.icon).assertEqual("$media:icon") - expect(datainfo.appInfo.iconId >= 0).assertTrue() - expect(datainfo.appInfo.label).assertEqual("$string:app_name") - expect(datainfo.appInfo.labelId >= 0).assertTrue() - expect(datainfo.appInfo.systemApp).assertEqual(true) - installData.uninstall(NAME2, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - } + await demo.getBundleInfo(NAME2, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, OnReceiveEvent); + function OnReceiveEvent(err, datainfo) { + expect(datainfo.name).assertEqual(NAME2); + expect(datainfo.vendor).assertEqual("example"); + expect(datainfo.versionCode).assertEqual(1); + expect(datainfo.versionName).assertLarger(0); + expect(datainfo.entryModuleName).assertEqual("entry"); + expect(datainfo.appInfo.name).assertEqual(NAME2); + expect(datainfo.appInfo.description).assertEqual(DESCRIPTION); + expect(datainfo.appInfo.descriptionId >= 0).assertTrue(); + expect(datainfo.appInfo.icon).assertEqual("$media:icon"); + expect(datainfo.appInfo.iconId >= 0).assertTrue(); + expect(datainfo.appInfo.label).assertEqual("$string:app_name"); + expect(datainfo.appInfo.labelId >= 0).assertTrue(); + expect(datainfo.appInfo.systemApp).assertEqual(true); + done(); } }) @@ -761,33 +475,10 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfos interfaces with two haps. */ it('getApplicationInfos_0200', 0, async function (done) { - let installData = await demo.getBundleInstaller() - - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - let datainfo = await demo.getAllApplicationInfo(8, 100) - console.info("==========ActsBmsGetInfosSecondScene is ==========" + JSON.stringify(datainfo)); - checkgetApplicationInfos(datainfo) - installData.uninstall(NAME2, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - } + let datainfo = await demo.getAllApplicationInfo(demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, USERID); + console.info("==========ActsBmsGetInfosSecondScene is ==========" + JSON.stringify(datainfo)); + checkgetApplicationInfos(datainfo); + done(); }) /** @@ -796,32 +487,10 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfos interfaces with two haps and different param. */ it('getApplicationInfos_0400', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - let datainfo = await demo.getAllApplicationInfo(0, 100) - expect(datainfo.length).assertLarger(0) - checkgetApplicationInfos(datainfo) - installData.uninstall(NAME2, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - } + let datainfo = await demo.getAllApplicationInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT, USERID); + expect(datainfo.length).assertLarger(0); + checkgetApplicationInfos(datainfo); + done(); }) /** @@ -830,49 +499,55 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfos interfaces with two haps. */ it('getApplicationInfos_0700', 0, async function (done) { - let installData = await demo.getBundleInstaller() - - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - await demo.getAllApplicationInfo(8, 100, (error, datainfo) => { + await demo.getAllApplicationInfo(demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, + USERID, (error, datainfo) => { for (let i = 0; i < datainfo.length; i++) { - expect(datainfo[i].name.length).assertLarger(0) + expect(datainfo[i].name.length).assertLarger(0); if (datainfo[i].name == NAME1 || datainfo[i].name == NAME2 || datainfo[i].name == NAME3 || datainfo[i].name == NAME4 || datainfo[i].name == NAME5) { - expect(datainfo[i].description.length).assertLarger(0) - expect(datainfo[i].icon.length).assertLarger(0) - expect(datainfo[i].label.length).assertLarger(0) + expect(datainfo[i].description.length).assertLarger(0); + expect(datainfo[i].icon.length).assertLarger(0); + expect(datainfo[i].label.length).assertLarger(0); } - expect(datainfo[i].moduleSourceDirs.length).assertLarger(0) - expect(datainfo[i].moduleInfos.length).assertLarger(0) - expect(datainfo[i].supportedModes).assertEqual(0) - expect(datainfo[i].flags).assertEqual(0) + expect(datainfo[i].moduleSourceDirs.length).assertLarger(0); + expect(datainfo[i].moduleInfos.length).assertLarger(0); + expect(datainfo[i].supportedModes).assertEqual(0); + expect(datainfo[i].flags).assertEqual(0); for (let j = 0; j < datainfo[i].moduleInfos; j++) { - expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0) - expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0) + expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); + expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0); } } - installData.uninstall(NAME2, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); + done(); }); - } + }) + + /** + * @tc.number getApplicationInfos_0800 + * @tc.name BUNDLE::getApplicationInfos + * @tc.desc Test getApplicationInfos interfaces with three haps. + */ + it('getApplicationInfos_0800', 0, async function (done) { + await demo.getAllApplicationInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT, USERID, (error, datainfo) => { + for (let i = 0; i < datainfo.length; i++) { + expect(datainfo[i].name.length).assertLarger(0); + if (datainfo[i].name == NAME1 || datainfo[i].name == NAME2 + || datainfo[i].name == NAME3 || datainfo[i].name == NAME4 || datainfo[i].name == NAME5) { + expect(datainfo[i].description.length).assertLarger(0); + expect(datainfo[i].icon.length).assertLarger(0); + expect(datainfo[i].label.length).assertLarger(0); + } + expect(datainfo[i].moduleSourceDirs.length).assertLarger(0); + expect(datainfo[i].moduleInfos.length).assertLarger(0); + expect(datainfo[i].supportedModes).assertEqual(0); + expect(datainfo[i].flags).assertEqual(0); + for (let j = 0; j < datainfo[i].moduleInfos; j++) { + expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); + expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0); + } + } + done(); + }); }) /** @@ -881,48 +556,26 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfos interfaces with two haps and different param. */ it('getApplicationInfos_0900', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - await demo.getAllApplicationInfo(0, 100, (error, datainfo) => { - for (let i = 0; i < datainfo.length; i++) { - expect(datainfo[i].name.length).assertLarger(0) - if (datainfo[i].name == NAME1 || datainfo[i].name == NAME2 - || datainfo[i].name == NAME3 || datainfo[i].name == NAME4 || datainfo[i].name == NAME5) { - expect(datainfo[i].description.length).assertLarger(0) - expect(datainfo[i].icon.length).assertLarger(0) - expect(datainfo[i].label.length).assertLarger(0) - } - expect(datainfo[i].moduleSourceDirs.length).assertLarger(0) - expect(datainfo[i].moduleInfos.length).assertLarger(0) - expect(datainfo[i].supportedModes).assertEqual(0) - expect(datainfo[i].flags).assertEqual(0) - for (let j = 0; j < datainfo[i].moduleInfos; j++) { - expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0) - expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0) - } + await demo.getAllApplicationInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT, USERID, (error, datainfo) => { + for (let i = 0; i < datainfo.length; i++) { + expect(datainfo[i].name.length).assertLarger(0); + if (datainfo[i].name == NAME1 || datainfo[i].name == NAME2 + || datainfo[i].name == NAME3 || datainfo[i].name == NAME4 || datainfo[i].name == NAME5) { + expect(datainfo[i].description.length).assertLarger(0); + expect(datainfo[i].icon.length).assertLarger(0); + expect(datainfo[i].label.length).assertLarger(0); } - installData.uninstall(NAME2, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }); - } + expect(datainfo[i].moduleSourceDirs.length).assertLarger(0); + expect(datainfo[i].moduleInfos.length).assertLarger(0); + expect(datainfo[i].supportedModes).assertEqual(0); + expect(datainfo[i].flags).assertEqual(0); + for (let j = 0; j < datainfo[i].moduleInfos; j++) { + expect(datainfo[i].moduleInfos[j].moduleName.length).assertLarger(0); + expect(datainfo[i].moduleInfos[j].moduleSourceDir.length).assertLarger(0); + } + } + done(); + }); }) /** @@ -931,55 +584,21 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfos interfaces with two haps. */ it('getBundleInfos_0200', 0, async function (done) { - let installData = await demo.getBundleInstaller() - - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - - async function getInfo() { - let data = await demo.getAllBundleInfo(0) - expect(typeof data).assertEqual(OBJECT) - - for (let i = 0; i < data.length; i++) { - console.info('====> getBundleInfos_02200 =====>' + JSON.stringify(data[i].name.length)) - console.info('====> getBundleInfos_03300 =====>' + JSON.stringify(data[i].entryModuleName.length)) - console.info('====> getBundleInfos_04400 =====>' + JSON.stringify(data[i].appInfo.name.length)) - console.info('====> getBundleInfos_05500 =====>' + JSON.stringify(data[i].appInfo.description.length)) - console.info('====> getBundleInfos_06600 =====>' + JSON.stringify(data[i].appInfo.icon.length)) - console.info('====> getBundleInfos_07700 =====>' + JSON.stringify(data[i].appInfo.label.length)) - console.info('====> getBundleInfos_08800 =====>' + JSON.stringify(data[i].appInfo.supportedModes)) - console.info('====> getBundleInfos_09900 =====>' + JSON.stringify(data[i].appInfo.moduleInfos.length)) - expect(data[i].name.length).assertLarger(0) - expect(data[i].appInfo.name.length).assertLarger(0) - if (data[i].name == NAME1 || data[i].name == NAME2 - || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { - expect(data[i].appInfo.description.length).assertLarger(0) - expect(data[i].appInfo.icon.length).assertLarger(0) - expect(data[i].appInfo.label.length).assertLarger(0) - } - expect(data[i].appInfo.supportedModes).assertEqual(0) - expect(data[i].appInfo.moduleInfos.length).assertLarger(0) - + let data = await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT); + expect(typeof data).assertEqual(OBJECT); + for (let i = 0; i < data.length; i++) { + expect(data[i].name.length).assertLarger(0); + expect(data[i].appInfo.name.length).assertLarger(0); + if (data[i].name == NAME1 || data[i].name == NAME2 + || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { + expect(data[i].appInfo.description.length).assertLarger(0); + expect(data[i].appInfo.icon.length).assertLarger(0); + expect(data[i].appInfo.label.length).assertLarger(0); } - installData.uninstall(NAME2, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); + expect(data[i].appInfo.supportedModes).assertEqual(0); + expect(data[i].appInfo.moduleInfos.length).assertLarger(0); } + done(); }) /** @@ -988,45 +607,21 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfos interfaces with two haps and different param. */ it('getBundleInfos_0400', 0, async function (done) { - let installData = await demo.getBundleInstaller() - - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - let data = await demo.getAllBundleInfo(1) - expect(typeof data).assertEqual(OBJECT) - - for (let i = 0; i < data.length; i++) { - expect(data[i].name.length).assertLarger(0) - expect(data[i].appInfo.name.length).assertLarger(0) - if (data[i].name == NAME1 || data[i].name == NAME2 - || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { - expect(data[i].appInfo.description.length).assertLarger(0) - expect(data[i].appInfo.icon.length).assertLarger(0) - expect(data[i].appInfo.label.length).assertLarger(0) - } - expect(data[i].appInfo.supportedModes).assertEqual(0) - expect(data[i].appInfo.moduleInfos.length).assertLarger(0) + let data = await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); + expect(typeof data).assertEqual(OBJECT); + for (let i = 0; i < data.length; i++) { + expect(data[i].name.length).assertLarger(0); + expect(data[i].appInfo.name.length).assertLarger(0); + if (data[i].name == NAME1 || data[i].name == NAME2 + || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { + expect(data[i].appInfo.description.length).assertLarger(0); + expect(data[i].appInfo.icon.length).assertLarger(0); + expect(data[i].appInfo.label.length).assertLarger(0); } - installData.uninstall(NAME2, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); + expect(data[i].appInfo.supportedModes).assertEqual(0); + expect(data[i].appInfo.moduleInfos.length).assertLarger(0); } + done(); }) /** @@ -1035,48 +630,34 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfo interfaces with two haps. */ it('getApplicationInfo_0200', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - let datainfo = await demo.getApplicationInfo(NAME2, - demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, 100) - console.info("getApplicationInfo result" + JSON.stringify(datainfo)) - expect(typeof datainfo).assertEqual(OBJECT) - expect(datainfo.name.length).assertLarger(0) - expect(datainfo.description.length).assertLarger(0) - expect(datainfo.icon.length).assertLarger(0) - expect(datainfo.label.length).assertLarger(0) - expect(datainfo.moduleSourceDirs.length).assertLarger(0) - expect(datainfo.moduleInfos.length).assertLarger(0) - expect(datainfo.name).assertEqual(NAME2) - expect(datainfo.description).assertEqual(DESCRIPTION) - expect(datainfo.icon).assertEqual("$media:icon") - expect(datainfo.label).assertEqual("$string:app_name") - expect(datainfo.systemApp).assertEqual(true) - expect(datainfo.descriptionId >= 0).assertTrue() - expect(datainfo.iconId >= 0).assertTrue() - expect(datainfo.labelId >= 0).assertTrue() - expect(datainfo.supportedModes).assertEqual(0) - expect(datainfo.process).assertEqual("") - expect(datainfo.enabled).assertEqual(true) - expect(datainfo.flags).assertEqual(0) - expect(datainfo.moduleSourceDirs.length).assertLarger(0) - for (let j = 0; j < datainfo.moduleInfos; j++) { - expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry") - expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertLarger(0) - } - installData.uninstall(NAME2, installParam, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); + let datainfo = await demo.getApplicationInfo(NAME2, + demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, USERID); + console.info("getApplicationInfo result" + JSON.stringify(datainfo)); + expect(typeof datainfo).assertEqual(OBJECT); + expect(datainfo.name.length).assertLarger(0); + expect(datainfo.description.length).assertLarger(0); + expect(datainfo.icon.length).assertLarger(0); + expect(datainfo.label.length).assertLarger(0); + expect(datainfo.moduleSourceDirs.length).assertLarger(0); + expect(datainfo.moduleInfos.length).assertLarger(0); + expect(datainfo.name).assertEqual(NAME2); + expect(datainfo.description).assertEqual(DESCRIPTION); + expect(datainfo.icon).assertEqual("$media:icon"); + expect(datainfo.label).assertEqual("$string:app_name"); + expect(datainfo.systemApp).assertEqual(true); + expect(datainfo.descriptionId >= 0).assertTrue(); + expect(datainfo.iconId >= 0).assertTrue(); + expect(datainfo.labelId >= 0).assertTrue(); + expect(datainfo.supportedModes).assertEqual(0); + expect(datainfo.process).assertEqual(""); + expect(datainfo.enabled).assertEqual(true); + expect(datainfo.flags).assertEqual(0); + expect(datainfo.moduleSourceDirs.length).assertLarger(0); + for (let j = 0; j < datainfo.moduleInfos; j++) { + expect(datainfo.moduleInfos[j].moduleName).assertEqual("entry"); + expect(datainfo.moduleInfos[j].moduleSourceDir.length).assertLarger(0); } + done(); }) /** @@ -1085,46 +666,22 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfos interfaces with two haps. */ it('getBundleInfos_0700', 0, async function (done) { - let installData = await demo.getBundleInstaller() - - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - await demo.getAllBundleInfo(0, (error, data) => { - expect(typeof data).assertEqual(OBJECT) - - for (let i = 0; i < data.length; i++) { - expect(data[i].name.length).assertLarger(0) - expect(data[i].appInfo.name.length).assertLarger(0) - if (data[i].name == NAME1 || data[i].name == NAME2 - || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { - expect(data[i].appInfo.description.length).assertLarger(0) - expect(data[i].appInfo.icon.length).assertLarger(0) - expect(data[i].appInfo.label.length).assertLarger(0) - } - expect(data[i].appInfo.supportedModes).assertEqual(0) - expect(data[i].appInfo.moduleInfos.length).assertLarger(0) + await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT, (error, data) => { + expect(typeof data).assertEqual(OBJECT); + for (let i = 0; i < data.length; i++) { + expect(data[i].name.length).assertLarger(0); + expect(data[i].appInfo.name.length).assertLarger(0); + if (data[i].name == NAME1 || data[i].name == NAME2 + || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { + expect(data[i].appInfo.description.length).assertLarger(0); + expect(data[i].appInfo.icon.length).assertLarger(0); + expect(data[i].appInfo.label.length).assertLarger(0); } - installData.uninstall(NAME2, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }) - } + expect(data[i].appInfo.supportedModes).assertEqual(0); + expect(data[i].appInfo.moduleInfos.length).assertLarger(0); + } + done(); + }) }) /** @@ -1133,46 +690,22 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfos interfaces with two haps and different param. */ it('getBundleInfos_0900', 0, async function (done) { - let installData = await demo.getBundleInstaller() - - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - await demo.getAllBundleInfo(1, (error, data) => { - expect(typeof data).assertEqual(OBJECT) - - for (let i = 0; i < data.length; i++) { - expect(data[i].name.length).assertLarger(0) - expect(data[i].appInfo.name.length).assertLarger(0) - if (data[i].name == NAME1 || data[i].name == NAME2 - || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { - expect(data[i].appInfo.description.length).assertLarger(0) - expect(data[i].appInfo.icon.length).assertLarger(0) - expect(data[i].appInfo.label.length).assertLarger(0) - } - expect(data[i].appInfo.supportedModes).assertEqual(0) - expect(data[i].appInfo.moduleInfos.length).assertLarger(0) + await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, (error, data) => { + expect(typeof data).assertEqual(OBJECT); + for (let i = 0; i < data.length; i++) { + expect(data[i].name.length).assertLarger(0); + expect(data[i].appInfo.name.length).assertLarger(0); + if (data[i].name == NAME1 || data[i].name == NAME2 + || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { + expect(data[i].appInfo.description.length).assertLarger(0); + expect(data[i].appInfo.icon.length).assertLarger(0); + expect(data[i].appInfo.label.length).assertLarger(0); } - installData.uninstall(NAME2, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }) - } + expect(data[i].appInfo.supportedModes).assertEqual(0); + expect(data[i].appInfo.moduleInfos.length).assertLarger(0); + } + done(); + }) }) @@ -1182,62 +715,29 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfo interfaces with two haps. */ it('getApplicationInfo_0700', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - await demo.getApplicationInfo(NAME2, - demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, 100, (error, datainfo) => { + await demo.getApplicationInfo(NAME2, + demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, USERID, (error, datainfo) => { if (error) { - console.info("getApplicationInfo error" + JSON.stringify(error)) - expect(error).assertFail() + console.info("getApplicationInfo error" + JSON.stringify(error)); + expect(error).assertFail(); } - console.info("getApplicationInfo success" + JSON.stringify(datainfo)) - expect(typeof datainfo).assertEqual(OBJECT) - expect(datainfo.name).assertEqual(NAME2) - expect(datainfo.label).assertEqual("$string:app_name") - expect(datainfo.description).assertEqual(DESCRIPTION) - expect(datainfo.icon).assertEqual("$media:icon") - expect(datainfo.name).assertEqual(NAME2) - expect(datainfo.description).assertEqual(DESCRIPTION) - expect(datainfo.descriptionId >= 0).assertTrue() - expect(datainfo.icon).assertEqual("$media:icon") - expect(datainfo.iconId >= 0).assertTrue() - expect(datainfo.label).assertEqual("$string:app_name") - expect(datainfo.labelId >= 0).assertTrue() - expect(datainfo.systemApp).assertEqual(true) - expect(datainfo.supportedModes).assertEqual(0) - installData.uninstall(NAME2, installParam, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); + console.info("getApplicationInfo success" + JSON.stringify(datainfo)); + expect(typeof datainfo).assertEqual(OBJECT); + expect(datainfo.name).assertEqual(NAME2); + expect(datainfo.label).assertEqual("$string:app_name"); + expect(datainfo.description).assertEqual(DESCRIPTION); + expect(datainfo.icon).assertEqual("$media:icon"); + expect(datainfo.name).assertEqual(NAME2); + expect(datainfo.description).assertEqual(DESCRIPTION); + expect(datainfo.descriptionId >= 0).assertTrue(); + expect(datainfo.icon).assertEqual("$media:icon"); + expect(datainfo.iconId >= 0).assertTrue(); + expect(datainfo.label).assertEqual("$string:app_name"); + expect(datainfo.labelId >= 0).assertTrue(); + expect(datainfo.systemApp).assertEqual(true); + expect(datainfo.supportedModes).assertEqual(0); + done(); }) - } - }) - - /** - * @tc.number getApplicationInfos_0800 - * @tc.name BUNDLE::getApplicationInfos - * @tc.desc Test getApplicationInfos interfaces with three haps. - */ - it('getApplicationInfos_0800', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST4, PATH + BMSJSTEST5, PATH + BMSJSTEST6], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(-1); - expect(data.status).assertEqual(3); - expect(data.statusMessage).assertEqual('STATUS_INSTALL_FAILURE_INVALID'); - done(); - }); }) /** @@ -1246,52 +746,20 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfos interfaces with three haps. */ it('getBundleInfos_0300', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST4, PATH + BMSJSTEST5, PATH + BMSJSTEST6], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(-1); - expect(data.status).assertEqual(3); - expect(data.statusMessage).assertEqual('STATUS_INSTALL_FAILURE_INVALID'); - getInfo(); - }); - async function getInfo() { - let data = await demo.getAllBundleInfo(0) - - for (let i = 0; i < data.length; i++) { - expect(data[i].name.length).assertLarger(0) - expect(data[i].appInfo.name.length).assertLarger(0) - if (data[i].name == NAME1 || data[i].name == NAME2 - || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { - expect(data[i].appInfo.description.length).assertLarger(0) - expect(data[i].appInfo.icon.length).assertLarger(0) - expect(data[i].appInfo.label.length).assertLarger(0) - } - expect(data[i].appInfo.supportedModes).assertEqual(0) - expect(data[i].appInfo.moduleInfos.length).assertLarger(0) + let data = await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT); + for (let i = 0; i < data.length; i++) { + expect(data[i].name.length).assertLarger(0); + expect(data[i].appInfo.name.length).assertLarger(0); + if (data[i].name == NAME1 || data[i].name == NAME2 + || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { + expect(data[i].appInfo.description.length).assertLarger(0); + expect(data[i].appInfo.icon.length).assertLarger(0); + expect(data[i].appInfo.label.length).assertLarger(0); } - installData.uninstall(NAME3, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - installData.uninstall(NAME4, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - installData.uninstall(NAME5, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - done(); - }); - }); - }); + expect(data[i].appInfo.supportedModes).assertEqual(0); + expect(data[i].appInfo.moduleInfos.length).assertLarger(0); } + done(); }) /** @@ -1300,53 +768,20 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfos interfaces with three haps and different param. */ it('getBundleInfos_0500', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST4, PATH + BMSJSTEST5, PATH + BMSJSTEST6], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(-1); - expect(data.status).assertEqual(3); - expect(data.statusMessage).assertEqual('STATUS_INSTALL_FAILURE_INVALID'); - getInfo(); - }); - async function getInfo() { - let data = await demo.getAllBundleInfo(1) - - for (let i = 0; i < data.length; i++) { - expect(data[i].name.length).assertLarger(0) - expect(data[i].appInfo.name.length).assertLarger(0) - if (data[i].name == NAME1 || data[i].name == NAME2 - || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { - expect(data[i].appInfo.description.length).assertLarger(0) - expect(data[i].appInfo.icon.length).assertLarger(0) - expect(data[i].appInfo.label.length).assertLarger(0) - } - expect(data[i].appInfo.supportedModes).assertEqual(0) - expect(data[i].appInfo.moduleInfos.length).assertLarger(0) - + let data = await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); + for (let i = 0; i < data.length; i++) { + expect(data[i].name.length).assertLarger(0); + expect(data[i].appInfo.name.length).assertLarger(0); + if (data[i].name == NAME1 || data[i].name == NAME2 + || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { + expect(data[i].appInfo.description.length).assertLarger(0); + expect(data[i].appInfo.icon.length).assertLarger(0); + expect(data[i].appInfo.label.length).assertLarger(0); } - installData.uninstall(NAME3, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - installData.uninstall(NAME4, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - installData.uninstall(NAME5, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - done(); - }); - }); - }); + expect(data[i].appInfo.supportedModes).assertEqual(0); + expect(data[i].appInfo.moduleInfos.length).assertLarger(0); } + done(); }) /** @@ -1355,53 +790,22 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfos interfaces with three haps. */ it('getBundleInfos_0800', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST4, PATH + BMSJSTEST5, PATH + BMSJSTEST6], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(-1); - expect(data.status).assertEqual(3); - expect(data.statusMessage).assertEqual('STATUS_INSTALL_FAILURE_INVALID'); - getInfo(); - }); - async function getInfo() { - await demo.getAllBundleInfo(0, (error, data) => { - - for (let i = 0; i < data.length; i++) { - expect(data[i].name.length).assertLarger(0) - expect(data[i].appInfo.name.length).assertLarger(0) - if (data[i].name == NAME1 || data[i].name == NAME2 - || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { - expect(data[i].appInfo.description.length).assertLarger(0) - expect(data[i].appInfo.icon.length).assertLarger(0) - expect(data[i].appInfo.label.length).assertLarger(0) - } - expect(data[i].appInfo.supportedModes).assertEqual(0) - expect(data[i].appInfo.moduleInfos.length).assertLarger(0) + await demo.getAllBundleInfo(demo.BundleFlag.GET_BUNDLE_DEFAULT, (error, data) => { + for (let i = 0; i < data.length; i++) { + expect(data[i].name.length).assertLarger(0); + expect(data[i].appInfo.name.length).assertLarger(0); + if (data[i].name == NAME1 || data[i].name == NAME2 + || data[i].name == NAME3 || data[i].name == NAME4 || data[i].name == NAME5) { + expect(data[i].appInfo.description.length).assertLarger(0); + expect(data[i].appInfo.icon.length).assertLarger(0); + expect(data[i].appInfo.label.length).assertLarger(0); } - installData.uninstall(NAME3, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - installData.uninstall(NAME4, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - installData.uninstall(NAME5, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - done(); - }); - }); - }); - }) - } + expect(data[i].appInfo.supportedModes).assertEqual(0); + expect(data[i].appInfo.moduleInfos.length).assertLarger(0); + } + done(); + }) + }) /** @@ -1410,54 +814,23 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfo interfaces with three haps. */ it('getApplicationInfo_0300', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST4, PATH + BMSJSTEST5, PATH + BMSJSTEST6], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(-1); - expect(data.status).assertEqual(3); - expect(data.statusMessage).assertEqual('STATUS_INSTALL_FAILURE_INVALID'); - getInfo(); - }); - async function getInfo() { - demo.getApplicationInfo(NAME3, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, - demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES).then(datainfo => { - expect(datainfo.name).assertEqual(NAME3) - expect(datainfo.label).assertEqual("$string:app_name") - expect(datainfo.description).assertEqual(DESCRIPTION) - expect(datainfo.icon).assertEqual("$media:icon") - expect(datainfo.name).assertEqual(NAME3) - expect(datainfo.description).assertEqual(DESCRIPTION) - expect(datainfo.descriptionId >= 0).assertTrue() - expect(datainfo.icon).assertEqual("$media:icon") - expect(datainfo.iconId >= 0).assertTrue() - expect(datainfo.label).assertEqual("$string:app_name") - expect(datainfo.labelId >= 0).assertTrue() - expect(datainfo.systemApp).assertEqual(true) - expect(datainfo.supportedModes).assertEqual(0) - }); - installData.uninstall(NAME3, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - installData.uninstall(NAME4, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - installData.uninstall(NAME5, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - done(); - }); - }); + demo.getApplicationInfo(NAME3, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, + demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES).then(datainfo => { + expect(datainfo.name).assertEqual(NAME3); + expect(datainfo.label).assertEqual("$string:app_name"); + expect(datainfo.description).assertEqual(DESCRIPTION); + expect(datainfo.icon).assertEqual("$media:icon"); + expect(datainfo.name).assertEqual(NAME3); + expect(datainfo.description).assertEqual(DESCRIPTION); + expect(datainfo.descriptionId >= 0).assertTrue(); + expect(datainfo.icon).assertEqual("$media:icon"); + expect(datainfo.iconId >= 0).assertTrue(); + expect(datainfo.label).assertEqual("$string:app_name"); + expect(datainfo.labelId >= 0).assertTrue(); + expect(datainfo.systemApp).assertEqual(true); + expect(datainfo.supportedModes).assertEqual(0); }); - } + done(); }) /** @@ -1467,11 +840,11 @@ describe('ActsBundleManagerTest', function () { */ it('getBundleInfo_0400', 0, async function (done) { await demo.getBundleInfo('error', demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES).then(datainfo => { - console.info("getBundleInfo success:" + JSON.stringify(datainfo)) + console.info("getBundleInfo success:" + JSON.stringify(datainfo)); expect(datainfo).assertFail(); done(); }).catch(err => { - console.info("getBundleInfo err:" + JSON.stringify(err)) + console.info("getBundleInfo err:" + JSON.stringify(err)); expect(err).assertEqual(1); done(); }); @@ -1483,7 +856,7 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfo interfaces with error hap. */ it('getBundleInfo_0900', 0, async function (done) { - await demo.getBundleInfo('error', demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, OnReceiveEvent) + await demo.getBundleInfo('error', demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, OnReceiveEvent); function OnReceiveEvent(err, datainfo) { if (err) { console.info("getBundleInfo err" + JSON.stringify(err)); @@ -1503,18 +876,19 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfo interfaces with error hap. */ it('getApplicationInfo_0400', 0, async function (done) { - demo.getApplicationInfo(ERROR, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, 100).then(datainfo => { - checkgetApplicationInfoe(datainfo) - }).catch(err => { - console.info("getApplicationInfo err" + JSON.stringify(err)) - expect(err).assertEqual(1) - done() - }); + demo.getApplicationInfo(ERROR, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, + USERID).then(datainfo => { + checkgetApplicationInfoe(datainfo); + }).catch(err => { + console.info("getApplicationInfo err" + JSON.stringify(err)); + expect(err).assertEqual(1); + done(); + }); }) function checkgetApplicationInfoe(datainfo) { - console.info("getApplicationInfo success" + JSON.stringify(datainfo)) - expect(datainfo).assertFail() - done() + console.info("getApplicationInfo success" + JSON.stringify(datainfo)); + expect(datainfo).assertFail(); + done(); } /** @@ -1523,17 +897,18 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfo interfaces with error hap. */ it('getApplicationInfo_0900', 0, async function (done) { - demo.getApplicationInfo(ERROR, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, 100, (error, datainfo) => { - if (error) { - console.info("getApplicationInfo fail" + JSON.stringify(error)); - expect(error).assertEqual(1); - done() - return; - } - console.info("getApplicationInfo success" + JSON.stringify(datainfo)) - expect(datainfo).assertFail() - done() - }) + demo.getApplicationInfo(ERROR, demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, + USERID, (error, datainfo) => { + if (error) { + console.info("getApplicationInfo fail" + JSON.stringify(error)); + expect(error).assertEqual(1); + done(); + return; + } + console.info("getApplicationInfo success" + JSON.stringify(datainfo)); + expect(datainfo).assertFail(); + done(); + }) }) /** @@ -1542,8 +917,7 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfo interfaces with none hap. */ it('getBundleInfo_1000', 0, async function (done) { - await demo.getBundleInfo(' ', demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, OnReceiveEvent) - + await demo.getBundleInfo(' ', demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, OnReceiveEvent); function OnReceiveEvent(err, datainfo) { if (err) { console.info("getBundleInfo err" + JSON.stringify(err)); @@ -1563,17 +937,18 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfo interfaces with none hap. */ it('getApplicationInfo_0500', 0, async function (done) { - demo.getApplicationInfo('', demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, 100, (error, datainfo) => { - if (error) { - console.info("getApplicationInfo err" + JSON.stringify(error)); - expect(error).assertEqual(1); + demo.getApplicationInfo('', demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, + USERID, (error, datainfo) => { + if (error) { + console.info("getApplicationInfo err" + JSON.stringify(error)); + expect(error).assertEqual(1); + done(); + return; + } + console.info("getApplicationInfo success" + JSON.stringify(datainfo)); + expect(datainfo).assertFail(); done(); - return; - } - console.info("getApplicationInfo success" + JSON.stringify(datainfo)); - expect(datainfo).assertFail() - done(); - }) + }) }) /** @@ -1584,11 +959,11 @@ describe('ActsBundleManagerTest', function () { it('getBundleInfo_0500', 0, async function (done) { demo.getBundleInfo(' ', demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES).then(datainfo => { console.info("getBundleInfo success" + JSON.stringify(datainfo)); - expect(datainfo).assertFail(0) + expect(datainfo).assertFail(); done(); }).catch(err => { console.info("getBundleInfo fail" + JSON.stringify(err)); - expect(err).assertEqual(1) + expect(err).assertEqual(1); done(); }); }) @@ -1599,17 +974,18 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getApplicationInfo interfaces with none hap. */ it('getApplicationInfo_1000', 0, async function (done) { - demo.getApplicationInfo('', demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, 100, (error, datainfo) => { - if (error) { - console.info("getApplicationInfo fail" + JSON.stringify(error)); - expect(error).assertEqual(1); + demo.getApplicationInfo('', demo.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, + USERID, (error, datainfo) => { + if (error) { + console.info("getApplicationInfo fail" + JSON.stringify(error)); + expect(error).assertEqual(1); + done(); + return; + } + console.info("getApplicationInfo success" + JSON.stringify(datainfo)); + expect(datainfo).assertFail(); done(); - return; - } - console.info("getApplicationInfo success" + JSON.stringify(datainfo)); - expect(datainfo).assertFail() - done() - }) + }); }) /** @@ -1618,67 +994,49 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test queryAbilityByWant interfaces with none hap. */ it('queryAbilityByWant_0100', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(demo.InstallErrorCode.SUCCESS); - expect(data.statusMessage).assertEqual('SUCCESS'); - await demo.queryAbilityByWant( - { - "bundleName": "com.example.myapplication1", - "abilityName": "com.example.myapplication1.MainAbility", - }, demo.BundleFlag.GET_ABILITY_INFO_WITH_APPLICATION | - demo.BundleFlag.GET_ABILITY_INFO_WITH_PERMISSION | - demo.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, - 100).then(data => { - expect(data.length).assertLarger(0); - for (let i = 0, len = data.length; i < len; i++) { - let datainfo = data[i]; - expect(datainfo.name).assertEqual("com.example.myapplication1.MainAbility") - expect(datainfo.label).assertEqual("$string:app_name") - expect(datainfo.description).assertEqual(DESCRIPTION) - expect(datainfo.icon).assertEqual("$media:icon") - expect(datainfo.moduleName).assertEqual("entry") - expect(datainfo.bundleName).assertEqual(NAME1) - expect(datainfo.type).assertEqual(demo.AbilityType.PAGE) - expect(datainfo.subType).assertEqual(demo.AbilitySubType.UNSPECIFIED) - expect(datainfo.orientation).assertEqual(demo.DisplayOrientation.UNSPECIFIED) - expect(datainfo.launchMode).assertEqual(demo.LaunchMode.STANDARD) - expect(datainfo.permissions[0]).assertEqual("com.permission.BMS_PERMISSION_CAMERA") - expect(datainfo.applicationInfo.name).assertEqual(NAME1) - expect(datainfo.applicationInfo.description).assertEqual(DESCRIPTION) - expect(datainfo.applicationInfo.descriptionId >= 0).assertTrue() - expect(datainfo.applicationInfo.icon).assertEqual("$media:icon") - expect(datainfo.applicationInfo.iconId >= 0).assertTrue() - expect(datainfo.applicationInfo.label).assertEqual("$string:app_name") - expect(datainfo.applicationInfo.labelId >= 0).assertTrue() - expect(datainfo.applicationInfo.systemApp).assertEqual(true) - expect(datainfo.applicationInfo.supportedModes).assertEqual(0) - expect(datainfo.applicationInfo.enabled).assertEqual(true) - expect(datainfo.metaData.length).assertLarger(0) - for (let j = 0; j < datainfo.applicationInfo.moduleInfos; j++) { - expect(datainfo.applicationInfo.moduleInfos[j].moduleName).assertEqual("entry") - expect(datainfo.applicationInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1) - } + await demo.queryAbilityByWant( + { + "bundleName": "com.example.myapplication1", + "abilityName": "com.example.myapplication1.MainAbility", + }, demo.BundleFlag.GET_ABILITY_INFO_WITH_APPLICATION | + demo.BundleFlag.GET_ABILITY_INFO_WITH_PERMISSION | + demo.BundleFlag.GET_ABILITY_INFO_WITH_METADATA, + USERID).then(data => { + expect(data.length).assertLarger(0); + for (let i = 0, len = data.length; i < len; i++) { + let datainfo = data[i]; + expect(datainfo.name).assertEqual("com.example.myapplication1.MainAbility"); + expect(datainfo.label).assertEqual("$string:app_name"); + expect(datainfo.description).assertEqual(DESCRIPTION); + expect(datainfo.icon).assertEqual("$media:icon"); + expect(datainfo.moduleName).assertEqual("entry"); + expect(datainfo.bundleName).assertEqual(NAME1); + expect(datainfo.type).assertEqual(demo.AbilityType.PAGE); + expect(datainfo.subType).assertEqual(demo.AbilitySubType.UNSPECIFIED); + expect(datainfo.orientation).assertEqual(demo.DisplayOrientation.UNSPECIFIED); + expect(datainfo.launchMode).assertEqual(demo.LaunchMode.STANDARD); + expect(datainfo.permissions[0]).assertEqual("com.permission.BMS_PERMISSION_CAMERA"); + expect(datainfo.applicationInfo.name).assertEqual(NAME1); + expect(datainfo.applicationInfo.description).assertEqual(DESCRIPTION); + expect(datainfo.applicationInfo.descriptionId >= 0).assertTrue(); + expect(datainfo.applicationInfo.icon).assertEqual("$media:icon"); + expect(datainfo.applicationInfo.iconId >= 0).assertTrue(); + expect(datainfo.applicationInfo.label).assertEqual("$string:app_name"); + expect(datainfo.applicationInfo.labelId >= 0).assertTrue(); + expect(datainfo.applicationInfo.systemApp).assertEqual(true); + expect(datainfo.applicationInfo.supportedModes).assertEqual(0); + expect(datainfo.applicationInfo.enabled).assertEqual(true); + expect(datainfo.metaData.length).assertLarger(0); + for (let j = 0; j < datainfo.applicationInfo.moduleInfos; j++) { + expect(datainfo.applicationInfo.moduleInfos[j].moduleName).assertEqual("entry"); + expect(datainfo.applicationInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); } - }).catch(err => { - expect(err).assertFail(); - }) - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); + } done(); - }); - }); + }).catch(err => { + expect(err).assertFail(); + done(); + }) }) /** @@ -1687,61 +1045,38 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test queryAbilityByWant interfaces with two haps. */ it('queryAbilityByWant_0200', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(demo.InstallErrorCode.SUCCESS); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - let data = - await demo.queryAbilityByWant( - { - "bundleName": "com.example.myapplication2", - "abilityName": "com.example.myapplication1.MainAbility", - }, demo.BundleFlag.GET_ALL_APPLICATION_INFO, 100) - expect(data.length).assertLarger(0); - for (let i = 0, len = data.length; i < len; i++) { - let datainfo = data[i]; - expect(datainfo.name.length).assertLarger(0) - expect(datainfo.label).assertEqual("$string:app_name") - expect(datainfo.description).assertEqual(DESCRIPTION) - expect(datainfo.icon).assertEqual("$media:icon") - expect(datainfo.moduleName).assertEqual("entry") - expect(datainfo.bundleName).assertEqual(NAME2) - expect(datainfo.orientation).assertEqual(1) - expect(datainfo.launchMode).assertEqual(demo.LaunchMode.SINGLETON) - expect(datainfo.applicationInfo.name).assertEqual(NAME2) - expect(datainfo.applicationInfo.description).assertEqual(DESCRIPTION) - expect(datainfo.applicationInfo.descriptionId >= 0).assertTrue() - expect(datainfo.applicationInfo.icon).assertEqual("$media:icon") - expect(datainfo.applicationInfo.iconId >= 0).assertTrue() - expect(datainfo.applicationInfo.label).assertEqual("$string:app_name") - expect(datainfo.applicationInfo.labelId >= 0).assertTrue() - expect(datainfo.applicationInfo.systemApp).assertEqual(true) - expect(datainfo.applicationInfo.supportedModes).assertEqual(0) - expect(datainfo.applicationInfo.enabled).assertEqual(true) - for (let j = 0; j < datainfo.applicationInfo.moduleInfos; j++) { - expect(datainfo.applicationInfo.moduleInfos[j].moduleName).assertEqual("entry") - expect(datainfo.applicationInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR2) - } + let data = await demo.queryAbilityByWant( + { + "bundleName": "com.example.myapplication2", + "abilityName": "com.example.myapplication1.MainAbility", + }, demo.BundleFlag.GET_ALL_APPLICATION_INFO, USERID); + expect(data.length).assertLarger(0); + for (let i = 0, len = data.length; i < len; i++) { + let datainfo = data[i]; + expect(datainfo.name.length).assertLarger(0); + expect(datainfo.label).assertEqual("$string:app_name"); + expect(datainfo.description).assertEqual(DESCRIPTION); + expect(datainfo.icon).assertEqual("$media:icon"); + expect(datainfo.moduleName).assertEqual("entry"); + expect(datainfo.bundleName).assertEqual(NAME2); + expect(datainfo.orientation).assertEqual(1); + expect(datainfo.launchMode).assertEqual(demo.LaunchMode.SINGLETON); + expect(datainfo.applicationInfo.name).assertEqual(NAME2); + expect(datainfo.applicationInfo.description).assertEqual(DESCRIPTION); + expect(datainfo.applicationInfo.descriptionId >= 0).assertTrue(); + expect(datainfo.applicationInfo.icon).assertEqual("$media:icon"); + expect(datainfo.applicationInfo.iconId >= 0).assertTrue(); + expect(datainfo.applicationInfo.label).assertEqual("$string:app_name"); + expect(datainfo.applicationInfo.labelId >= 0).assertTrue(); + expect(datainfo.applicationInfo.systemApp).assertEqual(true); + expect(datainfo.applicationInfo.supportedModes).assertEqual(0); + expect(datainfo.applicationInfo.enabled).assertEqual(true); + for (let j = 0; j < datainfo.applicationInfo.moduleInfos; j++) { + expect(datainfo.applicationInfo.moduleInfos[j].moduleName).assertEqual("entry"); + expect(datainfo.applicationInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR2); } - installData.uninstall(NAME2, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); } + done(); }) /** @@ -1750,103 +1085,54 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test queryAbilityByWant interfaces with three haps. */ it('queryAbilityByWant_0300', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST4], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(data.status).assertEqual(0); - installData.install([PATH + BMSJSTEST5], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(data.status).assertEqual(0); - installData.install([PATH + BMSJSTEST6], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(data.status).assertEqual(0); - queryAbilityByWants(); - }); - }); - }); - async function queryAbilityByWants(){ - await demo.queryAbilityByWant( - { - entities: ['entity.system.home','entitiesentities'] - }, 4, 100).then(data => { - let queryResultCount = 0; - for (let i = 0, len = data.length; i < len; i++) { - let datainfo = data[i]; - if (datainfo.bundleName == NAME3){ - expect(datainfo.name).assertEqual("com.example.myapplication.MainAbility") - expect(datainfo.label).assertEqual("$string:app_name") - expect(datainfo.description).assertEqual(DESCRIPTION) - expect(datainfo.icon).assertEqual("$media:icon") - expect(datainfo.moduleName).assertEqual("entry") - expect(datainfo.bundleName).assertEqual(NAME3) - expect(datainfo.applicationInfo.name).assertEqual(NAME3) - expect(datainfo.applicationInfo.description).assertEqual(DESCRIPTION) - expect(datainfo.applicationInfo.descriptionId >= 0).assertTrue() - expect(datainfo.applicationInfo.icon).assertEqual("$media:icon") - expect(datainfo.applicationInfo.iconId >= 0).assertTrue() - expect(datainfo.applicationInfo.label).assertEqual("$string:app_name") - expect(datainfo.applicationInfo.labelId >= 0).assertTrue() - expect(datainfo.applicationInfo.systemApp).assertEqual(true) - expect(datainfo.applicationInfo.supportedModes).assertEqual(0) - expect(datainfo.orientation).assertEqual(2) - expect(datainfo.applicationInfo.enabled).assertEqual(true) - for (let j = 0; j < datainfo.applicationInfo.moduleInfos; j++) { - expect(datainfo.applicationInfo.moduleInfos[j].moduleName).assertEqual("entry") - } - queryResultCount++ - } - if (datainfo.bundleName == NAME4){ - expect(datainfo.name).assertEqual("com.example.myapplication.MainAbility") - expect(datainfo.bundleName).assertEqual(NAME4) - expect(datainfo.orientation).assertEqual(3) - queryResultCount++ - } - if (datainfo.bundleName == NAME5){ - expect(datainfo.name).assertEqual("com.example.myapplication.MainAbility") - expect(datainfo.bundleName).assertEqual(NAME5) - expect(datainfo.orientation).assertEqual(0) - queryResultCount++ - } + await demo.queryAbilityByWant({ + entities: ['entity.system.home', 'entitiesentities'] + }, 4, USERID).then(data => { + let queryResultCount = 0; + for (let i = 0, len = data.length; i < len; i++) { + let datainfo = data[i]; + if (datainfo.bundleName == NAME3) { + expect(datainfo.name).assertEqual("com.example.myapplication.MainAbility"); + expect(datainfo.label).assertEqual("$string:app_name"); + expect(datainfo.description).assertEqual(DESCRIPTION); + expect(datainfo.icon).assertEqual("$media:icon"); + expect(datainfo.moduleName).assertEqual("entry"); + expect(datainfo.bundleName).assertEqual(NAME3); + expect(datainfo.applicationInfo.name).assertEqual(NAME3); + expect(datainfo.applicationInfo.description).assertEqual(DESCRIPTION); + expect(datainfo.applicationInfo.descriptionId >= 0).assertTrue(); + expect(datainfo.applicationInfo.icon).assertEqual("$media:icon"); + expect(datainfo.applicationInfo.iconId >= 0).assertTrue(); + expect(datainfo.applicationInfo.label).assertEqual("$string:app_name"); + expect(datainfo.applicationInfo.labelId >= 0).assertTrue(); + expect(datainfo.applicationInfo.systemApp).assertEqual(true); + expect(datainfo.applicationInfo.supportedModes).assertEqual(0); + expect(datainfo.orientation).assertEqual(2); + expect(datainfo.applicationInfo.enabled).assertEqual(true); + for (let j = 0; j < datainfo.applicationInfo.moduleInfos; j++) { + expect(datainfo.applicationInfo.moduleInfos[j].moduleName).assertEqual("entry"); } - expect(queryResultCount).assertEqual(3) - }).catch(err => { - expect(err).assertFail() - }) - uninstallfunction(); - } - async function uninstallfunction(){ - installData.uninstall(NAME3, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(data.status).assertEqual(0); - installData.uninstall(NAME4, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(data.status).assertEqual(0); - installData.uninstall(NAME5, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(data.status).assertEqual(0); - done(); - }); - }); - }); - } + queryResultCount++; + } + if (datainfo.bundleName == NAME4) { + expect(datainfo.name).assertEqual("com.example.myapplication.MainAbility"); + expect(datainfo.bundleName).assertEqual(NAME4); + expect(datainfo.orientation).assertEqual(3); + queryResultCount++; + } + if (datainfo.bundleName == NAME5) { + expect(datainfo.name).assertEqual("com.example.myapplication.MainAbility"); + expect(datainfo.bundleName).assertEqual(NAME5); + expect(datainfo.orientation).assertEqual(0); + queryResultCount++; + } + } + expect(queryResultCount).assertEqual(3); + done(); + }).catch(err => { + expect(err).assertFail(); + done(); + }) }) /** @@ -1855,36 +1141,18 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test queryAbilityByWant interfaces with one hap. */ it('queryAbilityByWant_0400', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - demo.queryAbilityByWant( - { - "bundleName": "wrong name", - "abilityName": "com.example.myapplication1.MainAbility", - }, 0, 100).then(datainfo => { - expect(datainfo.length).assertEqual(0) - }) - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); + await demo.queryAbilityByWant( + { + "bundleName": "wrong name", + "abilityName": "com.example.myapplication1.MainAbility" + }, demo.BundleFlag.GET_BUNDLE_DEFAULT, USERID).then(datainfo => { + console.info("queryAbilityByWant_0400 dataInfo : ===========" + datainfo); + expect(datainfo).assertFail(); + }).catch(err => { + console.info("queryAbilityByWant_0400 err : ===========" + err); + expect(err).assertEqual(1); done(); - }); - } + }) }) /** @@ -1894,17 +1162,17 @@ describe('ActsBundleManagerTest', function () { */ it('getBundleInfo_1300', 0, async function (done) { demo.getBundleInfo(LAUNCHER, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES).then(datainfo => { - console.info("getBundleInfo success:" + JSON.stringify(datainfo)) - expect(datainfo.name).assertEqual(LAUNCHER) - expect(datainfo.vendor).assertEqual("ohos") - expect(datainfo.versionCode).assertEqual(1000000) - expect(datainfo.versionName.length).assertLarger(0) - expect(datainfo.uid).assertLarger(2099) - expect(datainfo.appInfo.name).assertEqual(LAUNCHER) - expect(datainfo.appInfo.systemApp).assertEqual(true) - expect(datainfo.appInfo.supportedModes).assertEqual(0) - expect(datainfo.appInfo.moduleInfos.length).assertLarger(0) - expect(datainfo.appInfo.enabled).assertEqual(true) + console.info("getBundleInfo success:" + JSON.stringify(datainfo)); + expect(datainfo.name).assertEqual(LAUNCHER); + expect(datainfo.vendor).assertEqual("ohos"); + expect(datainfo.versionCode).assertEqual(1000000); + expect(datainfo.versionName.length).assertLarger(0); + expect(datainfo.uid).assertLarger(2099); + expect(datainfo.appInfo.name).assertEqual(LAUNCHER); + expect(datainfo.appInfo.systemApp).assertEqual(true); + expect(datainfo.appInfo.supportedModes).assertEqual(0); + expect(datainfo.appInfo.moduleInfos.length).assertLarger(0); + expect(datainfo.appInfo.enabled).assertEqual(true); done(); }).catch(err => { console.info("getBundleInfo fail:" + JSON.stringify(err)); @@ -1920,66 +1188,46 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfo interface with current userId(by promise). */ it('getBundleInfo_1400', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - let bundleOptions = { - userId: 100 - }; - let dataInfo = await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, bundleOptions); - expect(dataInfo.name).assertEqual(NAME1) - expect(dataInfo.vendor).assertEqual("example") - expect(dataInfo.versionCode).assertEqual(VERSIONCODE1) - expect(dataInfo.versionName).assertLarger(0) - expect(dataInfo.entryModuleName).assertEqual("entry") - expect(dataInfo.appInfo.name).assertEqual(NAME1) - expect(dataInfo.appInfo.description).assertEqual(DESCRIPTION) - expect(dataInfo.appInfo.descriptionId >= 0).assertTrue() - expect(dataInfo.appInfo.icon).assertEqual("$media:icon") - expect(dataInfo.appInfo.iconId >= 0).assertTrue() - expect(dataInfo.appInfo.label).assertEqual("$string:app_name") - expect(dataInfo.appInfo.labelId >= 0).assertTrue() - expect(dataInfo.appInfo.systemApp).assertEqual(true) - expect(dataInfo.appInfo.supportedModes).assertEqual(0) - expect(dataInfo.updateTime).assertLarger(0) - expect(dataInfo.reqPermissions.length).assertEqual(0) - expect(dataInfo.reqPermissionDetails.length).assertEqual(0) - expect(dataInfo.compatibleVersion).assertEqual(5) - expect(dataInfo.targetVersion).assertEqual(5) - expect(dataInfo.isCompressNativeLibs).assertEqual(false) - for (let s = 0; s < dataInfo.hapModuleInfos; s++) { - expect(dataInfo.moduleInfos[s].name).assertEqual("com.example.myapplication1") - expect(dataInfo.moduleInfos[s].moduleName).assertEqual("entry") - } - expect(dataInfo.entryModuleName).assertEqual("entry") - expect(dataInfo.isSilentInstallation.length).assertEqual(0) - expect(dataInfo.minCompatibleVersionCode).assertEqual(0) - expect(dataInfo.entryInstallationFree).assertEqual(false) - for (let j = 0; j < dataInfo.appInfo.moduleInfos; j++) { - expect(dataInfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry") - expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1) - } - expect(dataInfo.appInfo.enabled).assertEqual(true); - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); + let bundleOptions = { + userId: USERID + }; + let dataInfo = await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, bundleOptions); + console.info("getBundleInfo_1400 start --------"); + expect(dataInfo.name).assertEqual(NAME1); + expect(dataInfo.vendor).assertEqual("example"); + expect(dataInfo.versionCode).assertEqual(VERSIONCODE1); + expect(dataInfo.versionName).assertLarger(0); + expect(dataInfo.entryModuleName).assertEqual("entry"); + expect(dataInfo.appInfo.name).assertEqual(NAME1); + expect(dataInfo.appInfo.description).assertEqual(DESCRIPTION); + expect(dataInfo.appInfo.descriptionId >= 0).assertTrue(); + expect(dataInfo.appInfo.icon).assertEqual("$media:icon"); + expect(dataInfo.appInfo.iconId >= 0).assertTrue(); + expect(dataInfo.appInfo.label).assertEqual("$string:app_name"); + expect(dataInfo.appInfo.labelId >= 0).assertTrue(); + expect(dataInfo.appInfo.systemApp).assertEqual(true); + expect(dataInfo.appInfo.supportedModes).assertEqual(0); + expect(dataInfo.updateTime).assertLarger(0); + expect(dataInfo.reqPermissions.length).assertEqual(0); + expect(dataInfo.reqPermissionDetails.length).assertEqual(0); + expect(dataInfo.compatibleVersion).assertEqual(5); + expect(dataInfo.targetVersion).assertEqual(5); + expect(dataInfo.isCompressNativeLibs).assertEqual(false); + for (let s = 0; s < dataInfo.hapModuleInfos; s++) { + expect(dataInfo.moduleInfos[s].name).assertEqual("com.example.myapplication1"); + expect(dataInfo.moduleInfos[s].moduleName).assertEqual("entry"); } + expect(dataInfo.entryModuleName).assertEqual("entry"); + expect(dataInfo.isSilentInstallation.length).assertEqual(0); + expect(dataInfo.minCompatibleVersionCode).assertEqual(0); + expect(dataInfo.entryInstallationFree).assertEqual(false); + for (let j = 0; j < dataInfo.appInfo.moduleInfos; j++) { + expect(dataInfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); + expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); + } + expect(dataInfo.appInfo.enabled).assertEqual(true); + console.info("getBundleInfo_1400 end --------"); + done(); }) /** @@ -1988,67 +1236,44 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfo interface with current userId(by callback). */ it('getBundleInfo_1500', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); + let bundleOptions = { + userId: USERID + }; + demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, bundleOptions, (err, dataInfo) => { + expect(dataInfo.name).assertEqual(NAME1); + expect(dataInfo.vendor).assertEqual("example"); + expect(dataInfo.versionCode).assertEqual(VERSIONCODE1); + expect(dataInfo.versionName).assertLarger(0); + expect(dataInfo.entryModuleName).assertEqual("entry"); + expect(dataInfo.appInfo.name).assertEqual(NAME1); + expect(dataInfo.appInfo.description).assertEqual(DESCRIPTION); + expect(dataInfo.appInfo.descriptionId >= 0).assertTrue(); + expect(dataInfo.appInfo.icon).assertEqual("$media:icon"); + expect(dataInfo.appInfo.iconId >= 0).assertTrue(); + expect(dataInfo.appInfo.label).assertEqual("$string:app_name"); + expect(dataInfo.appInfo.labelId >= 0).assertTrue(); + expect(dataInfo.appInfo.systemApp).assertEqual(true); + expect(dataInfo.appInfo.supportedModes).assertEqual(0); + expect(dataInfo.updateTime).assertLarger(0); + expect(dataInfo.reqPermissions.length).assertEqual(0); + expect(dataInfo.reqPermissionDetails.length).assertEqual(0); + expect(dataInfo.compatibleVersion).assertEqual(5); + expect(dataInfo.targetVersion).assertEqual(5); + expect(dataInfo.isCompressNativeLibs).assertEqual(false); + for (let s = 0; s < dataInfo.hapModuleInfos; s++) { + expect(dataInfo.moduleInfos[s].name).assertEqual("com.example.myapplication1"); + expect(dataInfo.moduleInfos[s].moduleName).assertEqual("entry"); + } + expect(dataInfo.entryModuleName).assertEqual("entry"); + expect(dataInfo.isSilentInstallation.length).assertEqual(0); + expect(dataInfo.minCompatibleVersionCode).assertEqual(0); + expect(dataInfo.entryInstallationFree).assertEqual(false); + for (let j = 0; j < dataInfo.appInfo.moduleInfos; j++) { + expect(dataInfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry"); + expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1); + } + done(); }); - async function getInfo() { - let bundleOptions = { - userId: 100 - }; - demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, bundleOptions, (err, dataInfo) => { - expect(dataInfo.name).assertEqual(NAME1) - expect(dataInfo.vendor).assertEqual("example") - expect(dataInfo.versionCode).assertEqual(VERSIONCODE1) - expect(dataInfo.versionName).assertLarger(0) - expect(dataInfo.entryModuleName).assertEqual("entry") - expect(dataInfo.appInfo.name).assertEqual(NAME1) - expect(dataInfo.appInfo.description).assertEqual(DESCRIPTION) - expect(dataInfo.appInfo.descriptionId >= 0).assertTrue() - expect(dataInfo.appInfo.icon).assertEqual("$media:icon") - expect(dataInfo.appInfo.iconId >= 0).assertTrue() - expect(dataInfo.appInfo.label).assertEqual("$string:app_name") - expect(dataInfo.appInfo.labelId >= 0).assertTrue() - expect(dataInfo.appInfo.systemApp).assertEqual(true) - expect(dataInfo.appInfo.supportedModes).assertEqual(0) - expect(dataInfo.updateTime).assertLarger(0) - expect(dataInfo.reqPermissions.length).assertEqual(0) - expect(dataInfo.reqPermissionDetails.length).assertEqual(0) - expect(dataInfo.compatibleVersion).assertEqual(5) - expect(dataInfo.targetVersion).assertEqual(5) - expect(dataInfo.isCompressNativeLibs).assertEqual(false) - for (let s = 0; s < dataInfo.hapModuleInfos; s++) { - expect(dataInfo.moduleInfos[s].name).assertEqual("com.example.myapplication1") - expect(dataInfo.moduleInfos[s].moduleName).assertEqual("entry") - } - expect(dataInfo.entryModuleName).assertEqual("entry") - expect(dataInfo.isSilentInstallation.length).assertEqual(0) - expect(dataInfo.minCompatibleVersionCode).assertEqual(0) - expect(dataInfo.entryInstallationFree).assertEqual(false) - for (let j = 0; j < dataInfo.appInfo.moduleInfos; j++) { - expect(dataInfo.appInfo.moduleInfos[j].moduleName).assertEqual("entry") - expect(dataInfo.appInfo.moduleInfos[j].moduleSourceDir).assertEqual(DIR1) - } - expect(dataInfo.appInfo.enabled).assertEqual(true); - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }); - } }) /** @@ -2057,36 +1282,15 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfo interface with other userId(by promise). */ it('getBundleInfo_1600', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); + demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, { + userId: 1 + }).then(data => { + expect().assertFail(); + done(); + }).catch(err => { + expect(err).assertEqual(1); + done(); }); - async function getInfo() { - demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, { - userId: 1 - }).then(data => { - expect().assertFail(); - }).catch(err => { - expect(err).assertEqual(1); - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }); - } }) /** @@ -2095,35 +1299,13 @@ describe('ActsBundleManagerTest', function () { * @tc.desc Test getBundleInfo interface with other userId(by callback). */ it('getBundleInfo_1700', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); + demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, { + userId: 1 + }, (err, dataInfo) => { + expect(err).assertEqual(1); + expect(dataInfo).assertEqual(undefined); + done(); }); - async function getInfo() { - demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES, { - userId: 1 - }, (err, dataInfo) => { - expect(err).assertEqual(1); - expect(dataInfo).assertEqual(undefined); - installData.uninstall(NAME1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }); - } }) /** @@ -2136,317 +1318,12 @@ describe('ActsBundleManagerTest', function () { { bundleName: "wrong name", abilityName: "wrong name", - }, 0, 100, OnReceiveEvent) - + }, 0, USERID, OnReceiveEvent); function OnReceiveEvent(err, datainfo) { - expect(datainfo.length).assertLarger(0) - done() - } - }) - - - - /** - * @tc.number install_0100 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces. - */ - it('install_0100', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + BMSJSTEST1], installParam, async (err, data) => { - expect(data.statusMessage).assertEqual("SUCCESS") - let datainfo = await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); - console.info("getBundleInfo result" + JSON.stringify(datainfo)) - expect(datainfo.name).assertEqual(NAME1); - installData.uninstall(NAME1, installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }); - }) - - /** - * @tc.number install_0200 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces. - */ - it('install_0200', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + BMSJSTEST2], installParam, async (err, data) => { - let datainfo = await demo.getBundleInfo(NAME2, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); - expect(datainfo.name).assertEqual(NAME2); - installData.uninstall(NAME2, installParam, (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }); - - }) - - /** - * @tc.number install_0300 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces. - */ - it('install_0300', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST4], installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - installData.install([PATH + BMSJSTEST5], installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - installData.install([PATH + BMSJSTEST6], installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - }); - }); - async function getInfo() { - await demo.getBundleInfo(NAME3, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES).then(dataInfo1 => { - expect(dataInfo1.name).assertEqual(NAME3); - }).catch(errInfo => { - expect(errInfo).assertFail() - }); - await demo.getBundleInfo(NAME4, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES).then(dataInfo2 => { - expect(dataInfo2.name).assertEqual(NAME4); - }).catch(errInfo => { - expect(errInfo).assertFail() - }); - await demo.getBundleInfo(NAME5, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES).then(dataInfo3 => { - expect(dataInfo3.name).assertEqual(NAME5); - }).catch(errInfo => { - expect(errInfo).assertFail() - }); - installData.uninstall(NAME3, installParam, (err, data) => { - console.info("uninstall----result1" + JSON.stringify(data)) - expect(err.code).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - installData.uninstall(NAME4, installParam, (err, data) => { - console.info("uninstall----result2" + JSON.stringify(data)) - expect(err.code).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - installData.uninstall(NAME5, installParam, (err, data) => { - console.info("uninstall----result3" + JSON.stringify(data)) - expect(err.code).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - }); - }); - } - }) - - /** - * @tc.number install_0400 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces. - */ - it('install_0400', 0, async function (done) { - demo.getBundleInstaller().then(async (data) => { - await data.install([PATH + ERROR], { - userId: 100, - installFlag: 0, - isKeepData: false - }, OnReceiveinstallEvent); - - function OnReceiveinstallEvent(err, data) { - expect(typeof data).assertEqual(OBJECT); - expect(data.statusMessage == "STATUS_INSTALL_FAILURE_INVALID" || - data.statusMessage == "STATUS_INSTALL_FAILURE" || - data.statusMessage == "STATUS_BMS_SERVICE_ERROR" || - data.statusMessage == "STATUS_UNINSTALL_FAILURE_ABORTED").assertTrue(); - done(); - } - }); - }) - - /** - * @tc.number install_0500 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces. - */ - it('install_0500', 0, async function (done) { - demo.getBundleInstaller().then((data) => { - data.install([''], { - userId: 100, - installFlag: 0, - isKeepData: false - }, OnReceiveinstallEvent); - - function OnReceiveinstallEvent(err, data) { - expect(typeof data).assertEqual(OBJECT); - expect(data.statusMessage == "STATUS_INSTALL_FAILURE_INVALID" || - data.statusMessage == "STATUS_INSTALL_FAILURE_ABORTED" || - data.statusMessage == "STATUS_INSTALL_FAILURE_DOWNLOAD_FAILED" || - data.statusMessage == "STATUS_UNINSTALL_FAILURE_CONFLICT" || - data.statusMessage == "STATUS_ABILITY_NOT_FOUND").assertTrue(); - done(); - } - }); - }) - - /** - * @tc.number install_0600 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces. - */ - - it('install_0600', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + BMSJSTEST1], installParam, OnReceiveInstallEvent); - async function OnReceiveInstallEvent(err, data) { - expect(typeof data).assertEqual(OBJECT); - expect(data.statusMessage).assertEqual(SUCCESS); - let datainfo1 = await demo.getBundleInfo(NAME1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); - expect(datainfo1.name).assertEqual(NAME1); - installData.uninstall(NAME1, installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - } - }) - - /** - * @tc.number install_0700 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces. - */ - it('install_0700', 0, async function (done) { - demo.getBundleInstaller().then((data) => { - data.install([PATH + BMSJSTEST7], { - userId: 100, - installFlag: 0, - isKeepData: false - }, OnReceiveinstallEvent); - - function OnReceiveinstallEvent(err, data) { - expect(typeof data).assertEqual(OBJECT); - expect(data.statusMessage == "STATUS_INSTALL_FAILURE_INVALID" || - data.statusMessage == "STATUS_INSTALL_FAILURE_CONFLICT" || - data.statusMessage == "STATUS_INSTALL_FAILURE_DOWNLOAD_TIMEOUT" || - data.statusMessage == "STATUS_UNINSTALL_FAILURE_BLOCKED" || - data.statusMessage == "STATUS_INSTALL_FAILURE_STORAGE").assertTrue(); - } + expect(err).assertEqual(1); + expect(datainfo.length).assertLarger(0); done(); - }); - }) - - /** - * @tc.number install_0800 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces. - */ - it('install_0800', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST8], installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo(); - }); - async function getInfo() { - let datainfo = await demo.getBundleInfo(THIRD1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); - expect(datainfo.name).assertEqual(THIRD1); - expect(datainfo.versionCode).assertEqual(VERSIONCODE1); - expect(datainfo.versionName).assertLarger(0); - installData.install([PATH + BMSJSTEST9], installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - getInfo1(); - }); } - async function getInfo1() { - let datainfo = await demo.getBundleInfo(THIRD1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); - expect(datainfo.name).assertEqual(THIRD1); - expect(datainfo.versionCode).assertEqual(VERSIONCODE2); - expect(datainfo.versionName).assertLarger(0); - installData.uninstall(THIRD1, installParam, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - done(); - }); - } - }) - - /** - * @tc.number install_0900 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces. - */ - it('install_0900', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST9], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(typeof data).assertEqual(OBJECT); - expect(data.statusMessage).assertEqual(SUCCESS); - let datainfo = await demo.getBundleInfo(THIRD1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); - expect(datainfo.versionCode).assertEqual(VERSIONCODE2); - expect(datainfo.versionName).assertLarger(0); - installData.install([PATH + BMSJSTEST8], { - userId: 100, - installFlag: 0, - isKeepData: false - }, OnReceiveinstallEvent); - }); - async function OnReceiveinstallEvent(err, data) { - expect(typeof data).assertEqual(OBJECT); - expect(data.statusMessage).assertEqual('STATUS_INSTALL_FAILURE_INCOMPATIBLE'); - let datainfo = await demo.getBundleInfo(THIRD1, demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); - expect(datainfo.versionCode).assertEqual(VERSIONCODE2); - expect(datainfo.versionName).assertLarger(0); - installData.uninstall(THIRD1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - done(); - }); - } - }) - - /** - * @tc.number install_1000 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces. - */ - it('install_1000', 0, async function (done) { - let installData = await demo.getBundleInstaller() - installData.install([PATH + BMSJSTEST8], { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage).assertEqual('SUCCESS'); - let bundleInfo = await demo.getBundleInfo('com.example.third1', demo.BundleFlag.GET_BUNDLE_WITH_ABILITIES); - expect(bundleInfo.uid).assertLarger(10000); - installData.uninstall(THIRD1, { - userId: 100, - installFlag: 0, - isKeepData: false - }, async (err, data) => { - expect(err.code).assertEqual(0); - expect(data.status).assertEqual(0); - expect(data.statusMessage == "SUCCESS").assertTrue(); - done(); - }); - }); }) /** @@ -2465,7 +1342,7 @@ describe('ActsBundleManagerTest', function () { * @tc.name InstallErrorCode::STATUS_FAILED_NO_SPACE_LEFT * @tc.desc Test install errcode STATUS_FAILED_NO_SPACE_LEFT. */ - it('installErrCodeTest_0200', 0, async function (done) { + it('installErrCodeTest_0200', 0, async function (done) { expect(demo.InstallErrorCode.STATUS_GRANT_REQUEST_PERMISSIONS_FAILED).assertEqual(67); done(); }) diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/BUILD.gn deleted file mode 100644 index ca2d062d0be200d3ccd4e4d9f7b097fb4a2065c6..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/BUILD.gn +++ /dev/null @@ -1,31 +0,0 @@ -# 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("ActsBundleManagerUninstallTest") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsBundleManagerUninstallTest" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/js/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/Test.json b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/Test.json deleted file mode 100644 index 4004cc07c15814354f91821cfb49b683420e401b..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/Test.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "120000", - "package": "com.example.actsbundlemanageruninstall", - "shell-timeout": "60000" - }, - "kits": [ - { - "test-file-name": [ - "ActsBundleManagerUninstallTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "PushKit", - "push": [ - "bmsJstest1.hap->/data/bmsJstest1.hap", - "bmsJstest2.hap->/data/bmsJstest2.hap", - "bmsJstest3.hap->/data/bmsJstest3.hap", - "bmsJstest4.hap->/data/bmsJstest4.hap", - "bmsJstest5.hap->/data/bmsJstest5.hap", - "bmsJstest6.hap->/data/bmsJstest6.hap", - "bmsJstest8.hap->/data/bmsJstest8.hap" - ] - - }, - { - "type": "ShellKit", - "run-command": [ - "chmod 644 /data/*.hap" - ] - } - ] -} diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/config.json deleted file mode 100644 index 8a6582f13cf53b541ffe0e9599cff3a4f0b4c0da..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/config.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "app": { - "bundleName": "com.example.actsbundlemanageruninstall", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 5, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.actsbundlemanageruninstall", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home", - "flag.home.intent.from.system" - ], - "actions": [ - "action.system.home" - ] - } - ], - "visible": true, - "name": "com.example.actsbundlemanageruninstall.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard" - } - ], - "defPermissions": [ - { - "name": "com.permission.CAMERA", - "grantMode": "system_grant", - "availableScope": ["signature"], - "label": "CAMERA permission", - "description": "CAMERA permission in detail" - }, - { - "name": "com.permission.music", - "grantMode": "system_grant", - "availableScope": ["signature"], - "label": "music permission", - "description": "music permission in detail" - }, - { - "name": "com.permission.WeChat", - "grantMode": "system_grant", - "availableScope": ["signature"], - "label": "WeChat permission", - "description": "WeChat permission in detail" - } - ], - "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO", - "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/app.js deleted file mode 100755 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/pages/index/index.js deleted file mode 100644 index f90bb8113e3aa0aff86222b3782b49c7e1aaaf86..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 {Core, ExpectExtend} from 'deccjsunit/index' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - }, - onShow() { - console.info('onShow finish') - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - core.addService('expect', expectExtend) - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - - require('../../../test/List.test') - core.execute() - }, - onReady() { - }, -} diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/resources/base/element/string.json deleted file mode 100644 index 00ca1aa073a6cb49e8c304775822f82dd4ca8d24..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "actsbundlemanageruninstall" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/test/ExampleJsunit.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/test/ExampleJsunit.test.js deleted file mode 100644 index cc5d0223054ae6874fe13cae4226d26a0fc0c629..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/test/ExampleJsunit.test.js +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' -import demo from '@ohos.bundle' - -const PATH = "/data/"; -const ERROR = "error.hap"; -const BMSJSTEST1 = "bmsJstest1.hap"; -const BMSJSTEST2 = "bmsJstest2.hap"; -const BMSJSTEST3 = "bmsJstest3.hap"; -const BMSJSTEST4 = "bmsJstest4.hap"; -const BMSJSTEST5 = "bmsJstest5.hap"; -const BMSJSTEST6 = "bmsJstest6.hap"; -const BMSJSTEST8 = "bmsJstest8.hap"; -const NAME1 = "com.example.myapplication1"; -const NAME2 = "com.example.myapplication2"; -const NAME3 = "com.example.myapplication4"; -const NAME4 = "com.example.myapplication5"; -const NAME5 = "com.example.myapplication6"; -const THIRD1 = "com.example.third1"; -const LAUNCHER = "com.ohos.launcher"; -const SUCCESS = "SUCCESS"; -const installParam = { - userId: 100, - installFlag: 1, - isKeepData: false -}; - -describe('ActsBundleManagerUninstall', function () { - - /** - * @tc.number uninstall_0100 - * @tc.name BUNDLE::uninstall - * @tc.desc Test uninstall interfaces. - */ - it('uninstall_0100', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + BMSJSTEST1], installParam, async (err, data) => { - checkInstallResult(err, data); - await queryInfo(NAME1, 0); - installData.uninstall(NAME1, installParam, async (err, data) => { - checkInstallResult(err, data); - await queryInfo(NAME1, 1); - done(); - }); - }); - }); - - /** - * @tc.number uninstall_0200 - * @tc.name BUNDLE::uninstall - * @tc.desc Test uninstall interfaces. - */ - it('uninstall_0200', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + BMSJSTEST2, PATH + BMSJSTEST3], installParam, async (err, data) => { - checkInstallResult(err, data); - let bundleInfo = await demo.getBundleInfo(NAME2, demo.BundleFlag.GET_BUNDLE_DEFAULT); - expect(bundleInfo.appInfo.moduleSourceDirs.length).assertEqual(2); - installData.uninstall(NAME2, installParam, async(err, data) => { - checkInstallResult(err, data); - await queryInfo(NAME2, 1); - done(); - }); - }); - }); - - /** - * @tc.number uninstall_0300 - * @tc.name BUNDLE::uninstall - * @tc.desc Test uninstall interfaces. - */ - it('uninstall_0300', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + BMSJSTEST4], installParam, async (err, data) => { - checkInstallResult(err, data); - installData.install([PATH + BMSJSTEST5], installParam, async (err, data) => { - checkInstallResult(err, data); - installData.install([PATH + BMSJSTEST6], installParam, async (err, data) => { - checkInstallResult(err, data); - await queryInfo(NAME3, 0); - await queryInfo(NAME4, 0); - await queryInfo(NAME5, 0); - installData.uninstall(NAME3, installParam, async (err, data) => { - checkInstallResult(err, data); - installData.uninstall(NAME4, installParam, async (err, data) => { - checkInstallResult(err, data); - installData.uninstall(NAME5, installParam, async (err, data) => { - checkInstallResult(err, data); - await queryInfo(NAME3, 1); - await queryInfo(NAME4, 1); - await queryInfo(NAME5, 1); - done(); - }); - }); - }); - }); - }); - }); - }); - - /** - * @tc.number uninstall_0400 - * @tc.name BUNDLE::uninstall - * @tc.desc Test uninstall interfaces. - */ - it('uninstall_0400', 0, async function (done) { - demo.getBundleInstaller().then((data) => { - data.uninstall(ERROR, installParam, (err, data) => { - expect(err.code).assertEqual(-1); - expect(data.status).assertEqual(demo.InstallErrorCode.STATUS_UNINSTALL_FAILURE); - expect(data.statusMessage).assertEqual("STATUS_UNINSTALL_FAILURE"); - done(); - }); - }); - }); - - /** - * @tc.number uninstall_0500 - * @tc.name BUNDLE::uninstall - * @tc.desc Test uninstall interfaces. - */ - it('uninstall_0500', 0, async function (done) { - demo.getBundleInstaller().then((data) => { - data.uninstall('', installParam, (err, data) => { - expect(err.code).assertEqual(-1); - expect(data.status).assertEqual(demo.InstallErrorCode.STATUS_UNINSTALL_FAILURE); - expect(data.statusMessage).assertEqual("STATUS_UNINSTALL_FAILURE"); - done(); - }); - }); - }); - - /** - * @tc.number uninstall_0600 - * @tc.name BUNDLE::uninstall - * @tc.desc Test uninstall interfaces. - */ - it('uninstall_0600', 0, async function (done) { - demo.getBundleInstaller().then((data) => { - data.uninstall(LAUNCHER, installParam, (err, data) => { - expect(err.code).assertEqual(-1); - expect(data.status).assertEqual(demo.InstallErrorCode.STATUS_UNINSTALL_FAILURE); - expect(data.statusMessage).assertEqual("STATUS_UNINSTALL_FAILURE"); - done(); - }); - }); - }); - - /** - * @tc.number uninstall_0700 - * @tc.name BUNDLE::uninstall - * @tc.desc Test uninstall interfaces. - */ - it('uninstall_0700', 0, async function (done) { - let result = await demo.getBundleInstaller(); - result.install([PATH + BMSJSTEST1], { - userId: 100, - installFlag: 1, - isKeepData: true - }, async (err, data) => { - checkInstallResult(err, data); - await queryInfo(NAME1, 0); - result.uninstall(NAME1, installParam, async (err, data) => { - checkInstallResult(err, data); - await queryInfo(NAME1, 1); - done(); - }); - }); - }); - - /** - * @tc.number uninstall_0800 - * @tc.name BUNDLE::uninstall - * @tc.desc Test uninstall interfaces. - */ - it('uninstall_0800', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + BMSJSTEST8], installParam, async (err, data) => { - checkInstallResult(err, data); - let bundleInfo = await demo.getBundleInfo('com.example.third1', demo.BundleFlag.GET_BUNDLE_DEFAULT); - expect(bundleInfo.uid).assertLarger(10000); - installData.uninstall(THIRD1, installParam, async (err, data) => { - checkInstallResult(err, data); - await queryInfo('com.example.third1', 1); - done(); - }); - }); - }); - - async function queryInfo(bundleName, assertFlag){ - if (!assertFlag) { - await demo.getBundleInfo(bundleName, demo.BundleFlag.GET_BUNDLE_DEFAULT - ).then(datainfo => { - console.info("getBundleInfo result0"+JSON.stringify(datainfo)); - expect(datainfo.name).assertEqual(bundleName); - }).catch(err => { - console.info("getBundleInfo result0"+JSON.stringify(datainfo)); - expect(err).assertFail(); - }); - } else { - await demo.getBundleInfo(bundleName, demo.BundleFlag.GET_BUNDLE_DEFAULT - ).then(datainfo => { - console.info("getBundleInfo result1"+JSON.stringify(datainfo)); - expect(datainfo).assertFail(); - }).catch(err => { - console.info("getBundleInfo result1"+JSON.stringify(err)); - expect(err).assertEqual(1); - }); - } - } - - function checkInstallResult(err, result) { - console.info("install uninstall result" + JSON.stringify(result)); - expect(err.code).assertEqual(0); - expect(result.status).assertEqual(demo.InstallErrorCode.SUCCESS); - expect(result.statusMessage).assertEqual(SUCCESS); - } -}) \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/test/List.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/test/List.test.js deleted file mode 100644 index c0b876e81cf0a75db974ee932d8fc06a1d5a6e66..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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. - */ -require('./ExampleJsunit.test.js') \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/BUILD.gn deleted file mode 100644 index 2a9b5573ad533441a2af52a92b87c28a642f1c06..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/BUILD.gn +++ /dev/null @@ -1,31 +0,0 @@ -# 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("ActsBundleMgrMultipleInstallTest") { - hap_profile = "./entry/src/main/config.json" - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" - hap_name = "ActsBundleMgrMultipleInstallTest" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./entry/src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./entry/src/main/js/resources" ] - hap_profile = "./entry/src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/Test.json b/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/Test.json deleted file mode 100644 index b5e2d8e46fce4f6a7fd0cbc81a98c38e8b7409b7..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/Test.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", - "driver": { - "type": "JSUnitTest", - "test-timeout": "750000", - "package": "com.example.actsbundlemgrmultipleinstalltest", - "shell-timeout": "60000" - }, - "kits": [ - { - "test-file-name": [ - "ActsBundleMgrMultipleInstallTest.hap" - ], - "type": "AppInstallKit", - "cleanup-apps": true - }, - { - "type": "ShellKit", - "run-command": [ - "remount", - "mkdir -p /data/test/resource/bms/install_bundle" - ] - }, - { - "type": "PushKit", - "push": [ - "first_right.hap -> /data/test/resource/bms/install_bundle/first_right.hap", - "second_right.hap -> /data/test/resource/bms/install_bundle/second_right.hap", - "third_right.hap -> /data/test/resource/bms/install_bundle/third_right.hap", - "fourth_right.hap -> /data/test/resource/bms/install_bundle/fourth_right.hap", - "eighth_right.hap -> /data/test/resource/bms/install_bundle/eighth_right.hap", - "ninth_right.hap -> /data/test/resource/bms/install_bundle/ninth_right.hap", - "tenth_right.hap -> /data/test/resource/bms/install_bundle/tenth_right.hap", - "eleventh_right.hap -> /data/test/resource/bms/install_bundle/eleventh_right.hap", - "fifth_right.hap -> /data/test/resource/bms/install_bundle/fifth_right.hap", - "second_backup_right.hap -> /data/test/resource/bms/install_bundle/second_backup_right.hap", - "twelfth_right.hap -> /data/test/resource/bms/install_bundle/twelfth_right.hap", - "sixth_right.hap -> /data/test/resource/bms/install_bundle/sixth_right.hap", - "thirteenth_right.hap -> /data/test/resource/bms/install_bundle/thirteenth_right.hap", - "fourteenth_right.hap -> /data/test/resource/bms/install_bundle/fourteenth_right.hap", - "sixteenth_right.hap -> /data/test/resource/bms/install_bundle/sixteenth_right.hap" - ] - }, - { - "type": "ShellKit", - "run-command": [ - "chmod 777 /data/test/resource/bms/install_bundle/*" - ] - } - ] -} diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/config.json deleted file mode 100644 index 9c4ef7403d37a8134c06fb7d9f2acc38e41f7725..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/config.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "app": { - "bundleName": "com.example.actsbundlemgrmultipleinstalltest", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 5, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.actsbundlemgrmultipleinstalltest", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home", - "flag.home.intent.from.system" - ], - "actions": [ - "action.system.home" - ] - } - ], - "visible": true, - "name": "com.example.actsbundlemgrmultipleinstalltest.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard" - } - ], - "defPermissions": [ - { - "name": "com.permission.CAMERA", - "grantMode": "system_grant", - "availableScope": ["signature"], - "label": "CAMERA permission", - "description": "CAMERA permission in detail" - }, - { - "name": "com.permission.music", - "grantMode": "system_grant", - "availableScope": ["signature"], - "label": "music permission", - "description": "music permission in detail" - }, - { - "name": "com.permission.WeChat", - "grantMode": "system_grant", - "availableScope": ["signature"], - "label": "WeChat permission", - "description": "WeChat permission in detail" - } - ], - "reqPermissions": [ - { - "name": "ohos.permission.INSTALL_BUNDLE", - "reason": "need use ohos.permission.INSTALL_BUNDLE" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED", - "reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED" - }, - { - "name":"ohos.permission.GET_BUNDLE_INFO", - "reason":"need use ohos.permission.GET_BUNDLE_INFO" - }, - { - "name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE", - "reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE" - }, - { - "name":"ohos.permission.REMOVE_CACHE_FILES", - "reason":"need use ohos.permission.REMOVE_CACHE_FILES" - }, - { - "name":"ohos.permission.LISTEN_BUNDLE_CHANGE", - "reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/pages/index/index.js deleted file mode 100644 index f90bb8113e3aa0aff86222b3782b49c7e1aaaf86..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 {Core, ExpectExtend} from 'deccjsunit/index' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - }, - onShow() { - console.info('onShow finish') - const core = Core.getInstance() - const expectExtend = new ExpectExtend({ - 'id': 'extend' - }) - core.addService('expect', expectExtend) - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - - require('../../../test/List.test') - core.execute() - }, - onReady() { - }, -} diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/resources/base/element/string.json deleted file mode 100644 index 9340e9383b7e8fd1f14121764e134b166d812a6d..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "actsbundlemgrmultipleinstalltest" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/test/ExampleJsunit.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/test/ExampleJsunit.test.js deleted file mode 100644 index 7fbb6b37ff4c32767a239b4434c50569e58246ef..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/test/ExampleJsunit.test.js +++ /dev/null @@ -1,658 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' -import demo from '@ohos.bundle' - -const PATH = "/data/test/resource/bms/install_bundle/"; -const FIRST_RIGHT = "first_right.hap"; -const SECOND_RIGHT = "second_right.hap"; -const THIRD_RIGHT = "third_right.hap"; -const FOURTH_RIGHT = "fourth_right.hap"; -const EIGHTH_RIGHT = "eighth_right.hap"; -const NINTH_RIGHT = "ninth_right.hap"; -const TENTH_RIGHT = "tenth_right.hap"; -const ELEVEBTH_RIGHT = "eleventh_right.hap"; -const FIFTH_RIGHT = "fifth_right.hap"; -const SECOND_BACKUP_RIGHT = "second_backup_right.hap"; -const TWELFTH_RIGHT = "twelfth_right.hap"; -const SIXTH_RIGHT = "sixth_right.hap"; -const THIRTEENTH_RIGHT = "thirteenth_right.hap"; -const FOURTEENTH_RIGHT = "fourteenth_right.hap"; -const SIXTEENTH_RIGHT = "sixteenth_right.hap"; -const NAME = "com.example.l3jsdemo"; -const ERR_CODE = -1; -const installParam1 = { - userId: 100, - installFlag: 0, - isKeepData: false -}; -const installParam2 = { - userId: 100, - installFlag: 1, - isKeepData: false -}; - -describe('ActsBundleMgrMultipleInstallTest', function () { - - /** - * @tc.number BMS_Multiple_Hap_Install_0200 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces path err. - */ - it('BMS_Multiple_Hap_Install_0200', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT,""], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.STATUS_INSTALL_FAILURE_INVALID, - "STATUS_INSTALL_FAILURE_INVALID"); - await queryInfo(NAME, 1); - done(); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Install_0400 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces two different hap. - */ - it('BMS_Multiple_Hap_Install_0400', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + SECOND_RIGHT, PATH + THIRD_RIGHT], installParam1, - async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.STATUS_INSTALL_FAILURE_CONFLICT, - "STATUS_INSTALL_FAILURE_CONFLICT"); - await queryInfo(NAME, 1); - done(); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Install_0500 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces version code different. - */ - it('BMS_Multiple_Hap_Install_0500', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT, PATH + FOURTH_RIGHT], installParam1, - async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.STATUS_INSTALL_FAILURE_CONFLICT, - "STATUS_INSTALL_FAILURE_CONFLICT"); - await queryInfo(NAME, 1); - done(); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Install_0600 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces version name different. - */ - it('BMS_Multiple_Hap_Install_0600', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT, PATH + EIGHTH_RIGHT], installParam1, - async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.STATUS_INSTALL_FAILURE_CONFLICT, - "STATUS_INSTALL_FAILURE_CONFLICT"); - await queryInfo(NAME, 1); - done(); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Install_0700 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces target different. - */ - it('BMS_Multiple_Hap_Install_0700', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT, PATH + NINTH_RIGHT], installParam1, - async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.STATUS_INSTALL_FAILURE_CONFLICT, - "STATUS_INSTALL_FAILURE_CONFLICT"); - await queryInfo(NAME, 1); - done(); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Install_0800 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces compatible different. - */ - it('BMS_Multiple_Hap_Install_0800', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT, PATH + TENTH_RIGHT], installParam1, - async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.STATUS_INSTALL_FAILURE_CONFLICT, - "STATUS_INSTALL_FAILURE_CONFLICT"); - await queryInfo(NAME, 1); - done(); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Install_0900 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces vendor different. - */ - it('BMS_Multiple_Hap_Install_0900', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT, PATH + ELEVEBTH_RIGHT], installParam1, - async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.STATUS_INSTALL_FAILURE_CONFLICT, - "STATUS_INSTALL_FAILURE_CONFLICT"); - await queryInfo(NAME, 1); - done(); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Install_1000 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces two entry. - */ - it('BMS_Multiple_Hap_Install_1000', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT, PATH + FIFTH_RIGHT], installParam1, - async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.STATUS_INSTALL_FAILURE_INVALID, - "STATUS_INSTALL_FAILURE_INVALID"); - await queryInfo(NAME, 1); - done(); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Install_1100 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces same feature. - */ - it('BMS_Multiple_Hap_Install_1100', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + SECOND_RIGHT, PATH + SECOND_BACKUP_RIGHT], installParam1, - async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.uninstall(NAME, installParam1, async (err, data1) => { - checkResult(err, data1, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Install_1200 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces entry and feature. - */ - it('BMS_Multiple_Hap_Install_1200', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT, PATH + SECOND_RIGHT], installParam1, - async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await demo.getBundleInfo(NAME, demo.BundleFlag.GET_BUNDLE_DEFAULT).then(datainfo => { - console.info("getBundleInfo result" + JSON.stringify(datainfo)) - expect(datainfo.hapModuleInfos.length).assertEqual(2); - expect(datainfo.hapModuleInfos[0].moduleName).assertEqual("l2jsdemo"); - expect(datainfo.hapModuleInfos[1].moduleName).assertEqual("entry"); - }).catch(err => { - console.info("getBundleInfo err" + JSON.stringify(err)); - expect(err).assertFail(); - }); - installData.uninstall(NAME, installParam1, async (err, data1) => { - checkResult(err, data1, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Install_1300 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces two feature. - */ - it('BMS_Multiple_Hap_Install_1300', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + SECOND_RIGHT, PATH + TWELFTH_RIGHT], installParam1, - async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await demo.getBundleInfo(NAME, demo.BundleFlag.GET_BUNDLE_DEFAULT).then(datainfo => { - console.info("getBundleInfo result" + JSON.stringify(datainfo)) - expect(datainfo.hapModuleInfos.length).assertEqual(2); - expect(datainfo.hapModuleInfos[0].moduleName).assertEqual("l1jsdemo"); - expect(datainfo.hapModuleInfos[1].moduleName).assertEqual("l2jsdemo"); - }).catch(err => { - console.info("getBundleInfo err" + JSON.stringify(err)); - expect(err).assertFail(); - }); - installData.uninstall(NAME, installParam1, async (err, data1) => { - checkResult(err, data1, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Install_1400 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces path err. - */ - it('BMS_Multiple_Hap_Install_1400', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT, PATH + "test_right.hap"], installParam1, - async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.STATUS_INSTALL_FAILURE_INVALID, - "STATUS_INSTALL_FAILURE_INVALID"); - await queryInfo(NAME, 1); - done(); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_0100 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces entry and feature. - */ - it('BMS_Multiple_Hap_Update_0100', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + SECOND_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await demo.getBundleInfo(NAME, demo.BundleFlag.GET_BUNDLE_DEFAULT).then(datainfo => { - console.info("getBundleInfo result" + JSON.stringify(datainfo)); - expect(datainfo.hapModuleInfos.length).assertEqual(2); - expect(datainfo.hapModuleInfos[0].moduleName).assertEqual("l2jsdemo"); - expect(datainfo.hapModuleInfos[1].moduleName).assertEqual("entry"); - }).catch(err => { - console.info("getBundleInfo err" + JSON.stringify(err)); - expect(err).assertFail(); - }); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_0200 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces high version feature. - */ - it('BMS_Multiple_Hap_Update_0200', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + SIXTH_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.STATUS_INSTALL_FAILURE_CONFLICT, - "STATUS_INSTALL_FAILURE_CONFLICT"); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_0300 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces low version feature. - */ - it('BMS_Multiple_Hap_Update_0300', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + THIRTEENTH_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.STATUS_INSTALL_FAILURE_INCOMPATIBLE, - "STATUS_INSTALL_FAILURE_INCOMPATIBLE"); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_0400 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces same entry. - */ - it('BMS_Multiple_Hap_Update_0400', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + FIRST_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_0500 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces entry upgrade. - */ - it('BMS_Multiple_Hap_Update_0500', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + FOURTEENTH_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await demo.getBundleInfo(NAME, demo.BundleFlag.GET_BUNDLE_DEFAULT).then(datainfo => { - console.info("getBundleInfo result" + JSON.stringify(datainfo)); - expect(datainfo.versionName).assertEqual("3.0.0"); - }).catch(err => { - console.info("getBundleInfo err" + JSON.stringify(err)); - expect(err).assertFail(); - }); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_0600 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces entry of the same version. - */ - it('BMS_Multiple_Hap_Update_0600', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + SECOND_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + FIRST_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await demo.getBundleInfo(NAME, demo.BundleFlag.GET_BUNDLE_DEFAULT).then(datainfo => { - console.info("getBundleInfo result" + JSON.stringify(datainfo)); - expect(datainfo.hapModuleInfos.length).assertEqual(2); - expect(datainfo.hapModuleInfos[0].moduleName).assertEqual("l2jsdemo"); - expect(datainfo.hapModuleInfos[1].moduleName).assertEqual("entry"); - }).catch(err => { - console.info("getBundleInfo err" + JSON.stringify(err)); - expect(err).assertFail(); - }); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_0700 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces entry of the high version. - */ - it('BMS_Multiple_Hap_Update_0700', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + SECOND_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + FOURTEENTH_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await demo.getBundleInfo(NAME, demo.BundleFlag.GET_BUNDLE_DEFAULT).then(datainfo => { - console.info("getBundleInfo result" + JSON.stringify(datainfo)); - expect(datainfo.versionName).assertEqual("3.0.0"); - expect(datainfo.hapModuleInfos[0].moduleName).assertEqual("entry"); - }).catch(err => { - console.info("getBundleInfo err" + JSON.stringify(err)); - expect(err).assertFail(); - }); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_0800 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces same feature. - */ - it('BMS_Multiple_Hap_Update_0800', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + SECOND_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + SECOND_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_0900 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces feature of the high version. - */ - it('BMS_Multiple_Hap_Update_0900', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + SECOND_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + SIXTH_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await demo.getBundleInfo(NAME, demo.BundleFlag.GET_BUNDLE_DEFAULT).then(datainfo => { - console.info("getBundleInfo result" + JSON.stringify(datainfo)); - expect(datainfo.versionName).assertEqual("3.0.0"); - }).catch(err => { - console.info("getBundleInfo err" + JSON.stringify(err)); - expect(err).assertFail(); - }); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_1000 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces feature of the lower version. - */ - it('BMS_Multiple_Hap_Update_1000', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + SECOND_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + THIRTEENTH_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.STATUS_INSTALL_FAILURE_INCOMPATIBLE, - "STATUS_INSTALL_FAILURE_INCOMPATIBLE"); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_1100 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces install other feature. - */ - it('BMS_Multiple_Hap_Update_1100', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + SECOND_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + TWELFTH_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await demo.getBundleInfo(NAME, demo.BundleFlag.GET_BUNDLE_DEFAULT).then(datainfo => { - console.info("getBundleInfo result" + JSON.stringify(datainfo)); - expect(datainfo.hapModuleInfos.length).assertEqual(2); - expect(datainfo.hapModuleInfos[0].moduleName).assertEqual("l1jsdemo"); - expect(datainfo.hapModuleInfos[1].moduleName).assertEqual("l2jsdemo"); - }).catch(err => { - console.info("getBundleInfo err" + JSON.stringify(err)); - expect(err).assertFail(); - }); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_1200 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces install other high version feature. - */ - it('BMS_Multiple_Hap_Update_1200', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + SECOND_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + SIXTEENTH_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await demo.getBundleInfo(NAME, demo.BundleFlag.GET_BUNDLE_DEFAULT).then(datainfo => { - console.info("getBundleInfo result" + JSON.stringify(datainfo)); - expect(datainfo.versionName).assertEqual("3.0.0"); - expect(datainfo.hapModuleInfos[0].moduleName).assertEqual("l1jsdemo"); - }).catch(err => { - console.info("getBundleInfo err" + JSON.stringify(err)); - expect(err).assertFail(); - }); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_1300 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces install other low version feature. - */ - it('BMS_Multiple_Hap_Update_1300', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + SECOND_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + THIRTEENTH_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.STATUS_INSTALL_FAILURE_INCOMPATIBLE, - "STATUS_INSTALL_FAILURE_INCOMPATIBLE"); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - /** - * @tc.number BMS_Multiple_Hap_Update_1500 - * @tc.name BUNDLE::install - * @tc.desc Test install interfaces. - */ - it('BMS_Multiple_Hap_Update_1500', 0, async function (done) { - let installData = await demo.getBundleInstaller(); - installData.install([PATH + FIRST_RIGHT, PATH + SECOND_RIGHT], installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.install([PATH + FIRST_RIGHT, PATH + SECOND_RIGHT],installParam2, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 0); - installData.uninstall(NAME, installParam1, async (err, data) => { - checkResult(err, data, demo.InstallErrorCode.SUCCESS, "SUCCESS"); - await queryInfo(NAME, 1); - done(); - }); - }); - }); - }); - - function checkResult(error, data, status, statusMessage) { - if(!status) { - expect(error.code).assertEqual(status); - expect(data.status).assertEqual(status); - expect(data.statusMessage).assertEqual(statusMessage); - console.info('===install uninstall result===' + JSON.stringify(data.statusMessage)); - } else { - expect(error.code).assertEqual(ERR_CODE); - expect(data.status).assertEqual(status); - expect(data.statusMessage).assertEqual(statusMessage); - console.info('===install uninstall result===' + JSON.stringify(data.statusMessage)); - } - } - - async function queryInfo(bundleName, assertFlag){ - if (!assertFlag) { - await demo.getBundleInfo(bundleName, demo.BundleFlag.GET_BUNDLE_DEFAULT - ).then(datainfo => { - console.info("getBundleInfo result0" + JSON.stringify(datainfo)); - expect(datainfo.name).assertEqual(bundleName); - }).catch(err => { - console.info("getBundleInfo result0" + JSON.stringify(datainfo)); - expect(err).assertFail(); - }); - } else { - await demo.getBundleInfo(bundleName, demo.BundleFlag.GET_BUNDLE_DEFAULT) - .then(datainfo => { - console.info("getBundleInfo result1" + JSON.stringify(datainfo)); - expect(datainfo).assertFail(); - }).catch(err => { - console.info("getBundleInfo result1" + JSON.stringify(err)); - expect(err).assertEqual(1); - }); - } - } -}) diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/test/List.test.js b/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/test/List.test.js deleted file mode 100644 index c0b876e81cf0a75db974ee932d8fc06a1d5a6e66..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/test/List.test.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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. - */ -require('./ExampleJsunit.test.js') \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/BUILD.gn similarity index 94% rename from appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/BUILD.gn rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/BUILD.gn index 7928bccb83d933fc05efb9bf32af5b334cb0bdf3..0063f84e99cae8aa26f3504fea60a629c2cfd0f2 100644 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/BUILD.gn +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/BUILD.gn @@ -12,9 +12,9 @@ # limitations under the License. import("//test/xts/tools/build/suite.gni") -ohos_hap("fifth_right") { +ohos_hap("bmsAccessTokenTest5") { hap_profile = "./src/main/config.json" - hap_name = "fifth_right" + hap_name = "bmsAccessTokenTest5" subsystem_name = XTS_SUITENAME final_hap_path = "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/Test.json similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/Test.json rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/Test.json diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/signature/openharmony_sx.p7b old mode 100755 new mode 100644 similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/signature/openharmony_sx.p7b rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/signature/openharmony_sx.p7b diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..a7bb5a8eb6a554e25e7c4d333d3bd14813fdcc11 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/config.json @@ -0,0 +1,104 @@ +{ + "app": { + "bundleName": "com.example.bmsaccesstoken3", + "vendor": "example", + "version": { + "code": 1, + "name": "1.0" + }, + "apiVersion": { + "compatible": 5, + "target": 5, + "releaseType": "Beta1" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.bmsaccesstoken3", + "name": ".MyApplication1", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry" + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": ".MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "isVisible": "true", + "launchType": "standard", + "language": "C++", + "metaData": { + "customizeData": [ + { + "name": "originWidgetName", + "value": "com.weather.testWidget" + } + ] + } + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ], + "definePermissions":[ + { + "availableLevel":"normal", + "description":"ALPHA description", + "distributedSceneEnable":true, + "grantMode":"user_grant", + "label":"ALPHA label", + "name":"ohos.permission.ALPHA", + "provisionEnable":true + }, + { + "availableLevel":"normal", + "description":"BETA description", + "distributedSceneEnable":true, + "grantMode":"user_grant", + "label":"BETA label", + "name":"ohos.permission.BETA", + "provisionEnable":true + } + ], + "reqPermissions":[ + { + "name":"ohos.permission.ALPHA", + "reason":"use ohos.permission.ALPHA" + }, + { + "name":"ohos.permission.BETA", + "reason":"use ohos.permission.BETA" + }, + { + "name": "ohos.permission.KEEP_BACKGROUND_RUNNING", + "reason": "use ohos.permission.KEEP_BACKGROUND_RUNNING" + } + ] + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/default/app.js similarity index 97% rename from appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/app.js rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/default/app.js index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..c158442201abb1888ae8fb1d57f150c5ec26c36b 100644 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/app.js +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/default/app.js @@ -1,22 +1,22 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; +/* + * 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('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } +}; diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/default/i18n/en-US.json similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/i18n/en-US.json rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/default/i18n/en-US.json diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/i18n/zh-CN.json rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/default/i18n/zh-CN.json diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/default/pages/index/index.css similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/pages/index/index.css rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/default/pages/index/index.css diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/default/pages/index/index.hml similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/default/pages/index/index.hml rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/default/pages/index/index.hml diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/default/pages/index/index.js similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/pages/index/index.js rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/default/pages/index/index.js diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/resources/base/element/string.json similarity index 79% rename from appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/resources/base/element/string.json rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/resources/base/element/string.json index 765de60f53fa554bfcfe58f02a307f53278dcac6..42d35ea0b36004721fb7567ea02f97834d53e296 100644 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/resources/base/element/string.json +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/resources/base/element/string.json @@ -1,12 +1,12 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmsscenfive" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] +{ + "string": [ + { + "name": "app_name", + "value": "bmsfirstright" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] } \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/resources/base/media/icon.png similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/actsbundlemanageruninstall/entry/src/main/js/resources/base/media/icon.png rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfive/src/main/js/resources/base/media/icon.png diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/BUILD.gn similarity index 94% rename from appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/BUILD.gn rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/BUILD.gn index 696c55959e5c33b5b8fb3ff7fca4385d7b49626c..424238265f9edd30ba3eef38fcfbaf5853888177 100644 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/BUILD.gn +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/BUILD.gn @@ -12,9 +12,9 @@ # limitations under the License. import("//test/xts/tools/build/suite.gni") -ohos_hap("fourteenth_right") { +ohos_hap("bmsAccessTokenTest4") { hap_profile = "./src/main/config.json" - hap_name = "fourteenth_right" + hap_name = "bmsAccessTokenTest4" subsystem_name = XTS_SUITENAME final_hap_path = "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/Test.json similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/Test.json rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/Test.json diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/signature/openharmony_sx.p7b similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/signature/openharmony_sx.p7b rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/signature/openharmony_sx.p7b diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..20a8be88d6afb97d908179891434dc2576d85556 --- /dev/null +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/config.json @@ -0,0 +1,104 @@ +{ + "app": { + "bundleName": "com.example.bmsaccesstoken2", + "vendor": "example", + "version": { + "code": 1, + "name": "1.0" + }, + "apiVersion": { + "compatible": 5, + "target": 5, + "releaseType": "Beta1" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.example.bmsaccesstoken2", + "name": ".MyApplication1", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry" + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": ".MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "isVisible": "true", + "launchType": "standard", + "language": "C++", + "metaData": { + "customizeData": [ + { + "name": "originWidgetName", + "value": "com.weather.testWidget" + } + ] + } + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ], + "definePermissions":[ + { + "availableLevel":"normal", + "description":"ALPHA description", + "distributedSceneEnable":true, + "grantMode":"user_grant", + "label":"ALPHA label", + "name":"ohos.permission.ALPHA", + "provisionEnable":true + }, + { + "availableLevel":"normal", + "description":"BETA description", + "distributedSceneEnable":true, + "grantMode":"user_grant", + "label":"BETA label", + "name":"ohos.permission.BETA", + "provisionEnable":true + } + ], + "reqPermissions":[ + { + "name":"ohos.permission.ALPHA", + "reason":"use ohos.permission.ALPHA" + }, + { + "name":"ohos.permission.BETA", + "reason":"use ohos.permission.BETA" + }, + { + "name": "ohos.permission.KEEP_BACKGROUND_RUNNING", + "reason": "use ohos.permission.KEEP_BACKGROUND_RUNNING" + } + ] + } +} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/default/app.js similarity index 97% rename from appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/app.js rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/default/app.js index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..c158442201abb1888ae8fb1d57f150c5ec26c36b 100644 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/app.js +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/default/app.js @@ -1,22 +1,22 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; +/* + * 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('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } +}; diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/default/i18n/en-US.json similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/i18n/en-US.json rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/default/i18n/en-US.json diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/i18n/zh-CN.json rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/default/i18n/zh-CN.json diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/default/pages/index/index.css similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/pages/index/index.css rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/default/pages/index/index.css diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/default/pages/index/index.hml similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/default/pages/index/index.hml rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/default/pages/index/index.hml diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/default/pages/index/index.js similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/pages/index/index.js rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/default/pages/index/index.js diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/resources/base/element/string.json similarity index 79% rename from appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/resources/base/element/string.json rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/resources/base/element/string.json index 62d9a121bd83115eae4053dbb49df9db70383866..42d35ea0b36004721fb7567ea02f97834d53e296 100644 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/resources/base/element/string.json +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/resources/base/element/string.json @@ -1,12 +1,12 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmsscenseven" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] +{ + "string": [ + { + "name": "app_name", + "value": "bmsfirstright" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] } \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/resources/base/media/icon.png similarity index 100% rename from appexecfwk/bundle_standard/bundlemanager/actsbundlemgrmultipleinstalltest/entry/src/main/js/resources/base/media/icon.png rename to appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokenfour/src/main/js/resources/base/media/icon.png diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokentwo/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokentwo/src/main/config.json index 3ccb165a2eae63c6c3156cb08a261e1b194b3991..462b69a87de8c338bd00b04fff812637efe545d5 100644 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokentwo/src/main/config.json +++ b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsaccesstokentwo/src/main/config.json @@ -1,6 +1,6 @@ { "app": { - "bundleName": "com.example.bmsaccesstoken1", + "bundleName": "com.example.bmsaccesstoken2", "vendor": "example", "version": { "code": 1, @@ -14,7 +14,7 @@ }, "deviceConfig": {}, "module": { - "package": "com.example.bmsaccesstoken1", + "package": "com.example.bmsaccesstoken2", "name": ".MyApplication1", "deviceType": [ "phone" diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/BUILD.gn deleted file mode 100644 index 3e7f7467e00ab87df1410a0318b8b7bce4253696..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("eighth_right") { - hap_profile = "./src/main/config.json" - hap_name = "eighth_right" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/config.json deleted file mode 100644 index 759494e8fb17288504ab77e7ad13aa79f0f45767..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/config.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "app": { - "iconId": 33554436, - "apiVersion": { - "compatible": 4, - "releaseType": "Release", - "target": 5 - }, - "labelId": 33554432, - "vendor": "example", - "icon": "$media:icon", - "bundleName": "com.example.l3jsdemo", - "label": "$string:app_name", - "version": { - "code": 2000000, - "name": "1.0.1" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 33554435, - "descriptionId": 33554434, - "visible": true, - "labelId": 33554433, - "icon": "$media:icon", - "name": "com.example.l2jsdemo.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "homeAbility": false, - "launchType": "standard" - } - ], - "deviceType": [ - "tablet" - ], - "mainAbility": "com.example.l2jsdemo.MainAbility", - "distro": { - "moduleType": "feature", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "l2jsdemo" - }, - "package": "com.example.l2jsdemo", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/resources/base/element/string.json deleted file mode 100644 index 2008ad59f68f3bb7179f174c1a3ce49d3d789fb1..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmseighthright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseighthright/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/BUILD.gn deleted file mode 100644 index ac900911b5d8d7f9843531470e589cbc26ca71fa..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("eleventh_right") { - hap_profile = "./src/main/config.json" - hap_name = "eleventh_right" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/config.json deleted file mode 100644 index 2b2f60fed9ad5af8e9cee7deb299ecd9eb929066..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/config.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "app": { - "iconId": 33554436, - "apiVersion": { - "compatible": 4, - "releaseType": "Release", - "target": 5 - }, - "labelId": 33554432, - "vendor": "huawei", - "icon": "$media:icon", - "bundleName": "com.example.l3jsdemo", - "label": "$string:app_name", - "version": { - "code": 2000000, - "name": "2.0.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 33554435, - "descriptionId": 33554434, - "visible": true, - "labelId": 33554433, - "icon": "$media:icon", - "name": "com.example.l2jsdemo.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "homeAbility": false, - "launchType": "standard" - } - ], - "deviceType": [ - "tablet" - ], - "mainAbility": "com.example.l2jsdemo.MainAbility", - "distro": { - "moduleType": "feature", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "l2jsdemo" - }, - "package": "com.example.l2jsdemo", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/resources/base/element/string.json deleted file mode 100644 index 32db9f0361462130f46f3b8ae88b5717df5bbaef..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmseleventhright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmseleventhright/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/config.json deleted file mode 100644 index 2556bbcbc2593dab90d94eeeeaac629a07c66ac0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/config.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "app": { - "apiVersion": { - "compatible": 4, - "releaseType": "Release", - "target": 5 - }, - "vendor": "example", - "bundleName": "com.example.l3jsdemo", - "version": { - "code": 2000000, - "name": "2.0.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 16777218, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "descriptionId": 16777217, - "labelId": 16777216, - "icon": "$media:icon", - "name": "com.example.l3jsdemo.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "homeAbility": true, - "launchType": "standard" - } - ], - "deviceType": [ - "tablet" - ], - "mainAbility": "com.example.l3jsdemo.MainAbility", - "distro": { - "moduleType": "entry", - "installationFree": true, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.l1jsdemo", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/resources/base/element/string.json deleted file mode 100644 index 8fabfb10bf46b4ebb50d7283e87995a5b67ce8aa..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmsfifthright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfifthright/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/BUILD.gn deleted file mode 100644 index 34a5af0a5ae54998a2c8b0de179ecf03dc3c51f8..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("FirstRequestPermissions") { - hap_profile = "./src/main/config.json" - hap_name = "FirstRequestPermissions" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/config.json deleted file mode 100644 index ac42b49b5dc8ee00a0f4591bae0d376912787b48..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/config.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "app": { - "bundleName": "com.example.firstrequestpermissions", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.firstrequestpermissions", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.example.firstrequestpermissions.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard", - "permissions": ["ohos.permission.CAMERA"] - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ], - "reqPermissions": [ - { - "name": "com.permission.BMS_PERMISSIONCHANGE_U", - "reason": "Need PERMISSION_U", - "usedScene": { - "ability": [ - "com.example.firstrequestpermissions.MainAbility" - ], - "when": "always" - } - }, - { - "name": "com.permission.BMS_PERMISSIONCHANGE_V", - "reason": "Need PERMISSION_V", - "usedScene": { - "ability": [ - "com.example.firstrequestpermissions.MainAbility" - ], - "when": "always" - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/pages/index/index.css deleted file mode 100644 index ba0faefa766fc0bd6d401d034deaa693f2c9219e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,31 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} - -.button { - margin-top: 15px; - font-size:35px; - background-color: aqua; - text-color: black; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 160e128c9849bf44c636557748cbcbcf2ffafb8e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,22 +0,0 @@ - - -
- - {{ title }} - - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/pages/index/index.js deleted file mode 100644 index fce67f7ba75c4eb48e0c165cbff06cb143506833..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 featureAbility from '@ohos.ability.featureAbility' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = "Start First" - }, - onShow() { - }, - async reqPermission() { - var context = await featureAbility.getContext(); - context.requestPermissionsFromUser(["com.permission.BMS_PERMISSIONCHANGE_U", - "com.permission.BMS_PERMISSIONCHANGE_V"], 1, - (err, data) => { - console.log("RequestPermissionForUser:requestCode=" + data.requestCode); - for (var j = 0; j < data.permissions.length; j++) { - console.log("RequestPermissionForUser permissions : " + data.permissions[j]); - } - - for (var j = 0; j < data.grantResults.length; j++) { - console.log("RequestPermissionForUser grantResults : " + data.grantResults[j]); - } - }); - }, -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/resources/base/element/string.json deleted file mode 100644 index 268d71aef5ab970d472fcab46012605fdfc1590f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "firstrequestpermission" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfirstrequestpermissions/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/config.json deleted file mode 100644 index 151bb0ffa2114ccb71d5e499f92ffb582bc4ed50..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/config.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "app": { - "apiVersion": { - "compatible": 4, - "releaseType": "Release", - "target": 5 - }, - "vendor": "example", - "bundleName": "com.example.l3jsdemo", - "version": { - "code": 3000000, - "name": "3.0.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 16777218, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "descriptionId": 16777217, - "labelId": 16777216, - "icon": "$media:icon", - "name": "com.example.l3jsdemo.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "homeAbility": true, - "launchType": "standard" - } - ], - "deviceType": [ - "tablet" - ], - "mainAbility": "com.example.l3jsdemo.MainAbility", - "distro": { - "moduleType": "entry", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.l3jsdemo", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/resources/base/element/string.json deleted file mode 100644 index 154c9fd962764a1aa4145170bac551b9201fe5c5..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmsfourteenthright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourteenthright/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/BUILD.gn deleted file mode 100644 index dbf733663184783f28754813fdfa49718fa3f2ae..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("fourth_right") { - hap_profile = "./src/main/config.json" - hap_name = "fourth_right" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/config.json deleted file mode 100644 index 80341fe83ff7c745a489590a3b11f0e9a5fa15fd..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/config.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "app": { - "iconId": 33554436, - "apiVersion": { - "compatible": 4, - "releaseType": "Release", - "target": 5 - }, - "labelId": 33554432, - "vendor": "example", - "icon": "$media:icon", - "bundleName": "com.example.l3jsdemo", - "label": "$string:app_name", - "version": { - "code": 3000000, - "name": "2.0.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 33554435, - "descriptionId": 33554434, - "visible": true, - "labelId": 33554433, - "icon": "$media:icon", - "name": "com.example.l2jsdemo.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "homeAbility": false, - "launchType": "standard" - } - ], - "deviceType": [ - "tablet" - ], - "mainAbility": "com.example.l2jsdemo.MainAbility", - "distro": { - "moduleType": "feature", - "installationFree": true, - "deliveryWithInstall": true, - "moduleName": "l2jsdemo" - }, - "package": "com.example.l2jsdemo", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/resources/base/element/string.json deleted file mode 100644 index 948bdc6cc5fe4bfa1a39868efef872ef64f8966b..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmsfourthright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsfourthright/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/BUILD.gn deleted file mode 100644 index 3212864f9e9256650d62f946e4308a99462b47f8..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("bmsSystemBundleTest2Feature") { - hap_profile = "./src/main/config.json" - hap_name = "bmsSystemBundleTest2Feature" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/signature/openharmony_sx.p7b deleted file mode 100755 index 9be1e98fa4c0c28ca997ed660112fa16b194f0f5..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/config.json deleted file mode 100644 index 0fd6bb419733da0ab9a3e5b27e15a068d6f4efd0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/config.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "app": { - "bundleName": "com.example.system2", - "vendor": "example", - "singleUser":true, - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": { - "default":{ - "keepAlive":true - } - }, - "module": { - "package": "com.example.system.feature", - "name": ".system2feature", - "mainAbility": "com.example.system2.MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "systemFeature", - "moduleType": "feature" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.example.system2.MainAbilityB", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/element/string.json deleted file mode 100644 index 8abf35edcac1a14aba258130c1ace4d237188ee7..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "system2" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - }, - { - "name": "shortcut", - "value": "JS_Phone_Empty Shortcut" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemfeature/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/BUILD.gn deleted file mode 100644 index 2669e011c1c7ce8f382ca821d1ed29d2a4e0c715..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("bmsSystemBundleTest2Update") { - hap_profile = "./src/main/config.json" - hap_name = "bmsSystemBundleTest2Update" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/signature/openharmony_sx.p7b deleted file mode 100755 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/config.json deleted file mode 100644 index 704050bee7a5b131c060b22cc787dfcae540342c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/config.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "app": { - "bundleName": "com.example.system2", - "vendor": "example", - "singleUser":true, - "version": { - "code": 5, - "name": "5.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": { - "default":{ - "keepAlive":true - } - }, - "module": { - "package": "com.example.system2", - "name": ".BmsSystemBundle1", - "mainAbility": "com.example.system2.MainAbility", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.example.system2.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/element/string.json deleted file mode 100644 index 56a8d952c81f3f6c0bee12a1fc212218d10cc1ca..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "upsystem" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - }, - { - "name": "shortcut", - "value": "JS_Phone_Empty Shortcut" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsgetinfosscenesystemupdate/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/BUILD.gn deleted file mode 100644 index 49c1315a041acce469d4e6f61792d3d1d4ded13b..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("ninth_right") { - hap_profile = "./src/main/config.json" - hap_name = "ninth_right" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/config.json deleted file mode 100644 index 9bdc606158e8125631dba4363139107d253e44cc..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/config.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "app": { - "iconId": 33554436, - "apiVersion": { - "compatible": 4, - "releaseType": "Release", - "target": 6 - }, - "labelId": 33554432, - "vendor": "example", - "icon": "$media:icon", - "bundleName": "com.example.l3jsdemo", - "label": "$string:app_name", - "version": { - "code": 2000000, - "name": "2.0.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 33554435, - "descriptionId": 33554434, - "visible": true, - "labelId": 33554433, - "icon": "$media:icon", - "name": "com.example.l2jsdemo.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "homeAbility": false, - "launchType": "standard" - } - ], - "deviceType": [ - "tablet" - ], - "mainAbility": "com.example.l2jsdemo.MainAbility", - "distro": { - "moduleType": "feature", - "installationFree": true, - "deliveryWithInstall": true, - "moduleName": "l2jsdemo" - }, - "package": "com.example.l2jsdemo", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/resources/base/element/string.json deleted file mode 100644 index 72d179ce06a70a5f2ca8ec2477a66d18c72a976e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmsninthright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsninthright/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/BUILD.gn deleted file mode 100644 index ddcb136a9787ef55af5384f6075b026d6fab1335..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("bmsJstest8") { - hap_profile = "./src/main/config.json" - hap_name = "bmsJstest8" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/signature/openharmony_sx.p7b deleted file mode 100755 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/config.json deleted file mode 100644 index e7c204192295a644e9ee7e8098c2f7707c1a522a..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/config.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "app": { - "bundleName": "com.example.third1", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.third1", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.example.third1.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "forms": [ - { - "colorMode": "light", - "description": " JS1 Form", - "supportDimensions": [ "1*2", "2*2", "2*4" ], - "type": "JS", - "jsComponentName": "JS_name1", - "metaData": { - "customizeData": [ - { - "name": "originWidgetName1", - "value": "com.openharmony.weather.testWidget1" - } - ] - }, - "isDefault": true, - "deepLink": "ability://com.example.myapplication.fa/.MainAbility", - "defaultDimension": "1*2", - "name": "Form_JS1", - "scheduledUpateTime": "21:55", - "updateEnabled": true, - "updateDuration": 1 - } - ], - "launchType": "standard", - "visible": true, - "metaData": { - "parameters": [{ - "name": "Data1", - "type": "float", - "description": "$string:mainability_description" - }], - "results": [{ - "name": "Data1", - "type": "float", - "description": "$string:mainability_description" - }], - "customizeData": [{ - "name": "Data1", - "value": "float", - "extra": "$string:mainability_description" - }] - } - } - ], - "shortcuts": [ - { - "icon": "$media:icon", - "shortcutId": "id.third1", - "label": "$string:app_name", - "intents": [ - { - "targetClass":"com.example.third1.MainAbility", - "targetBundle":"com.example.third1" - } - ] - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/app.js deleted file mode 100755 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/pages/index/index.js deleted file mode 100644 index a2ff58470a93d145ec2da6f0c58ef486b9cbd08d..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 commonEvent from '@ohos.commonevent' -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -function PublishCallBackOne() { - console.debug("====>Publish CallBack Third1_Publish_CommonEvent====>"); -} -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - }, - onShow() { - commonEvent.publish("Third1_Publish_CommonEvent", PublishCallBackOne); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/resources/base/element/string.json deleted file mode 100644 index 14de079ccdb69ee914ba212fd6586880ce86a582..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmssceneeight" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneeight/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/BUILD.gn deleted file mode 100644 index 16631f9e879a1688158c4f5ad2bd1bda541c716f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("bmsJstest9") { - hap_profile = "./src/main/config.json" - hap_name = "bmsJstest9" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/signature/openharmony_sx.p7b deleted file mode 100755 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/config.json deleted file mode 100644 index 5dbdecb146794f57829444c56347421fb2562368..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/config.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "app": { - "bundleName": "com.example.third1", - "vendor": "example", - "version": { - "code": 2, - "name": "2.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.third1", - "name": "com.example.third1.MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.example.third1.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "forms": [ - { - "colorMode": "light", - "description": " JSA1 Form", - "supportDimensions": [ "2*2", "2*4" ], - "type": "JS", - "jsComponentName": "JS_nameA1", - "metaData": { - "customizeData": [ - { - "name": "originWidgetNameA1", - "value": "com.openharmony.weather.testWidgetA1" - } - ] - }, - "isDefault": true, - "deepLink": "ability://com.example.myapplication.fa/.MainAbility", - "defaultDimension": "1*2", - "name": "Form_JSA1", - "scheduledUpateTime": "21:55", - "updateEnabled": true, - "updateDuration": 1 - } - ], - "launchType": "standard", - "metaData": { - "parameters": [{ - "name": "DataA1", - "type": "float", - "description": "$string:mainability_description" - }], - "results": [{ - "name": "DataA1", - "type": "float", - "description": "$string:mainability_description" - }], - "customizeData": [{ - "name": "DataA1", - "value": "float", - "extra": "$string:mainability_description" - }] - } - } - ], - "shortcuts": [ - { - "icon": "$media:icon", - "shortcutId": "id.thirdA1", - "label": "$string:app_name", - "intents": [ - { - "targetClass":"com.example.third1.MainAbility", - "targetBundle":"com.example.third1" - } - ] - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/app.js deleted file mode 100755 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/pages/index/index.js deleted file mode 100644 index 2bbeb831276190a9fe5e7d7fd99ab24ad2bbd9e0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "publish_event0100" - }, - onInit() { - this.title = "publish_event0100"; - }, -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/resources/base/element/string.json deleted file mode 100644 index a1d22c0cde826169dcfb33538ab56e7842d38575..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmsscenenine" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsscenenine/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/BUILD.gn deleted file mode 100644 index e24e97b7742279b1e502c222e46372a3f2297399..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("bmsJstest7") { - hap_profile = "./src/main/config.json" - hap_name = "bmsJstest7" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/signature/openharmony_sx.p7b deleted file mode 100755 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/config.json deleted file mode 100644 index 506c87b97d8e415653313f1897ec5baf54da8ddc..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/config.json +++ /dev/null @@ -1 +0,0 @@ -{"app": {"apiVersion": {"compatible": 5,"releaseType": "Beta1","target": 5},"vendor": "example","bundleName": "com.example.napi_test_suite10","version": {"code": 1,"name": "1.0"}},"deviceConfig": {"default": {"debug": true}},"module": {"abilities": [{"iconId": 16777218,"skills": [{"entities": ["entity.system.home","flag.home.intent.from.system"],"actions": ["action.system.home"]}],"descriptionId": 16777217,"labelId": 16777216,"icon": "$media:icon","name": "com.example.napi_test_suite.MainAbility","description": "$string:mainability_description","label": "$string:app_name","type": "page","launchType": "standard"}],"deviceType": ["phone"],"distro": {"moduleType": "entry","deliveryWithInstall": true,"moduleName": "entry"},"package": "com.example.napi_test_suite","defPermissions": [{"availableScope": ["signature"],"grantMode": "system_grant","name": "com.permission.CAMERA","description": "CAMERA permission in detail","label": "CAMERA permission"},{"availableScope": ["signature"],"grantMode": "system_grant","name": "com.permission.music","description": "music permission in detail","label": "music permission"},{"availableScope": ["signature"],"grantMode": "system_grant","name": "com.permission.WeChat","description": "WeChat permission in detail","label": "WeChat permission"}],"name": ".MyApplication","js": [{"pages": ["pages/index/index"],"name": "default","window": {"designWidth": 720,"autoDesignWidth": false}}]}} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/app.js deleted file mode 100755 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssceneseven/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/BUILD.gn deleted file mode 100644 index 106f552e1840917680df7034477553fca8818bcc..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("second_backup_right") { - hap_profile = "./src/main/config.json" - hap_name = "second_backup_right" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/config.json deleted file mode 100644 index 2ab33613f033f123e0d8c65a67c2ef0c55a5ffac..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/config.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "app": { - "iconId": 33554436, - "apiVersion": { - "compatible": 4, - "releaseType": "Release", - "target": 5 - }, - "labelId": 33554432, - "vendor": "example", - "icon": "$media:icon", - "bundleName": "com.example.l3jsdemo", - "label": "$string:app_name", - "version": { - "code": 2000000, - "name": "2.0.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 33554435, - "descriptionId": 33554434, - "visible": true, - "labelId": 33554433, - "icon": "$media:icon", - "name": "com.example.l2jsdemo.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "homeAbility": false, - "launchType": "standard" - } - ], - "deviceType": [ - "tablet" - ], - "mainAbility": "com.example.l2jsdemo.MainAbility", - "distro": { - "moduleType": "feature", - "installationFree": true, - "deliveryWithInstall": true, - "moduleName": "l2jsdemo" - }, - "package": "com.example.l2jsdemo", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/resources/base/element/string.json deleted file mode 100644 index a8e0d78256161dd977ef251e3fd0d7f5621ed24e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmssecondbackupright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondbackupright/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/BUILD.gn deleted file mode 100644 index d78d0fc777d20579b89d0f41c3e7b3f1d82ed919..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("SecondRequestPermissions") { - hap_profile = "./src/main/config.json" - hap_name = "SecondRequestPermissions" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/config.json deleted file mode 100644 index 38f80ae1a5d23e9868ecc08b2f9bb68429023017..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/config.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "app": { - "bundleName": "com.example.secondrequestpermissions", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Beta1" - } - }, - "deviceConfig": {}, - "module": { - "package": "com.example.secondrequestpermissions", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry" - }, - "abilities": [ - { - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "com.example.secondrequestpermissions.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard" - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ], - "reqPermissions": [ - { - "name": "com.permission.BMS_PERMISSIONCHANGE_W", - "reason": "Need PERMISSIONCHANGE W", - "usedScene": { - "ability": [ - "com.example.secondrequestpermissions.MainAbility" - ], - "when": "always" - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/pages/index/index.css deleted file mode 100644 index dfceb2563512fd1b8853b9f0703fc1b6bc02dab4..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,31 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} - -.button { - margin-top: 15px; - font-size:35px; - background-color: aqua; - text-color: black; -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 65cb5afb5514dcbf624825a7dce25718c49d1603..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,21 +0,0 @@ - - -
- - {{ title }} - - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/pages/index/index.js deleted file mode 100644 index be70e7571888d2a8709f565b2c83d009180249e7..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 featureAbility from '@ohos.ability.featureAbility' - -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') -export default { - data: { - title: "" - }, - onInit() { - this.title = "Start Second"; - }, - onShow() {}, - async reqPermission() - { - var context = await featureAbility.getContext(); - context.requestPermissionsFromUser(["com.permission.BMS_PERMISSIONCHANGE_W"], 1, - (err, data)=>{ - console.log("RequestPermissionForUser:requestCode=" + data.requestCode); - for(var j = 0; j < data.permissions.length; j++) { - console.log("RequestPermissionForUser permissions : " + data.permissions[j]); - } - - for(var j = 0; j < data.grantResults.length; j++) { - console.log("RequestPermissionForUser grantResults : " + data.grantResults[j]); - } - }); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/resources/base/element/string.json deleted file mode 100644 index 40a792e03f62e897befad23d80e6a9e7a29cfa5c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "secondrequestpermission" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssecondrequestpermissions/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/BUILD.gn deleted file mode 100644 index d4c8429194686f9097d7bdaec7c4ff98431d6f7e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("sixteenth_right") { - hap_profile = "./src/main/config.json" - hap_name = "sixteenth_right" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/config.json deleted file mode 100644 index a47d547f2d6fbd7726e815413f93a6968bc14e07..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/config.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "app": { - "iconId": 33554436, - "apiVersion": { - "compatible": 4, - "releaseType": "Release", - "target": 5 - }, - "labelId": 33554432, - "vendor": "example", - "icon": "$media:icon", - "bundleName": "com.example.l3jsdemo", - "label": "$string:app_name", - "version": { - "code": 3000000, - "name": "3.0.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 33554435, - "descriptionId": 33554434, - "visible": true, - "labelId": 33554433, - "icon": "$media:icon", - "name": "com.example.l1jsdemo.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "homeAbility": false, - "launchType": "standard" - } - ], - "deviceType": [ - "tablet" - ], - "mainAbility": "com.example.l1jsdemo.MainAbility", - "distro": { - "moduleType": "feature", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "l1jsdemo" - }, - "package": "com.example.l1jsdemo", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/resources/base/element/string.json deleted file mode 100644 index 39988d5508ab29bc0157534ab41f8665c69883c8..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmssixteenthright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixteenthright/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/BUILD.gn deleted file mode 100644 index cadc6611391934097a29f343e0e372d8ee1dba47..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("sixth_right") { - hap_profile = "./src/main/config.json" - hap_name = "sixth_right" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/config.json deleted file mode 100644 index 7cfcf7262d251fbe393f6c47121e20f63137b00b..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/config.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "app": { - "iconId": 33554436, - "apiVersion": { - "compatible": 4, - "releaseType": "Release", - "target": 5 - }, - "labelId": 33554432, - "vendor": "example", - "icon": "$media:icon", - "bundleName": "com.example.l3jsdemo", - "label": "$string:app_name", - "version": { - "code": 3000000, - "name": "3.0.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 33554435, - "descriptionId": 33554434, - "visible": true, - "labelId": 33554433, - "icon": "$media:icon", - "name": "com.example.l2jsdemo.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "homeAbility": false, - "launchType": "standard" - } - ], - "deviceType": [ - "tablet" - ], - "mainAbility": "com.example.l2jsdemo.MainAbility", - "distro": { - "moduleType": "feature", - "installationFree": true, - "deliveryWithInstall": true, - "moduleName": "l2jsdemo" - }, - "package": "com.example.l2jsdemo", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/resources/base/element/string.json deleted file mode 100644 index 7123cbbc0f63e957e1d89e993a33865095415589..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmssixthright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmssixthright/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/BUILD.gn deleted file mode 100644 index 35fc3f788367b5ba01e95b96cda76e2eda448dab..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("tenth_right") { - hap_profile = "./src/main/config.json" - hap_name = "tenth_right" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/config.json deleted file mode 100644 index b957787e4c810174a3b00f0cbf35156e1e991474..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/config.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "app": { - "iconId": 33554436, - "apiVersion": { - "compatible": 5, - "releaseType": "Release", - "target": 5 - }, - "labelId": 33554432, - "vendor": "example", - "icon": "$media:icon", - "bundleName": "com.example.l3jsdemo", - "label": "$string:app_name", - "version": { - "code": 2000000, - "name": "2.0.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 33554435, - "descriptionId": 33554434, - "visible": true, - "labelId": 33554433, - "icon": "$media:icon", - "name": "com.example.l2jsdemo.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "homeAbility": false, - "launchType": "standard" - } - ], - "deviceType": [ - "tablet" - ], - "mainAbility": "com.example.l2jsdemo.MainAbility", - "distro": { - "moduleType": "feature", - "installationFree": true, - "deliveryWithInstall": true, - "moduleName": "l2jsdemo" - }, - "package": "com.example.l2jsdemo", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/resources/base/element/string.json deleted file mode 100644 index a0da92dc23450f77db0b082d19a020b26343054e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmstenthright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstenthright/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/BUILD.gn deleted file mode 100644 index 682627d96fcf3f76c33f9450e4357e4b3928eb64..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("third_right") { - hap_profile = "./src/main/config.json" - hap_name = "third_right" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/config.json deleted file mode 100644 index 08830bb444c77a7f31831ae6ffbaed3563131a2e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/config.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "app": { - "apiVersion": { - "compatible": 4, - "releaseType": "Release", - "target": 5 - }, - "vendor": "example", - "bundleName": "com.example.heiheiApplication", - "version": { - "code": 1000000, - "name": "1.0.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 16777218, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "descriptionId": 16777217, - "labelId": 16777216, - "icon": "$media:icon", - "name": "com.example.heiheiApplication.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "homeAbility": true, - "launchType": "standard" - } - ], - "deviceType": [ - "phone", - "tablet", - "tv", - "wearable" - ], - "mainAbility": "com.example.heiheiApplication.MainAbility", - "distro": { - "moduleType": "entry", - "installationFree": true, - "deliveryWithInstall": true, - "moduleName": "entry" - }, - "package": "com.example.heihei", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index", - "pages/index/details/details" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/resources/base/element/string.json deleted file mode 100644 index 7be54a0326d049c671392674c10b0c4e3b418448..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmsthirdright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirdright/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/BUILD.gn deleted file mode 100644 index dfe51e1e985fdffeee4cd7441fa2234655f63258..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("thirteenth_right") { - hap_profile = "./src/main/config.json" - hap_name = "thirteenth_right" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/config.json deleted file mode 100644 index fbdc95b9fada1e9412e0917acc62353f5ddf9bba..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/config.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "app": { - "iconId": 33554436, - "apiVersion": { - "compatible": 4, - "releaseType": "Release", - "target": 5 - }, - "labelId": 33554432, - "vendor": "example", - "icon": "$media:icon", - "bundleName": "com.example.l3jsdemo", - "label": "$string:app_name", - "version": { - "code": 1000000, - "name": "1.0.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 33554435, - "descriptionId": 33554434, - "visible": true, - "labelId": 33554433, - "icon": "$media:icon", - "name": "com.example.l1jsdemo.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "homeAbility": false, - "launchType": "standard" - } - ], - "deviceType": [ - "tablet" - ], - "mainAbility": "com.example.l1jsdemo.MainAbility", - "distro": { - "moduleType": "feature", - "installationFree": true, - "deliveryWithInstall": true, - "moduleName": "l1jsdemo" - }, - "package": "com.example.l1jsdemo", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmsthirteenthright/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/BUILD.gn deleted file mode 100644 index bc867d6c38ec872f51711ec1b56718882fc09690..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# 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_hap("twelfth_right") { - hap_profile = "./src/main/config.json" - hap_name = "twelfth_right" - subsystem_name = XTS_SUITENAME - final_hap_path = - "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "./signature/openharmony_sx.p7b" -} -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/Test.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/Test.json deleted file mode 100644 index 7a88763ed8d2ac31dd30211b9574f47273e84549..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/Test.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "description": "Configuration for hjunit demo Tests", -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/signature/openharmony_sx.p7b b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/signature/openharmony_sx.p7b deleted file mode 100644 index 66b4457a8a81fb8d3356cf46d67226c850944858..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/signature/openharmony_sx.p7b and /dev/null differ diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/config.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/config.json deleted file mode 100644 index b75b9cdcd9831dbe581c589e898db9df7ab4e09e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/config.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "app": { - "iconId": 33554436, - "apiVersion": { - "compatible": 4, - "releaseType": "Release", - "target": 5 - }, - "labelId": 33554432, - "vendor": "example", - "icon": "$media:icon", - "bundleName": "com.example.l3jsdemo", - "label": "$string:app_name", - "version": { - "code": 2000000, - "name": "2.0.0" - } - }, - "deviceConfig": { - "default": { - "debug": true - } - }, - "module": { - "abilities": [ - { - "iconId": 33554435, - "descriptionId": 33554434, - "visible": true, - "labelId": 33554433, - "icon": "$media:icon", - "name": "com.example.l1jsdemo.MainAbility", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "homeAbility": false, - "launchType": "standard" - } - ], - "deviceType": [ - "tablet" - ], - "mainAbility": "com.example.l1jsdemo.MainAbility", - "distro": { - "moduleType": "feature", - "installationFree": false, - "deliveryWithInstall": true, - "moduleName": "l1jsdemo" - }, - "package": "com.example.l1jsdemo", - "name": ".MyApplication", - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/app.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/app.js deleted file mode 100644 index 2a68c1992145a976957d7dcdd69a7e9c2e8e9877..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/app.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/i18n/en-US.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/i18n/en-US.json deleted file mode 100644 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/i18n/zh-CN.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/i18n/zh-CN.json deleted file mode 100644 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/pages/index/index.css b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/pages/index/index.css deleted file mode 100644 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/pages/index/index.hml b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/pages/index/index.hml deleted file mode 100644 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/pages/index/index.js b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/pages/index/index.js deleted file mode 100644 index 23ac44c8d392bb6b777ebae8c8a6f17bfff13f83..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/resources/base/element/string.json b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/resources/base/element/string.json deleted file mode 100644 index df46e92017823a52b0931a9f747505d147ea3bd6..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "app_name", - "value": "bmstwelfthright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/resources/base/media/icon.png b/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/resources/base/media/icon.png deleted file mode 100644 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/appexecfwk/bundle_standard/bundlemanager/sceneProject/bmstwelfthright/src/main/js/resources/base/media/icon.png and /dev/null differ