cypress-axe
cypress-axe copied to clipboard
checkA11y failing when called after setting cy.clock
Hi,
I noticed that checkA11y failed when called after using the cy.clock(...)
function to set a date
I get the following error when trying to call checkA11y :
cy.then() timed out after waiting 4000ms.
Your callback function returned a promise that never resolved.
The callback function was:
function(a){i(e)&&(e=void 0),i(t)&&(t=void 0),i(n)&&(n=void 0);var o=t||{},s=o.includedImpacts,u=r(o,["includedImpacts"]);return a.axe.run(e||a.document,u).then((function(e){var t=e.violations;return s&&Array.isArray(s)&&Boolean(s.length)?t.filter((function(e){return s.includes(e.impact)})):t}))}
Running cypress-axe 0.8.1
and cypress 4.12.1
I've been fighting this issue for the past couple days and had not connected the dots with the cy.clock()
tests being the culprits until I saw this bug report.
I was able to work around this by restoring the clock before calling checkA11y()
.
Thanks for the workaround, I had not thought of that !