-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async test moving on before finished #8
Comments
@NicholasBoll I've also tested your library but it seems that it has a major conceptual flow. Cypress doesn't know about test functions running asynchronously. If you have a test like this:
the test will be successful immediately while Cypress will be running the queued commands. At least that is what I've experienced. What is your take on this? |
I'm using My setup:
A cleaner method that calls And an example of a test using
This solved the problem of promise race conditions randomly not creating or deleting data. The only minor annoyance now is the warnings: |
I'm using
cypress-promise@1.0.2
andcypress@3.4.0
(I know a bit out of date) and I'm noticing that my async tests usingcypress-promise
are "completing" and moving on to the next test before all of the commands are finished in the test. This is happening in the UI of cypress (not cli)Here is a test I have
I have other tests (that I'm using promisify in) that are doing the same thing.
Edit: Confirmed that async/await was causing the issue. I removed all usages of it in this spec and am no longer seeing the issue where a test won't complete fully. It's possible there is a fix in a newer version or I am just using the promises wrong, but something is definitely not working right.
The text was updated successfully, but these errors were encountered: