Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from Feb 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 6 additions & 9 deletions test/integration/error-load-fail/test/index.test.js
Expand Up @@ -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, '..')
Expand All @@ -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/)
})
})