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 1
1
import { expect , test } from "@playwright/test" ;
2
2
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 } ) => {
4
4
const result = await page . goto ( "/ssg" ) ;
5
5
expect ( result ) . toBeDefined ( ) ;
6
6
expect ( result ?. status ( ) ) . toBe ( 200 ) ;
7
7
const headers = result ?. headers ( ) ;
8
8
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 ( ) ;
20
11
} ) ;
You can’t perform that action at this time.
0 commit comments