@@ -45,12 +45,26 @@ test.describe('app router on-demand revalidation', () => {
45
45
revalidateApiPath : '/api/on-demand-revalidate/tag?tag=show-4' ,
46
46
expectedH1Content : 'Hello, Statically fetched show 4' ,
47
47
} ,
48
+ {
49
+ label : 'revalidatePath (prerendered page with dynamic path) - non-ASCII variant' ,
50
+ prerendered : true ,
51
+ pagePath : '/product/事前レンダリング' ,
52
+ revalidateApiPath : `/api/on-demand-revalidate/path?path=/product/事前レンダリング` ,
53
+ expectedH1Content : 'Product 事前レンダリング' ,
54
+ } ,
55
+ {
56
+ label : 'revalidatePath (not prerendered page with dynamic path) - non-ASCII variant' ,
57
+ prerendered : false ,
58
+ pagePath : '/product/事前レンダリングされていない' ,
59
+ revalidateApiPath : `/api/on-demand-revalidate/path?path=/product/事前レンダリングされていない` ,
60
+ expectedH1Content : 'Product 事前レンダリングされていない' ,
61
+ } ,
48
62
] ) {
49
63
test ( label , async ( { page, pollUntilHeadersMatch, serverComponents } ) => {
50
64
// in case there is retry or some other test did hit that path before
51
65
// we want to make sure that cdn cache is not warmed up
52
66
const purgeCdnCache = await page . goto (
53
- new URL ( `/api/purge-cdn?path=${ pagePath } ` , serverComponents . url ) . href ,
67
+ new URL ( `/api/purge-cdn?path=${ encodeURI ( pagePath ) } ` , serverComponents . url ) . href ,
54
68
)
55
69
expect ( purgeCdnCache ?. status ( ) ) . toBe ( 200 )
56
70
0 commit comments