File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 3
3
*/
4
4
5
5
export const testData = {
6
+ urls : {
7
+ invalid : "/invalid-url" ,
8
+ invalidInternationalized : "/es/invalid-url" ,
9
+ } ,
10
+
6
11
search : {
7
12
validQuery : "smart contract" ,
8
13
invalidQuery : "xyz123nonexistent" ,
@@ -34,6 +39,8 @@ export const testData = {
34
39
headings : {
35
40
homepage : "Ethereum.org" ,
36
41
findWallet : "Choose your wallet" ,
42
+ notFoundEn : "we couldn't find that page" ,
43
+ notFoundEs : "no hemos podido encontrar esa página" ,
37
44
} ,
38
45
} ,
39
46
}
Original file line number Diff line number Diff line change @@ -20,11 +20,31 @@ test.describe("Global", () => {
20
20
21
21
await homePage . verifyNoResults ( )
22
22
} )
23
+
24
+ test ( "handles invalid URL with 404" , async ( { page } ) => {
25
+ await page . goto ( testData . urls . invalid )
26
+ await expect (
27
+ page . getByRole ( "heading" , {
28
+ level : 1 ,
29
+ name : new RegExp ( testData . content . headings . notFoundEn , "i" ) ,
30
+ } )
31
+ ) . toBeVisible ( )
32
+ } )
33
+
34
+ test ( "handles invalid URL with 404 internationalized" , async ( { page } ) => {
35
+ await page . goto ( testData . urls . invalidInternationalized )
36
+ await expect (
37
+ page . getByRole ( "heading" , {
38
+ level : 1 ,
39
+ name : new RegExp ( testData . content . headings . notFoundEs , "i" ) ,
40
+ } )
41
+ ) . toBeVisible ( )
42
+ } )
23
43
} )
24
44
25
45
test . describe ( "Accessibility" , ( ) => {
26
46
test ( "skip link - keyboard navigation" , async ( ) => {
27
- // TODO: Add skip link tests. Part of #15663
47
+ // TODO: Add skip link tests.
28
48
} )
29
49
} )
30
50
You can’t perform that action at this time.
0 commit comments