未验证 提交 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": [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册