fix: pressing arrow keys behavior on Radio buttons
What:
Fix a bug in the behavior of the keyboard operations on the radio buttons.
Why:
closes #1048
How:
- updating test cases
- increase amount of radio buttons in test situations to make the behavior easier to understand
- fix the assertion of the test cases as it should be
- fix the code to behave correctly
Checklist:
- [N/A] Documentation
- [x] Tests
- [x] Ready to be merged
FYI
I know there is already another PR https://github.com/testing-library/user-event/pull/1049 for this bug. However, it has past several months since it stop its activity.
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 5e9fd2b83a4c1f996237f2d32e90ed083c500468:
| Sandbox | Source |
|---|---|
| userEvent-dom | Configuration |
| userEvent-react | Configuration |
| silent-sun-kxlrgr | Issue #1048 |
| zen-feather-hx0h14 | Issue #1048 |
@ph-fritsche @Gpx @kentcdodds can we merge this PR? If I can help something to merge, I will gladly cooperate with you.
resolved by #1049