Cypress · Middle · Question 3 of 77

Why can an action in the middle of a chain break retrying?

cy.get("input").type("abc").should("have.value", "abc");
Show the answer

Correct answer: Actions aren't retried, so only queries after them retry

Explanation

If the .type() happened on an element that re-rendered, retrying the assertion can't redo the typing. Split long chains around actions.

Further reading

Problem with a question

Cypress · Middle · question 3

Test yourself

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

Take this quiz