1
1
// SPDX-License-Identifier: AGPL-3.0-or-later
2
2
import { expect , test } from "playwright/test" ;
3
- import { getI18nString } from "~/utils/i18n" ;
3
+ import { getEnglishText } from "~/utils/i18n" ;
4
4
5
5
test . beforeEach ( async ( { page } ) => {
6
6
await page . goto ( "/en" ) ;
7
7
await expect ( page . getByRole ( "heading" , { level : 1 } ) ) . toHaveText (
8
- new RegExp ( getI18nString ( "i18n.components.landing_splash.header" ) , "i" )
8
+ new RegExp ( getEnglishText ( "i18n.components.landing_splash.header" ) , "i" )
9
9
) ;
10
10
} ) ;
11
11
@@ -27,7 +27,7 @@ test.describe("Landing Page", { tag: ["@desktop", "@mobile"] }, () => {
27
27
test ( "User can go to Organizations page" , async ( { page } ) => {
28
28
const organizationsLink = page . getByRole ( "link" , {
29
29
name : new RegExp (
30
- getI18nString (
30
+ getEnglishText (
31
31
"i18n.components.landing_splash.view_organizations_aria_label"
32
32
) ,
33
33
"i"
@@ -41,7 +41,7 @@ test.describe("Landing Page", { tag: ["@desktop", "@mobile"] }, () => {
41
41
test ( "User can go to Events page" , async ( { page } ) => {
42
42
const eventsLink = page . getByRole ( "link" , {
43
43
name : new RegExp (
44
- getI18nString ( "i18n.components.landing_splash.view_events_aria_label" ) ,
44
+ getEnglishText ( "i18n.components.landing_splash.view_events_aria_label" ) ,
45
45
"i"
46
46
) ,
47
47
} ) ;
@@ -54,39 +54,39 @@ test.describe("Landing Page", { tag: ["@desktop", "@mobile"] }, () => {
54
54
const links = [
55
55
{
56
56
name : new RegExp (
57
- getI18nString ( "i18n.pages.index.get_active_aria_label" ) ,
57
+ getEnglishText ( "i18n.pages.index.get_active_aria_label" ) ,
58
58
"i"
59
59
) ,
60
60
url : "https://docs.activist.org/activist" ,
61
61
} ,
62
62
63
63
{
64
64
name : new RegExp (
65
- getI18nString ( "i18n.pages.index.get_organized_aria_label" ) ,
65
+ getEnglishText ( "i18n.pages.index.get_organized_aria_label" ) ,
66
66
"i"
67
67
) ,
68
68
url : "https://docs.activist.org/activist" ,
69
69
} ,
70
70
71
71
{
72
72
name : new RegExp (
73
- getI18nString ( "i18n.pages.index.grow_organization_aria_label" ) ,
73
+ getEnglishText ( "i18n.pages.index.grow_organization_aria_label" ) ,
74
74
"i"
75
75
) ,
76
76
url : "https://docs.activist.org/activist" ,
77
77
} ,
78
78
79
79
{
80
80
name : new RegExp (
81
- getI18nString ( "i18n.pages.index.activist_section_btn_aria_label" ) ,
81
+ getEnglishText ( "i18n.pages.index.activist_section_btn_aria_label" ) ,
82
82
"i"
83
83
) ,
84
84
url : "https://docs.activist.org/activist" ,
85
85
} ,
86
86
87
87
{
88
88
name : new RegExp (
89
- getI18nString (
89
+ getEnglishText (
90
90
"i18n.pages.index.our_supporters_btn_become_aria_label"
91
91
) ,
92
92
"i"
@@ -96,7 +96,7 @@ test.describe("Landing Page", { tag: ["@desktop", "@mobile"] }, () => {
96
96
97
97
{
98
98
name : new RegExp (
99
- getI18nString ( "i18n.pages.index.our_supporters_btn_view_aria_label" ) ,
99
+ getEnglishText ( "i18n.pages.index.our_supporters_btn_view_aria_label" ) ,
100
100
"i"
101
101
) ,
102
102
url : "https://docs.activist.org/activist/organization/community/supporters" ,
0 commit comments