From d8bdd03cf61498c1e5ae56a17c3d6f1730dda7a8 Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Tue, 17 Aug 2021 19:45:36 +0300 Subject: [PATCH] test: fix stability (#3661) --- test/e2e/web-socket-server-url.test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/e2e/web-socket-server-url.test.js b/test/e2e/web-socket-server-url.test.js index 794c9845e9..f5249a6807 100644 --- a/test/e2e/web-socket-server-url.test.js +++ b/test/e2e/web-socket-server-url.test.js @@ -2213,6 +2213,15 @@ describe("web socket server URL", () => { await page.goto(`http://localhost:${port1}/main`, { waitUntil: "networkidle0", }); + await new Promise((resolve) => { + const interval = setInterval(() => { + if (consoleMessages.includes("[webpack-dev-server] Disconnected!")) { + clearInterval(interval); + + resolve(); + } + }, 100); + }); expect(consoleMessages).toMatchSnapshot("console messages"); expect(