@@ -94,24 +94,30 @@ const TIMEOUT_MS = 40000;
9494 } ) ;
9595
9696 it ( "should load a moment locale" , ( ) => {
97+ const time = new Date ( '2025-01-01' )
98+ cy . clock ( time , [ 'Date' ] )
99+
97100 cy . visit ( {
98101 url : "/interactive-question?locale=es" ,
99102 } ) ;
100103
101104 cy . findByText ( 'Filtro' , { timeout : TIMEOUT_MS } ) . click ( ) ;
102105 cy . get ( '[data-element-id="mantine-popover"]' ) . within ( ( ) => {
103106 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 ( ) ;
105109 } )
106110
107111 cy . findByTestId ( 'date-filter-picker' ) . within ( ( ) => {
108- const monthName = new Intl . DateTimeFormat ( 'es-ES' , { month : 'short' } ) . format ( new Date ( ) ) ;
109112
110- cy . findByText ( new RegExp ( monthName , 'i' ) ) . should ( 'exist' ) ;
113+ cy . findByText ( 'dic. 2–31, 2024' ) . should ( 'exist' ) ;
111114 } )
112115 } ) ;
113116
114117 it ( "should load a dayjs locale" , ( ) => {
118+ const time = new Date ( '2025-01-01' )
119+ cy . clock ( time , [ 'Date' ] )
120+
115121 cy . visit ( {
116122 url : "/interactive-question?locale=es" ,
117123 } ) ;
@@ -124,9 +130,7 @@ const TIMEOUT_MS = 40000;
124130 } )
125131
126132 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' ) ;
130134 } )
131135 } ) ;
132136 } ) ;
0 commit comments