component-driven / component-driven/cypress-axe
cy.injectAxe() is Causing Cypress Test Runner to Freeze
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 641
- Forks
- 90
- Avg merge
- 6h 8m
- Merged PRs (30d)
- 1
Description
Whenever I try to use cy.injectAxe() in a test, Cypress gets stuck at the step immediately prior. The Cypress test runner itself is locked and must be force-quit.
Here is code to reproduce the problem.
context('Problem with cy.injectAxe()', function () {
beforeEach (function () {
// These are not real credentials.
// Please sign up (for free) at www.vidyard.com, verify your email address, then update these accordingly before running.
const email = 'yourEmailAddress@fake.com'
const password = 'password123!'
cy.visit('https://secure.vidyard.com/user/sign_in')
cy.get('#username').type(email)
cy.get('#password').type(password)
cy.get('#sign-in').click()
cy.wait(10000) // Just to make sure the page is fully loaded.
})
it('Accessibility Test', function () {
// When the lines below are commented out, there is no issue.
// When the lines are let to run, the Cypress Test Runner gets stuck on the cy.wait step.
// Cypress will be completely frozen and must be force quit.
cy.injectAxe()
cy.checkA11y()
})
})
I am using Cypress version 4.12.1 and cypress-axe version 0.8.1 on macOS 10.14.6 with Chrome 84.0.4147.105 and Firefox 79.0.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction test shown in the issue using cy.injectAxe() and cy.checkA11y() on the listed Cypress and cypress-axe versions. Confirm the freeze at the preceding cy.wait step, then narrow down which command causes the runner to lock; done means the test runner remains usable and the accessibility commands complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cypress
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100