-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
userEvent.type not entering a space into inputs with type email #479
Comments
Hi @wolfe111 thanks for reaching us :). I think that this is a bug. As for the spec some inputs have
On our side I think that we should keep the value with the space and use on the next iteration of the type function instead of using the value of the input. |
Hi, I think that the same problem is present when the input control is of type |
This should be solved by adding a special handler for those inputs here. |
This should be easier to tackle once #744 is resolved. |
Resolved by #747 |
@testing-library/user-event
version: 12.1.8Relevant code or config
What you did:
I wanted to test a email validation message I had in on one of my forms and had an issue inputting a space into an input box with type=email. When running it in the browser, I'm freely allowed to enter a space.
What happened:
userEvent.type would ignore the space being typed in. See console logs when running in repo below.
Reproduction repository:
https://github.com/wolfe111/user-event-space
(created with create-react-app and updated @testing-library/jest-dom, @testing-library/react and @testing-library/user-event to most recent version)
The text was updated successfully, but these errors were encountered: