11import { expect } from '@playwright/test'
2- import { test } from '../utils/playwright-helpers.js'
32import { nextVersionSatisfies } from '../utils/next-version-helpers.mjs'
3+ import { test } from '../utils/playwright-helpers.js'
44
55export function waitFor ( millis : number ) {
66 return new Promise ( ( resolve ) => setTimeout ( resolve , millis ) )
@@ -405,7 +405,7 @@ test.describe('Simple Page Router (no basePath, no i18n)', () => {
405405 const headers = response ?. headers ( ) || { }
406406 expect ( response ?. status ( ) ) . toBe ( 404 )
407407
408- expect ( await page . textContent ( 'h1 ' ) ) . toBe ( '404' )
408+ expect ( await page . textContent ( 'p ' ) ) . toBe ( 'Custom 404 page ' )
409409
410410 // https://github.com/vercel/next.js/pull/69802 made changes to returned cache-control header,
411411 // after that (14.2.10 and canary.147) 404 pages would have `private` directive, before that
@@ -429,7 +429,7 @@ test.describe('Simple Page Router (no basePath, no i18n)', () => {
429429 const headers = response ?. headers ( ) || { }
430430 expect ( response ?. status ( ) ) . toBe ( 404 )
431431
432- expect ( await page . textContent ( 'h1 ' ) ) . toBe ( '404' )
432+ expect ( await page . textContent ( 'p ' ) ) . toBe ( 'Custom 404 page ' )
433433
434434 expect ( headers [ 'netlify-cdn-cache-control' ] ) . toBe (
435435 nextVersionSatisfies ( '>=15.0.0-canary.187' )
@@ -1269,7 +1269,7 @@ test.describe('Page Router with basePath and i18n', () => {
12691269 const headers = response ?. headers ( ) || { }
12701270 expect ( response ?. status ( ) ) . toBe ( 404 )
12711271
1272- expect ( await page . textContent ( 'h1 ' ) ) . toBe ( '404' )
1272+ expect ( await page . textContent ( 'p ' ) ) . toBe ( 'Custom 404 page ' )
12731273
12741274 // https://github.com/vercel/next.js/pull/69802 made changes to returned cache-control header,
12751275 // after that 404 pages would have `private` directive, before that it would not
@@ -1292,7 +1292,7 @@ test.describe('Page Router with basePath and i18n', () => {
12921292 const headers = response ?. headers ( ) || { }
12931293 expect ( response ?. status ( ) ) . toBe ( 404 )
12941294
1295- expect ( await page . textContent ( 'h1 ' ) ) . toBe ( '404' )
1295+ expect ( await page . textContent ( 'p ' ) ) . toBe ( 'Custom 404 page ' )
12961296
12971297 expect ( headers [ 'netlify-cdn-cache-control' ] ) . toBe (
12981298 nextVersionSatisfies ( '>=15.0.0-canary.187' )
0 commit comments