We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a series of specs for different sections and modules of my app. I would like to configure checkA11y in one location for all specs.
This works within each test
cy.checkA11y(null, { rules: { 'color-contrast': { enabled: false }, 'frame-title': { enabled: false }, }, });
I tried to set the configuration in support/index.js but I get an error
beforeEach(function () { // runs before each test in the block cy.visit('/') cy.injectAxe() cy.configureAxe({ rules: { 'color-contrast': { enabled: false }, 'frame-title': { enabled: false }, }, }) });
I am unsure where to set this up correctly.
The text was updated successfully, but these errors were encountered:
In the support, folder create a file e.g say axe-cofig.js and in that file create an object like this
export const defaultAxeConfiguration = { rules:[ { id: 'color-contrast', enabled: true, }], disableOtherRules: true, };
and write your beforeEach like this beforeEach(()=>{ cy.visit('/') cy.injectAxe() cy.configureAxe(defaultAxeConfiguration) })
beforeEach(()=>{ cy.visit('/') cy.injectAxe() cy.configureAxe(defaultAxeConfiguration) })
Sorry, something went wrong.
No branches or pull requests
I have a series of specs for different sections and modules of my app. I would like to configure checkA11y in one location for all specs.
This works within each test
I tried to set the configuration in support/index.js but I get an error
I am unsure where to set this up correctly.
The text was updated successfully, but these errors were encountered: