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

cy.wrap does not respect timeout #5980

janakdr opened this issue Dec 17, 2019 · 1 comment

cy.wrap does not respect timeout #5980

janakdr opened this issue Dec 17, 2019 · 1 comment


Copy link

@janakdr janakdr commented Dec 17, 2019

This example spec file fails with the error below:

describe('Cypress wait', () => {
  it('wrap does not wait', () => {
        new Promise((resolve) => setTimeout(resolve, 5000)), {timeout: 20000});
 Cypress wait
    1) wrap does not wait

  0 passing (4s)
  1 failing

  1) Cypress wait wrap does not wait:
     Error: Cypress command timeout of '4000ms' exceeded.
      at http://localhost:57838/__cypress/runner/cypress_runner.js:103532:25

Shouldn't cy.wrap respect the timeout option? The test passes if I pass --config defaultCommandTimeout=6000 on the command line, but I want to pass a specific timeout for this cy.wrap command.


This comment has been minimized.

Copy link

@jennifer-shehane jennifer-shehane commented Dec 17, 2019

I do feel like it should respect the timeout option here.

The code for the .wrap() command can be found here:

janakdr added a commit to givedirectly/Google-Partnership that referenced this issue Dec 17, 2019
And use that backup if the new one is not found. We do this by catching a failure in our score promise and substituting the backup if the failure seems to be from a missing asset.

This works out because we don't do any processing of the score asset except via that promise. Stern comment added to that effect.

Test has a horrible wait because of an apparent Cypress bug (cypress-io/cypress#5980).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.