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.server() should work even before cy.visit() #17

Closed
brian-mann opened this issue Apr 9, 2015 · 1 comment
Closed

cy.server() should work even before cy.visit() #17

brian-mann opened this issue Apr 9, 2015 · 1 comment
Labels
type: enhancement Requested enhancement of existing feature

Comments

@brian-mann
Copy link
Member

Currently cy.server can only be started after you cy.visit a remote page.

cy
  .visit("http://localhost:7000/dashboard")
  .server()
  .route(...)

This is problematic because many pages make XHR requests onLoad. Because cy.visit resolves when the page's load event fires, by this time it is often too late. XHR requests may have gone out.

Therefore cy.server should be able to be invoked prior to a page loading (even though one does not exist).

Any routes attached to the server should also be carried over.

@brian-mann brian-mann added type: feature New feature that does not currently exist type: enhancement Requested enhancement of existing feature and removed type: feature New feature that does not currently exist labels Apr 9, 2015
@brian-mann
Copy link
Member Author

This new functionality is implemented in 0.4.3. Changelog

@cypress-io cypress-io locked as resolved and limited conversation to collaborators Dec 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Requested enhancement of existing feature
Projects
None yet
Development

No branches or pull requests

1 participant