@@ -1352,13 +1352,15 @@ test.describe('Page Router with basePath and i18n', () => {
13521352
13531353 test ( 'requesting a non existing page route that needs to be fetched from the blob store like 404.html' , async ( {
13541354 page,
1355- pageRouter ,
1355+ pageRouterBasePathI18n ,
13561356 } ) => {
1357- const response = await page . goto ( new URL ( 'non-existing' , pageRouter . url ) . href )
1357+ const response = await page . goto (
1358+ new URL ( 'base/path/non-existing' , pageRouterBasePathI18n . url ) . href ,
1359+ )
13581360 const headers = response ?. headers ( ) || { }
13591361 expect ( response ?. status ( ) ) . toBe ( 404 )
13601362
1361- expect ( await page . textContent ( 'p' ) ) . toBe ( 'Custom 404 page' )
1363+ expect ( await page . textContent ( 'p' ) ) . toBe ( 'Custom 404 page for locale: en ' )
13621364
13631365 expect ( headers [ 'debug-netlify-cdn-cache-control' ] ) . toMatch (
13641366 / n o - c a c h e , n o - s t o r e , m a x - a g e = 0 , m u s t - r e v a l i d a t e , d u r a b l e / m,
@@ -1368,13 +1370,15 @@ test.describe('Page Router with basePath and i18n', () => {
13681370
13691371 test ( 'requesting a non existing page route that needs to be fetched from the blob store like 404.html (notFound: true)' , async ( {
13701372 page,
1371- pageRouter ,
1373+ pageRouterBasePathI18n ,
13721374 } ) => {
1373- const response = await page . goto ( new URL ( 'static/not-found' , pageRouter . url ) . href )
1375+ const response = await page . goto (
1376+ new URL ( 'base/path/static/not-found' , pageRouterBasePathI18n . url ) . href ,
1377+ )
13741378 const headers = response ?. headers ( ) || { }
13751379 expect ( response ?. status ( ) ) . toBe ( 404 )
13761380
1377- expect ( await page . textContent ( 'p' ) ) . toBe ( 'Custom 404 page' )
1381+ expect ( await page . textContent ( 'p' ) ) . toBe ( 'Custom 404 page for locale: en ' )
13781382
13791383 // Prior to v14.2.4 notFound pages are not cacheable
13801384 // https://github.com/vercel/next.js/pull/66674
0 commit comments