Unverified Commit 830090a4 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update error-load-fail test to use check to handle reload taking longer on windows (#10631)

* Update error-load-fail test to use check to handle reload taking longer on windows

* bump
parent fb729823
......@@ -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/)
})
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment