0
votes

I have a modal which has a ok button that automatically focused on mount. But userEvent.keyDown(or keyPress, keyUp) using Enter key does not trigger this button. My package versions :

"@testing-library/jest-dom": "^5.16.3",
"@testing-library/react": "^12.1.5",
"@testing-library/react-hooks": "^8.0.0",
"@testing-library/user-event": "^14.2.0",
"jest": "^27.5.1",

is it even supported or am i trying for nothing ?