Skip to content
New issue

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

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

Already on GitHub? # to your account

fix parallel-route-not-found-params deploy test #66807

Merged
merged 2 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test/deploy-tests-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"test/e2e/react-dnd-compile/react-dnd-compile.test.ts",
"test/e2e/skip-trailing-slash-redirect/index.test.ts",
"test/e2e/app-dir/app-compilation/index.test.ts",
"test/e2e/app-dir/parallel-route-not-found-params/parallel-route-not-found-params.test.ts",
"test/e2e/app-dir/ppr/ppr.test.ts",
"test/e2e/app-dir/rsc-webpack-loader/rsc-webpack-loader.test.ts",
"test/e2e/swc-warnings/index.test.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,26 @@ import { nextTestSetup } from 'e2e-utils'
import { check } from 'next-test-utils'

describe('parallel-route-not-found', () => {
const { next } = nextTestSetup({
const { next, isNextDeploy } = nextTestSetup({
files: __dirname,
})

it('should behave correctly without any errors', async () => {
const browser = await next.browser('/en')
await check(() => {
if (
next.cliOutput.includes('TypeError') ||
next.cliOutput.includes('Warning')
) {
return 'has-errors'
}

return 'success'
}, 'success')
// Deploy doesn't have access to runtime logs
if (!isNextDeploy) {
await check(() => {
if (
next.cliOutput.includes('TypeError') ||
next.cliOutput.includes('Warning')
) {
return 'has-errors'
}

return 'success'
}, 'success')
}

expect(await browser.elementByCss('body').text()).not.toContain(
'Interception Modal'
Expand All @@ -26,16 +30,19 @@ describe('parallel-route-not-found', () => {

await browser.elementByCss("[href='/en/show']").click()

await check(() => {
if (
next.cliOutput.includes('TypeError') ||
next.cliOutput.includes('Warning')
) {
return 'has-errors'
}
// Deploy doesn't have access to runtime logs
if (!isNextDeploy) {
await check(() => {
if (
next.cliOutput.includes('TypeError') ||
next.cliOutput.includes('Warning')
) {
return 'has-errors'
}

return 'success'
}, 'success')
return 'success'
}, 'success')
}

await check(() => browser.elementByCss('body').text(), /Interception Modal/)
await check(() => browser.elementByCss('body').text(), /Locale: en/)
Expand All @@ -47,16 +54,20 @@ describe('parallel-route-not-found', () => {

it('should handle the not found case correctly without any errors', async () => {
const browser = await next.browser('/de/show')
await check(() => {
if (
next.cliOutput.includes('TypeError') ||
next.cliOutput.includes('Warning')
) {
return 'has-errors'
}

return 'success'
}, 'success')
// Deploy doesn't have access to runtime logs
if (!isNextDeploy) {
await check(() => {
if (
next.cliOutput.includes('TypeError') ||
next.cliOutput.includes('Warning')
) {
return 'has-errors'
}

return 'success'
}, 'success')
}

expect(await browser.elementByCss('body').text()).toContain(
'Custom Not Found'
Expand Down
Loading