Open ian5484 opened 4 years ago
@testing-library/react
has been integrated into the project but not all the components have the better tests yet.
in tests i typically mock all material ui components. do you have a reason for not doing so here? it is much easier just to replace all material ui inputs with native html tags. i think you can trust material-ui's internal unit tests to verify that a select input works the way it's supposed to.
I am having trouble triggering the
onChange
orsetValues
when dispatching a change event when using aSelect
. Would you be able to provide an example for this? I have a suspicion this might be a bug.Here is what I have been trying:
This works for basic fields like
TextField
but I think some of theonChange
shims might be interfering the dispatched change event forSelect
.The
values
prop in theFormik
render scope never updates if the input is from theSelect
, however immediately updates if it's aTextField
.