Cypress · Middle · Question 2 of 77

In cy.get('.list').find('li').should('have.length', 3), what is retried?

Show the answer

Correct answer: The whole chain of queries before the assertion

Explanation

Since Cypress 12, a failing assertion re-runs the chain of linked queries, so newly rendered elements are found.

Further reading

Problem with a question

Cypress · Middle · question 2

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