From c806184bfee8200f49b8ac2ed26c4c35d356a7b1 Mon Sep 17 00:00:00 2001 From: Robo Date: Mon, 12 Jul 2021 15:19:30 +0900 Subject: [PATCH] chore: fix flaky fullscreen inheritance test (#30081) --- spec-main/api-browser-window-spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 0a1863abf0d0..cec65e092c03 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -4211,8 +4211,10 @@ describe('BrowserWindow module', () => { await enterFullScreen; expect(w.isFullScreen()).to.be.true('isFullScreen'); await delay(); - const w2 = new BrowserWindow(); - await delay(); + const w2 = new BrowserWindow({ show: false }); + const enterFullScreen2 = emittedOnce(w2, 'enter-full-screen'); + w2.show(); + await enterFullScreen2; expect(w2.isFullScreen()).to.be.true('isFullScreen'); }); });