Skip to content

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.

1 participant