@@ -61,12 +61,13 @@ describe('Dynamic Routing', () => {
61
61
expect ( res . body ) . to . contain ( 'Under the Dome' )
62
62
} )
63
63
} )
64
- it ( 'renders fallback page via ODB on a non-prerendered dynamic route with fallback: true' , ( ) => {
64
+ it ( 'does not render fallback page via ODB on a non-prerendered dynamic route with fallback: true' , ( ) => {
65
+ // unfortunately there is a problem with `fallback: true` in ODB context - the fallback would be cached indefinitely
66
+ // so visits to those pages would always render the fallback first and browser client would later re-render with correct
67
+ // content. As this is not ideal the `fallback: true` is treated as `fallback: blocking`.
65
68
cy . request ( { url : '/getStaticProps/withFallback/3/' , headers : { 'x-nf-debug-logging' : '1' } } ) . then ( ( res ) => {
66
69
expect ( res . status ) . to . eq ( 200 )
67
- // expect 'odb' until https://github.com/netlify/pillar-runtime/issues/438 is fixed
68
70
expect ( res . headers ) . to . have . property ( 'x-nf-render-mode' , 'odb' )
69
- // expect 'Bitten' until the above is fixed and we can test for fallback 'Loading...' message
70
71
expect ( res . body ) . to . contain ( 'Bitten' )
71
72
} )
72
73
} )
@@ -115,12 +116,14 @@ describe('Dynamic Routing', () => {
115
116
} ,
116
117
)
117
118
} )
118
- it ( 'renders fallback page via ODB on a non-prerendered dynamic route with revalidate and fallback: true' , ( ) => {
119
+ it ( 'does not render fallback page via ODB on a non-prerendered dynamic route with revalidate and fallback: true' , ( ) => {
120
+ // unfortunately there is a problem with `fallback: true` in ODB context - the fallback would be cached indefinitely
121
+ // so visits to those pages would always render the fallback first and browser client would later re-render with correct
122
+ // content. As this is not ideal the `fallback: true` is treated as `fallback: blocking`.
119
123
cy . request ( { url : '/getStaticProps/withRevalidate/withFallback/3/' , headers : { 'x-nf-debug-logging' : '1' } } ) . then (
120
124
( res ) => {
121
125
expect ( res . status ) . to . eq ( 200 )
122
126
expect ( res . headers ) . to . have . property ( 'x-nf-render-mode' , 'odb ttl=60' )
123
- // expect 'Bitten' until https://github.com/netlify/pillar-runtime/issues/438 is fixed
124
127
expect ( res . body ) . to . contain ( 'Bitten' )
125
128
} ,
126
129
)
0 commit comments