@@ -57,7 +57,7 @@ it('redirects to a matched locale at the root for non-default locales', async ({
57
57
page . getByRole ( 'heading' , { name : 'Start' } ) ;
58
58
} ) ;
59
59
60
- it ( 'redirects to a matched locale for invalid cased locales ' , async ( {
60
+ it ( 'redirects to a matched locale for an invalid cased non-default locale ' , async ( {
61
61
browser
62
62
} ) => {
63
63
const context = await browser . newContext ( { locale : 'de' } ) ;
@@ -68,6 +68,39 @@ it('redirects to a matched locale for invalid cased locales', async ({
68
68
page . getByRole ( 'heading' , { name : 'Start' } ) ;
69
69
} ) ;
70
70
71
+ it ( 'redirects to a matched locale for an invalid cased non-default locale in a nested path' , async ( {
72
+ browser
73
+ } ) => {
74
+ const context = await browser . newContext ( { locale : 'de' } ) ;
75
+ const page = await context . newPage ( ) ;
76
+
77
+ await page . goto ( '/DE/verschachtelt' ) ;
78
+ await expect ( page ) . toHaveURL ( '/de/verschachtelt' ) ;
79
+ page . getByRole ( 'heading' , { name : 'Verschachtelt' } ) ;
80
+ } ) ;
81
+
82
+ it ( 'redirects to a matched locale for an invalid cased default locale' , async ( {
83
+ browser
84
+ } ) => {
85
+ const context = await browser . newContext ( { locale : 'en' } ) ;
86
+ const page = await context . newPage ( ) ;
87
+
88
+ await page . goto ( '/EN' ) ;
89
+ await expect ( page ) . toHaveURL ( '/' ) ;
90
+ page . getByRole ( 'heading' , { name : 'Home' } ) ;
91
+ } ) ;
92
+
93
+ it ( 'redirects to a matched locale for an invalid cased default locale in a nested path' , async ( {
94
+ browser
95
+ } ) => {
96
+ const context = await browser . newContext ( { locale : 'en' } ) ;
97
+ const page = await context . newPage ( ) ;
98
+
99
+ await page . goto ( '/EN/nested' ) ;
100
+ await expect ( page ) . toHaveURL ( '/nested' ) ;
101
+ page . getByRole ( 'heading' , { name : 'Nested' } ) ;
102
+ } ) ;
103
+
71
104
it ( 'redirects a prefixed pathname for the default locale to the unprefixed version' , async ( {
72
105
request
73
106
} ) => {
0 commit comments