Gleb's blog discussion - Retry or Not - Cannot read properties of undefined (reading 'overrides') #27608
Unanswered
JimBarrisGSC
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I appreciate Gleb's blog, and his continued contributions to the community.
You can see the blog entry here.
I had a question re: the section where you stop retries, based on error message
if (cy.state('test').err.message.includes('cy.visit')) {
console.error('test failed because of cy.visit')
console.error('skipping retries')
cy.state('test')._testConfig.testConfigList[0].overrides.retries = -1
}
Now, it show that retries are set within the "IT" block. I have retries set globally in the cypress.config.js file. When I attempt to use "cy.state('test')._testConfig.testConfigList[0].overrides.retries = -1" the runner states:
"Cannot read properties of undefined (reading 'overrides')".
Is it possible to have tests skip retries, if retries are set globally and not within the IT block?
Beta Was this translation helpful? Give feedback.
All reactions