@@ -314,36 +314,39 @@ describe('app-dir static/dynamic handling', () => {
314
314
expect ( $ ( '#page' ) . text ( ) ) . toBe ( '/blog/[author]/[slug]' )
315
315
}
316
316
} )
317
- it ( 'should navigate to static path correctly' , async ( ) => {
318
- const browser = await webdriver ( next . url , '/blog/tim' )
319
- await browser . eval ( 'window.beforeNav = 1' )
320
317
321
- expect ( await browser . eval ( 'document.documentElement.innerHTML' ) ) . toContain ( '/blog/[author]' )
322
- await browser . elementByCss ( '#author-2' ) . click ( )
323
-
324
- await check ( async ( ) => {
325
- const params = JSON . parse ( await browser . elementByCss ( '#params' ) . text ( ) )
326
- return params . author === 'seb' ? 'found' : params
327
- } , 'found' )
328
-
329
- expect ( await browser . eval ( 'window.beforeNav' ) ) . toBe ( 1 )
330
- await browser . elementByCss ( '#author-1-post-1' ) . click ( )
331
-
332
- await check ( async ( ) => {
333
- const params = JSON . parse ( await browser . elementByCss ( '#params' ) . text ( ) )
334
- return params . author === 'tim' && params . slug === 'first-post' ? 'found' : params
335
- } , 'found' )
336
-
337
- expect ( await browser . eval ( 'window.beforeNav' ) ) . toBe ( 1 )
338
- await browser . back ( )
339
-
340
- await check ( async ( ) => {
341
- const params = JSON . parse ( await browser . elementByCss ( '#params' ) . text ( ) )
342
- return params . author === 'seb' ? 'found' : params
343
- } , 'found' )
344
-
345
- expect ( await browser . eval ( 'window.beforeNav' ) ) . toBe ( 1 )
346
- } )
318
+ if ( ! ( ( global as any ) . isNextStart && process . env . CUSTOM_CACHE_HANDLER ) ) {
319
+ it ( 'should navigate to static path correctly' , async ( ) => {
320
+ const browser = await webdriver ( next . url , '/blog/tim' )
321
+ await browser . eval ( 'window.beforeNav = 1' )
322
+
323
+ expect ( await browser . eval ( 'document.documentElement.innerHTML' ) ) . toContain ( '/blog/[author]' )
324
+ await browser . elementByCss ( '#author-2' ) . click ( )
325
+
326
+ await check ( async ( ) => {
327
+ const params = JSON . parse ( await browser . elementByCss ( '#params' ) . text ( ) )
328
+ return params . author === 'seb' ? 'found' : params
329
+ } , 'found' )
330
+
331
+ expect ( await browser . eval ( 'window.beforeNav' ) ) . toBe ( 1 )
332
+ await browser . elementByCss ( '#author-1-post-1' ) . click ( )
333
+
334
+ await check ( async ( ) => {
335
+ const params = JSON . parse ( await browser . elementByCss ( '#params' ) . text ( ) )
336
+ return params . author === 'tim' && params . slug === 'first-post' ? 'found' : params
337
+ } , 'found' )
338
+
339
+ expect ( await browser . eval ( 'window.beforeNav' ) ) . toBe ( 1 )
340
+ await browser . back ( )
341
+
342
+ await check ( async ( ) => {
343
+ const params = JSON . parse ( await browser . elementByCss ( '#params' ) . text ( ) )
344
+ return params . author === 'seb' ? 'found' : params
345
+ } , 'found' )
346
+
347
+ expect ( await browser . eval ( 'window.beforeNav' ) ) . toBe ( 1 )
348
+ } )
349
+ }
347
350
348
351
it ( 'should ssr dynamically when detected automatically with fetch cache option' , async ( ) => {
349
352
const pathname = '/ssr-auto/cache-no-store'
0 commit comments