From e0bf1ecfd6e6e8e8cd26ff81d05ebb2943d2b033 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Fri, 21 Feb 2020 10:43:11 -0600 Subject: [PATCH 1/2] Update error-load-fail test to use check to handle reload taking longer on windows --- .../error-load-fail/test/index.test.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/test/integration/error-load-fail/test/index.test.js b/test/integration/error-load-fail/test/index.test.js index fafdc88ff9d7172..2e9c28369a83c08 100644 --- a/test/integration/error-load-fail/test/index.test.js +++ b/test/integration/error-load-fail/test/index.test.js @@ -2,13 +2,7 @@ /* global jasmine */ import path from 'path' import webdriver from 'next-webdriver' -import { - nextBuild, - nextStart, - findPort, - killApp, - waitFor, -} from 'next-test-utils' +import { nextBuild, nextStart, findPort, killApp, check } from 'next-test-utils' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1 const appDir = path.join(__dirname, '..') @@ -29,8 +23,11 @@ describe('Failing to load _error', () => { await killApp(app) await browser.elementByCss('#to-broken').click() - await waitFor(2000) - expect(await browser.eval('window.beforeNavigate')).toBeFalsy() + await check(async () => { + return !(await browser.eval('window.beforeNavigate')) + ? 'reloaded' + : 'fail' + }, /reloaded/) }) }) From c3c39fba98be20ea647d30de9df010df180472b3 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Fri, 21 Feb 2020 10:53:18 -0600 Subject: [PATCH 2/2] bump