File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -209,14 +209,19 @@ describe("InputTime", () => {
209209 < InputTime
210210 date = { date }
211211 timeString = "10:00"
212- customTimeInput = { < CustomTimeInput onTimeChange = { onTimeChange } /> }
212+ customTimeInput = {
213+ < CustomTimeInput
214+ data-testid = "custom-time-input"
215+ onTimeChange = { onTimeChange }
216+ />
217+ }
213218 /> ,
214219 ) ;
215220
216- const timeInput = container . querySelector (
217- 'input[type=" time"]' ,
221+ const customInput = container . querySelector (
222+ '[data-testid="custom- time-input "]' ,
218223 ) as HTMLInputElement ;
219- fireEvent . change ( timeInput , { target : { value : "11:15" } } ) ;
224+ fireEvent . change ( customInput , { target : { value : "11:15" } } ) ;
220225
221226 expect ( onTimeChange ) . toHaveBeenCalledWith ( date ) ;
222227 } ) ;
You can’t perform that action at this time.
0 commit comments