From 778c5af92f6271dcc34e2ce916987bee2c5c54d2 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Tue, 14 Jul 2020 02:18:33 -0400 Subject: [PATCH] Fix test --- test/integration/worker-loader/pages/index.js | 6 +++--- test/integration/worker-loader/test/index.test.js | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/integration/worker-loader/pages/index.js b/test/integration/worker-loader/pages/index.js index 7143cd562d09b..06bfc09ea654e 100644 --- a/test/integration/worker-loader/pages/index.js +++ b/test/integration/worker-loader/pages/index.js @@ -31,9 +31,9 @@ export default function Home() { return (
-

$RefreshRegistry repro

-
Web: {expensiveWebStatus}
-
Worker: {expensiveWorkerStatus}
+

$RefreshRegistry repro

+
Web: {expensiveWebStatus}
+
Worker: {expensiveWorkerStatus}
) } diff --git a/test/integration/worker-loader/test/index.test.js b/test/integration/worker-loader/test/index.test.js index f4876522d5c55..8526d473397eb 100644 --- a/test/integration/worker-loader/test/index.test.js +++ b/test/integration/worker-loader/test/index.test.js @@ -22,8 +22,10 @@ describe('Web Workers with Fast Refresh', () => { let browser try { browser = await webdriver(context.appPort, '/') - await check(() => browser.elementByCss('#web-status'), /PASS/i) - await check(() => browser.elementByCss('#worker-status'), /PASS/i) + await browser.waitForElementByCss('#web-status') + await check(() => browser.elementByCss('#web-status').text(), /PASS/i) + await browser.waitForElementByCss('#worker-status') + await check(() => browser.elementByCss('#worker-status').text(), /PASS/i) } finally { if (browser) { await browser.close()