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

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

Merge pull request !2906 from liulinna/OpenHarmony-3.1-Release
...@@ -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,14 +30,17 @@ describe('TimeTest', function() { ...@@ -30,14 +30,17 @@ 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 (err) { 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();
done(); done();
return; return;
} }
console.info('SetTime success data : ' + JSON.stringify(data)); console.info('SetTime success data : ' + JSON.stringify(data));
expect(true).assertTrue();
done();
return;
}); });
console.log('SUB_systemTime_setTime_JS_API_0100 end'); console.log('SUB_systemTime_setTime_JS_API_0100 end');
}) })
...@@ -52,14 +55,17 @@ describe('TimeTest', function() { ...@@ -52,14 +55,17 @@ describe('TimeTest', function() {
*/ */
it('systemTime_setTimezone_test1', 0, async function (done) { it('systemTime_setTimezone_test1', 0, async function (done) {
console.log("SUB_systemTime_setTimezone_JS_API_0100 start"); console.log("SUB_systemTime_setTimezone_JS_API_0100 start");
systemTime.setTimezone('Anadyr, Russia', (err, data) => { // callback形式调用异步接口 systemTime.setTimezone('Asia/Shanghai', (err, data) => { // callback形式调用异步接口
if (err) { if ((typeof err !== 'undefined') && (err.code !== 0)) {
console.error('setTimezone failed because ' + JSON.stringify(err)); console.error('setTimezone failed because ' + JSON.stringify(err));
expect().assertFail(); expect().assertFail();
done(); done();
return; return;
} }
console.info('setTimezone success data : ' + JSON.stringify(data)); console.info('setTimezone success data : ' + JSON.stringify(data));
expect(true).assertTrue();
done();
return;
}); });
console.log('SUB_systemTime_setTimezone_JS_API_0100 end'); console.log('SUB_systemTime_setTimezone_JS_API_0100 end');
}) })
......
...@@ -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": [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册