11describe ( 'Enhanced middleware' , ( ) => {
22 it ( 'rewrites the response body' , ( ) => {
33 cy . visit ( '/static' )
4- cy . get ( '#message' ) . contains ( 'This was static but has been transformed in' )
4+ cy . get ( '#message' ) . contains ( 'This was static (& escaping test &) but has been transformed in' )
55 cy . contains ( "This is an ad that isn't shown by default" )
66 } )
77
@@ -10,7 +10,7 @@ describe('Enhanced middleware', () => {
1010 expect ( response . body ) . to . have . nested . property ( 'pageProps.showAd' , true )
1111 expect ( response . body )
1212 . to . have . nested . property ( 'pageProps.message' )
13- . that . includes ( 'This was static but has been transformed in' )
13+ . that . includes ( 'This was static (& escaping test &) but has been transformed in' )
1414 } )
1515 } )
1616
@@ -27,13 +27,13 @@ describe('Enhanced middleware', () => {
2727
2828 it ( 'handles uppercase i18n redirects properly ' , ( ) => {
2929 cy . visit ( '/de-DE/static' )
30- cy . get ( '#message' ) . contains ( 'This was static but has been transformed in' )
30+ cy . get ( '#message' ) . contains ( 'This was static (& escaping test &) but has been transformed in' )
3131 cy . contains ( "This is an ad that isn't shown by default" )
3232 } )
3333
3434 it ( 'handles lowercase i18n redirects properly ' , ( ) => {
3535 cy . visit ( '/de-de/static' )
36- cy . get ( '#message' ) . contains ( 'This was static but has been transformed in' )
36+ cy . get ( '#message' ) . contains ( 'This was static (& escaping test &) but has been transformed in' )
3737 cy . contains ( "This is an ad that isn't shown by default" )
3838 } )
3939} )
0 commit comments