@@ -1352,13 +1352,15 @@ test.describe('Page Router with basePath and i18n', () => {
1352
1352
1353
1353
test ( 'requesting a non existing page route that needs to be fetched from the blob store like 404.html' , async ( {
1354
1354
page,
1355
- pageRouter ,
1355
+ pageRouterBasePathI18n ,
1356
1356
} ) => {
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
+ )
1358
1360
const headers = response ?. headers ( ) || { }
1359
1361
expect ( response ?. status ( ) ) . toBe ( 404 )
1360
1362
1361
- expect ( await page . textContent ( 'p' ) ) . toBe ( 'Custom 404 page' )
1363
+ expect ( await page . textContent ( 'p' ) ) . toBe ( 'Custom 404 page for locale: en ' )
1362
1364
1363
1365
expect ( headers [ 'debug-netlify-cdn-cache-control' ] ) . toMatch (
1364
1366
/ 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', () => {
1368
1370
1369
1371
test ( 'requesting a non existing page route that needs to be fetched from the blob store like 404.html (notFound: true)' , async ( {
1370
1372
page,
1371
- pageRouter ,
1373
+ pageRouterBasePathI18n ,
1372
1374
} ) => {
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
+ )
1374
1378
const headers = response ?. headers ( ) || { }
1375
1379
expect ( response ?. status ( ) ) . toBe ( 404 )
1376
1380
1377
- expect ( await page . textContent ( 'p' ) ) . toBe ( 'Custom 404 page' )
1381
+ expect ( await page . textContent ( 'p' ) ) . toBe ( 'Custom 404 page for locale: en ' )
1378
1382
1379
1383
// Prior to v14.2.4 notFound pages are not cacheable
1380
1384
// https://github.com/vercel/next.js/pull/66674
0 commit comments