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
selectOptions
fails on options with role
attribute
#542
Comments
comatory
changed the title
When select has a
When select has a Jan 11, 2021
role
attribute, change callback is not triggeredrole
attribute, change callback is not triggered if selectOptions
is used
Clarification: Actually it seems to be a problem not with |
ph-fritsche
added a commit
that referenced
this issue
Jan 11, 2021
ph-fritsche
changed the title
When select has a
Jan 11, 2021
role
attribute, change callback is not triggered if selectOptions
is usedselectOptions
fails on options with role
attribute
kentcdodds
pushed a commit
that referenced
this issue
Jan 21, 2021
* fix: selectOptions on options with role #542 * fix: selectOptions click event on option * fix: aria-selected * fix: handle invalid element
resolved in 12.6.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@testing-library/user-event
version:12.6.0
Testing Framework and version:
jest@26.6.0
DOM Environment:
not sure, I'm using
react-scripts@3.4.3
in CodeSandboxRelevant code or config
What you did:
I used
role
property on my react component. My native select component has rolelistbox
. I created a test for identifying ifonChange
handler is called.What happened:
When using
userEvent.selectOptions
myonChange
handler is not called. However whenrole
attribute is removed, the test passes.Reproduction repository:
See this sandbox: https://codesandbox.io/s/user-event-changle-handler-with-role-p78f5?file=/src/Select.spec.js:190-586
Problem description:
change
event does not seem to be triggered when the DOM element hasrole
property defined.Suggested solution:
The text was updated successfully, but these errors were encountered: