The change to the type event to append to existing values has broken our tests which are written expecting to replace existing values.
Is it possible to document how to clear/delete existing values? I tried using the \b character but this resulted in some very strange behavior (I imagine this is not being translated until the test reporting.)
The only reliable way I have at the moment is to clear using fireEvent.
e.g. fireEvent.change(getByTestId('input-element'), { target: { value: '' } });
One other thing I tried was to use userEvent.dblClickto attempt to select all text - but alas this did not work, perhaps this could be a nice addition?
A way this library is doing it in its own test files is by calling input.value = '';
By calling that, you can basically simulate previous behavior.
If it's really important to test full user interaction, it would require writing custom selectAll/clear method I guess.
Referenced PR https://github.com/testing-library/user-event/pull/221
Slightly related #232 (type should support replacing the current input)
Most helpful comment
馃帀 https://github.com/testing-library/user-event/issues/232#issuecomment-640791105