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

!2906 修改剪贴板和定时服务用

Merge pull request !2906 from liulinna/OpenHarmony-3.1-Release
......@@ -16,9 +16,9 @@ group("miscservices") {
testonly = true
deps = [
"InputMethodTest_ets:ActsInputMethodEtsTest",
"PasteBoardTest_js:ActsPasteBoardJSApiTest",
"RequestTest_js:ActsMiscservicesRequestJSApiTest",
# "TimeTest_js:ActsTimeJSApiTest",
"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 {
// core.subscribeEvent('suite', instrumentLog)
// core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config')
this.timeout = 30000
configService.setConfig(this)
require('../../test/List.test')
......
......@@ -30,14 +30,17 @@ describe('TimeTest', function() {
*/
it('systemTime_setTime_test1', 0, async function (done) {
console.log("SUB_systemTime_setTime_JS_API_0100 start");
systemTime.setTime(152600, (err, data) => { // callback形式调用异步接口
if (err) {
systemTime.setTime(66666666, (err, data) => { // callback形式调用异步接口
if ((typeof err !== 'undefined') && (err.code !== 0)) {
console.error('SetTime failed because ' + JSON.stringify(err));
expect().assertFail();
done();
return;
}
console.info('SetTime success data : ' + JSON.stringify(data));
expect(true).assertTrue();
done();
return;
});
console.log('SUB_systemTime_setTime_JS_API_0100 end');
})
......@@ -52,14 +55,17 @@ describe('TimeTest', function() {
*/
it('systemTime_setTimezone_test1', 0, async function (done) {
console.log("SUB_systemTime_setTimezone_JS_API_0100 start");
systemTime.setTimezone('Anadyr, Russia', (err, data) => { // callback形式调用异步接口
if (err) {
systemTime.setTimezone('Asia/Shanghai', (err, data) => { // callback形式调用异步接口
if ((typeof err !== 'undefined') && (err.code !== 0)) {
console.error('setTimezone failed because ' + JSON.stringify(err));
expect().assertFail();
done();
return;
}
console.info('setTimezone success data : ' + JSON.stringify(data));
expect(true).assertTrue();
done();
return;
});
console.log('SUB_systemTime_setTimezone_JS_API_0100 end');
})
......
......@@ -14,7 +14,7 @@
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsPasteBoardJSApiTest") {
hap_profile = "./src/main/config.json"
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
......@@ -23,9 +23,9 @@ ohos_js_hap_suite("ActsPasteBoardJSApiTest") {
hap_name = "ActsPasteBoardJSApiTest"
}
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") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
......@@ -2,9 +2,9 @@
"description": "Configuration for PasteBoard js api Tests",
"driver": {
"type": "JSUnitTest",
"test-timeout": "180000",
"package": "ohos.acts.miscservices.pasteboard",
"shell-timeout": "180000"
"test-timeout": "1800000",
"package": "com.open.harmony.pasteboard",
"shell-timeout": "1800000"
},
"kits": [
{
......
{
"app": {
"bundleName": "ohos.acts.miscservices.pasteboard",
"vendor": "acts",
"bundleName": "com.open.harmony.pasteboard",
"vendor": "open",
"version": {
"code": 1000000,
"name": "1.0.0"
},
"apiVersion": {
"compatible": 4,
"releaseType": "Beta1",
"target": 5
}
},
"deviceConfig": {},
"module": {
"package": "ohos.acts.miscservices.pasteboard",
"package": "com.open.harmony.pasteboard",
"name": ".MyApplication",
"deviceType": [
"phone"
......@@ -25,7 +26,6 @@
},
"abilities": [
{
"visible": true,
"skills": [
{
"entities": [
......@@ -36,12 +36,13 @@
]
}
],
"name": "ohos.acts.miscservices.pasteboard.MainAbility",
"name": "com.open.harmony.pasteboard.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard"
"launchType": "standard",
"visible": true
}
],
"js": [
......@@ -57,4 +58,4 @@
}
]
}
}
}
\ No newline at end of file
......@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default {
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 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import app from '@system.app'
import {Core, ExpectExtend} from 'deccjsunit/index'
import {Core, ExpectExtend} from 'deccjsunit'
const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
export default {
data: {
title: ""
title: ''
},
onInit() {
this.title = this.$t('strings.world');
......@@ -32,11 +31,7 @@ export default {
'id': 'extend'
})
core.addService('expect', expectExtend)
// core.addService('report', instrumentLog)
core.init()
// core.subscribeEvent('spec', instrumentLog)
// core.subscribeEvent('suite', instrumentLog)
// core.subscribeEvent('task', instrumentLog)
const configService = core.getDefaultService('config')
configService.setConfig(this)
......@@ -45,4 +40,6 @@ export default {
},
onReady() {
},
onBackPress(){
}
}
......@@ -2,7 +2,7 @@
"string": [
{
"name": "app_name",
"value": "JstimeTest"
"value": "PasteBoardTest_js"
},
{
"name": "mainability_description",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册