From e33f70d294de570fc298f8325fd7ea67d5a98a0e Mon Sep 17 00:00:00 2001 From: yaocui Date: Wed, 8 Mar 2023 11:38:12 +0800 Subject: [PATCH] update case 20230308 Signed-off-by: yaocui --- .../entry/src/main/ets/test/windowCallback.test.ets | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/graphic/windowStage/entry/src/main/ets/test/windowCallback.test.ets b/graphic/windowStage/entry/src/main/ets/test/windowCallback.test.ets index f873bc33a..185f5338c 100644 --- a/graphic/windowStage/entry/src/main/ets/test/windowCallback.test.ets +++ b/graphic/windowStage/entry/src/main/ets/test/windowCallback.test.ets @@ -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; } -- GitLab