sclavijosuero / wick-a11y

Cypress plugin for performing configurable Accessibility tests using AXE. Flawless integration in Cypress with violations shown graphically on the web page and the Cypress log, and generating HTML document with violations details and screenshot.
MIT License
24 stars 3 forks source link

enableAccessibilityVoice not working in config #10

Closed w4dd325 closed 4 weeks ago

w4dd325 commented 4 weeks ago

When setting enableAccessibilityVoice to true in the config, when I run a test I get no options for voice.

But when I pass enableAccessibilityVoice as a command line arg npx cypress open -- env enableAccessibilityVoice=true it does give me the option for voice.

Video attached. https://github.com/user-attachments/assets/4569ed75-c0d7-4c38-80fe-9d7fdb07d264

sebastianclavijo commented 4 weeks ago

@w4dd325 , to set cypress environment variables in the cypress.config.js file you need to do as a sub property within the env property, instead of within e2e.

This is an example:

module.exports = defineConfig({
      // [...]
      env: {
            enableAccessibilityVoice: true
      }
      // [...]
});

You can also set it directly in the file cypress.env.json. Details are explained in the Configuration section of the doc.

Cheers

w4dd325 commented 4 weeks ago

All working - user error!! thank you!