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 f873bc33a96a47f64c358ee5af97f7d3e0b81734..185f5338c21fae4e914da30ec64bc579392e84c5 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; }