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

Timeout progress indicator for cy.wait is incorrect if timeout option is not passed #7881

Closed
panzarino opened this issue Jul 3, 2020 · 2 comments · Fixed by #7882
Closed
Assignees
Labels
pkg/driver This is due to an issue in the packages/driver directory pkg/reporter This is due to an issue in the packages/reporter directory type: bug type: user experience Improvements needed for UX

Comments

@panzarino
Copy link
Contributor

panzarino commented Jul 3, 2020

Current behavior:

When calling cy.wait without passing a timeout option, the timeout progress bar will default to the length of a normal command rather than the default timeout for cy.wait.

ezgif-6-621a66abf4bc

Desired behavior:

The progress bar should reflect the actual timeout for the command, which is requestTimeout or responseTimeout.

Test code to reproduce

Cypress test:

describe('Long request', () => {
  it('Succeeds', () => {

    cy.server();
    cy.route('/api').as('api');

    cy.visit('/');
    cy.wait("@api");

    cy.contains("API response");
  });
});

Server (Express):

app.get('/api', async function (req, res) {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      res.status(200).send('API response');
      resolve();
      },
    34000);
  })
});
@panzarino panzarino added type: bug pkg/driver This is due to an issue in the packages/driver directory type: user experience Improvements needed for UX labels Jul 3, 2020
@panzarino panzarino self-assigned this Jul 3, 2020
@panzarino panzarino added the pkg/reporter This is due to an issue in the packages/reporter directory label Jul 3, 2020
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review stage: work in progress labels Jul 3, 2020
@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: work in progress stage: needs review The PR code is done & tested, needs review labels Jul 6, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 20, 2020

The code for this is done in cypress-io/cypress#7882, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Jul 20, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 21, 2020

Released in 4.11.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.11.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jul 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pkg/driver This is due to an issue in the packages/driver directory pkg/reporter This is due to an issue in the packages/reporter directory type: bug type: user experience Improvements needed for UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants