Skip to content

Remove pages and references to functionality obsoleted by multidomain GA #4735

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

Merged
merged 2 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions content/_data/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,6 @@
{
"title": "Cross Browser Testing",
"slug": "cross-browser-testing"
},
{
"title": "Web Security",
"slug": "web-security"
}
]
},
Expand Down Expand Up @@ -757,10 +753,6 @@
"title": "root",
"slug": "root"
},
{
"title": "route",
"slug": "route"
},
{
"title": "screenshot",
"slug": "screenshot"
Expand All @@ -781,10 +773,6 @@
"title": "selectFile",
"slug": "selectfile"
},
{
"title": "server",
"slug": "server"
},
{
"title": "session",
"slug": "session"
Expand Down Expand Up @@ -941,10 +929,6 @@
"title": "SelectorPlayground",
"slug": "selector-playground-api"
},
{
"title": "Server",
"slug": "cypress-server"
},
{
"title": "arch",
"slug": "arch"
Expand Down
18 changes: 0 additions & 18 deletions content/api/commands/intercept.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ Spy and stub network requests and responses.

</Alert>

<Alert type="bolt">

`cy.intercept()` is the successor to `cy.route()` as of Cypress 6.0.0. See
[Comparison to `cy.route`](#Comparison-to-cy-route).

</Alert>

<Alert type="warning">

All intercepts are automatically cleared before every test.
Expand Down Expand Up @@ -1486,16 +1479,6 @@ Cypress.minimatch('http://localhost/users?_limit=3', '**/users?_limit=+(3|5)', {
// true (plus debug messages)
```

## Comparison to `cy.route()`

Unlike [cy.route()](/api/commands/route), `cy.intercept()`:

- can intercept all types of network requests including Fetch API, page loads,
XMLHttpRequests, resource loads, etc.
- does not require calling [cy.server()](/api/commands/server) before use - in
fact, `cy.server()` does not influence `cy.intercept()` at all.
- does not have method set to `GET` by default, but intercepts `*` methods.

## `cy.intercept()` and request caching

`cy.intercept()` intercepts requests at the network layer. This can cause
Expand Down Expand Up @@ -1597,7 +1580,6 @@ information about the request and response to the console:
- [Network Requests Guide](/guides/guides/network-requests)
- [Cypress Example Recipes](https://github.com/cypress-io/cypress-example-recipes#stubbing-and-spying)
- [Kitchen Sink Examples](https://github.com/cypress-io/cypress-example-kitchensink/blob/master/cypress/integration/2-advanced-examples/network_requests.spec.js)
- [Migrating `cy.route()` to `cy.intercept()`](/guides/references/migration-guide#Migrating-cy-route-to-cy-intercept)
<!-- TODO add examples from the resources below to `cypress-example-recipes` repo -->
- [Smart GraphQL Stubbing in Cypress](https://glebbahmutov.com/blog/smart-graphql-stubbing/)
blog post
Expand Down
2 changes: 0 additions & 2 deletions content/api/commands/origin.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,6 @@ following Cypress commands will throw errors if used in the callback:
- `cy.origin()`
- [`cy.intercept()`](/api/commands/intercept)
- [`cy.session()`](/api/commands/session)
- [`cy.server()`](/api/commands/server)
- [`cy.route()`](/api/commands/route)

### Other limitations

Expand Down
7 changes: 2 additions & 5 deletions content/api/commands/request.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,9 @@ browser cookies.
In other words, `cy.request()` transparently performs all of the underlying
functions as if it came from the browser.

### [`cy.intercept()`](/api/commands/intercept), [`cy.server()`](/api/commands/server), and [`cy.route()`](/api/commands/route)
### [`cy.intercept()`](/api/commands/intercept)

#### `cy.request()` sends requests to actual endpoints, bypassing those defined using `cy.route()` or `cy.intercept()`

`cy.server()` and any configuration passed to
[`cy.server()`](/api/commands/server) has no effect on `cy.request()`.
#### `cy.request()` sends requests to actual endpoints, bypassing those defined using `cy.intercept()`

The intention of `cy.request()` is to be used for checking endpoints on an
actual, running server without having to start the front end application.
Expand Down
Loading