@@ -94,24 +94,30 @@ const TIMEOUT_MS = 40000;
94
94
} ) ;
95
95
96
96
it ( "should load a moment locale" , ( ) => {
97
+ const time = new Date ( '2025-01-01' )
98
+ cy . clock ( time , [ 'Date' ] )
99
+
97
100
cy . visit ( {
98
101
url : "/interactive-question?locale=es" ,
99
102
} ) ;
100
103
101
104
cy . findByText ( 'Filtro' , { timeout : TIMEOUT_MS } ) . click ( ) ;
102
105
cy . get ( '[data-element-id="mantine-popover"]' ) . within ( ( ) => {
103
106
cy . findByText ( 'Created At' ) . click ( ) ;
104
- cy . findByText ( / ( F e c h a s e s p e c í f i c a s … | R a n g o d e f e c h a s f i j o … ) / ) . click ( ) ;
107
+ // Different texts for 54 and 55
108
+ cy . findByText ( / ( F e c h a s r e l a t i v a s … | R a n g o d e f e c h a s r e l a t i v o … ) / ) . click ( ) ;
105
109
} )
106
110
107
111
cy . findByTestId ( 'date-filter-picker' ) . within ( ( ) => {
108
- const monthName = new Intl . DateTimeFormat ( 'es-ES' , { month : 'short' } ) . format ( new Date ( ) ) ;
109
112
110
- cy . findByText ( new RegExp ( monthName , 'i' ) ) . should ( 'exist' ) ;
113
+ cy . findByText ( 'dic. 2–31, 2024' ) . should ( 'exist' ) ;
111
114
} )
112
115
} ) ;
113
116
114
117
it ( "should load a dayjs locale" , ( ) => {
118
+ const time = new Date ( '2025-01-01' )
119
+ cy . clock ( time , [ 'Date' ] )
120
+
115
121
cy . visit ( {
116
122
url : "/interactive-question?locale=es" ,
117
123
} ) ;
@@ -124,9 +130,7 @@ const TIMEOUT_MS = 40000;
124
130
} )
125
131
126
132
cy . findByTestId ( 'date-filter-picker' ) . within ( ( ) => {
127
- const monthName = new Intl . DateTimeFormat ( 'es-ES' , { month : 'long' } ) . format ( new Date ( ) ) ;
128
-
129
- cy . findByText ( new RegExp ( monthName , 'i' ) ) . should ( 'exist' ) ;
133
+ cy . findByText ( 'enero 2025' ) . should ( 'exist' ) ;
130
134
} )
131
135
} ) ;
132
136
} ) ;
0 commit comments