-
Notifications
You must be signed in to change notification settings - Fork 153
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
"Your callback function returned a promise which never resolved" error with cy.queryByText() #37
Comments
I remember this piece of code, I think I wrote it. At that time I never used "should not exist" and I wonder why does it not take care of the timeout inside Cypress. The timeout was originally meant to wait for the element to exist. |
Nope, at the time of writing there was no timeout ef22f87#diff-1fdf421c05c1140f6d71444ea2b27638R20 The timeout appears later ec3b712#diff-1fdf421c05c1140f6d71444ea2b27638R43 CC @npeterkamps |
Removing the timeout option on the call to I think the original problem happens when Adding more than 100ms might make the issue less frequent, but it is not a sure way to avoid it :( |
Is this still an issue after the changes to retries in #78 ? |
Still an issue. In fact, since moving to 5.0.0 I'm seeing these failures when I wasn't before. Unhelpfully, I now no longer which command actually failed.
|
I'm a little late to the party. I introduced some changes to the way these Cypress Custom commands work. Is this still an issue in I know for sure the original error shouldn't happen, because the
Hopefully this is no longer an issue. That's what #108 sought to address - better debugging of failures. My recommendation is to change all The changes introduced in cy.queryByText('Does not exist').should('exist') |
I think we're safe to close this now. If this is still a problem for anyone please open a new issue. Thanks! |
cypress-testing-library
version: 2.3.6node
version: 10.12.0npm
(oryarn
) version: 6.4.1I have a few tests checking that an elements doesn't exist using a command like
Usually, everything is fine. But, occasionally, I get a failure like this:
I nailed it down to the timeout on https://github.com/kentcdodds/cypress-testing-library/blob/master/src/index.js#L53 , and everything seems to work if we remove the timeout option.
Since
waitForElement
is already called with a timeout option on https://github.com/kentcdodds/cypress-testing-library/blob/master/src/index.js#L24 , is it needed on the cypress command chain? Could it be removed from that line 53?Sorry for not providing a code sample, but I have not been able to reliably reproduce it.
The text was updated successfully, but these errors were encountered: