Retry Or Not

1 · Gleb Bahmutov · March 22, 2023, 11:37 a.m.
Cypress has built-in test retries. For example, we can let a test retry 2 more times if it fails.12345it('retries this test', { retries: 2, defaultCommandTimeout: 1000 }, () => { cy.visit('/cypress-examples/') // this element does not exist cy.get('#foo')})The test fails because there is no element with id foo and retries 2 more times:There are different kinds of errors. What if instead of the "element not found" we try to visit the page that does not exist? For example, cy.visit('/cypress-ex...