-
Notifications
You must be signed in to change notification settings - Fork 252
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
Support arrowup and arrowdown events #511
Support arrowup and arrowdown events #511
Conversation
Codecov Report
@@ Coverage Diff @@
## master #511 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 664 674 +10
Branches 211 211
=========================================
+ Hits 664 674 +10
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty solid to me 👍 Just one note about the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant 👏
Oh rats, there are merge conflicts. Could you address those? |
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! Thank you 👏
🎉 This PR is included in version 12.5.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
It's really the perfect timing for this, thanks!!! |
Hello Everyone, I'm handling a test on input type number, where I expect increase and decrease value when typing on keyboard arrow up and down respectively. The Issue is that nothing happens, the input value remains the same. Someone could look into my code and see what is happening. I believe that userEvent and input are not communicating with each other in this particular event Code: https://codesandbox.io/s/late-http-ff27ln?file=/src/App.test.tsx |
What:
These changes add support for the arrow up and down keys to
userEvent.type
.Why:
Arrow up and down keys are used for various accessibility reasons and are part of regular user actions.
How:
I added two functions,
handleArrowDown
andhandleArrowUp
, and tied those into the existing special character map.Checklist:
Unless something unexpected comes up, this is probably ready for merging immediately.
Closes #503