未验证 提交 580f9484 编写于 作者: O openharmony_ci 提交者: Gitee

!1549 add 多hap安装 xts用例

Merge pull request !1549 from Lotol/master
......@@ -27,7 +27,14 @@ group("bundlemanager") {
"actsbmsmoduleusagerecordtest:ActsBmsModuleUsageRecordTest",
"actsbundlemanagertest:ActsBundleManagerTest",
"actsbundlemanageruninstall:ActsBundleManagerUninstallTest",
"actsbundlemgrmultipleinstalltest:ActsBundleMgrMultipleInstallTest",
"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",
......@@ -44,6 +51,7 @@ group("bundlemanager") {
"sceneProject/bmsgetinfosthirdscene:bmsThirdBundleTest3",
"sceneProject/bmsmainabilityfirstscene:bmsMainAbilityFirstScene",
"sceneProject/bmsmainabilitysecondscene:bmsMainAbilitySecondScene",
"sceneProject/bmsninthright:ninth_right",
"sceneProject/bmssceneeight:bmsJstest8",
"sceneProject/bmsscenefive:bmsJstest5",
"sceneProject/bmsscenefour:bmsJstest4",
......@@ -53,7 +61,15 @@ group("bundlemanager") {
"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",
]
}
}
# 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"
}
{
"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/*"
]
}
]
}
{
"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"
}
],
"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');
}
};
{
"strings": {
"hello": "Hello",
"world": "World"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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.
*/
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() {
},
}
{
"string": [
{
"name": "app_name",
"value": "actsbundlemgrmultipleinstalltest"
},
{
"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 { 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 STATUS_INSTALL_FAILURE_INVALID = 3;
const STATUS_INSTALL_FAILURE_CONFLICT = 4;
const STATUS_INSTALL_FAILURE_INCOMPATIBLE = 6;
describe('ActsBundleMgrMultipleInstallTest', function () {
/**
* @tc.number BMS_Multiple_Hap_Install_0100
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_0100', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([""], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_INVALID);
console.info('===BMS_Multiple_Hap_Install_0100.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual("STATUS_INSTALL_FAILURE_INVALID");
done();
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_0200
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_0200', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT,""], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_INVALID);
console.info('===BMS_Multiple_Hap_Install_0200.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual("STATUS_INSTALL_FAILURE_INVALID");
done();
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_0300
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_0300', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Install_0300.Message1===' + JSON.stringify(data.statusMessage));
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data1) => {
console.info('===BMS_Multiple_Hap_Install_0300.Message3===' + JSON.stringify(data1.statusMessage));
expect(data1.statusMessage).assertEqual('SUCCESS');
done();
})
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_0400
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_0400', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + SECOND_RIGHT, PATH + THIRD_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_CONFLICT);
console.info('===BMS_Multiple_Hap_Install_0400.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual("STATUS_INSTALL_FAILURE_CONFLICT");
done();
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_0500
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_0500', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + SECOND_RIGHT, PATH + FOURTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_CONFLICT);
console.info('===BMS_Multiple_Hap_Install_0500.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual("STATUS_INSTALL_FAILURE_CONFLICT");
done();
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_0600
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_0600', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT, PATH + EIGHTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_CONFLICT);
console.info('===BMS_Multiple_Hap_Install_0600.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual("STATUS_INSTALL_FAILURE_CONFLICT");
done();
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_0700
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_0700', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT, PATH + NINTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_CONFLICT);
console.info('===BMS_Multiple_Hap_Install_0700.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual("STATUS_INSTALL_FAILURE_CONFLICT");
done();
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_0800
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_0800', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT, PATH + TENTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_CONFLICT);
console.info('===BMS_Multiple_Hap_Install_0800.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual("STATUS_INSTALL_FAILURE_CONFLICT");
done();
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_0900
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_0900', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT, PATH + ELEVEBTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_CONFLICT);
console.info('===BMS_Multiple_Hap_Install_0900.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual("STATUS_INSTALL_FAILURE_CONFLICT");
done();
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_1000
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_1000', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT, PATH + FIFTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_INVALID);
console.info('===BMS_Multiple_Hap_Install_1000.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual("STATUS_INSTALL_FAILURE_INVALID");
done();
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_1100
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_1100', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + SECOND_RIGHT, PATH + SECOND_BACKUP_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Install_1100.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data1) => {
console.info('===BMS_Multiple_Hap_Install_1100.Message2===' + JSON.stringify(data1.statusMessage));
expect(data1.statusMessage).assertEqual('SUCCESS');
done();
})
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_1200
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_1200', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT, PATH + SECOND_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Install_1200.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data1) => {
console.info('===BMS_Multiple_Hap_Install_1200.Message2===' + JSON.stringify(data1.statusMessage));
expect(data1.statusMessage).assertEqual('SUCCESS');
done();
})
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_1300
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_1300', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + SECOND_RIGHT, PATH + TWELFTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Install_1300.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data1) => {
console.info('===BMS_Multiple_Hap_Install_1300.Message2===' + JSON.stringify(data1.statusMessage));
expect(data1.statusMessage).assertEqual('SUCCESS');
done();
})
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_1400
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_1400', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT, PATH + "test_right.hap"], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_INVALID);
console.info('===BMS_Multiple_Hap_Install_1400.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual("STATUS_INSTALL_FAILURE_INVALID");
done();
});
})
/**
* @tc.number BMS_Multiple_Hap_Install_1500
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Install_1500', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT, PATH + SIXTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_CONFLICT);
console.info('===BMS_Multiple_Hap_Install_1500.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual("STATUS_INSTALL_FAILURE_CONFLICT");
done();
});
})
/**
* @tc.number BMS_Multiple_Hap_Update_0100
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_0100', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0100.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + SECOND_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0100.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_0100.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
});
})
/**
* @tc.number BMS_Multiple_Hap_Update_0200
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_0200', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0200.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + FOURTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_CONFLICT);
console.info('===BMS_Multiple_Hap_Update_0200.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('STATUS_INSTALL_FAILURE_CONFLICT');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_0200.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
})
})
/**
* @tc.number BMS_Multiple_Hap_Update_0300
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_0300', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0300.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + THIRTEENTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_INCOMPATIBLE);
console.info('===BMS_Multiple_Hap_Update_0300.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('STATUS_INSTALL_FAILURE_INCOMPATIBLE');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_0300.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
})
})
/**
* @tc.number BMS_Multiple_Hap_Update_0400
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_0400', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0400.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + FIRST_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0400.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_0400.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
});
})
/**
* @tc.number BMS_Multiple_Hap_Update_0500
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_0500', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0500.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + FOURTEENTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0500.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_0500.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
});
})
/**
* @tc.number BMS_Multiple_Hap_Update_0600
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_0600', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + SECOND_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0600.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + FIRST_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0600.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_0600.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
});
})
/**
* @tc.number BMS_Multiple_Hap_Update_0700
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_0700', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + SECOND_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0700.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + FOURTEENTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0700.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_0700.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
});
})
/**
* @tc.number BMS_Multiple_Hap_Update_0800
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_0800', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + SECOND_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0800.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + SECOND_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0800.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_0800.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
});
})
/**
* @tc.number BMS_Multiple_Hap_Update_0900
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_0900', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + SECOND_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0900.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + FOURTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_0900.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_0900.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
});
})
/**
* @tc.number BMS_Multiple_Hap_Update_1000
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_1000', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + SECOND_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_1000.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + THIRTEENTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_INCOMPATIBLE);
console.info('===BMS_Multiple_Hap_Update_1000.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('STATUS_INSTALL_FAILURE_INCOMPATIBLE');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_1000.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
})
})
/**
* @tc.number BMS_Multiple_Hap_Update_1100
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_1100', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + SECOND_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_1100.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + TWELFTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_1100.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_1100.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
});
})
/**
* @tc.number BMS_Multiple_Hap_Update_1200
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_1200', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + SECOND_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_1200.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + SIXTEENTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_1200.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_1200.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
});
})
/**
* @tc.number BMS_Multiple_Hap_Update_1300
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_1300', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + SECOND_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_1300.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + THIRTEENTH_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(ERR_CODE);
expect(data.status).assertEqual(STATUS_INSTALL_FAILURE_INCOMPATIBLE);
console.info('===BMS_Multiple_Hap_Update_1300.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('STATUS_INSTALL_FAILURE_INCOMPATIBLE');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_1300.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
})
})
/**
* @tc.number BMS_Multiple_Hap_Update_1400
* @tc.name BUNDLE::install
* @tc.desc Test install interfaces.
*/
it('BMS_Multiple_Hap_Update_1400', 0, async function (done) {
let installData = await demo.getBundleInstaller();
installData.install([PATH + FIRST_RIGHT, PATH + SECOND_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_1400.Message1===' + JSON.stringify(data.statusMessage));
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data1) => {
console.info('===BMS_Multiple_Hap_Update_1400.Message2===' + JSON.stringify(data1.statusMessage));
expect(data1.statusMessage).assertEqual('SUCCESS');
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], {
userId: 0,
installFlag: 0,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_1500.Message1===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.install([PATH + FIRST_RIGHT, PATH + SECOND_RIGHT], {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
expect(err.code).assertEqual(0);
expect(data.status).assertEqual(0);
console.info('===BMS_Multiple_Hap_Update_1500.Message2===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
installData.uninstall(NAME, {
userId: 0,
installFlag: 1,
isKeepData: false
}, async (err, data) => {
console.info('===BMS_Multiple_Hap_Update_1500.Message3===' + JSON.stringify(data.statusMessage));
expect(data.statusMessage).assertEqual('SUCCESS');
done();
})
})
});
})
})
/*
* 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
# 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"
}
{
"description": "Configuration for hjunit demo Tests",
}
{
"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.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
/*
* 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
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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": "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"
}
{
"description": "Configuration for hjunit demo Tests",
}
{
"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": 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.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');
}
};
{
"strings": {
"hello": "Hello",
"world": "World"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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": "bmseleventhright"
},
{
"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("fifth_right") {
hap_profile = "./src/main/config.json"
hap_name = "fifth_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"
}
{
"description": "Configuration for hjunit demo Tests",
}
{
"app": {
"apiVersion": {
"compatible": 4,
"releaseType": "Release",
"target": 5
},
"vendor": "example",
"bundleName": "com.example.l3jsdemo",
"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.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
/*
* 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
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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("first_right") {
hap_profile = "./src/main/config.json"
hap_name = "first_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"
}
{
"description": "Configuration for hjunit demo Tests",
}
{
"app": {
"apiVersion": {
"compatible": 4,
"releaseType": "Release",
"target": 5
},
"vendor": "example",
"bundleName": "com.example.l3jsdemo",
"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.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.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": "Hello",
"world": "World"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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": "bmsfirstright"
},
{
"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": 1000001,
"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.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": "Hello",
"world": "World"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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"
}
{
"description": "Configuration for hjunit demo Tests",
}
{
"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": 1000001,
"name": "1.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
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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("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"
}
{
"description": "Configuration for hjunit demo Tests",
}
{
"app": {
"iconId": 33554436,
"apiVersion": {
"compatible": 4,
"releaseType": "Beta1",
"target": 6
},
"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.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');
}
};
{
"strings": {
"hello": "Hello",
"world": "World"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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": "bmsninthright"
},
{
"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("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"
}
{
"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.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
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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": "bmssecondbackupright"
},
{
"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("second_right") {
hap_profile = "./src/main/config.json"
hap_name = "second_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"
}
{
"description": "Configuration for hjunit demo Tests",
}
{
"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.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
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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": "bmssecondright"
},
{
"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("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"
}
{
"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": 1000001,
"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": 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
/*
* 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
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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": "bmssixteenthright"
},
{
"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("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"
}
{
"description": "Configuration for hjunit demo Tests",
}
{
"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": 1000001,
"name": "1.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
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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": "bmssixthright"
},
{
"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("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"
}
{
"description": "Configuration for hjunit demo Tests",
}
{
"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": 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.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');
}
};
{
"strings": {
"hello": "Hello",
"world": "World"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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": "bmstenthright"
},
{
"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("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"
}
{
"description": "Configuration for hjunit demo Tests",
}
{
"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
/*
* 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
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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": "bmsthirdright"
},
{
"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("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"
}
{
"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": 999999,
"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": 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
/*
* 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
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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": "bmsscenfive"
},
{
"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("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"
}
{
"description": "Configuration for hjunit demo Tests",
}
{
"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": 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
/*
* 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
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<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": "bmstwelfthright"
},
{
"name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册