@@ -407,21 +407,6 @@ describe('app dir - navigation', () => {
407
407
} )
408
408
} )
409
409
410
- describe ( 'bots' , ( ) => {
411
- if ( ! isNextDeploy ) {
412
- it ( 'should block rendering for bots and return 404 status' , async ( ) => {
413
- const res = await next . fetch ( '/not-found/servercomponent' , {
414
- headers : {
415
- 'User-Agent' : 'Googlebot' ,
416
- } ,
417
- } )
418
-
419
- expect ( res . status ) . toBe ( 404 )
420
- expect ( await res . text ( ) ) . toInclude ( '"noindex"' )
421
- } )
422
- }
423
- } )
424
-
425
410
describe ( 'redirect' , ( ) => {
426
411
describe ( 'components' , ( ) => {
427
412
it ( 'should redirect in a server component' , async ( ) => {
@@ -520,7 +505,9 @@ describe('app dir - navigation', () => {
520
505
521
506
// If the timestamp has changed, throw immediately.
522
507
if ( currentTimestamp !== initialTimestamp ) {
523
- throw new Error ( 'Timestamp has changed' )
508
+ throw new Error (
509
+ `Timestamp has changed from the initial '${ initialTimestamp } ' to '${ currentTimestamp } '`
510
+ )
524
511
}
525
512
526
513
// If we've reached the last attempt without the timestamp changing, force a retry failure to keep going.
@@ -582,27 +569,6 @@ describe('app dir - navigation', () => {
582
569
expect ( await browser . url ( ) ) . toBe ( next . url + '/redirect-dest' )
583
570
} )
584
571
} )
585
-
586
- describe ( 'status code' , ( ) => {
587
- it ( 'should respond with 307 status code in server component' , async ( ) => {
588
- const res = await next . fetch ( '/redirect/servercomponent' , {
589
- redirect : 'manual' ,
590
- } )
591
- expect ( res . status ) . toBe ( 307 )
592
- } )
593
- it ( 'should respond with 307 status code in client component' , async ( ) => {
594
- const res = await next . fetch ( '/redirect/clientcomponent' , {
595
- redirect : 'manual' ,
596
- } )
597
- expect ( res . status ) . toBe ( 307 )
598
- } )
599
- it ( 'should respond with 308 status code if permanent flag is set' , async ( ) => {
600
- const res = await next . fetch ( '/redirect/servercomponent-2' , {
601
- redirect : 'manual' ,
602
- } )
603
- expect ( res . status ) . toBe ( 308 )
604
- } )
605
- } )
606
572
} )
607
573
608
574
describe ( 'external push' , ( ) => {
@@ -994,15 +960,18 @@ describe('app dir - navigation', () => {
994
960
describe ( 'locale warnings' , ( ) => {
995
961
it ( 'should warn about using the `locale` prop with `next/link` in app router' , async ( ) => {
996
962
const browser = await next . browser ( '/locale-app' )
997
- const logs = await browser . log ( )
998
- expect ( logs ) . toContainEqual (
999
- expect . objectContaining ( {
1000
- message : expect . stringContaining (
1001
- 'The `locale` prop is not supported in `next/link` while using the `app` router.'
1002
- ) ,
1003
- source : 'warning' ,
1004
- } )
1005
- )
963
+
964
+ await retry ( async ( ) => {
965
+ const logs = await browser . log ( )
966
+ expect ( logs ) . toContainEqual (
967
+ expect . objectContaining ( {
968
+ message : expect . stringContaining (
969
+ 'The `locale` prop is not supported in `next/link` while using the `app` router.'
970
+ ) ,
971
+ source : 'warning' ,
972
+ } )
973
+ )
974
+ } )
1006
975
} )
1007
976
1008
977
it ( 'should have no warnings in pages router' , async ( ) => {
0 commit comments