We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://codesandbox.io/s/quiet-butterfly-dcz8ld
<button>button</button>
<div role='dialog'>dialog</div>
render(<App />); const button = await screen.findByRole("button"); button.focus(); await userEvent.keyboard("{space}"); const dialog = await screen.findByRole("dialog"); expect(dialog).toBeInTheDocument();
SpaceKey work, and can find a dialog element.
SpaceKey does not work, and can not find a dialog element.
14.2.0
"dependencies": { "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^14.2.0", "@types/jest": "^27.5.2", "@types/node": "^16.11.39", "@types/react": "^18.0.12", "@types/react-dom": "^18.0.5", "react": "^18.1.0", "react-dom": "^18.1.0", "react-scripts": "5.0.1", "typescript": "^4.7.3" },
Enter key and Click button work!😄 But space key does not work🤔
The text was updated successfully, but these errors were encountered:
See https://testing-library.com/docs/user-event/keyboard
You can describe the key
.keyboard(' ')
.keyboard('{ }')
.keyboard('[Space]')
Sorry, something went wrong.
@ph-fritsche
Thank you.
No branches or pull requests
Reproduction example
https://codesandbox.io/s/quiet-butterfly-dcz8ld
Prerequisites
<button>button</button>
and<div role='dialog'>dialog</div>
.Expected behavior
SpaceKey work, and can find a dialog element.
Actual behavior
SpaceKey does not work, and can not find a dialog element.
User-event version
14.2.0
Environment
Additional context
Enter key and Click button work!😄
But space key does not work🤔
The text was updated successfully, but these errors were encountered: