Cypress · Junior · Question 61 of 75

Why does a hard-coded cy.wait(2000) before checking a result usually fail sometimes?

Show the answer

Correct answer: The result may take longer than 2 s under load

Explanation

Timing varies between machines and runs. Waiting on the condition or request removes the guess.

Further reading

Problem with a question

Cypress · Junior · question 61

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