Skip to content
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

on('fail') not reliably continuing test after failure #31148

Open
wilecoyte78 opened this issue Feb 20, 2025 · 3 comments
Open

on('fail') not reliably continuing test after failure #31148

wilecoyte78 opened this issue Feb 20, 2025 · 3 comments
Labels
stage: needs information Not enough info to reproduce the issue

Comments

@wilecoyte78
Copy link

wilecoyte78 commented Feb 20, 2025

Current behavior

In Cypress 13 this used to go to the next line and continue with the testing and now in Cypress 14 it does not.

Image

Desired behavior

Continue on with test even though failure has been found.

Test code to reproduce

describe('Testing', () => {
    it('Testing', () => {
        cy.on('fail', (err, runnable) => {
            console.log('ConsoleLog', err.message, runnable);
            // alert(err.message);

            return false;
        });
        cy.visit('https://www.google.com');
        cy.get('[value="Google Search"]').should('not.be.visible');
        cy.get('textarea').type('test');
    });
});

Cypress Version

14.0.3

Node version

18.19.1

Operating System

Ubuntu 24.04

Debug Logs

Other

No response

@jennifer-shehane
Copy link
Member

Hi, I'm not seeing the difference in behavior with this example. I tried version 14.0.3, 14.0.1, 13.17.0, 13.0.0. What is the behavior you are expecting? Can you share a screenshot?

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Feb 20, 2025
@wilecoyte78
Copy link
Author

@jennifer-shehane
Copy link
Member

@wilecoyte78 We'll need a reproducible example that we can run that demonstrates the issue. I'm not seeing unintended behavior in the example provided. No commands run after the fail event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs information Not enough info to reproduce the issue
Projects
None yet
Development

No branches or pull requests

2 participants