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

Add severity levels to fail on #137

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

roc
Copy link

@roc roc commented Jul 28, 2022

I found that the includedImpacts option was very helpful, but got me into a weird state in which I could have failures but not have the assertions logged out.

Here I've put together a rough and ready implementation of failure levels, meaning you can choose which levels of error you think are important enough to fail on per test. The way I've been using it is:

    it('Fails only if the accessibility error is of serious or critical level', () => {
      const failOn = ['serious', 'critical'];
      cy.visit('/home');
      cy.injectAxe();
      cy.checkA11y(null, null, a11yLogFunction, failOn);
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant