-
Notifications
You must be signed in to change notification settings - Fork 470
fireEvent.keyPress() is not working #1258
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
Comments
Hi @ak-spotter, thanks for opening this. |
Hi @MatanBobi I actually want to test a draggable element of |
Got you. |
I have a checkbox which I want to test using keyPress. The checkbox should be checked on pressing the Space key.
Here's my Component file-
And the test file-
The test fails at the second expect statement-
expect(testCheckBox).toBeChecked();
However it should have passed as I focused the checkbox and pressed the Space key.CodeSandbox link- https://codesandbox.io/s/cool-star-6k6ghp
The text was updated successfully, but these errors were encountered: