Unverified Commit 8f67469b authored by Zack Tanner's avatar Zack Tanner Committed by GitHub

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

The rest of this test is valid for a deployed environment, we just won't
have access to runtime logs.
parent e2968464
......@@ -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",
......
......@@ -2,12 +2,15 @@ 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')
// Deploy doesn't have access to runtime logs
if (!isNextDeploy) {
await check(() => {
if (
next.cliOutput.includes('TypeError') ||
......@@ -18,6 +21,7 @@ describe('parallel-route-not-found', () => {
return 'success'
}, 'success')
}
expect(await browser.elementByCss('body').text()).not.toContain(
'Interception Modal'
......@@ -26,6 +30,8 @@ describe('parallel-route-not-found', () => {
await browser.elementByCss("[href='/en/show']").click()
// Deploy doesn't have access to runtime logs
if (!isNextDeploy) {
await check(() => {
if (
next.cliOutput.includes('TypeError') ||
......@@ -36,6 +42,7 @@ describe('parallel-route-not-found', () => {
return 'success'
}, 'success')
}
await check(() => browser.elementByCss('body').text(), /Interception Modal/)
await check(() => browser.elementByCss('body').text(), /Locale: en/)
......@@ -47,6 +54,9 @@ describe('parallel-route-not-found', () => {
it('should handle the not found case correctly without any errors', async () => {
const browser = await next.browser('/de/show')
// Deploy doesn't have access to runtime logs
if (!isNextDeploy) {
await check(() => {
if (
next.cliOutput.includes('TypeError') ||
......@@ -57,6 +67,7 @@ describe('parallel-route-not-found', () => {
return 'success'
}, 'success')
}
expect(await browser.elementByCss('body').text()).toContain(
'Custom Not Found'
......
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