Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
df6bf199
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
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看板
未验证
提交
df6bf199
编写于
4月 27, 2022
作者:
O
openharmony_ci
提交者:
Gitee
4月 27, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3059 New use cases of global resource scheduling subsystem
Merge pull request !3059 from 火箭龟/njb0425
上级
477afc5d
959f33b7
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
1398 addition
and
0 deletion
+1398
-0
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/default/test/DeviceUsageStatisticsJsunit.test.js
.../main/js/default/test/DeviceUsageStatisticsJsunit.test.js
+1025
-0
resourceschedule/resourceschedule_standard/workscheduler/src/main/js/default/test/WorkScheduler.test.js
...kscheduler/src/main/js/default/test/WorkScheduler.test.js
+373
-0
未找到文件。
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/default/test/DeviceUsageStatisticsJsunit.test.js
浏览文件 @
df6bf199
此差异已折叠。
点击以展开。
resourceschedule/resourceschedule_standard/workscheduler/src/main/js/default/test/WorkScheduler.test.js
浏览文件 @
df6bf199
...
...
@@ -1022,4 +1022,377 @@ describe("WorkSchedulerJsTest", function () {
console
.
log
(
"
test workScheduler workInfo abilityName :
"
+
workInfo
.
abilityName
);
done
();
})
/*
* @tc.name: WorkSchedulerJsTest053
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest053
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest053---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
batteryLevel
:
10
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest054
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest054
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest054---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
batteryLevel
:
30
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest055
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest055
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest055---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
batteryLevel
:
40
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest056
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest056
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest056---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
batteryLevel
:
60
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest057
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest057
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest057---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
batteryLevel
:
70
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest058
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest058
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest058---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
batteryLevel
:
90
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest059
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest059
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest059---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
batteryLevel
:
100
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest060
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest060
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest060---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
isRepeat
:
true
,
repeatCycleTime
:
1200000
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest061
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest061
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest061---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
isRepeat
:
true
,
repeatCycleTime
:
1500000
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest062
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest062
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest062---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
isRepeat
:
true
,
repeatCycleTime
:
1800000
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest063
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest063
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest063---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
isRepeat
:
true
,
repeatCycleTime
:
2100000
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest064
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest064
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest064---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
isRepeat
:
false
,
repeatCycleTime
:
1200000
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest065
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest065
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest065---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
isRepeat
:
false
,
repeatCycleTime
:
1500000
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest066
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest066
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest066---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
isRepeat
:
false
,
repeatCycleTime
:
1800000
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest067
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest067
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest067---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
isRepeat
:
false
,
repeatCycleTime
:
2100000
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest068
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest068
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest068---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
repeatCycleTime
:
1200000
,
repeatCount
:
1
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest069
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest069
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest069---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
repeatCycleTime
:
1500000
,
repeatCount
:
1
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest070
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest070
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest070---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
repeatCycleTime
:
1800000
,
repeatCount
:
2
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
/*
* @tc.name: WorkSchedulerJsTest071
* @tc.desc: test work scheduler without conditions.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
WorkSchedulerJsTest071
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------WorkSchedulerJsTest071---------------------------
'
);
let
workInfo
=
{
workId
:
5
,
bundleName
:
"
ohos.acts.resourceschedule.workscheduler.js.function
"
,
abilityName
:
"
com.mytest.abilityName
"
,
repeatCycleTime
:
2100000
,
repeatCount
:
2
}
let
res
=
workScheduler
.
startWork
(
workInfo
);
expect
(
res
).
assertEqual
(
false
)
done
();
})
})
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录