File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
examples/e2e/app-pages-router/e2e Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 11import { expect , test } from "@playwright/test" ;
22
3- test ( "should test if poweredByHeader adds the correct headers " , async ( { page } ) => {
3+ test ( "does not set x-opennext-requestid header on cache interceptor response " , async ( { page } ) => {
44 const result = await page . goto ( "/ssg" ) ;
55 expect ( result ) . toBeDefined ( ) ;
66 expect ( result ?. status ( ) ) . toBe ( 200 ) ;
77 const headers = result ?. headers ( ) ;
88
9- // This header should not be defined even when cache interception happens in the external middleware
10- expect ( headers ?. [ "x-opennext-requestid" ] ) . toBeFalsy ( ) ;
11-
12- await page . waitForTimeout ( 2000 ) ; // Wait 2s
13-
14- const result2 = await page . goto ( "/ssg" ) ;
15- expect ( result2 ) . toBeDefined ( ) ;
16- expect ( result2 ?. status ( ) ) . toBe ( 200 ) ;
17- const headers2 = result2 ?. headers ( ) ;
18-
19- expect ( headers2 ?. [ "x-opennext-requestid" ] ) . toBeFalsy ( ) ;
9+ // This header should not be defined even when its a cached response from the cache interception in the external middleware
10+ expect ( headers ?. [ "x-opennext-requestid" ] ) . toBeUndefined ( ) ;
2011} ) ;
You can’t perform that action at this time.
0 commit comments