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

Remove the need for explicit call of injectAxe #9

Open
stereobooster opened this issue Jun 7, 2021 · 2 comments
Open

Remove the need for explicit call of injectAxe #9

stereobooster opened this issue Jun 7, 2021 · 2 comments

Comments

@stereobooster
Copy link

What do you think about removing explicit call of injectAxe and instead check if axe already injected in checkA11y, if no then inject it, if yes then skip injecting?

Also maybe read file once in the memory rather then reading it on each inject?

@stereobooster
Copy link
Author

Is there a need for this:

Enable results logging by defining cy.tasks

Why it needs to be task can't it just directly use console.log, console.table?

@mwmcode
Copy link
Owner

mwmcode commented Jun 8, 2021

  • It'd be a lot easier if we could just cy.checkA11y but the loading/injection of axe-core has to happen before running the running the check function.
  • You can provide violationsCallback and control how results are logged. In that case you won't need to create those tasks. Take a look here https://github.com/mcha-dev/cypress-axe-core#cyconfigurecypressaxe

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

No branches or pull requests

2 participants