You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Visiting my homepage and running checkA11y() is working just fine. My next test selects the login button to get us to the Login page. I run checkAlly() there and get the following
The documentation says this should be fine, use Cypress to interact, then call checkA11y()
// Basic usage after interacting with the page
it('Has no a11y violations after button click', () => {
// Interact with the page, then check for a11y issues
cy.get('button').click()
cy.checkA11y()
})
Any help welcome
The text was updated successfully, but these errors were encountered:
I was seeing a similar issue, if I had a simple test it seemed to be working fine but once I started adding a few more steps everything seemed to return this same error.
I managed to fix my issue, hopefully this helps others: according to the documentation they recommended placing the cy.injectAxe(); near the top of the code block, and then in most examples I see the cy.checkA11y(); placed near the end. Well, in a few of my tests I believe I was loading a new view or page in between the two, causing it to blow up.
My fix ended up being moving all of the cy.injectAxe(); down to directly above the cy.checkA11y(); and suddenly all of my "TypeError : Cannot read properties of undefined (reading 'run')" issues disappeared.
Not sure if this is the ultimate fix, but it worked for me.
Visiting my homepage and running checkA11y() is working just fine. My next test selects the login button to get us to the Login page. I run checkAlly() there and get the following
The documentation says this should be fine, use Cypress to interact, then call checkA11y()
// Basic usage after interacting with the page
it('Has no a11y violations after button click', () => {
// Interact with the page, then check for a11y issues
cy.get('button').click()
cy.checkA11y()
})
Any help welcome
The text was updated successfully, but these errors were encountered: