Cypress · Middle · Question 2 of 77
In cy.get('.list').find('li').should('have.length', 3), what is retried?
- 1The whole chain of queries before the assertion
- 2Only the assertion, against the first result
- 3Nothing; Cypress checks once and fails fast
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.