Skip to content

Commit

Permalink
feat(net-stubbing): rename cy.route2 to cy.http (#9182)
Browse files Browse the repository at this point in the history
Co-authored-by: Jennifer Shehane <[email protected]>
  • Loading branch information
flotwig and jennifer-shehane authored Nov 14, 2020
1 parent cc0a80f commit 3d0d1d8
Show file tree
Hide file tree
Showing 12 changed files with 206 additions and 165 deletions.
2 changes: 1 addition & 1 deletion cli/schema/cypress.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
"experimentalNetworkStubbing": {
"type": "boolean",
"default": false,
"description": "Enables `cy.route2`, which can be used to dynamically intercept/stub/await any HTTP request or response (XHRs, fetch, beacons, etc.)"
"description": "Enables `cy.http()`, which can be used to dynamically intercept/stub/await any HTTP request or response (XHRs, fetch, beacons, etc.)"
},
"experimentalFetchPolyfill": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2577,7 +2577,7 @@ declare namespace Cypress {
*/
experimentalSourceRewriting: boolean
/**
* Enables `cy.route2`, which can be used to dynamically intercept/stub/await any HTTP request or response (XHRs, fetch, beacons, etc.)
* Enables `cy.http()`, which can be used to dynamically intercept/stub/await any HTTP request or response (XHRs, fetch, beacons, etc.)
* @default false
*/
experimentalNetworkStubbing: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Release Notes', () => {

cy.fixture('user').then((theUser) => user = theUser)
cy.fixture('release_notes').then((theReleaseNotes) => releaseNotes = theReleaseNotes)
cy.route2('cypress-banner.jpg', { fixture: 'cypress-banner.jpg' })
cy.http('cypress-banner.jpg', { fixture: 'cypress-banner.jpg' })

cy.visitIndex().then((win) => {
ipc = win.App.ipc
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-gui/cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Cypress.Commands.add('visitIndex', (options = {}) => {
// disable livereload within the Cypress-loaded desktop GUI. it doesn't fully
// reload the app because the stubbed out ipc calls don't work after the first
// time, so it ends up a useless white page
cy.route2({ path: /livereload/ }, '')
cy.http({ path: /livereload/ }, '')

cy.visit('/', options)
})
Expand Down
Loading

2 comments on commit 3d0d1d8

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3d0d1d8 Nov 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/6.0.0/appveyor-v6.0-release-3d0d1d89de92c5618d44a166851fb99df85bf6d8/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3d0d1d8 Nov 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 ia32 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/6.0.0/appveyor-v6.0-release-3d0d1d89de92c5618d44a166851fb99df85bf6d8/cypress.tgz

Please sign in to comment.