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

Allowing setting Chrome bandwidth and latency setting #2716

Closed
mitar opened this issue Nov 3, 2018 · 2 comments · Fixed by #4176
Closed

Allowing setting Chrome bandwidth and latency setting #2716

mitar opened this issue Nov 3, 2018 · 2 comments · Fixed by #4176
Assignees
Labels
type: feature New feature that does not currently exist

Comments

@mitar
Copy link

mitar commented Nov 3, 2018

Current behavior:

Currently, during CI, the client-side connects to local server-side and this makes all API calls very fast. But in production, users are not so close to the server and I would prefer if I could test a more realistic scenario where there is a bandwidth and latency limits.

Desired behavior:

In Chrome, in web development tool, you can configure the speed and latency override for all HTTP requests. I think it would be great if one could control this from tests in Cypress (or for all tests, or just for some). So that I could also test if on a very slow links behavior is as expected (for example, to test that loading UI element appears and so on).

Versions

Cypress: 3.1.1
OS: Linux Ubuntu 18.04

@jennifer-shehane jennifer-shehane added type: feature New feature that does not currently exist stage: proposal 💡 No work has been done of this issue labels Nov 5, 2018
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: proposal 💡 No work has been done of this issue labels Jun 24, 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: needs review The PR code is done & tested, needs review stage: work in progress labels Aug 25, 2020
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Aug 31, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 1, 2020

Released in 5.1.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Sep 1, 2020
@jennifer-shehane
Copy link
Member

The features requested in this issue are now possible as part of cy.route2().

cy.route2() is currently experimental and requires being enabled by passing "experimentalNetworkStubbing": true through your Cypress configuration. This will eventually be merged in as part of our standard API.

Please see the cy.route2() docs for full details: https://on.cypress.io/route2

If you encounter any issues or unexpected behavior while using cy.route2() we encourage you to open a new issue so that we can work out all the issues before public release. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature New feature that does not currently exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants