提交 cbac4d1c 编写于 作者: Z zhaoyuan17

update xts test

Signed-off-by: Nzhaoyuan17 <zhaoyuan17@huawei.com>
上级 b37a615e
......@@ -41,7 +41,8 @@
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard"
"launchType": "standard",
"visible": true
}
],
"js": [
......
......@@ -45,7 +45,7 @@ export default {
},
}
);
featureAbility.terminateAbility(
featureAbility.terminateSelf(
(err, data)=>{
console.debug('==========Terminate Ability Success==========')
});
......
......@@ -41,7 +41,8 @@
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard"
"launchType": "standard",
"visible": true
}
],
"js": [
......
......@@ -85,7 +85,7 @@ export default {
},
}
)
featureAbility.terminateAbility(
featureAbility.terminateSelf(
(err, data)=>{
console.debug('==========Terminate Ability Success==========');
});
......
......@@ -41,7 +41,8 @@
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard"
"launchType": "standard",
"visible": true
}
],
"js": [
......
......@@ -41,7 +41,7 @@ export default {
},
}
);
featureAbility.terminateAbility(
featureAbility.terminateSelf(
(err, data)=>{
console.debug('==========Terminate Ability Success==========');
});
......
......@@ -41,7 +41,8 @@
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard"
"launchType": "standard",
"visible": true
}
],
"js": [
......
......@@ -41,7 +41,8 @@
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard"
"launchType": "standard",
"visible": true
}
],
"js": [
......
......@@ -61,7 +61,7 @@ export default {
},
}
);
await featureAbility.terminateAbility();
await featureAbility.terminateSelf();
},
onReady() {
},
......
......@@ -41,7 +41,8 @@
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard"
"launchType": "standard",
"visible": true
}
],
"js": [
......
......@@ -41,11 +41,11 @@ export default {
onShow() {
commonEvent.publish("ACTS_TerminateAbility_0100_CommonEvent", PublishCallBackOne);
commonEvent.publish("ACTS_TerminateAbility_0200_CommonEvent", PublishCallBackTwo);
featureAbility.terminateAbility(
(err, data)=>{
featureAbility.terminateSelf(
async (err, data)=>{
console.debug('==========Terminate Ability Success==========');
commonEvent.publish("ACTS_TerminateAbility_0100_Return", PublishCallBackThree);
commonEvent.publish("ACTS_TerminateAbility_0200_Return", PublishCallBackFour);
await commonEvent.publish("ACTS_TerminateAbility_0100_Return", PublishCallBackThree);
await commonEvent.publish("ACTS_TerminateAbility_0200_Return", PublishCallBackFour);
}
);
},
......
......@@ -16,6 +16,9 @@ import("//build/ohos_var.gni")
group("ams_standard") {
testonly = true
if (is_standard_system) {
deps = [ "amszipfileunzipfilest:amsZipfileUnzipfileST" ]
deps = [
"amszipfileunzipfilest:amsZipfileUnzipfileST",
"fwkdataaccessor:FWKDataAccessor",
]
}
}
# 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("FWKDataAccessor") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "FWKDataAccessor"
}
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": "JSStTest",
"test-timeout": "60000",
"package": "com.amsst.fwkdataaccessor",
"shell-timeout": "60000"
},
"kits": [
{
"test-file-name": [
"FWKDataAccessor.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
}
]
}
\ No newline at end of file
{
"app": {
"bundleName": "com.amsst.fwkdataaccessor",
"vendor": "amsst",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.amsst.fwkdataaccessor",
"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"
]
}
],
"name": "com.amsst.fwkdataaccessor.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard",
"visible": true
}
],
"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;
}
.titleST {
font-size: 32px;
}
\ No newline at end of file
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
<text class="titleST">
STDataAbility
</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 file from '@system.file'
import app from '@system.app'
import {Core, ExpectExtend, ReportExtend} from 'deccjsunit/index'
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'
})
const reportExtend = new ReportExtend(file)
core.addService('expect', expectExtend)
core.addService('report', reportExtend)
core.init()
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../../test/List.test')
core.execute()
},
onReady() {
},
}
\ No newline at end of file
{
"string": [
{
"name": "app_name",
"value": "STDataAbility"
},
{
"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.
*/
require('./DataAbilityHelperJsSt.test.js')
\ No newline at end of file
......@@ -28,6 +28,12 @@
"bmsJstest9.hap->/data/bmsJstest9.hap"
]
},
{
"type": "ShellKit",
"run-command": [
"chmod 644 /data/*.hap"
]
}
]
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册