Cypress · Junior · Question 24 of 75

Why should you avoid cy.wait(5000) in tests?

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').

Further reading

Problem with a question

Cypress · Junior · question 24

Test yourself

Take the Cypress · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz