-
Notifications
You must be signed in to change notification settings - Fork 468
Closed
Description
@testing-library/dom
version:@testing-library/dom@8.11.0
- Testing Framework and version:
@testing-library/cypress@8.0.2
- DOM Environment: Cypress/browser (though the issue is reproduced in the Codesandbox that follows via Jest/JSDom)
Relevant code or config:
<label for="my-select">My Select</label>
<select id="my-select"></select>
// Using `dom-testing-library` via `cypress-testing-library`
cy.findByRole("listbox", { name: "My Select" }); // Doesn't work, element not found
cy.findByRole("combobox", { name: "My Select" }); // Does work! But this isn't the right ARIA role
What you did:
- Tried to query a select element using the analogous ARIA role for a select
What happened:
"combobox"
worked where it should have failed - the combobox role is distinct from the listbox role
Reproduction:
Problem description:
- A
<select />
should be query-able via*byRole("listbox")
Suggested solution:
- It looks like
aria-query
lists "listbox" as a valid role mapping to the select element - I would assume there is an integration problem with this library
Thanks for all of your great work on this library - it's truly a game changer in the space 🎉
PowerTower25
Metadata
Metadata
Assignees
Labels
No labels