Replies: 3 comments 7 replies
-
Hi @nemanjam! I'm also facing that same error after upgrading to userEvent v14 |
Beta Was this translation helpful? Give feedback.
7 replies
-
This is still an issue for what it's worth, it should probably be opened as an issue because I don't see one. The additional click method worked for me though! |
Beta Was this translation helpful? Give feedback.
0 replies
-
I found out that if you focus the input first, the clear works. const input = screen.getByRole('input');
input.focus();
await userEvent.clear(input);
await userEvent.type(input, '200') |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Why simple clear() and type() in field does not work? Such a simple and trivial thing and it does not work, it creates race while typing. Very annoying and time wasting. Version: "@testing-library/user-event": "^14.2.0".
Example from docs is broken.
https://testing-library.com/docs/user-event/utility#clear
More info about this bug is that the input field is frozen for first 2 characters (interactions). Just typing a bit in the field fixes it. Either userEvent v14 or React Hook Form v8 are broken.
Beta Was this translation helpful? Give feedback.
All reactions