Open steve-taylor opened 3 years ago
I've replicated this with
it("login", () => {
cy.visit("/login/")
.findByLabelText(/Email Address/i)
.type(myEmail);
})
cypress.json
{
"baseUrl": "http://localhost:3000",
"video": false,
"screenshotOnRunFailure": false,
"env": {
"FAIL_FAST_ENABLED": true
}
}
cypress-testing-library
version: 8.0.0node
version: 14.16.1yarn
version: 1.22.10Relevant code or config
cypress/support/commands.js
cypress.json:
What you did:
What happened:
Reproduction repository:
(Will create one if this is a bug.)
Problem description:
practiceSelector.findByRole('listbox')
should find the<ul role="listbox">
element, because it's inside thepracticeSelector
element. However, it's timing out.Additionally,
practiceSelector.findAllByRole('option')
times out.However,
cy.findByRole('listbox')
andcy.findAllByRole('option')
both work.Suggested solution:
Use
cy.findByRole
andcy.findAllByRole
as workarounds in the short term.