React Testing Library click event does not trigger onRangeFocusChange
Using react-date-range DateRange component, and have custom beginDate and endDate inputs that display the selected dates, and show focus of whether start or end of range is being selected.
Writing jest test for functionality of select start of range, which should cause the endDate input component to become focused, via a function passed to onRangeFocusChange prop.
Using Jest and React Testing Library to get the <button> component of a particular day, and using fireEvent.click() however does not trigger the onChange or the onRangeFocusChange handlers.
React Testing Library click event does not trigger
onRangeFocusChange
Using react-date-range
DateRange
component, and have custombeginDate
andendDate
inputs that display the selected dates, and show focus of whether start or end of range is being selected.Writing jest test for functionality of select start of range, which should cause the
endDate
input component to become focused, via a function passed toonRangeFocusChange
prop.Using Jest and React Testing Library to get the
<button>
component of a particular day, and usingfireEvent.click()
however does not trigger theonChange
or theonRangeFocusChange
handlers.Environment
Package Version: 1.4.0 React version: 17.0.2 Node version: 16.13.2 Browser: N/A - Jest