Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
cac89e6e
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看板
未验证
提交
cac89e6e
编写于
11月 11, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 11, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6464 【主题】锁屏服务遗留接口覆盖
Merge pull request !6464 from 何海涛/theme1110
上级
cb01d247
61d90814
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
69 addition
and
4 deletion
+69
-4
theme/screenlock_ets/entry/src/main/ets/test/screenLockPromiseTest.ets
...ock_ets/entry/src/main/ets/test/screenLockPromiseTest.ets
+30
-0
theme/screenlock_ets/entry/src/main/ets/test/screenLockTest.ets
...screenlock_ets/entry/src/main/ets/test/screenLockTest.ets
+39
-4
未找到文件。
theme/screenlock_ets/entry/src/main/ets/test/screenLockPromiseTest.ets
浏览文件 @
cac89e6e
...
@@ -101,5 +101,35 @@ export default function ScreenLockPromiseTest(){
...
@@ -101,5 +101,35 @@ export default function ScreenLockPromiseTest(){
done();
done();
}
}
});
});
/*
* @tc.number SUB_MISC_THEME_screenLock_API_Promise_004
* @tc.name Set to locked screen, query the lock screen state is locked state
* @tc.desc Test ScreenLock API functionality.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it("SUB_MISC_THEME_screenLock_API_Promise_004", 0, async function (done) {
console.info("------------------start SUB_MISC_THEME_screenLock_API_Promise_004-------------------");
try {
screenLock.unlockScreen().then((data) => {
let currentResult = screenLock.isLocked()
expect(currentResult).assertEqual(false)
console.info("====>SUB_MISC_THEME_screenLock_API_Promise_004 success.");
console.info('====>-------------SUB_MISC_THEME_screenLock_API_Promise_004 end----------------------');
done();
}).catch( err => {
console.info("====>SUB_MISC_THEME_screenLock_API_Promise_004 failed because: " + JSON.stringify(err));
expect().assertFail();
done();
});
} catch (error) {
console.info("====>SUB_MISC_THEME_screenLock_API_Promise_004: error = " + error);
expect(true).assertTrue();
}
console.info("------------------end SUB_MISC_THEME_screenLock_API_Promise_004-------------------");
done();
});
})
})
}
}
theme/screenlock_ets/entry/src/main/ets/test/screenLockTest.ets
浏览文件 @
cac89e6e
...
@@ -36,7 +36,7 @@ export default function screenLockJSUnit() {
...
@@ -36,7 +36,7 @@ export default function screenLockJSUnit() {
* @tc.level 0
* @tc.level 0
*/
*/
it('SUB_MISC_THEME_screenLock_API_0012', 0, async function (done) {
it('SUB_MISC_THEME_screenLock_API_0012', 0, async function (done) {
console.info('====>-------------SUB_MISC_THEME_screenLock_API_0012 start----------------------');
console.info('====>-------------SUB_MISC_THEME_screenLock_API_0012 start----------------------');
try{
try{
screenLock.unlock((err, data) => {
screenLock.unlock((err, data) => {
try{
try{
...
@@ -177,15 +177,50 @@ export default function screenLockJSUnit() {
...
@@ -177,15 +177,50 @@ export default function screenLockJSUnit() {
console.info("====>logMessage SUB_MISC_THEME_screenLock_API_0003 throw_err = " + err);
console.info("====>logMessage SUB_MISC_THEME_screenLock_API_0003 throw_err = " + err);
expect().assertFail();
expect().assertFail();
done();
done();
}
}
});
});
} catch (err) {
} catch (err) {
console.info("====>logMessage SUB_MISC_THEME_screenLock_API_0003: err = " + err);
console.info("====>logMessage SUB_MISC_THEME_screenLock_API_0003: err = " + err);
expect().assertFail();
expect().assertFail();
done();
done();
}
});
/*
* @tc.number SUB_MISC_THEME_screenLock_API_0004
* @tc.name Set to locked screen, query the lock screen state is locked state
* @tc.desc Test ScreenLock API functionality.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it("SUB_MISC_THEME_screenLock_API_0004", 0, async function (done) {
console.info("------------------start SUB_MISC_THEME_screenLock_API_0004-------------------");
try {
screenLock.unlockScreen((err) => {
console.info("SUB_MISC_THEME_screenLock_API_0004: send unlockScreen issue success");
try{
if (err) {
console.info("====>SUB_MISC_THEME_screenLock_API_0004 failed because: " + JSON.stringify(err));
expect().assertFail();
done();
}
let currentResult = screenLock.isLocked()
expect(currentResult).assertEqual(false)
console.info("====>SUB_MISC_THEME_screenLock_API_0004 success.");
console.info('====>-------------SUB_MISC_THEME_screenLock_API_0004 end----------------------');
done();
}catch(err){
console.info('====>SUB_MISC_THEME_screenLock_API_0004 throw_err : ' + JSON.stringify(err));
expect().assertFail();
done();
}
});
} catch (error) {
console.info("SUB_MISC_THEME_screenLock_API_0004: error = " + error);
expect().assertFail();
done();
}
}
});
});
/*
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录