未验证 提交 22264e99 编写于 作者: O openharmony_ci 提交者: Gitee

!7858 优化用例setSystemBarEnableTest8,解决偶现失败问题

Merge pull request !7858 from 姚翠/monthly_20221018
......@@ -493,6 +493,7 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
expect().assertFail()
done();
});
await sleep(2000)
await setSystemBarEnableT(mainWnd).catch((err) => {
console.info(msgStr + 'setWindowSystemBarEnable error : ' + JSON.stringify(err));
expect().assertFail();
......@@ -2104,7 +2105,11 @@ export default function windowCallbackTest(context, windowStage, abilityStorage)
mainWin.snapshot((err, data) => {
if (err && err.code) {
console.log(msgStr + 'snapshot err.code:' + JSON.stringify(err.code));
expect().assertFail();
try{
expect().assertFail();
} catch (error) {
console.info(`expected catch error: ${JSON.stringify(error)}`)
}
done();
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册