component-driven / component-driven/cypress-axe

Using a different assertion library?

Open
#46 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
641
Forks
90
Avg merge
6h 8m
Merged PRs (30d)
1

Description

Firstly, cypress-axe is brilliant! Previously I was using axe-core with webdriverio, and it was painfully slow! However, one frustration with cypress-axe is the use of node assert. Elsewhere in our tests I'm using the chai library bundled into Cypress, which I have also extended to provide soft assertions (ie, continue on assertion fail) based on code found here:https://stackoverflow.com/questions/55868107/does-cypress-support-soft-assertion

I have modified cypress-axe locally to use chai.softExpect, and it behaves as I'd like. this allows me to run multiple a11y checks against different pages / page sections in the same test.

Might it be possible to have some sort of configuration option that allowed the user to specify which assertion library / method to use? Or something similar?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how cypress-axe currently invokes node assert and review the Cypress-bundled Chai usage described in the issue. Define a configuration path for selecting an assertion library or method, including soft assertions, and verify that multiple accessibility checks can run as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress, typescript
Domain
accessibility, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.