提交 63c8b419 编写于 作者: L liulinna 提交者: guduhanyan

修改剪贴板定时测试用例之调整格式

Signed-off-by: Nguduhanyan <xuyanjun27@163.com>
上级 ce36daa2
...@@ -16,9 +16,9 @@ group("miscservices") { ...@@ -16,9 +16,9 @@ group("miscservices") {
testonly = true testonly = true
deps = [ deps = [
"InputMethodTest_ets:ActsInputMethodEtsTest", "InputMethodTest_ets:ActsInputMethodEtsTest",
"PasteBoardTest_js:ActsPasteBoardJSApiTest",
"RequestTest_js:ActsMiscservicesRequestJSApiTest", "RequestTest_js:ActsMiscservicesRequestJSApiTest",
"TimeTest_js:ActsTimeJSApiTest", "TimeTest_js:ActsTimeJSApiTest",
"TimerTest_js:ActsTimerJSApiTest", "TimerTest_js:ActsTimerJSApiTest",
"actspasteboardjsapitest:ActsPasteBoardJSApiTest",
] ]
} }
.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>
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
// core.subscribeEvent('suite', instrumentLog) // core.subscribeEvent('suite', instrumentLog)
// core.subscribeEvent('task', instrumentLog) // core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config') const configService = core.getDefaultService('config')
this.timeout = 30000
configService.setConfig(this) configService.setConfig(this)
require('../../test/List.test') require('../../test/List.test')
......
...@@ -30,7 +30,7 @@ describe('TimeTest', function() { ...@@ -30,7 +30,7 @@ describe('TimeTest', function() {
*/ */
it('systemTime_setTime_test1', 0, async function (done) { it('systemTime_setTime_test1', 0, async function (done) {
console.log("SUB_systemTime_setTime_JS_API_0100 start"); console.log("SUB_systemTime_setTime_JS_API_0100 start");
systemTime.setTime(152600, (err, data) => { // callback形式调用异步接口 systemTime.setTime(66666666, (err, data) => { // callback形式调用异步接口
if ((typeof err !== 'undefined') && (err.code !== 0)) { if ((typeof err !== 'undefined') && (err.code !== 0)) {
console.error('SetTime failed because ' + JSON.stringify(err)); console.error('SetTime failed because ' + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsPasteBoardJSApiTest") { ohos_js_hap_suite("ActsPasteBoardJSApiTest") {
hap_profile = "./src/main/config.json" hap_profile = "./entry/src/main/config.json"
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
":hjs_demo_resources", ":hjs_demo_resources",
...@@ -23,9 +23,9 @@ ohos_js_hap_suite("ActsPasteBoardJSApiTest") { ...@@ -23,9 +23,9 @@ ohos_js_hap_suite("ActsPasteBoardJSApiTest") {
hap_name = "ActsPasteBoardJSApiTest" hap_name = "ActsPasteBoardJSApiTest"
} }
ohos_js_assets("hjs_demo_js_assets") { ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default" source_dir = "./entry/src/main/js/default"
} }
ohos_resources("hjs_demo_resources") { ohos_resources("hjs_demo_resources") {
sources = [ "./src/main/resources" ] sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./src/main/config.json" hap_profile = "./entry/src/main/config.json"
} }
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
"description": "Configuration for PasteBoard js api Tests", "description": "Configuration for PasteBoard js api Tests",
"driver": { "driver": {
"type": "JSUnitTest", "type": "JSUnitTest",
"test-timeout": "180000", "test-timeout": "1800000",
"package": "ohos.acts.miscservices.pasteboard", "package": "com.open.harmony.pasteboard",
"shell-timeout": "180000" "shell-timeout": "1800000"
}, },
"kits": [ "kits": [
{ {
......
{ {
"app": { "app": {
"bundleName": "ohos.acts.miscservices.pasteboard", "bundleName": "com.open.harmony.pasteboard",
"vendor": "acts", "vendor": "open",
"version": { "version": {
"code": 1000000, "code": 1000000,
"name": "1.0.0" "name": "1.0.0"
}, },
"apiVersion": { "apiVersion": {
"compatible": 4, "compatible": 4,
"releaseType": "Beta1",
"target": 5 "target": 5
} }
}, },
"deviceConfig": {}, "deviceConfig": {},
"module": { "module": {
"package": "ohos.acts.miscservices.pasteboard", "package": "com.open.harmony.pasteboard",
"name": ".MyApplication", "name": ".MyApplication",
"deviceType": [ "deviceType": [
"phone" "phone"
...@@ -25,7 +26,6 @@ ...@@ -25,7 +26,6 @@
}, },
"abilities": [ "abilities": [
{ {
"visible": true,
"skills": [ "skills": [
{ {
"entities": [ "entities": [
...@@ -36,12 +36,13 @@ ...@@ -36,12 +36,13 @@
] ]
} }
], ],
"name": "ohos.acts.miscservices.pasteboard.MainAbility", "name": "com.open.harmony.pasteboard.MainAbility",
"icon": "$media:icon", "icon": "$media:icon",
"description": "$string:mainability_description", "description": "$string:mainability_description",
"label": "$string:app_name", "label": "$string:app_name",
"type": "page", "type": "page",
"launchType": "standard" "launchType": "standard",
"visible": true
} }
], ],
"js": [ "js": [
...@@ -57,4 +58,4 @@ ...@@ -57,4 +58,4 @@
} }
] ]
} }
} }
\ No newline at end of file
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
export default { export default {
onCreate() { onCreate() {
console.info('AceApplication onCreate'); console.info('AceApplication onCreate');
......
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<!--
Copyright (c) 2022 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="container">
<text class="title">
{{ title }}
</text>
</div>
...@@ -12,15 +12,14 @@ ...@@ -12,15 +12,14 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import app from '@system.app' import {Core, ExpectExtend} from 'deccjsunit'
import {Core, ExpectExtend} from 'deccjsunit/index'
const injectRef = Object.getPrototypeOf(global) || global const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
export default { export default {
data: { data: {
title: "" title: ''
}, },
onInit() { onInit() {
this.title = this.$t('strings.world'); this.title = this.$t('strings.world');
...@@ -32,11 +31,7 @@ export default { ...@@ -32,11 +31,7 @@ export default {
'id': 'extend' 'id': 'extend'
}) })
core.addService('expect', expectExtend) core.addService('expect', expectExtend)
// core.addService('report', instrumentLog)
core.init() core.init()
// core.subscribeEvent('spec', instrumentLog)
// core.subscribeEvent('suite', instrumentLog)
// core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config') const configService = core.getDefaultService('config')
configService.setConfig(this) configService.setConfig(this)
...@@ -45,4 +40,6 @@ export default { ...@@ -45,4 +40,6 @@ export default {
}, },
onReady() { onReady() {
}, },
onBackPress(){
}
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"string": [ "string": [
{ {
"name": "app_name", "name": "app_name",
"value": "JstimeTest" "value": "PasteBoardTest_js"
}, },
{ {
"name": "mainability_description", "name": "mainability_description",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册