Skip to content
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

I so want to use this for retrying cy.task #7

Open
bahmutov opened this issue Jan 16, 2019 · 3 comments
Open

I so want to use this for retrying cy.task #7

bahmutov opened this issue Jan 16, 2019 · 3 comments

Comments

@bahmutov
Copy link

but it only evaluates functions that return cypress chainers once.

I have done my own little code experiment in https://github.com/bahmutov/retry-task-demo (which found a problem right away cypress-io/cypress#3144) but it is working.

@NicholasBoll
Copy link
Owner

@bahmutov, do you think cypress-pipe should retry all funtions that contain Cypress chainers? I thought about it and decided not to for 2 reasons off the top of my head - retrying side effect things like click which have their own timeouts and the command log getting spammed with cy logs.

There are probably other edge cases as well. I could always try it to see what happens. You could probably experiment by removing the retry restriction.

@bahmutov
Copy link
Author

I definitely see value in retrying everything even things that have side-effects - especially if the user really wants to. Real world problem solved here: cypress-io/cypress#3135 (comment)

@NicholasBoll
Copy link
Owner

Retrying is handled by verifyUpcomingAssertions. I dug around there a bit to see why assertions don't retry from functions that contain Cypress commands. It is quite complex and hard to follow. Do you have any insights. It looks like that code was last touched by Brian over a year ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants