Cypress · Junior · Question 24 of 75
Why should you avoid cy.wait(5000) in tests?
- 1It waits for 5000 network requests
- 2Fixed waits are slow and still flaky
- 3Cypress ignores waits longer than one second
Show the answer
Correct answer: Fixed waits are slow and still flaky
Explanation
Wait for a condition instead: an element, an assertion or an aliased request with cy.wait('@alias').