cypress 9.7.0 → 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/index.mjs +15 -0
- package/lib/cli.js +72 -23
- package/lib/errors.js +16 -1
- package/lib/exec/open.js +45 -10
- package/lib/exec/run.js +17 -10
- package/lib/exec/shared.js +30 -9
- package/lib/exec/spawn.js +4 -0
- package/lib/exec/xvfb.js +1 -0
- package/lib/util.js +10 -3
- package/mount-utils/CHANGELOG.md +20 -0
- package/mount-utils/README.md +14 -0
- package/mount-utils/dist/index.d.ts +54 -0
- package/mount-utils/dist/index.js +134 -0
- package/mount-utils/package.json +31 -0
- package/package.json +39 -4
- package/react/CHANGELOG.md +373 -0
- package/react/README.md +414 -0
- package/react/dist/cypress-react.browser.js +497 -0
- package/react/dist/cypress-react.cjs.js +495 -0
- package/react/dist/cypress-react.esm-bundler.js +467 -0
- package/react/dist/getDisplayName.d.ts +8 -0
- package/react/dist/index.d.ts +2 -0
- package/react/dist/mount.d.ts +143 -0
- package/react/dist/mountHook.d.ts +11 -0
- package/react/package.json +105 -0
- package/types/bluebird/index.d.ts +18 -4
- package/types/cypress-npm-api.d.ts +4 -10
- package/types/cypress.d.ts +172 -120
- package/types/minimatch/index.d.ts +15 -5
- package/vue/CHANGELOG.md +380 -0
- package/vue/README.md +678 -0
- package/vue/dist/cypress-vue.cjs.js +13535 -0
- package/vue/dist/cypress-vue.esm-bundler.js +13511 -0
- package/vue/dist/index.d.ts +56 -0
- package/vue/package.json +86 -0
- package/vue2/CHANGELOG.md +5 -0
- package/vue2/README.md +693 -0
- package/vue2/dist/cypress-vue2.browser.js +20191 -0
- package/vue2/dist/cypress-vue2.cjs.js +20188 -0
- package/vue2/dist/cypress-vue2.esm-bundler.js +20179 -0
- package/vue2/dist/index.d.ts +171 -0
- package/vue2/package.json +59 -0
package/types/cypress.d.ts
CHANGED
@@ -56,6 +56,16 @@ declare namespace Cypress {
|
|
56
56
|
password: string
|
57
57
|
}
|
58
58
|
|
59
|
+
interface RemoteState {
|
60
|
+
auth?: Auth
|
61
|
+
domainName: string
|
62
|
+
strategy: 'file' | 'http'
|
63
|
+
origin: string
|
64
|
+
fileServer: string | null
|
65
|
+
props: Record<string, any>
|
66
|
+
visiting: string
|
67
|
+
}
|
68
|
+
|
59
69
|
interface Backend {
|
60
70
|
/**
|
61
71
|
* Firefox only: Force Cypress to run garbage collection routines.
|
@@ -164,7 +174,7 @@ declare namespace Cypress {
|
|
164
174
|
|
165
175
|
/**
|
166
176
|
* Spec type for the given test. "integration" is the default, but
|
167
|
-
* tests run using `open
|
177
|
+
* tests run using `open --component` will be "component"
|
168
178
|
*
|
169
179
|
* @see https://on.cypress.io/experiments
|
170
180
|
*/
|
@@ -194,7 +204,7 @@ declare namespace Cypress {
|
|
194
204
|
/**
|
195
205
|
* The configuration for Cypress.
|
196
206
|
*/
|
197
|
-
type Config = ResolvedConfigOptions & RuntimeConfigOptions
|
207
|
+
type Config = ResolvedConfigOptions & RuntimeConfigOptions & RuntimeServerConfigOptions
|
198
208
|
|
199
209
|
/**
|
200
210
|
* Several libraries are bundled with Cypress by default.
|
@@ -388,7 +398,7 @@ declare namespace Cypress {
|
|
388
398
|
|
389
399
|
// no real way to type without generics
|
390
400
|
/**
|
391
|
-
* Returns all environment variables set with CYPRESS_ prefix or in "env" object in "cypress.
|
401
|
+
* Returns all environment variables set with CYPRESS_ prefix or in "env" object in "cypress.config.{js,ts,mjs,cjs}"
|
392
402
|
*
|
393
403
|
* @see https://on.cypress.io/env
|
394
404
|
*/
|
@@ -397,7 +407,7 @@ declare namespace Cypress {
|
|
397
407
|
* Returns specific environment variable or undefined
|
398
408
|
* @see https://on.cypress.io/env
|
399
409
|
* @example
|
400
|
-
* // cypress.
|
410
|
+
* // cypress.config.js
|
401
411
|
* { "env": { "foo": "bar" } }
|
402
412
|
* Cypress.env("foo") // => bar
|
403
413
|
*/
|
@@ -676,7 +686,7 @@ declare namespace Cypress {
|
|
676
686
|
* @see https://on.cypress.io/get
|
677
687
|
* @example
|
678
688
|
```
|
679
|
-
// Get the aliased
|
689
|
+
// Get the aliased 'todos' elements
|
680
690
|
cy.get('ul#todos').as('todos')
|
681
691
|
//...hack hack hack...
|
682
692
|
// later retrieve the todos
|
@@ -724,9 +734,9 @@ declare namespace Cypress {
|
|
724
734
|
*
|
725
735
|
* @see https://on.cypress.io/check
|
726
736
|
* @example
|
727
|
-
* // Select the radio with the value of
|
737
|
+
* // Select the radio with the value of 'US'
|
728
738
|
* cy.get('[type="radio"]').check('US')
|
729
|
-
* // Check the checkboxes with the values
|
739
|
+
* // Check the checkboxes with the values 'ga' and 'ca'
|
730
740
|
* cy.get('[type="checkbox"]').check(['ga', 'ca'])
|
731
741
|
*/
|
732
742
|
check(value: string | string[], options?: Partial<CheckOptions>): Chainable<Subject>
|
@@ -750,7 +760,7 @@ declare namespace Cypress {
|
|
750
760
|
|
751
761
|
/**
|
752
762
|
* Clear a specific browser cookie.
|
753
|
-
* Cypress automatically clears all cookies before each test to prevent state from being shared across tests. You shouldn
|
763
|
+
* Cypress automatically clears all cookies before each test to prevent state from being shared across tests. You shouldn't need to use this command unless you're using it to clear a specific cookie inside a single test.
|
754
764
|
*
|
755
765
|
* @see https://on.cypress.io/clearcookie
|
756
766
|
*/
|
@@ -758,7 +768,7 @@ declare namespace Cypress {
|
|
758
768
|
|
759
769
|
/**
|
760
770
|
* Clear all browser cookies.
|
761
|
-
* Cypress automatically clears all cookies before each test to prevent state from being shared across tests. You shouldn
|
771
|
+
* Cypress automatically clears all cookies before each test to prevent state from being shared across tests. You shouldn't need to use this command unless you're using it to clear a specific cookie inside a single test.
|
762
772
|
*
|
763
773
|
* @see https://on.cypress.io/clearcookies
|
764
774
|
*/
|
@@ -767,7 +777,7 @@ declare namespace Cypress {
|
|
767
777
|
/**
|
768
778
|
* Clear data in local storage.
|
769
779
|
* Cypress automatically runs this command before each test to prevent state from being
|
770
|
-
* shared across tests. You shouldn
|
780
|
+
* shared across tests. You shouldn't need to use this command unless you're using it
|
771
781
|
* to clear localStorage inside a single test. Yields `localStorage` object.
|
772
782
|
*
|
773
783
|
* @see https://on.cypress.io/clearlocalstorage
|
@@ -799,7 +809,7 @@ declare namespace Cypress {
|
|
799
809
|
/**
|
800
810
|
* Clear data in local storage.
|
801
811
|
* Cypress automatically runs this command before each test to prevent state from being
|
802
|
-
* shared across tests. You shouldn
|
812
|
+
* shared across tests. You shouldn't need to use this command unless you're using it
|
803
813
|
* to clear localStorage inside a single test. Yields `localStorage` object.
|
804
814
|
*
|
805
815
|
* @see https://on.cypress.io/clearlocalstorage
|
@@ -814,7 +824,7 @@ declare namespace Cypress {
|
|
814
824
|
/**
|
815
825
|
* Clear data in local storage.
|
816
826
|
* Cypress automatically runs this command before each test to prevent state from being
|
817
|
-
* shared across tests. You shouldn
|
827
|
+
* shared across tests. You shouldn't need to use this command unless you're using it
|
818
828
|
* to clear localStorage inside a single test. Yields `localStorage` object.
|
819
829
|
*
|
820
830
|
* @see https://on.cypress.io/clearlocalstorage
|
@@ -851,8 +861,8 @@ declare namespace Cypress {
|
|
851
861
|
/**
|
852
862
|
* Click a DOM element at specific coordinates
|
853
863
|
*
|
854
|
-
* @param {number} x The distance in pixels from the element
|
855
|
-
* @param {number} y The distance in pixels from the element
|
864
|
+
* @param {number} x The distance in pixels from the element's left to issue the click.
|
865
|
+
* @param {number} y The distance in pixels from the element's top to issue the click.
|
856
866
|
* @see https://on.cypress.io/click
|
857
867
|
* @example
|
858
868
|
```
|
@@ -1007,8 +1017,8 @@ declare namespace Cypress {
|
|
1007
1017
|
/**
|
1008
1018
|
* Double-click a DOM element at specific coordinates
|
1009
1019
|
*
|
1010
|
-
* @param {number} x The distance in pixels from the element
|
1011
|
-
* @param {number} y The distance in pixels from the element
|
1020
|
+
* @param {number} x The distance in pixels from the element's left to issue the click.
|
1021
|
+
* @param {number} y The distance in pixels from the element's top to issue the click.
|
1012
1022
|
* @see https://on.cypress.io/dblclick
|
1013
1023
|
* @example
|
1014
1024
|
```
|
@@ -1037,8 +1047,8 @@ declare namespace Cypress {
|
|
1037
1047
|
/**
|
1038
1048
|
* Right-click a DOM element at specific coordinates
|
1039
1049
|
*
|
1040
|
-
* @param {number} x The distance in pixels from the element
|
1041
|
-
* @param {number} y The distance in pixels from the element
|
1050
|
+
* @param {number} x The distance in pixels from the element's left to issue the click.
|
1051
|
+
* @param {number} y The distance in pixels from the element's top to issue the click.
|
1042
1052
|
* @see https://on.cypress.io/rightclick
|
1043
1053
|
* @example
|
1044
1054
|
```
|
@@ -1141,7 +1151,7 @@ declare namespace Cypress {
|
|
1141
1151
|
*
|
1142
1152
|
* @see https://on.cypress.io/find
|
1143
1153
|
* @example
|
1144
|
-
* // Find the li
|
1154
|
+
* // Find the li's within the nav
|
1145
1155
|
* cy.get('.left-nav>.nav').find('>li')
|
1146
1156
|
*/
|
1147
1157
|
find<E extends Node = HTMLElement>(selector: string, options?: Partial<Loggable & Timeoutable & Shadow>): Chainable<JQuery<E>>
|
@@ -1213,7 +1223,7 @@ declare namespace Cypress {
|
|
1213
1223
|
* Get one or more DOM elements by alias.
|
1214
1224
|
* @see https://on.cypress.io/get#Alias
|
1215
1225
|
* @example
|
1216
|
-
* // Get the aliased
|
1226
|
+
* // Get the aliased 'todos' elements
|
1217
1227
|
* cy.get('ul#todos').as('todos')
|
1218
1228
|
* //...hack hack hack...
|
1219
1229
|
* //later retrieve the todos
|
@@ -1236,7 +1246,7 @@ declare namespace Cypress {
|
|
1236
1246
|
getCookies(options?: Partial<Loggable & Timeoutable>): Chainable<Cookie[]>
|
1237
1247
|
|
1238
1248
|
/**
|
1239
|
-
* Navigate back or forward to the previous or next URL in the browser
|
1249
|
+
* Navigate back or forward to the previous or next URL in the browser's history.
|
1240
1250
|
*
|
1241
1251
|
* @see https://on.cypress.io/go
|
1242
1252
|
*/
|
@@ -1281,7 +1291,7 @@ declare namespace Cypress {
|
|
1281
1291
|
invoke(propertyPath: string, ...args: any[]): Chainable
|
1282
1292
|
|
1283
1293
|
/**
|
1284
|
-
* Get a property
|
1294
|
+
* Get a property's value on the previously yielded subject.
|
1285
1295
|
*
|
1286
1296
|
* @see https://on.cypress.io/its
|
1287
1297
|
* @example
|
@@ -1878,7 +1888,7 @@ declare namespace Cypress {
|
|
1878
1888
|
*/
|
1879
1889
|
stub(): Agent<sinon.SinonStub>
|
1880
1890
|
/**
|
1881
|
-
* Stubs all the object
|
1891
|
+
* Stubs all the object's methods.
|
1882
1892
|
*
|
1883
1893
|
* @see https://on.cypress.io/stub
|
1884
1894
|
* @example
|
@@ -2136,11 +2146,11 @@ declare namespace Cypress {
|
|
2136
2146
|
* @example
|
2137
2147
|
* // Unchecks checkbox element
|
2138
2148
|
* cy.get('[type="checkbox"]').uncheck()
|
2139
|
-
* // Uncheck element with the id
|
2149
|
+
* // Uncheck element with the id 'saveUserName'
|
2140
2150
|
* cy.get('#saveUserName').uncheck()
|
2141
2151
|
* // Uncheck all checkboxes
|
2142
2152
|
* cy.get(':checkbox').uncheck()
|
2143
|
-
* // Uncheck the checkbox with the value of
|
2153
|
+
* // Uncheck the checkbox with the value of 'ga'
|
2144
2154
|
* cy.get('input[type="checkbox"]').uncheck(['ga'])
|
2145
2155
|
*/
|
2146
2156
|
uncheck(options?: Partial<CheckOptions>): Chainable<Subject>
|
@@ -2149,7 +2159,7 @@ declare namespace Cypress {
|
|
2149
2159
|
*
|
2150
2160
|
* @see https://on.cypress.io/uncheck
|
2151
2161
|
* @example
|
2152
|
-
* // Uncheck the checkbox with the value of
|
2162
|
+
* // Uncheck the checkbox with the value of 'ga'
|
2153
2163
|
* cy.get('input[type="checkbox"]').uncheck('ga')
|
2154
2164
|
*/
|
2155
2165
|
uncheck(value: string, options?: Partial<CheckOptions>): Chainable<Subject>
|
@@ -2158,7 +2168,7 @@ declare namespace Cypress {
|
|
2158
2168
|
*
|
2159
2169
|
* @see https://on.cypress.io/uncheck
|
2160
2170
|
* @example
|
2161
|
-
* // Uncheck the checkbox with the value of
|
2171
|
+
* // Uncheck the checkbox with the value of 'ga', 'ma'
|
2162
2172
|
* cy.get('input[type="checkbox"]').uncheck(['ga', 'ma'])
|
2163
2173
|
*/
|
2164
2174
|
uncheck(values: string[], options?: Partial<CheckOptions>): Chainable<Subject>
|
@@ -2648,9 +2658,9 @@ declare namespace Cypress {
|
|
2648
2658
|
certs: PEMCert[] | PFXCert[]
|
2649
2659
|
}
|
2650
2660
|
|
2651
|
-
interface ResolvedConfigOptions {
|
2661
|
+
interface ResolvedConfigOptions<ComponentDevServerOpts = any> {
|
2652
2662
|
/**
|
2653
|
-
* Url used as prefix for [cy.visit()](https://on.cypress.io/visit) or [cy.request()](https://on.cypress.io/request) command
|
2663
|
+
* Url used as prefix for [cy.visit()](https://on.cypress.io/visit) or [cy.request()](https://on.cypress.io/request) command's url
|
2654
2664
|
* @default null
|
2655
2665
|
*/
|
2656
2666
|
baseUrl: string | null
|
@@ -2663,7 +2673,7 @@ declare namespace Cypress {
|
|
2663
2673
|
* A String or Array of glob patterns used to ignore test files that would otherwise be shown in your list of tests. Cypress uses minimatch with the options: {dot: true, matchBase: true}. We suggest using http://globtester.com to test what files would match.
|
2664
2674
|
* @default "*.hot-update.js"
|
2665
2675
|
*/
|
2666
|
-
|
2676
|
+
excludeSpecPattern: string | string[]
|
2667
2677
|
/**
|
2668
2678
|
* The number of tests for which snapshots and command data are kept in memory. Reduce this number if you are experiencing high memory consumption in your browser during a test run.
|
2669
2679
|
* @default 50
|
@@ -2734,11 +2744,6 @@ declare namespace Cypress {
|
|
2734
2744
|
* @default "cypress/fixtures"
|
2735
2745
|
*/
|
2736
2746
|
fixturesFolder: string | false
|
2737
|
-
/**
|
2738
|
-
* Path to folder containing integration test files
|
2739
|
-
* @default "cypress/integration"
|
2740
|
-
*/
|
2741
|
-
integrationFolder: string
|
2742
2747
|
/**
|
2743
2748
|
* Path to folder where files downloaded during a test are saved
|
2744
2749
|
* @default "cypress/downloads"
|
@@ -2749,11 +2754,6 @@ declare namespace Cypress {
|
|
2749
2754
|
* @default "bundled"
|
2750
2755
|
*/
|
2751
2756
|
nodeVersion: 'system' | 'bundled'
|
2752
|
-
/**
|
2753
|
-
* Path to plugins file. (Pass false to disable)
|
2754
|
-
* @default "cypress/plugins/index.js"
|
2755
|
-
*/
|
2756
|
-
pluginsFile: string | false
|
2757
2757
|
/**
|
2758
2758
|
* The application under test cannot redirect more than this limit.
|
2759
2759
|
* @default 20
|
@@ -2775,13 +2775,13 @@ declare namespace Cypress {
|
|
2775
2775
|
*/
|
2776
2776
|
screenshotOnRunFailure: boolean
|
2777
2777
|
/**
|
2778
|
-
* Path to folder where screenshots will be saved from [cy.screenshot()](https://on.cypress.io/screenshot) command or after a headless or CI run
|
2778
|
+
* Path to folder where screenshots will be saved from [cy.screenshot()](https://on.cypress.io/screenshot) command or after a headless or CI run's test failure
|
2779
2779
|
* @default "cypress/screenshots"
|
2780
2780
|
*/
|
2781
2781
|
screenshotsFolder: string | false
|
2782
2782
|
/**
|
2783
2783
|
* Path to file to load before test files load. This file is compiled and bundled. (Pass false to disable)
|
2784
|
-
* @default "cypress/support/
|
2784
|
+
* @default "cypress/support/{e2e|component}.js"
|
2785
2785
|
*/
|
2786
2786
|
supportFile: string | false
|
2787
2787
|
/**
|
@@ -2805,7 +2805,7 @@ declare namespace Cypress {
|
|
2805
2805
|
*/
|
2806
2806
|
video: boolean
|
2807
2807
|
/**
|
2808
|
-
* Whether Cypress will upload the video to the Dashboard even if all tests are passing. This applies only when recording your runs to the Dashboard. Turn this off if you
|
2808
|
+
* Whether Cypress will upload the video to the Dashboard even if all tests are passing. This applies only when recording your runs to the Dashboard. Turn this off if you'd like the video uploaded only when there are failing tests.
|
2809
2809
|
* @default true
|
2810
2810
|
*/
|
2811
2811
|
videoUploadOnPasses: boolean
|
@@ -2815,12 +2815,12 @@ declare namespace Cypress {
|
|
2815
2815
|
*/
|
2816
2816
|
chromeWebSecurity: boolean
|
2817
2817
|
/**
|
2818
|
-
* Default height in pixels for the application under tests
|
2818
|
+
* Default height in pixels for the application under tests' viewport (Override with [cy.viewport()](https://on.cypress.io/viewport) command)
|
2819
2819
|
* @default 660
|
2820
2820
|
*/
|
2821
2821
|
viewportHeight: number
|
2822
2822
|
/**
|
2823
|
-
* Default width in pixels for the application under tests
|
2823
|
+
* Default width in pixels for the application under tests' viewport. (Override with [cy.viewport()](https://on.cypress.io/viewport) command)
|
2824
2824
|
* @default 1000
|
2825
2825
|
*/
|
2826
2826
|
viewportWidth: number
|
@@ -2854,11 +2854,6 @@ declare namespace Cypress {
|
|
2854
2854
|
* @default false
|
2855
2855
|
*/
|
2856
2856
|
experimentalSourceRewriting: boolean
|
2857
|
-
/**
|
2858
|
-
* Generate and save commands directly to your test suite by interacting with your app as an end user would.
|
2859
|
-
* @default false
|
2860
|
-
*/
|
2861
|
-
experimentalStudio: boolean
|
2862
2857
|
/**
|
2863
2858
|
* Number of times to retry a failed test.
|
2864
2859
|
* If a number is set, tests will retry in both runMode and openMode.
|
@@ -2868,7 +2863,7 @@ declare namespace Cypress {
|
|
2868
2863
|
retries: Nullable<number | { runMode?: Nullable<number>, openMode?: Nullable<number> }>
|
2869
2864
|
/**
|
2870
2865
|
* Enables including elements within the shadow DOM when using querying
|
2871
|
-
* commands (e.g. cy.get(), cy.find()). Can be set globally in cypress.
|
2866
|
+
* commands (e.g. cy.get(), cy.find()). Can be set globally in cypress.config.{js,ts,mjs,cjs},
|
2872
2867
|
* per-suite or per-test in the test configuration object, or programmatically
|
2873
2868
|
* with Cypress.config()
|
2874
2869
|
* @default false
|
@@ -2879,10 +2874,6 @@ declare namespace Cypress {
|
|
2879
2874
|
* The list of hosts to be blocked
|
2880
2875
|
*/
|
2881
2876
|
blockHosts: null | string | string[]
|
2882
|
-
/**
|
2883
|
-
* Path to folder containing component test files.
|
2884
|
-
*/
|
2885
|
-
componentFolder: false | string
|
2886
2877
|
/**
|
2887
2878
|
* A unique ID for the project used for recording
|
2888
2879
|
*/
|
@@ -2894,7 +2885,7 @@ declare namespace Cypress {
|
|
2894
2885
|
/**
|
2895
2886
|
* Glob pattern to determine what test files to load.
|
2896
2887
|
*/
|
2897
|
-
|
2888
|
+
specPattern: string | string[]
|
2898
2889
|
/**
|
2899
2890
|
* The user agent the browser sends in all request headers.
|
2900
2891
|
*/
|
@@ -2908,34 +2899,41 @@ declare namespace Cypress {
|
|
2908
2899
|
* Override default config options for Component Testing runner.
|
2909
2900
|
* @default {}
|
2910
2901
|
*/
|
2911
|
-
component:
|
2902
|
+
component: ComponentConfigOptions<ComponentDevServerOpts>
|
2912
2903
|
|
2913
2904
|
/**
|
2914
2905
|
* Override default config options for E2E Testing runner.
|
2915
2906
|
* @default {}
|
2916
2907
|
*/
|
2917
|
-
e2e: Omit<
|
2908
|
+
e2e: Omit<CoreConfigOptions, 'indexHtmlFile'>
|
2918
2909
|
|
2919
2910
|
/**
|
2920
2911
|
* An array of objects defining the certificates
|
2921
2912
|
*/
|
2922
2913
|
clientCertificates: ClientCertificate[]
|
2914
|
+
|
2915
|
+
/**
|
2916
|
+
* Handle Cypress plugins
|
2917
|
+
*/
|
2918
|
+
setupNodeEvents: (on: PluginEvents, config: PluginConfigOptions) => Promise<PluginConfigOptions | void> | PluginConfigOptions | void
|
2919
|
+
|
2920
|
+
indexHtmlFile: string
|
2923
2921
|
}
|
2924
2922
|
|
2925
2923
|
/**
|
2926
2924
|
* Options appended to config object on runtime.
|
2927
2925
|
*/
|
2928
|
-
interface RuntimeConfigOptions {
|
2926
|
+
interface RuntimeConfigOptions extends Partial<RuntimeServerConfigOptions> {
|
2927
|
+
/**
|
2928
|
+
* Absolute path to the config file (default: <projectRoot>/cypress.config.{js,ts,mjs,cjs})
|
2929
|
+
*/
|
2930
|
+
configFile: string
|
2929
2931
|
/**
|
2930
2932
|
* CPU architecture, from Node `os.arch()`
|
2931
2933
|
*
|
2932
2934
|
* @see https://nodejs.org/api/os.html#os_os_arch
|
2933
2935
|
*/
|
2934
2936
|
arch: string
|
2935
|
-
/**
|
2936
|
-
* The browser Cypress is running on.
|
2937
|
-
*/
|
2938
|
-
browser: Browser
|
2939
2937
|
/**
|
2940
2938
|
* Available browsers found on your system.
|
2941
2939
|
*/
|
@@ -2959,27 +2957,40 @@ declare namespace Cypress {
|
|
2959
2957
|
* The platform Cypress is running on.
|
2960
2958
|
*/
|
2961
2959
|
platform: 'linux' | 'darwin' | 'win32'
|
2960
|
+
remote: RemoteState
|
2962
2961
|
/**
|
2963
2962
|
* The Cypress version being used.
|
2964
2963
|
*/
|
2965
2964
|
version: string
|
2966
2965
|
|
2966
|
+
// Internal or Unlisted at server/lib/config_options
|
2967
|
+
namespace: string
|
2968
|
+
projectRoot: string
|
2969
|
+
devServerPublicPathRoute: string
|
2970
|
+
cypressBinaryRoot: string
|
2971
|
+
}
|
2972
|
+
|
2973
|
+
/**
|
2974
|
+
* Optional options added before the server starts
|
2975
|
+
*/
|
2976
|
+
interface RuntimeServerConfigOptions {
|
2977
|
+
/**
|
2978
|
+
* The browser Cypress is running on.
|
2979
|
+
*/
|
2980
|
+
browser: Browser
|
2967
2981
|
// Internal or Unlisted at server/lib/config_options
|
2968
2982
|
autoOpen: boolean
|
2969
2983
|
browserUrl: string
|
2970
2984
|
clientRoute: string
|
2971
|
-
configFile: string
|
2972
2985
|
cypressEnv: string
|
2973
|
-
devServerPublicPathRoute: string
|
2974
2986
|
isNewProject: boolean
|
2975
2987
|
isTextTerminal: boolean
|
2976
2988
|
morgan: boolean
|
2977
|
-
namespace: string
|
2978
2989
|
parentTestsFolder: string
|
2979
2990
|
parentTestsFolderDisplay: string
|
2980
2991
|
projectName: string
|
2981
|
-
projectRoot: string
|
2982
2992
|
proxyUrl: string
|
2993
|
+
remote: RemoteState
|
2983
2994
|
report: boolean
|
2984
2995
|
reporterRoute: string
|
2985
2996
|
reporterUrl: string
|
@@ -2992,7 +3003,7 @@ declare namespace Cypress {
|
|
2992
3003
|
xhrUrl: string
|
2993
3004
|
}
|
2994
3005
|
|
2995
|
-
interface TestConfigOverrides extends Partial<Pick<ConfigOptions, 'animationDistanceThreshold' | '
|
3006
|
+
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' | 'experimentalSessionAndOrigin'>> {
|
2996
3007
|
browser?: IsBrowserMatcher | IsBrowserMatcher[]
|
2997
3008
|
keystrokeDelay?: number
|
2998
3009
|
}
|
@@ -3001,13 +3012,54 @@ declare namespace Cypress {
|
|
3001
3012
|
* All configuration items are optional.
|
3002
3013
|
*/
|
3003
3014
|
type CoreConfigOptions = Partial<Omit<ResolvedConfigOptions, TestingType>>
|
3004
|
-
type ConfigOptions = CoreConfigOptions & { e2e?: CoreConfigOptions, component?: CoreConfigOptions }
|
3005
3015
|
|
3006
|
-
interface
|
3007
|
-
|
3008
|
-
|
3009
|
-
|
3010
|
-
|
3016
|
+
interface DefineDevServerConfig {
|
3017
|
+
// This interface can be extended by the user, to inject the types for their
|
3018
|
+
// preferred bundler: e.g.
|
3019
|
+
//
|
3020
|
+
// import type * as webpack from 'webpack'
|
3021
|
+
//
|
3022
|
+
// declare global {
|
3023
|
+
// namespace Cypress {
|
3024
|
+
// interface DefineDevServerConfig {
|
3025
|
+
// webpackConfig?: webpack.Configuration
|
3026
|
+
// }
|
3027
|
+
// }
|
3028
|
+
// }
|
3029
|
+
[key: string]: any
|
3030
|
+
}
|
3031
|
+
|
3032
|
+
type PickConfigOpt<T> = T extends keyof DefineDevServerConfig ? DefineDevServerConfig[T] : any
|
3033
|
+
|
3034
|
+
type DevServerFn<ComponentDevServerOpts = any> = (cypressDevServerConfig: DevServerConfig, devServerConfig: ComponentDevServerOpts) => ResolvedDevServerConfig | Promise<ResolvedDevServerConfig>
|
3035
|
+
|
3036
|
+
type DevServerConfigOptions = {
|
3037
|
+
bundler: 'webpack'
|
3038
|
+
framework: 'react' | 'vue' | 'vue-cli' | 'nuxt' | 'create-react-app' | 'next'
|
3039
|
+
webpackConfig?: PickConfigOpt<'webpackConfig'>
|
3040
|
+
} | {
|
3041
|
+
bundler: 'vite'
|
3042
|
+
framework: 'react' | 'vue'
|
3043
|
+
viteConfig?: Omit<Exclude<PickConfigOpt<'viteConfig'>, undefined>, 'base' | 'root'>
|
3044
|
+
}
|
3045
|
+
|
3046
|
+
interface ComponentConfigOptions<ComponentDevServerOpts = any> extends Omit<CoreConfigOptions, 'baseUrl' | 'experimentalSessionAndOrigin'> {
|
3047
|
+
devServer: DevServerFn<ComponentDevServerOpts> | DevServerConfigOptions
|
3048
|
+
devServerConfig?: ComponentDevServerOpts
|
3049
|
+
}
|
3050
|
+
|
3051
|
+
/**
|
3052
|
+
* Config options that can be assigned on cypress.config.{js,ts,mjs,cjs} file
|
3053
|
+
*/
|
3054
|
+
type UserConfigOptions<ComponentDevServerOpts = any> = Omit<ResolvedConfigOptions<ComponentDevServerOpts>, 'baseUrl' | 'excludeSpecPattern' | 'supportFile' | 'specPattern' | 'indexHtmlFile'>
|
3055
|
+
|
3056
|
+
/**
|
3057
|
+
* Takes ComponentDevServerOpts to track the signature of the devServerConfig for the provided `devServer`,
|
3058
|
+
* so we have proper completion for `devServerConfig`
|
3059
|
+
*/
|
3060
|
+
type ConfigOptions<ComponentDevServerOpts = any> = Partial<UserConfigOptions<ComponentDevServerOpts>>
|
3061
|
+
|
3062
|
+
interface PluginConfigOptions extends ResolvedConfigOptions, RuntimeConfigOptions {
|
3011
3063
|
/**
|
3012
3064
|
* Absolute path to the root of the project
|
3013
3065
|
*/
|
@@ -3301,7 +3353,7 @@ declare namespace Cypress {
|
|
3301
3353
|
|
3302
3354
|
/**
|
3303
3355
|
* Cypress will automatically apply the right authorization headers
|
3304
|
-
* if you
|
3356
|
+
* if you're attempting to visit an application that requires
|
3305
3357
|
* Basic Authentication.
|
3306
3358
|
*
|
3307
3359
|
* @example
|
@@ -3372,7 +3424,7 @@ declare namespace Cypress {
|
|
3372
3424
|
interface Chainer<Subject> {
|
3373
3425
|
// chai
|
3374
3426
|
/**
|
3375
|
-
* Asserts that the target
|
3427
|
+
* Asserts that the target's `type` is equal to the given string type.
|
3376
3428
|
* Types are case insensitive. See the `type-detect` project page for info on the type detection algorithm:
|
3377
3429
|
* https://github.com/chaijs/type-detect.
|
3378
3430
|
* @example
|
@@ -3391,7 +3443,7 @@ declare namespace Cypress {
|
|
3391
3443
|
*/
|
3392
3444
|
(chainer: 'be.above', value: number | Date): Chainable<Subject>
|
3393
3445
|
/**
|
3394
|
-
* Asserts that the target
|
3446
|
+
* Asserts that the target's `type` is equal to the given string type.
|
3395
3447
|
* Types are case insensitive. See the `type-detect` project page for info on the type detection algorithm:
|
3396
3448
|
* https://github.com/chaijs/type-detect.
|
3397
3449
|
* @example
|
@@ -3428,7 +3480,7 @@ declare namespace Cypress {
|
|
3428
3480
|
*/
|
3429
3481
|
(chainer: 'be.arguments'): Chainable<Subject>
|
3430
3482
|
/**
|
3431
|
-
* Asserts that the target is a number that
|
3483
|
+
* Asserts that the target is a number that's within a given +/- `delta` range of the given number `expected`. However, it's often best to assert that the target is equal to its expected value.
|
3432
3484
|
* @example
|
3433
3485
|
* cy.wrap(5.1).should('be.approximately', 5, 0.5)
|
3434
3486
|
* @alias closeTo
|
@@ -3437,7 +3489,7 @@ declare namespace Cypress {
|
|
3437
3489
|
*/
|
3438
3490
|
(chainer: 'be.approximately', value: number, delta: number): Chainable<Subject>
|
3439
3491
|
/**
|
3440
|
-
* Asserts that the target is a number that
|
3492
|
+
* Asserts that the target is a number that's within a given +/- `delta` range of the given number `expected`. However, it's often best to assert that the target is equal to its expected value.
|
3441
3493
|
* @example
|
3442
3494
|
* cy.wrap(5.1).should('be.closeTo', 5, 0.5)
|
3443
3495
|
* @see http://chaijs.com/api/bdd/#method_closeto
|
@@ -3445,7 +3497,7 @@ declare namespace Cypress {
|
|
3445
3497
|
*/
|
3446
3498
|
(chainer: 'be.closeTo', value: number, delta: number): Chainable<Subject>
|
3447
3499
|
/**
|
3448
|
-
* When the target is a string or array, .empty asserts that the target
|
3500
|
+
* When the target is a string or array, .empty asserts that the target's length property is strictly (===) equal to 0
|
3449
3501
|
* @example
|
3450
3502
|
* cy.wrap([]).should('be.empty')
|
3451
3503
|
* cy.wrap('').should('be.empty')
|
@@ -3612,7 +3664,7 @@ declare namespace Cypress {
|
|
3612
3664
|
(chainer: 'contain', value: any): Chainable<Subject>
|
3613
3665
|
/**
|
3614
3666
|
* When one argument is provided, `.decrease` asserts that the given function `subject` returns a lesser number when it's invoked after invoking the target function compared to when it's invoked beforehand.
|
3615
|
-
* `.decrease` also causes all `.by` assertions that follow in the chain to assert how much lesser of a number is returned.
|
3667
|
+
* `.decrease` also causes all `.by` assertions that follow in the chain to assert how much lesser of a number is returned. It's often best to assert that the return value decreased by the expected amount, rather than asserting it decreased by any amount.
|
3616
3668
|
* @example
|
3617
3669
|
* let val = 1
|
3618
3670
|
* function subtractTwo() { val -= 2 }
|
@@ -3723,7 +3775,7 @@ declare namespace Cypress {
|
|
3723
3775
|
*/
|
3724
3776
|
(chainer: 'have.deep.property', value: string, obj: object): Chainable<Subject>
|
3725
3777
|
/**
|
3726
|
-
* Asserts that the target
|
3778
|
+
* Asserts that the target's `length` property is equal to the given number `n`.
|
3727
3779
|
* @example
|
3728
3780
|
* cy.wrap([1, 2, 3]).should('have.length', 3)
|
3729
3781
|
* cy.wrap('foo').should('have.length', 3)
|
@@ -3733,7 +3785,7 @@ declare namespace Cypress {
|
|
3733
3785
|
*/
|
3734
3786
|
(chainer: 'have.length' | 'have.lengthOf', value: number): Chainable<Subject>
|
3735
3787
|
/**
|
3736
|
-
* Asserts that the target
|
3788
|
+
* Asserts that the target's `length` property is greater than to the given number `n`.
|
3737
3789
|
* @example
|
3738
3790
|
* cy.wrap([1, 2, 3]).should('have.length.greaterThan', 2)
|
3739
3791
|
* cy.wrap('foo').should('have.length.greaterThan', 2)
|
@@ -3742,7 +3794,7 @@ declare namespace Cypress {
|
|
3742
3794
|
*/
|
3743
3795
|
(chainer: 'have.length.greaterThan' | 'have.lengthOf.greaterThan', value: number): Chainable<Subject>
|
3744
3796
|
/**
|
3745
|
-
* Asserts that the target
|
3797
|
+
* Asserts that the target's `length` property is greater than to the given number `n`.
|
3746
3798
|
* @example
|
3747
3799
|
* cy.wrap([1, 2, 3]).should('have.length.gt', 2)
|
3748
3800
|
* cy.wrap('foo').should('have.length.gt', 2)
|
@@ -3751,7 +3803,7 @@ declare namespace Cypress {
|
|
3751
3803
|
*/
|
3752
3804
|
(chainer: 'have.length.gt' | 'have.lengthOf.gt' | 'have.length.above' | 'have.lengthOf.above', value: number): Chainable<Subject>
|
3753
3805
|
/**
|
3754
|
-
* Asserts that the target
|
3806
|
+
* Asserts that the target's `length` property is greater than or equal to the given number `n`.
|
3755
3807
|
* @example
|
3756
3808
|
* cy.wrap([1, 2, 3]).should('have.length.gte', 2)
|
3757
3809
|
* cy.wrap('foo').should('have.length.gte', 2)
|
@@ -3760,7 +3812,7 @@ declare namespace Cypress {
|
|
3760
3812
|
*/
|
3761
3813
|
(chainer: 'have.length.gte' | 'have.lengthOf.gte' | 'have.length.at.least' | 'have.lengthOf.at.least', value: number): Chainable<Subject>
|
3762
3814
|
/**
|
3763
|
-
* Asserts that the target
|
3815
|
+
* Asserts that the target's `length` property is less than to the given number `n`.
|
3764
3816
|
* @example
|
3765
3817
|
* cy.wrap([1, 2, 3]).should('have.length.lessThan', 4)
|
3766
3818
|
* cy.wrap('foo').should('have.length.lessThan', 4)
|
@@ -3769,7 +3821,7 @@ declare namespace Cypress {
|
|
3769
3821
|
*/
|
3770
3822
|
(chainer: 'have.length.lessThan' | 'have.lengthOf.lessThan', value: number): Chainable<Subject>
|
3771
3823
|
/**
|
3772
|
-
* Asserts that the target
|
3824
|
+
* Asserts that the target's `length` property is less than to the given number `n`.
|
3773
3825
|
* @example
|
3774
3826
|
* cy.wrap([1, 2, 3]).should('have.length.lt', 4)
|
3775
3827
|
* cy.wrap('foo').should('have.length.lt', 4)
|
@@ -3778,7 +3830,7 @@ declare namespace Cypress {
|
|
3778
3830
|
*/
|
3779
3831
|
(chainer: 'have.length.lt' | 'have.lengthOf.lt' | 'have.length.below' | 'have.lengthOf.below', value: number): Chainable<Subject>
|
3780
3832
|
/**
|
3781
|
-
* Asserts that the target
|
3833
|
+
* Asserts that the target's `length` property is less than or equal to the given number `n`.
|
3782
3834
|
* @example
|
3783
3835
|
* cy.wrap([1, 2, 3]).should('have.length.lte', 4)
|
3784
3836
|
* cy.wrap('foo').should('have.length.lte', 4)
|
@@ -3787,7 +3839,7 @@ declare namespace Cypress {
|
|
3787
3839
|
*/
|
3788
3840
|
(chainer: 'have.length.lte' | 'have.lengthOf.lte' | 'have.length.at.most' | 'have.lengthOf.at.most', value: number): Chainable<Subject>
|
3789
3841
|
/**
|
3790
|
-
* Asserts that the target
|
3842
|
+
* Asserts that the target's `length` property is within `start` and `finish`.
|
3791
3843
|
* @example
|
3792
3844
|
* cy.wrap([1, 2, 3]).should('have.length.within', 1, 5)
|
3793
3845
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
@@ -3864,9 +3916,9 @@ declare namespace Cypress {
|
|
3864
3916
|
* When one argument is provided, `.increase` asserts that the given function `subject` returns a greater number when it's
|
3865
3917
|
* invoked after invoking the target function compared to when it's invoked beforehand.
|
3866
3918
|
* `.increase` also causes all `.by` assertions that follow in the chain to assert how much greater of a number is returned.
|
3867
|
-
*
|
3919
|
+
* It's often best to assert that the return value increased by the expected amount, rather than asserting it increased by any amount.
|
3868
3920
|
*
|
3869
|
-
* When two arguments are provided, `.increase` asserts that the value of the given object `subject
|
3921
|
+
* When two arguments are provided, `.increase` asserts that the value of the given object `subject`'s `prop` property is greater after
|
3870
3922
|
* invoking the target function compared to beforehand.
|
3871
3923
|
*
|
3872
3924
|
* @example
|
@@ -3951,7 +4003,7 @@ declare namespace Cypress {
|
|
3951
4003
|
*/
|
3952
4004
|
(chainer: 'be.extensible'): Chainable<Subject>
|
3953
4005
|
/**
|
3954
|
-
* Asserts that the target is sealed, which means that new properties can
|
4006
|
+
* Asserts that the target is sealed, which means that new properties can't be added to it, and its existing properties can't be reconfigured or deleted.
|
3955
4007
|
* @example
|
3956
4008
|
* let sealedObject = Object.seal({})
|
3957
4009
|
* let frozenObject = Object.freeze({})
|
@@ -3962,7 +4014,7 @@ declare namespace Cypress {
|
|
3962
4014
|
*/
|
3963
4015
|
(chainer: 'be.sealed'): Chainable<Subject>
|
3964
4016
|
/**
|
3965
|
-
* Asserts that the target is frozen, which means that new properties can
|
4017
|
+
* Asserts that the target is frozen, which means that new properties can't be added to it, and its existing properties can't be reassigned to different values, reconfigured, or deleted.
|
3966
4018
|
* @example
|
3967
4019
|
* let frozenObject = Object.freeze({})
|
3968
4020
|
* cy.wrap(frozenObject).should('be.frozen')
|
@@ -3971,7 +4023,7 @@ declare namespace Cypress {
|
|
3971
4023
|
*/
|
3972
4024
|
(chainer: 'be.frozen'): Chainable<Subject>
|
3973
4025
|
/**
|
3974
|
-
* Asserts that the target is a number, and isn
|
4026
|
+
* Asserts that the target is a number, and isn't `NaN` or positive/negative `Infinity`.
|
3975
4027
|
* @example
|
3976
4028
|
* cy.wrap(1).should('be.finite')
|
3977
4029
|
* @see http://chaijs.com/api/bdd/#method_finite
|
@@ -3981,7 +4033,7 @@ declare namespace Cypress {
|
|
3981
4033
|
|
3982
4034
|
// chai.not
|
3983
4035
|
/**
|
3984
|
-
* Asserts that the target
|
4036
|
+
* Asserts that the target's `type` is not equal to the given string type.
|
3985
4037
|
* Types are case insensitive. See the `type-detect` project page for info on the type detection algorithm:
|
3986
4038
|
* https://github.com/chaijs/type-detect.
|
3987
4039
|
* @example
|
@@ -4000,7 +4052,7 @@ declare namespace Cypress {
|
|
4000
4052
|
*/
|
4001
4053
|
(chainer: 'not.be.above', value: number | Date): Chainable<Subject>
|
4002
4054
|
/**
|
4003
|
-
* Asserts that the target
|
4055
|
+
* Asserts that the target's `type` is not equal to the given string type.
|
4004
4056
|
* Types are case insensitive. See the `type-detect` project page for info on the type detection algorithm:
|
4005
4057
|
* https://github.com/chaijs/type-detect.
|
4006
4058
|
* @example
|
@@ -4037,7 +4089,7 @@ declare namespace Cypress {
|
|
4037
4089
|
*/
|
4038
4090
|
(chainer: 'not.be.arguments'): Chainable<Subject>
|
4039
4091
|
/**
|
4040
|
-
* Asserts that the target is a not number that
|
4092
|
+
* Asserts that the target is a not number that's within a given +/- `delta` range of the given number `expected`. However, it's often best to assert that the target is equal to its expected value.
|
4041
4093
|
* @example
|
4042
4094
|
* cy.wrap(5.1).should('not.be.approximately', 6, 0.5)
|
4043
4095
|
* @alias closeTo
|
@@ -4046,7 +4098,7 @@ declare namespace Cypress {
|
|
4046
4098
|
*/
|
4047
4099
|
(chainer: 'not.be.approximately', value: number, delta: number): Chainable<Subject>
|
4048
4100
|
/**
|
4049
|
-
* Asserts that the target is not a number that
|
4101
|
+
* Asserts that the target is not a number that's within a given +/- `delta` range of the given number `expected`. However, it's often best to assert that the target is equal to its expected value.
|
4050
4102
|
* @example
|
4051
4103
|
* cy.wrap(5.1).should('not.be.closeTo', 6, 0.5)
|
4052
4104
|
* @see http://chaijs.com/api/bdd/#method_closeto
|
@@ -4054,7 +4106,7 @@ declare namespace Cypress {
|
|
4054
4106
|
*/
|
4055
4107
|
(chainer: 'not.be.closeTo', value: number, delta: number): Chainable<Subject>
|
4056
4108
|
/**
|
4057
|
-
* When the target is a not string or array, .empty asserts that the target
|
4109
|
+
* When the target is a not string or array, .empty asserts that the target's length property is strictly (===) equal to 0
|
4058
4110
|
* @example
|
4059
4111
|
* cy.wrap([1]).should('not.be.empty')
|
4060
4112
|
* cy.wrap('foo').should('not.be.empty')
|
@@ -4221,7 +4273,7 @@ declare namespace Cypress {
|
|
4221
4273
|
(chainer: 'not.contain', value: any): Chainable<Subject>
|
4222
4274
|
/**
|
4223
4275
|
* When one argument is provided, `.decrease` asserts that the given function `subject` does not returns a lesser number when it's invoked after invoking the target function compared to when it's invoked beforehand.
|
4224
|
-
* `.decrease` also causes all `.by` assertions that follow in the chain to assert how much lesser of a number is returned.
|
4276
|
+
* `.decrease` also causes all `.by` assertions that follow in the chain to assert how much lesser of a number is returned. It's often best to assert that the return value decreased by the expected amount, rather than asserting it decreased by any amount.
|
4225
4277
|
* @example
|
4226
4278
|
* let val = 1
|
4227
4279
|
* function subtractTwo() { val -= 2 }
|
@@ -4307,7 +4359,7 @@ declare namespace Cypress {
|
|
4307
4359
|
*/
|
4308
4360
|
(chainer: 'not.have.deep.property', value: string, obj: object): Chainable<Subject>
|
4309
4361
|
/**
|
4310
|
-
* Asserts that the target
|
4362
|
+
* Asserts that the target's `length` property is not equal to the given number `n`.
|
4311
4363
|
* @example
|
4312
4364
|
* cy.wrap([1, 2, 3]).should('not.have.length', 2)
|
4313
4365
|
* cy.wrap('foo').should('not.have.length', 2)
|
@@ -4317,7 +4369,7 @@ declare namespace Cypress {
|
|
4317
4369
|
*/
|
4318
4370
|
(chainer: 'not.have.length' | 'not.have.lengthOf', value: number): Chainable<Subject>
|
4319
4371
|
/**
|
4320
|
-
* Asserts that the target
|
4372
|
+
* Asserts that the target's `length` property is not greater than to the given number `n`.
|
4321
4373
|
* @example
|
4322
4374
|
* cy.wrap([1, 2, 3]).should('not.have.length.greaterThan', 4)
|
4323
4375
|
* cy.wrap('foo').should('not.have.length.greaterThan', 4)
|
@@ -4326,7 +4378,7 @@ declare namespace Cypress {
|
|
4326
4378
|
*/
|
4327
4379
|
(chainer: 'not.have.length.greaterThan' | 'not.have.lengthOf.greaterThan', value: number): Chainable<Subject>
|
4328
4380
|
/**
|
4329
|
-
* Asserts that the target
|
4381
|
+
* Asserts that the target's `length` property is not greater than to the given number `n`.
|
4330
4382
|
* @example
|
4331
4383
|
* cy.wrap([1, 2, 3]).should('not.have.length.gt', 4)
|
4332
4384
|
* cy.wrap('foo').should('not.have.length.gt', 4)
|
@@ -4335,7 +4387,7 @@ declare namespace Cypress {
|
|
4335
4387
|
*/
|
4336
4388
|
(chainer: 'not.have.length.gt' | 'not.have.lengthOf.gt' | 'not.have.length.above' | 'not.have.lengthOf.above', value: number): Chainable<Subject>
|
4337
4389
|
/**
|
4338
|
-
* Asserts that the target
|
4390
|
+
* Asserts that the target's `length` property is not greater than or equal to the given number `n`.
|
4339
4391
|
* @example
|
4340
4392
|
* cy.wrap([1, 2, 3]).should('not.have.length.gte', 4)
|
4341
4393
|
* cy.wrap('foo').should('not.have.length.gte', 4)
|
@@ -4344,7 +4396,7 @@ declare namespace Cypress {
|
|
4344
4396
|
*/
|
4345
4397
|
(chainer: 'not.have.length.gte' | 'not.have.lengthOf.gte' | 'not.have.length.at.least' | 'not.have.lengthOf.at.least', value: number): Chainable<Subject>
|
4346
4398
|
/**
|
4347
|
-
* Asserts that the target
|
4399
|
+
* Asserts that the target's `length` property is less than to the given number `n`.
|
4348
4400
|
* @example
|
4349
4401
|
* cy.wrap([1, 2, 3]).should('have.length.lessThan', 2)
|
4350
4402
|
* cy.wrap('foo').should('have.length.lessThan', 2)
|
@@ -4353,7 +4405,7 @@ declare namespace Cypress {
|
|
4353
4405
|
*/
|
4354
4406
|
(chainer: 'not.have.length.lessThan' | 'not.have.lengthOf.lessThan', value: number): Chainable<Subject>
|
4355
4407
|
/**
|
4356
|
-
* Asserts that the target
|
4408
|
+
* Asserts that the target's `length` property is not less than to the given number `n`.
|
4357
4409
|
* @example
|
4358
4410
|
* cy.wrap([1, 2, 3]).should('not.have.length.lt', 2)
|
4359
4411
|
* cy.wrap('foo').should('not.have.length.lt', 2)
|
@@ -4362,7 +4414,7 @@ declare namespace Cypress {
|
|
4362
4414
|
*/
|
4363
4415
|
(chainer: 'not.have.length.lt' | 'not.have.lengthOf.lt' | 'not.have.length.below' | 'not.have.lengthOf.below', value: number): Chainable<Subject>
|
4364
4416
|
/**
|
4365
|
-
* Asserts that the target
|
4417
|
+
* Asserts that the target's `length` property is not less than or equal to the given number `n`.
|
4366
4418
|
* @example
|
4367
4419
|
* cy.wrap([1, 2, 3]).should('not.have.length.lte', 2)
|
4368
4420
|
* cy.wrap('foo').should('not.have.length.lte', 2)
|
@@ -4371,7 +4423,7 @@ declare namespace Cypress {
|
|
4371
4423
|
*/
|
4372
4424
|
(chainer: 'not.have.length.lte' | 'not.have.lengthOf.lte' | 'not.have.length.at.most' | 'not.have.lengthOf.at.most', value: number): Chainable<Subject>
|
4373
4425
|
/**
|
4374
|
-
* Asserts that the target
|
4426
|
+
* Asserts that the target's `length` property is within `start` and `finish`.
|
4375
4427
|
* @example
|
4376
4428
|
* cy.wrap([1, 2, 3]).should('not.have.length.within', 6, 12)
|
4377
4429
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
@@ -4448,9 +4500,9 @@ declare namespace Cypress {
|
|
4448
4500
|
* When one argument is provided, `.increase` asserts that the given function `subject` returns a greater number when it's
|
4449
4501
|
* invoked after invoking the target function compared to when it's invoked beforehand.
|
4450
4502
|
* `.increase` also causes all `.by` assertions that follow in the chain to assert how much greater of a number is returned.
|
4451
|
-
*
|
4503
|
+
* It's often best to assert that the return value increased by the expected amount, rather than asserting it increased by any amount.
|
4452
4504
|
*
|
4453
|
-
* When two arguments are provided, `.increase` asserts that the value of the given object `subject
|
4505
|
+
* When two arguments are provided, `.increase` asserts that the value of the given object `subject`'s `prop` property is greater after
|
4454
4506
|
* invoking the target function compared to beforehand.
|
4455
4507
|
*
|
4456
4508
|
* @example
|
@@ -4536,7 +4588,7 @@ declare namespace Cypress {
|
|
4536
4588
|
*/
|
4537
4589
|
(chainer: 'not.be.extensible'): Chainable<Subject>
|
4538
4590
|
/**
|
4539
|
-
* Asserts that the target is sealed, which means that new properties can
|
4591
|
+
* Asserts that the target is sealed, which means that new properties can't be added to it, and its existing properties can't be reconfigured or deleted.
|
4540
4592
|
* @example
|
4541
4593
|
* cy.wrap({a: 1}).should('be.sealed')
|
4542
4594
|
* cy.wrap({a: 1}).should('be.sealed')
|
@@ -4545,7 +4597,7 @@ declare namespace Cypress {
|
|
4545
4597
|
*/
|
4546
4598
|
(chainer: 'not.be.sealed'): Chainable<Subject>
|
4547
4599
|
/**
|
4548
|
-
* Asserts that the target is frozen, which means that new properties can
|
4600
|
+
* Asserts that the target is frozen, which means that new properties can't be added to it, and its existing properties can't be reassigned to different values, reconfigured, or deleted.
|
4549
4601
|
* @example
|
4550
4602
|
* cy.wrap({a: 1}).should('not.be.frozen')
|
4551
4603
|
* @see http://chaijs.com/api/bdd/#method_frozen
|
@@ -4553,7 +4605,7 @@ declare namespace Cypress {
|
|
4553
4605
|
*/
|
4554
4606
|
(chainer: 'not.be.frozen'): Chainable<Subject>
|
4555
4607
|
/**
|
4556
|
-
* Asserts that the target is a number, and isn
|
4608
|
+
* Asserts that the target is a number, and isn't `NaN` or positive/negative `Infinity`.
|
4557
4609
|
* @example
|
4558
4610
|
* cy.wrap(NaN).should('not.be.finite')
|
4559
4611
|
* cy.wrap(Infinity).should('not.be.finite')
|
@@ -4565,7 +4617,7 @@ declare namespace Cypress {
|
|
4565
4617
|
// sinon-chai
|
4566
4618
|
/**
|
4567
4619
|
* Assert spy/stub was called the `new` operator.
|
4568
|
-
* Beware that this is inferred based on the value of the this object and the spy function
|
4620
|
+
* Beware that this is inferred based on the value of the this object and the spy function's prototype, so it may give false positives if you actively return the right kind of object.
|
4569
4621
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwithnew
|
4570
4622
|
* @see https://on.cypress.io/assertions
|
4571
4623
|
*/
|
@@ -4638,7 +4690,7 @@ declare namespace Cypress {
|
|
4638
4690
|
(chainer: 'be.calledWithMatch' | 'have.been.calledWithMatch', ...args: any[]): Chainable<Subject>
|
4639
4691
|
/**
|
4640
4692
|
* Assert spy/stub was called the `new` operator.
|
4641
|
-
* Beware that this is inferred based on the value of the this object and the spy function
|
4693
|
+
* Beware that this is inferred based on the value of the this object and the spy function's prototype, so it may give false positives if you actively return the right kind of object.
|
4642
4694
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwithnew
|
4643
4695
|
* @see https://on.cypress.io/assertions
|
4644
4696
|
*/
|
@@ -4725,7 +4777,7 @@ declare namespace Cypress {
|
|
4725
4777
|
// sinon-chai.not
|
4726
4778
|
/**
|
4727
4779
|
* Assert spy/stub was not called the `new` operator.
|
4728
|
-
* Beware that this is inferred based on the value of the this object and the spy function
|
4780
|
+
* Beware that this is inferred based on the value of the this object and the spy function's prototype, so it may give false positives if you actively return the right kind of object.
|
4729
4781
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwithnew
|
4730
4782
|
* @see https://on.cypress.io/assertions
|
4731
4783
|
*/
|
@@ -4798,7 +4850,7 @@ declare namespace Cypress {
|
|
4798
4850
|
(chainer: 'not.be.calledWithMatch' | 'not.have.been.calledWithMatch', ...args: any[]): Chainable<Subject>
|
4799
4851
|
/**
|
4800
4852
|
* Assert spy/stub was not called the `new` operator.
|
4801
|
-
* Beware that this is inferred based on the value of the this object and the spy function
|
4853
|
+
* Beware that this is inferred based on the value of the this object and the spy function's prototype, so it may give false positives if you actively return the right kind of object.
|
4802
4854
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwithnew
|
4803
4855
|
* @see https://on.cypress.io/assertions
|
4804
4856
|
*/
|
@@ -5349,7 +5401,7 @@ declare namespace Cypress {
|
|
5349
5401
|
|
5350
5402
|
/**
|
5351
5403
|
* Create an assertion. Assertions are automatically retried until they pass or time out.
|
5352
|
-
* Passing a function to `.should()` enables you to make multiple assertions on the yielded subject. This also gives you the opportunity to massage what you
|
5404
|
+
* Passing a function to `.should()` enables you to make multiple assertions on the yielded subject. This also gives you the opportunity to massage what you'd like to assert on.
|
5353
5405
|
* Just be sure _not_ to include any code that has side effects in your callback function. The callback function will be retried over and over again until no assertions within it throw.
|
5354
5406
|
* @example
|
5355
5407
|
* cy
|
@@ -5454,7 +5506,7 @@ declare namespace Cypress {
|
|
5454
5506
|
|
5455
5507
|
interface ResolvedDevServerConfig {
|
5456
5508
|
port: number
|
5457
|
-
close: (done?: () => any) => void
|
5509
|
+
close: (done?: (err?: Error) => any) => void
|
5458
5510
|
}
|
5459
5511
|
|
5460
5512
|
interface PluginEvents {
|
@@ -5502,7 +5554,7 @@ declare namespace Cypress {
|
|
5502
5554
|
```
|
5503
5555
|
// likely want to do this in a support file
|
5504
5556
|
// so it's applied to all spec files
|
5505
|
-
// cypress/support/
|
5557
|
+
// cypress/support/{e2e|component}.js
|
5506
5558
|
|
5507
5559
|
Cypress.on('uncaught:exception', (err, runnable) => {
|
5508
5560
|
// returning false here prevents Cypress from
|