Waiting arbitrary time for the checks to work
See original GitHub issueIssue Description
Related: #22, vercel/next.js#7945
Full repo: here (note: some of the packages there are not yet published, but the test can run without them)
I have a simple test:
import formatAxeLog from "../helpers/formatAxeLog";
describe("Home page", () => {
beforeEach(() => {
cy.visit("/");
});
it("Has no detectable a11y violations on load", () => {
cy.injectAxe();
// cy.wait(500);
cy.checkA11y(null, null, formatAxeLog);
});
});
When I run the tests multiple times they sometimes fail (due to vercel/next.js#7945, as they should), sometimes pass. The only “reliable” way is just to wait. Am I doing something wrong, or this is a bug?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:11
Top Results From Across the Web
How to wait for element to disappear in cypress?
I would recommend to use Cypress waitUntil command and use something like ... You almost never need to wait for an arbitrary period...
Read more >wait - Cypress Documentation
wait () 'yields an object containing the HTTP request and response properties of the request. Examples. Time. Wait for an arbitrary period of...
Read more >Arbitrary wait between 2 task in scheduler. | Blue Prism Product
Hi All,I am looking for option where I can put some arbitrary wait time between 2 task in given scheduler, like between Restart...
Read more >Entrypoint — docker-stack Documentation - Apache Airflow
In case you try to use different group, the entrypoint exits with error. ... Waiting for connection involves executing airflow db check command, ......
Read more >Busy waiting - Wikipedia
In computer science and software engineering, busy-waiting, busy-looping or spinning is a technique in which a process repeatedly checks to see if ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Can we make it wait the same timeout amount that cypress waits for before failing an assertion?
I’m having the same issue with an Angular app
<a href="somwhere">{{ 'some.text' | translate }}</a>
translations are fetched so they sometimes take a bit longer to appearInstead of wait, you can try and get a DOM element that you know will render once the page is ready for the tests to run.
Given a markup like
you could write a test like this