提交 5ba60fa0 编写于 作者: I inter515

删除辅助demo'

Signed-off-by: Ninter515 <ry.renyi@huawei.com>
上级 91f1d6e3
......@@ -29,13 +29,9 @@ group("bundlemanager") {
"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/bmsaccesstokenfour:bmsAccessTokenTest4",
"sceneProject/bmsaccesstokenfive:bmsAccessTokenTest5",
"sceneProject/bmsfirstright:first_right",
"sceneProject/bmsfourteenthright:fourteenth_right",
"sceneProject/bmsfourthright:fourth_right",
"sceneProject/bmsgetinfosfifthscene:bmsThirdBundleTest5",
"sceneProject/bmsgetinfosfirstscene:bmsThirdBundleTest1",
"sceneProject/bmsgetinfosfirstsceneupdate:bmsThirdBundleTestA1",
......@@ -43,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",
"sceneProject/bmssecondright:second_right"
]
}
}
......@@ -177,22 +177,4 @@ describe('ActsBmsAccessTokenTest', function () {
});
});
/**
* @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) {
await bundle.getApplicationInfo(BUNDLE_NAME2, bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION)
.then((applicationInfo) => {
console.info("bms_AccessTokenId_0800 accessTokenId: " + applicationInfo.accessTokenId);
expect(applicationInfo.name).assertEqual(BUNDLE_NAME2);
expect(applicationInfo.accessTokenId).assertLarger(0);
done();
}).catch((err) => {
expect(err).assertFail();
done();
});
});
});
......@@ -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
......
......@@ -32,8 +32,6 @@
"bmsThirdBundleTest4.hap->/data/test/bmsThirdBundleTest4.hap",
"bmsThirdBundleTest5.hap->/data/test/bmsThirdBundleTest5.hap",
"bmsThirdBundleTest6.hap->/data/test/bmsThirdBundleTest6.hap",
"bmsThirdBundleTest7.hap->/data/test/bmsThirdBundleTest7.hap",
"bmsThirdBundleTest7A.hap->/data/test/bmsThirdBundleTest7A.hap",
"bmsThirdBundleTestA1.hap->/data/test/bmsThirdBundleTestA1.hap",
"bmsSystemBundleTest2.hap->/data/test/bmsSystemBundleTest2.hap"
]
......@@ -47,8 +45,6 @@
"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/bmsThirdBundleTest7.hap",
"bm install -p /data/test/bmsThirdBundleTest7A.hap",
"bm install -p /data/test/bmsSystemBundleTest2.hap"
],
"teardown-command":[
......@@ -57,7 +53,6 @@
"bm uninstall -n com.example.third4",
"bm uninstall -n com.example.third5",
"bm uninstall -n com.example.third6",
"bm uninstall -n com.example.third7",
"bm uninstall -n com.example.system2",
"rm -rf /data/test/"
]
......
......@@ -21,14 +21,12 @@ const BUNDLE_NAME2 = 'com.example.third2';
const BUNDLE_NAME4 = 'com.example.third4';
const BUNDLE_NAME5 = 'com.example.third5';
const BUNDLE_NAME6 = 'com.example.third6';
const BUNDLE_NAME7 = 'com.example.third7';
const ABILITIY_NAME1 = "com.example.third5.MainAbilityA";
const ABILITIY_NAME2 = "com.example.third5.MainAbilityB";
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.third7.AMainAbilityA";
const NUM_TWO = 2;
const NUM_THREE = 3;
const NUM_FOUR = 4;
......@@ -204,28 +202,4 @@ describe('ActsBmsGetBackGroundModes', function () {
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 dataInfos = await bundle.queryAbilityByWant({
action: 'action.system.home',
entities: ['entity.system.home'],
elementName: {
deviceId: '0',
bundleName: BUNDLE_NAME7,
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);
}
done();
});
})
\ No newline at end of file
......@@ -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"
]
......@@ -39,14 +37,11 @@
"chmod 644 /data/test/*.hap",
"bm install -p /data/test/bmsMainAbilityFirstScene.hap",
"bm install -p /data/test/bmsMainAbilitySecondScene.hap",
"bm install -p /data/test/bmsThirdBundleTest1.hap",
"bm install -p /data/test/bmsThirdBundleTest2.hap",
"bm install -p /data/test/bmsThirdBundleTest5.hap",
"bm install -p /data/test/bmsThirdBundleTestA1.hap"
"bm install -p /data/test/bmsThirdBundleTest5.hap"
],
"teardown-command":[
"bm uninstall -n com.example.third2",
"bm uninstall -n com.example.third1",
"bm uninstall -n com.example.third5",
"bm uninstall -n com.example.bmsmainabilityfirstscene",
"rm -rf /data/test/"
......
......@@ -19,7 +19,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
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';
......@@ -170,44 +169,6 @@ describe('ActsBmsHapModuleTest', function () {
});
});
/*
* @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 dataInfo = await bundle.getBundleInfo(BUNDLE_NAME4, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES);
bundle.getBundleInfo(BUNDLE_NAME4, bundle.BundleFlag.GET_BUNDLE_WITH_ABILITIES, callback);
function callback(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.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.third1.AMainAbility");
expect(hapModuleInfo.mainElementName).assertEqual("com.example.third1.AMainAbility");
expect(hapModuleInfo.abilityInfo.length).assertLarger(0);
expect(hapModuleInfo.colorMode).assertEqual(0);
expect(hapModuleInfo.extensionAbilityInfo.length).assertEqual(0);
expect(hapModuleInfo.metadata.length).assertEqual(0);
expect(hapModuleInfo.installationFree).assertEqual(false);
done();
}
}
});
/*
* @tc.number: bms_getHapModuleInfo_0600
* @tc.name: get hapModuleInfo from the system through getBundleInfo
......
......@@ -29,9 +29,7 @@
"bmsThirdBundleTest1.hap->/data/test/bmsThirdBundleTest1.hap",
"bmsThirdBundleTest5.hap->/data/test/bmsThirdBundleTest5.hap",
"bmsSystemBundleTest1.hap->/data/test/bmsSystemBundleTest1.hap",
"bmsVendorBundleTest1.hap->/data/test/bmsVendorBundleTest1.hap",
"bmsThirdBundleTest7.hap->/data/test/bmsThirdBundleTest7.hap",
"bmsThirdBundleTest7A.hap->/data/test/bmsThirdBundleTest7A.hap"
"bmsVendorBundleTest1.hap->/data/test/bmsVendorBundleTest1.hap"
]
},
{
......@@ -40,16 +38,13 @@
"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",
"bm install -p /data/test/bmsThirdBundleTest7.hap",
"bm install -p /data/test/bmsThirdBundleTest7A.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",
"bm uninstall -n com.example.third7",
"rm -rf /data/test/"
]
}
......
......@@ -16,30 +16,17 @@
import bundle from '@ohos.bundle'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
const BUNDLE_PATH1 = ['/data/test/bmsThirdBundleTest1.hap'];
const BUNDLE_PATH2 = ['/data/test/bmsThirdBundleTestA1.hap'];
const BUNDLE_PATH3 = ['/data/test/bmsThirdBundleTest5.hap'];
const BUNDLE_PATH4 = ['/data/test/bmsSystemBundleTest1.hap'];
const BUNDLE_PATH5 = ['/data/test/bmsVendorBundleTest1.hap'];
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 BUNDLE_NAME6 = 'com.example.third7';
const ABILITY_NAME1 = 'com.example.third1.MainAbility';
const ABILITY_NAME2 = 'com.example.third1.AMainAbility';
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 ABILITY_NAME7 = 'com.example.third7.AMainAbility';
const USERID = 100;
const INSTALLPARAM = {
userId: 100,
installFlag: 1,
isKeepData: false
};
describe('ActsBmsMetaDataTest', function () {
......@@ -66,29 +53,6 @@ describe('ActsBmsMetaDataTest', function () {
});
});
/*
* @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) {
await bundle.queryAbilityByWant(
{
"bundleName": BUNDLE_NAME6,
"abilityName": ABILITY_NAME7
}, 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("DataA1");
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_0400
* @tc.name: test to get meta data for an application.
......
......@@ -12,9 +12,9 @@
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_hap("eighth_right") {
ohos_hap("bmsAccessTokenTest5") {
hap_profile = "./src/main/config.json"
hap_name = "eighth_right"
hap_name = "bmsAccessTokenTest5"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
......
{
"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"
}
}
]
}
{
"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
/*
* 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');
}
};
{
"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
......@@ -12,9 +12,9 @@
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_hap("fifth_right") {
ohos_hap("bmsAccessTokenTest4") {
hap_profile = "./src/main/config.json"
hap_name = "fifth_right"
hap_name = "bmsAccessTokenTest4"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
......
{
"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"
}
}
]
}
{
"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
/*
* 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');
}
};
{
"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
{
"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"
......
{
"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
{
"string": [
{
"name": "app_name",
"value": "bmseighthright"
},
{
"name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
# 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"
}
{
"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
/*
* 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');
}
};
{
"string": [
{
"name": "app_name",
"value": "bmseleventhright"
},
{
"name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
{
"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
{
"strings": {
"hello": "Hello",
"world": "World"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
}
}
\ No newline at end of file
/*
* 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;
}
<!--
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.
-->
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
/*
* 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');
}
}
{
"string": [
{
"name": "app_name",
"value": "bmsfifthright"
},
{
"name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
# 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"
}
/*
* 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) 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;
}
<!--
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.
-->
<div class="container">
<text class="title">
{{ title }}
</text>
<button class="button" type="capsule" value="申请权限" onclick="reqPermission">
</button>
</div>
/*
* 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]);
}
});
},
}
{
"string": [
{
"name": "app_name",
"value": "firstrequestpermission"
},
{
"name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
# 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("fourteenth_right") {
hap_profile = "./src/main/config.json"
hap_name = "fourteenth_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"
}
{
"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
/*
* 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');
}
};
{
"strings": {
"hello": "您好",
"world": "世界"
}
}
\ No newline at end of file
/*
* 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;
}
<!--
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.
-->
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
/*
* 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');
}
}
{
"string": [
{
"name": "app_name",
"value": "bmsfourteenthright"
},
{
"name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
# 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"
}
{
"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
/*
* 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');
}
};
{
"strings": {
"hello": "Hello",
"world": "World"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
}
}
\ No newline at end of file
/*
* 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;
}
<!--
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.
-->
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
/*
* 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');
}
}
{
"string": [
{
"name": "app_name",
"value": "bmsfourthright"
},
{
"name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
# 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"
}
{
"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
/*
* 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) 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;
}
<!--
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.
-->
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
/*
* 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');
}
}
{
"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
# 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"
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册