@@ -591,13 +591,6 @@ declare namespace Cypress {
591
591
defaults ( options : Partial < KeyboardDefaultsOptions > ) : void
592
592
}
593
593
594
- /**
595
- * @see https://on.cypress.io/api/api-server
596
- */
597
- Server : {
598
- defaults ( options : Partial < ServerOptions > ) : void
599
- }
600
-
601
594
/**
602
595
* @see https://on.cypress.io/screenshot-api
603
596
*/
@@ -1665,66 +1658,6 @@ declare namespace Cypress {
1665
1658
*/
1666
1659
root < E extends Node = HTMLHtmlElement > ( options ?: Partial < Loggable > ) : Chainable < JQuery < E > > // can't do better typing unless we ignore the `.within()` case
1667
1660
1668
- /**
1669
- * @deprecated Use `cy.intercept()` instead.
1670
- *
1671
- * Use `cy.route()` to manage the behavior of network requests.
1672
- * @see https://on.cypress.io/route
1673
- * @example
1674
- * cy.server()
1675
- * cy.route('https://localhost:7777/users', [{id: 1, name: 'Pat'}])
1676
- */
1677
- route ( url : string | RegExp , response ?: string | object ) : Chainable < null >
1678
- /**
1679
- * @deprecated Use `cy.intercept()` instead.
1680
- *
1681
- * Spy or stub request with specific method and url.
1682
- *
1683
- * @see https://on.cypress.io/route
1684
- * @example
1685
- * cy.server()
1686
- * // spy on POST /todos requests
1687
- * cy.route('POST', '/todos').as('add-todo')
1688
- */
1689
- route ( method : string , url : string | RegExp , response ?: string | object ) : Chainable < null >
1690
- /**
1691
- * @deprecated Use `cy.intercept()` instead.
1692
- *
1693
- * Set a route by returning an object literal from a callback function.
1694
- * Functions that return a Promise will automatically be awaited.
1695
- *
1696
- * @see https://on.cypress.io/route
1697
- * @example
1698
- * cy.server()
1699
- * cy.route(() => {
1700
- * // your logic here
1701
- * // return an appropriate routing object here
1702
- * return {
1703
- * method: 'POST',
1704
- * url: '/comments',
1705
- * response: this.commentsFixture
1706
- * }
1707
- * })
1708
- */
1709
- route ( fn : ( ) => RouteOptions ) : Chainable < null >
1710
- /**
1711
- * @deprecated Use `cy.intercept()` instead.
1712
- *
1713
- * Spy or stub a given route.
1714
- *
1715
- * @see https://on.cypress.io/route
1716
- * @example
1717
- * cy.server()
1718
- * cy.route({
1719
- * method: 'DELETE',
1720
- * url: '/users',
1721
- * status: 412,
1722
- * delay: 1000
1723
- * // and other options, see documentation
1724
- * })
1725
- */
1726
- route ( options : Partial < RouteOptions > ) : Chainable < null >
1727
-
1728
1661
/**
1729
1662
* Take a screenshot of the application under test and the Cypress Command Log.
1730
1663
*
@@ -1770,26 +1703,6 @@ declare namespace Cypress {
1770
1703
*/
1771
1704
select ( valueOrTextOrIndex : string | number | Array < string | number > , options ?: Partial < SelectOptions > ) : Chainable < Subject >
1772
1705
1773
- /**
1774
- * @deprecated Use `cy.intercept()` instead.
1775
- *
1776
- * Start a server to begin routing responses to `cy.route()` and `cy.request()`.
1777
- *
1778
- * @example
1779
- * // start server
1780
- * cy.server()
1781
- * // get default server options
1782
- * cy.server().should((server) => {
1783
- * expect(server.delay).to.eq(0)
1784
- * expect(server.method).to.eq('GET')
1785
- * expect(server.status).to.eq(200)
1786
- * // and many others options
1787
- * })
1788
- *
1789
- * @see https://on.cypress.io/server
1790
- */
1791
- server ( options ?: Partial < ServerOptions > ) : Chainable < ServerOptions >
1792
-
1793
1706
/**
1794
1707
* Set a browser cookie.
1795
1708
*
@@ -3040,8 +2953,6 @@ declare namespace Cypress {
3040
2953
socketIoRoute : string
3041
2954
spec : Cypress [ 'spec' ] | null
3042
2955
specs : Array < Cypress [ 'spec' ] >
3043
- xhrRoute : string
3044
- xhrUrl : string
3045
2956
}
3046
2957
3047
2958
interface TestConfigOverrides extends Partial < Pick < ConfigOptions , 'animationDistanceThreshold' | 'blockHosts' | 'defaultCommandTimeout' | 'env' | 'execTimeout' | 'includeShadowDom' | 'numTestsKeptInMemory' | 'pageLoadTimeout' | 'redirectionLimit' | 'requestTimeout' | 'responseTimeout' | 'retries' | 'screenshotOnRunFailure' | 'slowTestThreshold' | 'scrollBehavior' | 'taskTimeout' | 'viewportHeight' | 'viewportWidth' | 'waitForAnimations' > > , Partial < Pick < ResolvedConfigOptions , 'baseUrl' > > {
@@ -3289,28 +3200,6 @@ declare namespace Cypress {
3289
3200
interval : number
3290
3201
}
3291
3202
3292
- /**
3293
- * Setting default options for cy.server()
3294
- * @see https://on.cypress.io/server
3295
- */
3296
- interface ServerOptions {
3297
- delay : number
3298
- method : HttpMethod
3299
- status : number
3300
- headers : object
3301
- response : any
3302
- onRequest ( ...args : any [ ] ) : void
3303
- onResponse ( ...args : any [ ] ) : void
3304
- onAbort ( ...args : any [ ] ) : void
3305
- enable : boolean
3306
- force404 : boolean
3307
- urlMatchingOptions : object
3308
- ignore ( xhr : Request ) : void
3309
- onAnyRequest ( route : RouteOptions , proxy : any ) : void
3310
- onAnyResponse ( route : RouteOptions , proxy : any ) : void
3311
- onAnyAbort ( route : RouteOptions , proxy : any ) : void
3312
- }
3313
-
3314
3203
interface Session {
3315
3204
// Clear all saved sessions and re-run the current spec file.
3316
3205
clearAllSavedSessions : ( ) => Promise < void >
@@ -5947,28 +5836,6 @@ declare namespace Cypress {
5947
5836
viewportHeight : number
5948
5837
}
5949
5838
5950
- interface WaitXHR {
5951
- duration : number
5952
- id : string
5953
- method : HttpMethod
5954
- request : {
5955
- body : string | ObjectLike
5956
- headers : ObjectLike
5957
- }
5958
- requestBody : WaitXHR [ 'request' ] [ 'body' ]
5959
- requestHeaders : WaitXHR [ 'request' ] [ 'headers' ]
5960
- response : {
5961
- body : string | ObjectLike
5962
- headers : ObjectLike
5963
- }
5964
- responseBody : WaitXHR [ 'response' ] [ 'body' ]
5965
- responseHeaders : WaitXHR [ 'response' ] [ 'headers' ]
5966
- status : number
5967
- statusMessage : string
5968
- url : string
5969
- xhr : XMLHttpRequest
5970
- }
5971
-
5972
5839
type Encodings = 'ascii' | 'base64' | 'binary' | 'hex' | 'latin1' | 'utf8' | 'utf-8' | 'ucs2' | 'ucs-2' | 'utf16le' | 'utf-16le' | null
5973
5840
type PositionType = 'topLeft' | 'top' | 'topRight' | 'left' | 'center' | 'right' | 'bottomLeft' | 'bottom' | 'bottomRight'
5974
5841
type ViewportPreset = 'macbook-16' | 'macbook-15' | 'macbook-13' | 'macbook-11' | 'ipad-2' | 'ipad-mini' | 'iphone-xr' | 'iphone-x' | 'iphone-6+' | 'iphone-se2' | 'iphone-8' | 'iphone-7' | 'iphone-6' | 'iphone-5' | 'iphone-4' | 'iphone-3' | 'samsung-s10' | 'samsung-note9'
0 commit comments