Closed
Description
cypress-testing-library
version: 2.0.0node
version: 8.4.0npm
version: 5.3.0
Problem description:
Currently, the timeout for queries is hard-coded to 3000
:
https://github.com/kentcdodds/cypress-testing-library/blob/master/src/index.js#L11
When I visit my app, it shows a loading indicator, which takes more than 3 seconds. I can add a cy.wait
to make things work, but if the website gets faster, that wait just slows everything down. So I'd like to be able to configure the timeout as an option to the query functions.
Suggested solution:
Destructure the last option in the command
function {timeout, ...args}
and use it in waitForElement
, like timeout: timeout || 3000
.
I'll create a PR this weekend.
Metadata
Metadata
Assignees
Labels
No labels