Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
比较版本
23b3d6744a5480dc61176c90e5baf0a6e74b9fbc...0b24dd76086ef37d8be94135f9d665102d97039b
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
8 个月 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
源分支
0b24dd76086ef37d8be94135f9d665102d97039b
选择Git版本
...
目标分支
23b3d6744a5480dc61176c90e5baf0a6e74b9fbc
选择Git版本
比较
Commits (7)
https://gitcode.net/openharmony/xts_acts/-/commit/8b140ffc1937e01ad8af5058dd3133ebf3ccda28
20220114xts00
2022-01-14T17:40:23+08:00
guduhanyan
xuyanjun27@163.com
Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:xuyanjun27@163.com" title="xuyanjun27@163.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg2" style="text-decoration: none">N</a><a href="mailto:xuyanjun27@163.com" title="xuyanjun27@163.com">guduhanyan</a> <<a href="mailto:xuyanjun27@163.com" title="xuyanjun27@163.com">xuyanjun27@163.com</a>></span>
https://gitcode.net/openharmony/xts_acts/-/commit/7fecccc77f77383a7718dddcc9db7348aba6dfac
add powermgr testcases
2022-01-14T12:59:54+00:00
logic42
wanglong108@huawei.com
Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:wanglong108@huawei.com" title="wanglong108@huawei.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg5" style="text-decoration: none">N</a><a href="mailto:wanglong108@huawei.com" title="wanglong108@huawei.com">logic42</a> <<a href="mailto:wanglong108@huawei.com" title="wanglong108@huawei.com">wanglong108@huawei.com</a>></span>
https://gitcode.net/openharmony/xts_acts/-/commit/64e6120624d871c023002b54e42201f9c949506a
add cases by yangqing3@huawei.com
2022-01-15T16:28:26+08:00
y00314596
yangqing3@huawei.com
Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:yangqing3@huawei.com" title="yangqing3@huawei.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg5" style="text-decoration: none">N</a><a href="mailto:yangqing3@huawei.com" title="yangqing3@huawei.com">y00314596</a> <<a href="mailto:yangqing3@huawei.com" title="yangqing3@huawei.com">yangqing3@huawei.com</a>></span>
https://gitcode.net/openharmony/xts_acts/-/commit/e301a0748d1160f314fc0f54e97164b506613df3
2022011600
2022-01-16T07:06:32+08:00
guduhanyan
xuyanjun27@163.com
Signed-off-by: <span data-trailer="Signed-off-by:"><a href="mailto:xuyanjun27@163.com" title="xuyanjun27@163.com"></a><a href="javascript:void(0)" class="avatar s16 avatar-inline identicon bg2" style="text-decoration: none">N</a><a href="mailto:xuyanjun27@163.com" title="xuyanjun27@163.com">guduhanyan</a> <<a href="mailto:xuyanjun27@163.com" title="xuyanjun27@163.com">xuyanjun27@163.com</a>></span>
https://gitcode.net/openharmony/xts_acts/-/commit/252682031f563949f015d0d861d177246bc29398
!1582 调整超时时间
2022-01-16T02:12:50+00:00
openharmony_ci
120357966@qq.com
Merge pull request !1582 from guduhanyan/master
https://gitcode.net/openharmony/xts_acts/-/commit/03f034292a5d42ca882110a991877a53af318a10
!1586 add cases on 20220115
2022-01-16T03:43:29+00:00
openharmony_ci
120357966@qq.com
Merge pull request !1586 from 杨清/1228
https://gitcode.net/openharmony/xts_acts/-/commit/0b24dd76086ef37d8be94135f9d665102d97039b
!1584 【Powermgr】新增电源测试用例
2022-01-16T03:45:04+00:00
openharmony_ci
120357966@qq.com
Merge pull request !1584 from logic42/master
隐藏空白更改
内联
并排
Showing
7 changed file
with
327 addition
and
9 deletion
+327
-9
global/i18n_standard/intljs/src/main/js/default/test/I18n.test.js
...18n_standard/intljs/src/main/js/default/test/I18n.test.js
+283
-0
miscservices/TimeTest_js/BUILD.gn
miscservices/TimeTest_js/BUILD.gn
+1
-1
miscservices/TimeTest_js/Test.json
miscservices/TimeTest_js/Test.json
+3
-3
miscservices/TimerTest_js/BUILD.gn
miscservices/TimerTest_js/BUILD.gn
+1
-1
miscservices/TimerTest_js/Test.json
miscservices/TimerTest_js/Test.json
+3
-3
miscservices/TimerTest_js/src/main/js/default/test/SystemTimerJsunit.test.js
...est_js/src/main/js/default/test/SystemTimerJsunit.test.js
+1
-1
powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock_dev.test.js
...in/js/default/test/power_manager_running_lock_dev.test.js
+35
-0
未找到文件。
global/i18n_standard/intljs/src/main/js/default/test/I18n.test.js
浏览文件 @
0b24dd76
...
...
@@ -1055,6 +1055,57 @@ describe('I18nTest', function () {
expect
(
value
).
assertFalse
();
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_7920
* @tc.name test getCalendar interface
* @tc.desc get the getCalendar value
*/
it
(
'
i18n_test_7920
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_7920
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
jp
'
,
'
japanese
'
);
let
name
=
calendar
.
getDisplayName
(
'
jp
'
);
console
.
error
(
'
i18n_test_7920
'
+
name
);
expect
(
name
).
assertEqual
(
'
公历
'
);
let
timezone
=
calendar
.
getTimeZone
();
console
.
error
(
'
i18n_test_7920
'
+
timezone
);
expect
(
name
).
assertEqual
(
'
timezone
'
);
let
firstday
=
calendar
.
getFirstDayOfWeek
();
console
.
error
(
'
i18n_test_7920
'
+
firstday
);
expect
(
name
).
assertEqual
(
2
);
let
miniday
=
calendar
.
getMinimalDaysInFirstWeek
();
console
.
error
(
'
i18n_test_7920
'
+
miniday
);
expect
(
name
).
assertEqual
(
1
);
let
value
=
calendar
.
isWeekend
(
new
Date
(
2022
,
10
,
1
,
10
,
0
,
0
,
0
));
console
.
error
(
'
i18n_test_7920
'
+
value
);
expect
(
value
).
assertFalse
();
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_7940
* @tc.name test getCalendar interface with zh param
* @tc.desc get the getCalendar value
*/
it
(
'
i18n_test_7940
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_7940
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
,
'
chinese
'
);
let
name
=
calendar
.
getDisplayName
(
'
zh
'
);
console
.
error
(
'
i18n_test_7940
'
+
name
);
expect
(
name
).
assertEqual
(
'
农历
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_7960
* @tc.name test getCalendar interface with zh param
* @tc.desc get the getCalendar value
*/
it
(
'
i18n_test_7960
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_7960
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
,
'
japanese
'
);
let
name
=
calendar
.
getDisplayName
(
'
zh
'
);
console
.
error
(
'
i18n_test_7960
'
+
name
);
expect
(
name
).
assertEqual
(
'
和历
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8000
* @tc.name test getDisplayName interface
...
...
@@ -1068,6 +1119,19 @@ describe('I18nTest', function () {
expect
(
value
).
assertEqual
(
'
公历
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8020
* @tc.name test getDisplayName interface with en param
* @tc.desc get the getDisplayName value
*/
it
(
'
i18n_test_8020
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_8020
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
);
let
value
=
calendar
.
getDisplayName
(
'
en
'
);
console
.
error
(
'
i18n_test_8020
'
+
value
);
expect
(
value
).
assertEqual
(
'
Gregorian Calendar
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8100
* @tc.name test get interface
...
...
@@ -1081,6 +1145,32 @@ describe('I18nTest', function () {
expect
(
value
).
assertLarger
(
0
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8120
* @tc.name test get interface with month param
* @tc.desc get the get value
*/
it
(
'
i18n_test_8120
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_8120
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
);
let
value
=
calendar
.
get
(
'
month
'
);
console
.
error
(
'
i18n_test_8120
'
+
value
);
expect
(
value
).
assertLarger
(
0
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8140
* @tc.name test get interface with day_of_year param
* @tc.desc get the get value
*/
it
(
'
i18n_test_8140
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_8140
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
);
let
value
=
calendar
.
get
(
'
day_of_year
'
);
console
.
error
(
'
i18n_test_8140
'
+
value
);
expect
(
value
).
assertLarger
(
0
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8200
* @tc.name test setMinimalDaysInFirstWeek and getMinimalDaysInFirstWeek interface
...
...
@@ -1095,6 +1185,48 @@ describe('I18nTest', function () {
expect
(
value
).
assertEqual
(
1
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8220
* @tc.name test setMinimalDaysInFirstWeek with 0 param and getMinimalDaysInFirstWeek interface
* @tc.desc get the setMinimalDaysInFirstWeek and getMinimalDaysInFirstWeek value
*/
it
(
'
i18n_test_8220
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_8220
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
);
calendar
.
setMinimalDaysInFirstWeek
(
0
);
let
value
=
calendar
.
getMinimalDaysInFirstWeek
();
console
.
error
(
'
i18n_test_8220
'
+
value
);
expect
(
value
).
assertEqual
(
1
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8240
* @tc.name test setMinimalDaysInFirstWeek with 8 param and getMinimalDaysInFirstWeek interface
* @tc.desc get the setMinimalDaysInFirstWeek and getMinimalDaysInFirstWeek value
*/
it
(
'
i18n_test_8240
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_8240
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
);
calendar
.
setMinimalDaysInFirstWeek
(
8
);
let
value
=
calendar
.
getMinimalDaysInFirstWeek
();
console
.
error
(
'
i18n_test_8240
'
+
value
);
expect
(
value
).
assertEqual
(
7
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8260
* @tc.name test setMinimalDaysInFirstWeek with 7 param and getMinimalDaysInFirstWeek interface
* @tc.desc get the setMinimalDaysInFirstWeek and getMinimalDaysInFirstWeek value
*/
it
(
'
i18n_test_8260
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_8260
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
);
calendar
.
setMinimalDaysInFirstWeek
(
7
);
let
value
=
calendar
.
getMinimalDaysInFirstWeek
();
console
.
error
(
'
i18n_test_8260
'
+
value
);
expect
(
value
).
assertEqual
(
7
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8300
* @tc.name test setFirstDayOfWeek and getFirstDayOfWeek interface
...
...
@@ -1109,6 +1241,48 @@ describe('I18nTest', function () {
expect
(
value
).
assertEqual
(
1
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8320
* @tc.name test setFirstDayOfWeek with 0 param and getFirstDayOfWeek interface
* @tc.desc get the setFirstDayOfWeek and getFirstDayOfWeek value
*/
it
(
'
i18n_test_8320
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_8320
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
);
calendar
.
setFirstDayOfWeek
(
0
);
let
value
=
calendar
.
getFirstDayOfWeek
();
console
.
error
(
'
i18n_test_8320
'
+
value
);
expect
(
value
).
assertEqual
(
1
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8340
* @tc.name test setFirstDayOfWeek with 7 param and getFirstDayOfWeek interface
* @tc.desc get the setFirstDayOfWeek and getFirstDayOfWeek value
*/
it
(
'
i18n_test_8340
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_8340
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
);
calendar
.
setFirstDayOfWeek
(
7
);
let
value
=
calendar
.
getFirstDayOfWeek
();
console
.
error
(
'
i18n_test_8340
'
+
value
);
expect
(
value
).
assertEqual
(
7
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8360
* @tc.name test setFirstDayOfWeek with 8 param and getFirstDayOfWeek interface
* @tc.desc get the setFirstDayOfWeek and getFirstDayOfWeek value
*/
it
(
'
i18n_test_8360
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_8360
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
);
calendar
.
setFirstDayOfWeek
(
8
);
let
value
=
calendar
.
getFirstDayOfWeek
();
console
.
error
(
'
i18n_test_8360
'
+
value
);
expect
(
value
).
assertEqual
(
1
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8400
* @tc.name test setTimeZone and getTimeZone interface
...
...
@@ -1123,6 +1297,20 @@ describe('I18nTest', function () {
expect
(
value
).
assertEqual
(
'
China Standard Time
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8420
* @tc.name test setTimeZone with AAA param and getTimeZone interface
* @tc.desc get the setTimeZone and getTimeZone value
*/
it
(
'
i18n_test_8420
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_8420
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
);
calendar
.
setTimeZone
(
'
AAA
'
);
let
value
=
calendar
.
getTimeZone
();
console
.
error
(
'
i18n_test_8420
'
+
value
);
expect
(
value
).
assertEqual
(
'
GMT
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8500
* @tc.name test set interface
...
...
@@ -1137,6 +1325,34 @@ describe('I18nTest', function () {
expect
(
value
).
assertTrue
();
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8520
* @tc.name test set interface with hour,minute,second param
* @tc.desc get the set value
*/
it
(
'
i18n_test_8520
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_8520
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
);
calendar
.
set
(
2021
,
11
,
11
,
10
,
10
,
10
);
let
value
=
calendar
.
isWeekend
();
console
.
error
(
'
i18n_test_8520
'
+
value
);
expect
(
value
).
assertTrue
();
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8540
* @tc.name test set interface with hour,minute param
* @tc.desc get the set value
*/
it
(
'
i18n_test_8540
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_8540
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
);
calendar
.
set
(
2021
,
11
,
11
,
10
,
10
);
let
value
=
calendar
.
isWeekend
();
console
.
error
(
'
i18n_test_8540
'
+
value
);
expect
(
value
).
assertTrue
();
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8600
* @tc.name test setTime interface with date param
...
...
@@ -1153,6 +1369,21 @@ describe('I18nTest', function () {
expect
(
value
).
assertFalse
();
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8620
* @tc.name test setTime interface with wrong month param
* @tc.desc get the setTime value
*/
it
(
'
i18n_test_8620
'
,
0
,
function
()
{
console
.
error
(
'
i18n_test_8620
'
+
'
start
'
);
let
calendar
=
I18n
.
getCalendar
(
'
zh
'
);
let
date1
=
new
Date
(
2021
,
18
,
8
,
8
,
8
,
8
,
8
);
calendar
.
setTime
(
date1
);
let
value
=
calendar
.
isWeekend
();
console
.
error
(
'
i18n_test_8620
'
+
value
);
expect
(
value
).
assertFalse
();
})
/**
* @tc.number SUB_GLOBAL_I18N_JS_8700
* @tc.name test setTime interface
...
...
@@ -1471,6 +1702,58 @@ describe('I18nTest', function () {
let
value
=
iterator
.
isBoundary
(
10
);
console
.
log
(
'
i18n_test_iterator_0900
'
+
value
);
expect
(
value
).
assertFalse
();
// current
let
current
=
iterator
.
current
();
console
.
log
(
'
i18n_test_iterator_0900
'
+
current
);
expect
(
current
).
assertEqual
(
11
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_BREAKITERATOR_1000
* @tc.name test iterator interface
* @tc.desc check the iterator interface
*/
it
(
'
i18n_test_iterator_1000
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_iterator_1000
'
+
'
start
'
);
let
iterator
=
I18n
.
getLineInstance
(
'
en
'
);
iterator
.
setLineBreakText
(
'
My name is Tom.Welcome to the sky world.
'
);
// current
let
current
=
iterator
.
current
();
console
.
log
(
'
i18n_test_iterator_1000
'
+
current
);
expect
(
current
).
assertEqual
(
0
);
// next
let
next
=
iterator
.
next
();
console
.
log
(
'
i18n_test_iterator_1000
'
+
next
);
expect
(
next
).
assertEqual
(
3
);
// current
let
current2
=
iterator
.
current
();
console
.
log
(
'
i18n_test_iterator_1000
'
+
current2
);
expect
(
current2
).
assertEqual
(
3
);
// next 5
let
next2
=
iterator
.
next
(
5
);
console
.
log
(
'
i18n_test_iterator_1000
'
+
next2
);
expect
(
next2
).
assertEqual
(
30
);
// previous
let
previous
=
iterator
.
previous
();
console
.
log
(
'
i18n_test_iterator_1000
'
+
previous
);
expect
(
previous
).
assertEqual
(
26
);
// following 2
let
follwoing
=
iterator
.
following
(
3
);
console
.
log
(
'
i18n_test_iterator_1000
'
+
follwoing
);
expect
(
follwoing
).
assertEqual
(
8
);
// current
let
current3
=
iterator
.
current
();
console
.
log
(
'
i18n_test_iterator_1000
'
+
current3
);
expect
(
current3
).
assertEqual
(
8
);
// isBoundary
let
value
=
iterator
.
isBoundary
(
3
);
console
.
log
(
'
i18n_test_iterator_1000
'
+
value
);
expect
(
value
).
assertTrue
();
// current
let
current4
=
iterator
.
current
();
console
.
log
(
'
i18n_test_iterator_1000
'
+
current4
);
expect
(
current4
).
assertEqual
(
3
);
})
/* *
...
...
miscservices/TimeTest_js/BUILD.gn
浏览文件 @
0b24dd76
...
...
@@ -20,7 +20,7 @@ ohos_js_hap_suite("time_js_test") {
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "TimeJSApiTest"
hap_name = "
Acts
TimeJSApiTest"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default"
...
...
miscservices/TimeTest_js/Test.json
浏览文件 @
0b24dd76
...
...
@@ -2,14 +2,14 @@
"description"
:
"Configuration for time js api Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
2160
0000"
,
"test-timeout"
:
"
18
0000"
,
"package"
:
"ohos.acts.miscservices.timer"
,
"shell-timeout"
:
"
2160
0000"
"shell-timeout"
:
"
18
0000"
},
"kits"
:
[
{
"test-file-name"
:
[
"TimeJSApiTest.hap"
"
Acts
TimeJSApiTest.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
...
...
miscservices/TimerTest_js/BUILD.gn
浏览文件 @
0b24dd76
...
...
@@ -20,7 +20,7 @@ ohos_js_hap_suite("timer_js_test") {
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "TimerJSApiTest"
hap_name = "
Acts
TimerJSApiTest"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./src/main/js/default"
...
...
miscservices/TimerTest_js/Test.json
浏览文件 @
0b24dd76
...
...
@@ -2,14 +2,14 @@
"description"
:
"Configuration for time js api Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
2160
0000"
,
"test-timeout"
:
"
18
0000"
,
"package"
:
"ohos.acts.miscservices.timer"
,
"shell-timeout"
:
"
2160
0000"
"shell-timeout"
:
"
18
0000"
},
"kits"
:
[
{
"test-file-name"
:
[
"TimerJSApiTest.hap"
"
Acts
TimerJSApiTest.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
...
...
miscservices/TimerTest_js/src/main/js/default/test/SystemTimerJsunit.test.js
浏览文件 @
0b24dd76
...
...
@@ -61,7 +61,7 @@ describe('TimerTest', function() {
it
(
'
systemTimer_Timer_test2
'
,
0
,
async
()
=>
{
console
.
log
(
"
SUB_systemTimer_Timer_JS_API_0200 start
"
)
var
options
=
{
type
:
TIMER_TYPE_
REALTIME_
WAKEUP
,
type
:
TIMER_TYPE_WAKEUP
,
repeat
:
false
,
persistent
:
false
}
...
...
powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock_dev.test.js
0 → 100755
浏览文件 @
0b24dd76
/*
* 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
app
from
'
@system.app
'
import
Context
from
'
@ohos.napi_context
'
import
runningLock
from
'
@ohos.runningLock
'
;
import
power
from
'
@ohos.power
'
;
import
'
@ohos.permission.RUNNING_LOCK
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
appInfoTest
'
,
function
()
{
console
.
log
(
"
*************Power Unit Test Begin*************
"
);
it
(
'
power_reboot_device_test
'
,
0
,
function
()
{
//rebootDevice(reason: string): void
power
.
rebootDevice
(
"
power_js_test_reboot
"
);
console
.
info
(
'
power_reboot_device_test success
'
);
})
it
(
'
power_shutdown_device_test
'
,
0
,
function
()
{
//shutdownDevice(reason: string): void
power
.
shutdownDevice
(
"
power_js_test_shutdown
"
);
console
.
info
(
'
power_shutdown_device_test success
'
);
})
})
})