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

Stabilize i18n fallback test #17957

Merged
merged 6 commits into from Oct 16, 2020
Merged
Changes from 1 commit
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
9 changes: 6 additions & 3 deletions test/integration/i18n-support/test/index.test.js
Expand Up @@ -17,6 +17,7 @@ import {
File,
waitFor,
normalizeRegEx,
check,
} from 'next-test-utils'

jest.setTimeout(1000 * 60 * 2)
Expand Down Expand Up @@ -674,11 +675,13 @@ function runTests(isDev) {
it('should render 404 for fallback page that returned 404', async () => {
const browser = await webdriver(appPort, '/en/not-found/fallback/first')
await browser.waitForElementByCss('h1')
await browser.eval('window.beforeNav = 1')

expect(await browser.elementByCss('html').text()).toContain(
'This page could not be found'
await check(
() => browser.elementByCss('html').text(),
/This page could not be found/
)
await browser.eval('window.beforeNav = 1')

expect(await browser.elementByCss('html').getAttribute('lang')).toBe('en')

const parsedUrl = url.parse(
Expand Down