Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e0650127
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看板
未验证
提交
e0650127
编写于
7月 13, 2023
作者:
O
openharmony_ci
提交者:
Gitee
7月 13, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8543 add moveMissionsToForeground/moveMissionsToBackground test case
Merge pull request !8543 from 丁小龙/0425
上级
d0d58a2b
2bfe5782
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
116 addition
and
0 deletion
+116
-0
ability/ability_runtime/actssystemapitest/entry/src/main/ets/test/MissionManager.test.ets
...emapitest/entry/src/main/ets/test/MissionManager.test.ets
+116
-0
未找到文件。
ability/ability_runtime/actssystemapitest/entry/src/main/ets/test/MissionManager.test.ets
浏览文件 @
e0650127
...
...
@@ -432,5 +432,121 @@ export default function missionManagerTest() {
done();
})
})
/**
* @tc.number: System_API_Test_Mission_Manager_2200
* @tc.name: callback form moveMissionsToForeground system interface interception test
* @tc.desc: Test the third-party application call moveMissionsToForeground will be blocked
* @tc.level 3
*/
it('System_API_Test_Mission_Manager_2200', 0, function (done) {
let TAG = 'System_API_Test_Mission_Manager_2200';
let missionIds = [1, 2, 3];
missionManager.moveMissionsToForeground(missionIds, (err) => {
console.log(TAG + " err.code: " + err.code);
expect(err.code).assertEqual(ERROR_CODE);
done();
});
})
/**
* @tc.number: System_API_Test_Mission_Manager_2300
* @tc.name: promise form moveMissionsToForeground system interface interception test
* @tc.desc: Test the third-party application call moveMissionsToForeground will be blocked
* @tc.level 3
*/
it('System_API_Test_Mission_Manager_2300', 0, function (done) {
let TAG = 'System_API_Test_Mission_Manager_2300';
let missionIds = [1, 2, 3];
missionManager.moveMissionsToForeground(missionIds)
.then(err => {
console.log(TAG + ` err->${JSON.stringify(err)}`);
expect().assertFail();
done();
})
.catch(err => {
console.log(TAG + " err.code: " + err.code);
expect(err.code).assertEqual(ERROR_CODE);
done();
})
})
/**
* @tc.number: System_API_Test_Mission_Manager_2400
* @tc.name: Multi-parameter moveMissionsToForeground system interface interception test in the form of callback
* @tc.desc: Test the third-party application call moveMissionsToForeground will be blocked
* @tc.level 3
*/
it('System_API_Test_Mission_Manager_2400', 0, function (done) {
let TAG = 'System_API_Test_Mission_Manager_2400';
let missionIds = [1, 2, 3];
let topMission = 2;
missionManager.moveMissionsToForeground(missionIds, topMission, (err) => {
console.log(TAG + " err.code: " + err.code);
expect(err.code).assertEqual(ERROR_CODE);
done();
});
})
/**
* @tc.number: System_API_Test_Mission_Manager_2500
* @tc.name: Multi-parameter moveMissionsToForeground system interface interception test in the form of promise
* @tc.desc: Test the third-party application call moveMissionsToForeground will be blocked
* @tc.level 3
*/
it('System_API_Test_Mission_Manager_2500', 0, function (done) {
let TAG = 'System_API_Test_Mission_Manager_2500';
let missionIds = [1, 2, 3];
let topMission = 2;
missionManager.moveMissionsToForeground(missionIds, topMission)
.then(err => {
console.log(TAG + ` err->${JSON.stringify(err)}`);
expect().assertFail();
done();
})
.catch(err => {
console.log(TAG + " err.code: " + err.code);
expect(err.code).assertEqual(ERROR_CODE);
done();
})
})
/**
* @tc.number: System_API_Test_Mission_Manager_2600
* @tc.name: callback form moveMissionsToBackground system interface interception test
* @tc.desc: Test the third-party application call moveMissionsToBackground will be blocked
* @tc.level 3
*/
it('System_API_Test_Mission_Manager_2600', 0, function (done) {
let TAG = 'System_API_Test_Mission_Manager_2600';
let missionIds = [1, 2, 3];
missionManager.moveMissionsToBackground(missionIds, (err) => {
console.log(TAG + " err.code: " + err.code);
expect(err.code).assertEqual(ERROR_CODE);
done();
});
})
/**
* @tc.number: System_API_Test_Mission_Manager_2700
* @tc.name: promise form moveMissionsToBackground system interface interception test
* @tc.desc: Test the third-party application call moveMissionsToBackground will be blocked
* @tc.level 3
*/
it('System_API_Test_Mission_Manager_2700', 0, function (done) {
let TAG = 'System_API_Test_Mission_Manager_2700';
let missionIds = [1, 2, 3];
missionManager.moveMissionsToBackground(missionIds)
.then(err => {
console.log(TAG + ` err->${JSON.stringify(err)}`);
expect().assertFail();
done();
})
.catch(err => {
console.log(TAG + " err.code: " + err.code);
expect(err.code).assertEqual(ERROR_CODE);
done();
})
})
})
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录