-
Notifications
You must be signed in to change notification settings - Fork 254
Closed
Labels
Description
I have found what I believe to be a related issue to this one, which is documented in this CodeSandbox: https://codesandbox.io/s/userevent-unit-test-ncmgu?file=/src/App.test.js
Setup of the tested component
- contains a text input with an initial value of 1 string character (ex:
'1'
) - executes the
HTMLInputElement.select()
method on input focus so every new value completely overwrites the previous one
Test execution:
- Render the tested component with input
- Get the input by role
- Change the input value via
userEvent.type(...
(ex:'11123'
) - Notice the received input value is
'23'
and not'11123'
Originally posted by @psullivan6 in #521 (comment)