-
Notifications
You must be signed in to change notification settings - Fork 240
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 working with <input type="time"> #484
Comments
@kellengreen, thanks for reporting this. Would you be interested in getting this supported? |
If @kellengreen does not take it, I'd be interested in working with it 👀 |
Hey all, thank you for your quick replies. If this is indeed an unsupported use case (and not a bug) then yes I would love to see this resolved. In my current role I wont be able to provide much assistance so @gndelia please feel free to take the lead on this if you're interested. |
@gndelia, go for it 👍 |
ok I've been doing some testing yesterday and I think I've found the root cause. I'm leaving some insights in case anyone wants to add their thoughts or tell me if I'm in the wrong track 😅 How it looks (I'm going to be honest, I've never used the HTML native timer lol) From what I understood, when the user types into an I also understood the same from the whatwg spec about the behaviour; quoting here:
My only doubt is that in chrome at least, moving from "hours" to "minutes" takes place automatically, so it's not required for the user to type In addition to that, as soon as the user types a value >= 3 in the hours, it goes to the These are some scenarios that should be considered when testing |
I think we'll need a special branch of code for this because it looks like the Here's what I get in the user event playground when typing
All we need to do is make sure we simulate these same events with |
Amazing work. Thank you. |
@testing-library/user-event
version:12.2.0
jest:26.6.0
@testing-library/jest-dom:5.11.5
Relevant code or config
What you did: Called
userEvent.type
on<input type="time">
.What happened:
input.value
remains""
.Problem description: It would seem that keystrokes are not making their way to the input field. I've tested this under both
en-US
anden-GB
locales, the result is the same.The text was updated successfully, but these errors were encountered: