提交 4fefdaaf 编写于 作者: X xuchenghua09

merge master

Signed-off-by: Nxuchenghua09 <xuchenghua09@huawei.com>
上级 29fd6363
......@@ -13,19 +13,19 @@
import("//test/xts/tools/build/suite.gni")
ohos_hap("ActsAmsUsersApi7AppA") {
ohos_hap_assist_suite("ActsAmsUsersApi7AppA") {
hap_name = "ActsAmsUsersApi7AppA"
js_build_mode = "debug"
hap_profile = "entry/src/main/config.json"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":actsamsusersapi7appa_resources",
":actsamsusersapi7appa_ts_assets",
]
certificate_profile = "signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_js_assets("actsamsusersapi7appa_ts_assets") {
......
......@@ -13,13 +13,11 @@
import("//test/xts/tools/build/suite.gni")
ohos_hap("ActsAmsUsersKillProcessAppA") {
ohos_hap_assist_suite("ActsAmsUsersKillProcessAppA") {
hap_profile = "entry/src/main/module.json"
js_build_mode = "debug"
hap_name = "ActsAmsUsersKillProcessAppA"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":actsamsuserskillprocessappa_js_assets",
......@@ -27,6 +25,8 @@ ohos_hap("ActsAmsUsersKillProcessAppA") {
]
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_app_scope("actsamsuserskillprocessappa_app_profile") {
......
......@@ -13,13 +13,11 @@
import("//test/xts/tools/build/suite.gni")
ohos_hap("ActsAmsUsersKillProcessAppB") {
ohos_hap_assist_suite("ActsAmsUsersKillProcessAppB") {
hap_profile = "entry/src/main/module.json"
js_build_mode = "debug"
hap_name = "ActsAmsUsersKillProcessAppB"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":actsamsuserskillprocessappb_js_assets",
......@@ -27,6 +25,8 @@ ohos_hap("ActsAmsUsersKillProcessAppB") {
]
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_app_scope("actsamsuserskillprocessappb_app_profile") {
......
......@@ -13,13 +13,11 @@
import("//test/xts/tools/build/suite.gni")
ohos_hap("ActsAmsUsersKillProcessAppC") {
ohos_hap_assist_suite("ActsAmsUsersKillProcessAppC") {
hap_profile = "entry/src/main/module.json"
js_build_mode = "debug"
hap_name = "ActsAmsUsersKillProcessAppC"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":actsamsuserskillprocessappc_js_assets",
......@@ -27,6 +25,8 @@ ohos_hap("ActsAmsUsersKillProcessAppC") {
]
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_app_scope("actsamsuserskillprocessappc_app_profile") {
......
......@@ -14,7 +14,7 @@
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsAmsUsersSystemTest") {
hap_profile = "entry/src/main/module.json"
hap_profile = "./entry/src/main/module.json"
js_build_mode = "debug"
deps = [
":actsamsuserssystemtest_js_assets",
......@@ -23,6 +23,8 @@ ohos_js_hap_suite("ActsAmsUsersSystemTest") {
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
hap_name = "ActsAmsUsersSystemTest"
subsystem_name = "ability"
part_name = "ability_runtime"
}
ohos_app_scope("actsamsuserssystemtest_app_profile") {
......@@ -31,11 +33,11 @@ ohos_app_scope("actsamsuserssystemtest_app_profile") {
}
ohos_js_assets("actsamsuserssystemtest_js_assets") {
source_dir = "entry/src/main/ets"
source_dir = "./entry/src/main/ets"
}
ohos_resources("actsamsuserssystemtest_resources") {
sources = [ "entry/src/main/resources" ]
sources = [ "./entry/src/main/resources" ]
deps = [ ":actsamsuserssystemtest_app_profile" ]
hap_profile = "entry/src/main/module.json"
hap_profile = "./entry/src/main/module.json"
}
{
"description": "Configuration for hjunit demo Tests",
"driver": {
"type": "JSUnitTest",
"type": "OHJSUnitTest",
"test-timeout": "300000",
"package": "com.acts.actsinterfacemultiuserstest",
"shell-timeout": "300000"
"bundle-name": "com.acts.actsinterfacemultiuserstest",
"module-name":"phone",
"shell-timeout": "300000",
"testcase-timeout": 300000
},
"kits": [
{
......
......@@ -30,7 +30,7 @@ export default class MainAbility extends Ability {
// Main window is created, set main page for this ability
console.log("MainAbility onWindowStageCreate")
globalThis.abilityContext = this.context
windowStage.setUIContent(this.context, "pages/index/index", null)
windowStage.setUIContent(this.context, "MainAbility/pages/index/index", null)
}
onWindowStageDestroy() {
......
/*
* 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 file from '@system.file';
import {Core, ExpectExtend, InstrumentLog, ReportExtend} from "deccjsunit/index"
import testsuite from "../../test/List.test.ets"
@Entry
@Component
struct Index {
aboutToAppear() {
console.info("start run testcase!!!!")
const core = Core.getInstance()
const expectExtend = new ExpectExtend({
'id': 'extend'
})
core.addService('expect', expectExtend)
const reportExtend = new ReportExtend(file)
core.addService('report', reportExtend)
core.init()
core.subscribeEvent('task', reportExtend)
console.info("subscribeEvent run !!!!")
const configService = core.getDefaultService('config')
globalThis.abilityWant.parameters['timeout'] = 20000
console.info('parameters---->' + JSON.stringify(globalThis.abilityWant.parameters))
configService.setConfig(globalThis.abilityWant.parameters)
testsuite(globalThis.abilityContext)
core.execute()
}
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('MainAbility')
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width('100%')
.height('100%')
}
}
\ No newline at end of file
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import router from '@system.router';
@Entry
@Component
struct Second {
private content: string = "Second Page"
build() {
Flex({ direction: FlexDirection.Column,alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text(`${this.content}`)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button() {
Text('back to index')
.fontSize(20)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.onClick(() => {
router.back()
})
}
.width('100%')
.height('100%')
}
}
\ No newline at end of file
......@@ -14,7 +14,7 @@
*/
import abilityTest from './Ability.test.ets'
export default function testsuite(context) {
export default function testsuite() {
console.debug("====>in list.test====>");
abilityTest(context)
abilityTest()
}
\ No newline at end of file
{
"src": [
"pages/index/index",
"pages/second/second"
"MainAbility/pages/index/index",
"MainAbility/pages/second/second"
]
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册