@@ -229,7 +229,7 @@ describe('DateRangePicker Component', () => {
229229 fireEvent . click ( screen . getByTestId ( 'date-range-display' ) ) ;
230230
231231 // Select start date (10th)
232- const startDateElement = screen . getByTestId ( 'calendar-day-10' ) ;
232+ const startDateElement = screen . getAllByTestId ( 'calendar-day-10' ) ?. [ 0 ] ;
233233 fireEvent . click ( startDateElement ) ;
234234
235235 // Select end date (20th)
@@ -269,7 +269,7 @@ describe('DateRangePicker Component', () => {
269269 fireEvent . click ( screen . getByTestId ( 'date-range-display' ) ) ;
270270
271271 // Select only start date
272- const startDateElement = screen . getByTestId ( 'calendar-day-10' ) ;
272+ const startDateElement = screen . getAllByTestId ( 'calendar-day-10' ) ?. [ 0 ] ;
273273 fireEvent . click ( startDateElement ) ;
274274
275275 // Close calendar without selecting end date
@@ -291,7 +291,7 @@ describe('DateRangePicker Component', () => {
291291 fireEvent . click ( startDateElement ) ;
292292
293293 // Select end date (10th) which is before start date
294- const endDateElement = screen . getByTestId ( 'calendar-day-10' ) ;
294+ const endDateElement = screen . getAllByTestId ( 'calendar-day-10' ) ?. [ 0 ] ;
295295 fireEvent . click ( endDateElement ) ;
296296
297297 // Check if onChange was called with correct order (10th to 20th)
0 commit comments