-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timeout not triggering fail event #6829
Comments
Ok, so this is likely due to the difference between As a side note, you cannot call
Cypress.on('fail', () => {
// This code will run for any failure in any test
console.log('Cypress.on: Fail event')
return false
})
it('test', () => {
cy.on('fail', () => {
// This code will run for this test failure
console.log('cy.on: Fail event')
return false
})
cy.visit('index.html')
cy.get('#btn').click({ timeout: 1000 })
}) Please comment if you have an example outside of this where it is not working and we will consider reopening. |
Hi @jennifer-shehane, this could be caused by a 3rd party plugin. I have added more examples here: badeball/cypress-cucumber-preprocessor#348 |
Yeah, that may be. |
Current behavior:
The
fail
event is not being captured when a test fails due to timeout.Desired behavior:
The
fail
event should be captured when a test fails due to timeout.Test code to reproduce
Versions
cypress 4.2.0, Windows 10.
The text was updated successfully, but these errors were encountered: