cypress 4.9.0 → 4.12.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/cli.js +90 -8
- package/lib/cypress.js +17 -0
- package/package.json +38 -38
- package/types/cypress-npm-api.d.ts +30 -3
- package/types/cypress.d.ts +424 -67
- package/types/sinon/index.d.ts +6 -2
- package/types/sinon/ts3.1/index.d.ts +6 -1
package/types/cypress.d.ts
CHANGED
@@ -218,6 +218,7 @@ declare namespace Cypress {
|
|
218
218
|
name: string // "config_passing_spec.coffee"
|
219
219
|
relative: string // "cypress/integration/config_passing_spec.coffee" or "__all" if clicked all specs button
|
220
220
|
absolute: string
|
221
|
+
specFilter?: string // optional spec filter used by the user
|
221
222
|
}
|
222
223
|
|
223
224
|
/**
|
@@ -492,6 +493,10 @@ declare namespace Cypress {
|
|
492
493
|
}
|
493
494
|
|
494
495
|
type CanReturnChainable = void | Chainable
|
496
|
+
type ThenReturn<S, R> =
|
497
|
+
R extends void ? Chainable<S> :
|
498
|
+
R extends R | undefined ? Chainable<S | Exclude<R, undefined>> :
|
499
|
+
Chainable<S>
|
495
500
|
|
496
501
|
/**
|
497
502
|
* Chainable interface for non-array Subjects
|
@@ -703,6 +708,18 @@ declare namespace Cypress {
|
|
703
708
|
* This means that when you instantiate new Date in your application,
|
704
709
|
* it will have a time of January 1st, 1970.
|
705
710
|
*
|
711
|
+
* To restore the real clock call `.restore()`
|
712
|
+
*
|
713
|
+
* @example
|
714
|
+
* cy.clock()
|
715
|
+
* ...
|
716
|
+
* // restore the application clock
|
717
|
+
* cy.clock().then(clock => {
|
718
|
+
* clock.restore()
|
719
|
+
* })
|
720
|
+
* // or use this shortcut
|
721
|
+
* cy.clock().invoke('restore')
|
722
|
+
*
|
706
723
|
* @see https://on.cypress.io/clock
|
707
724
|
*/
|
708
725
|
clock(): Chainable<Clock>
|
@@ -712,15 +729,22 @@ declare namespace Cypress {
|
|
712
729
|
*
|
713
730
|
* @see https://on.cypress.io/clock
|
714
731
|
* @example
|
715
|
-
* // your app code
|
732
|
+
* // in your app code
|
716
733
|
* $('#date').text(new Date().toJSON())
|
717
|
-
* //
|
718
|
-
*
|
734
|
+
* // in the spec file
|
735
|
+
* // March 14, 2017 timestamp or Date object
|
736
|
+
* const now = new Date(2017, 2, 14).getTime()
|
719
737
|
* cy.clock(now)
|
720
738
|
* cy.visit('/index.html')
|
721
739
|
* cy.get('#date').contains('2017-03-14')
|
740
|
+
* // to restore the real clock
|
741
|
+
* cy.clock().then(clock => {
|
742
|
+
* clock.restore()
|
743
|
+
* })
|
744
|
+
* // or use this shortcut
|
745
|
+
* cy.clock().invoke('restore')
|
722
746
|
*/
|
723
|
-
clock(now: number, options?: Loggable): Chainable<Clock>
|
747
|
+
clock(now: number|Date, options?: Loggable): Chainable<Clock>
|
724
748
|
/**
|
725
749
|
* Mocks global clock but only overrides specific functions.
|
726
750
|
*
|
@@ -729,7 +753,7 @@ declare namespace Cypress {
|
|
729
753
|
* // keep current date but override "setTimeout" and "clearTimeout"
|
730
754
|
* cy.clock(null, ['setTimeout', 'clearTimeout'])
|
731
755
|
*/
|
732
|
-
clock(now: number, functions?: Array<'setTimeout' | 'clearTimeout' | 'setInterval' | 'clearInterval' | 'Date'>, options?: Loggable): Chainable<Clock>
|
756
|
+
clock(now: number|Date, functions?: Array<'setTimeout' | 'clearTimeout' | 'setInterval' | 'clearInterval' | 'Date'>, options?: Loggable): Chainable<Clock>
|
733
757
|
/**
|
734
758
|
* Mocks global clock and all functions.
|
735
759
|
*
|
@@ -1751,12 +1775,24 @@ declare namespace Cypress {
|
|
1751
1775
|
* @see https://on.cypress.io/then
|
1752
1776
|
*/
|
1753
1777
|
then<S extends object | any[] | string | number | boolean>(fn: (this: ObjectLike, currentSubject: Subject) => S): Chainable<S>
|
1778
|
+
/**
|
1779
|
+
* Enables you to work with the subject yielded from the previous command / promise.
|
1780
|
+
*
|
1781
|
+
* @see https://on.cypress.io/then
|
1782
|
+
*/
|
1783
|
+
then<S>(fn: (this: ObjectLike, currentSubject: Subject) => S): ThenReturn<Subject, S>
|
1754
1784
|
/**
|
1755
1785
|
* Enables you to work with the subject yielded from the previous command / promise.
|
1756
1786
|
*
|
1757
1787
|
* @see https://on.cypress.io/then
|
1758
1788
|
*/
|
1759
1789
|
then<S extends object | any[] | string | number | boolean>(options: Partial<Timeoutable>, fn: (this: ObjectLike, currentSubject: Subject) => S): Chainable<S>
|
1790
|
+
/**
|
1791
|
+
* Enables you to work with the subject yielded from the previous command / promise.
|
1792
|
+
*
|
1793
|
+
* @see https://on.cypress.io/then
|
1794
|
+
*/
|
1795
|
+
then<S>(options: Partial<Timeoutable>, fn: (this: ObjectLike, currentSubject: Subject) => S): ThenReturn<Subject, S>
|
1760
1796
|
/**
|
1761
1797
|
* Enables you to work with the subject yielded from the previous command.
|
1762
1798
|
*
|
@@ -1781,6 +1817,17 @@ declare namespace Cypress {
|
|
1781
1817
|
* `cy.clock()` must be called before `cy.tick()`
|
1782
1818
|
*
|
1783
1819
|
* @see https://on.cypress.io/clock
|
1820
|
+
* @example
|
1821
|
+
* cy.clock()
|
1822
|
+
* ...
|
1823
|
+
* // advance time by 10 minutes
|
1824
|
+
* cy.tick(600*1000)
|
1825
|
+
* // you can restore the real clock
|
1826
|
+
* cy.tick(1000).then(clock => {
|
1827
|
+
* clock.restore()
|
1828
|
+
* })
|
1829
|
+
* // or use this shortcut
|
1830
|
+
* cy.tick(5000).invoke('restore')
|
1784
1831
|
*/
|
1785
1832
|
tick(milliseconds: number): Chainable<Clock>
|
1786
1833
|
|
@@ -2375,6 +2422,11 @@ declare namespace Cypress {
|
|
2375
2422
|
* @example 1.2.3
|
2376
2423
|
*/
|
2377
2424
|
resolvedNodeVersion: string
|
2425
|
+
/**
|
2426
|
+
* Whether Cypress will take a screenshot when a test fails during cypress run.
|
2427
|
+
* @default true
|
2428
|
+
*/
|
2429
|
+
screenshotOnRunFailure: boolean
|
2378
2430
|
/**
|
2379
2431
|
* 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
|
2380
2432
|
* @default "cypress/screenshots"
|
@@ -2480,6 +2532,10 @@ declare namespace Cypress {
|
|
2480
2532
|
* Absolute path to the root of the project
|
2481
2533
|
*/
|
2482
2534
|
projectRoot: string
|
2535
|
+
/**
|
2536
|
+
* Cypress version.
|
2537
|
+
*/
|
2538
|
+
version: string
|
2483
2539
|
}
|
2484
2540
|
|
2485
2541
|
interface DebugOptions {
|
@@ -2591,6 +2647,12 @@ declare namespace Cypress {
|
|
2591
2647
|
* @default 'swing'
|
2592
2648
|
*/
|
2593
2649
|
easing: 'swing' | 'linear',
|
2650
|
+
/**
|
2651
|
+
* Ensure element is scrollable. Error if element is not scrollable
|
2652
|
+
*
|
2653
|
+
* @default true
|
2654
|
+
*/
|
2655
|
+
ensureScrollable: boolean,
|
2594
2656
|
}
|
2595
2657
|
|
2596
2658
|
interface ScrollIntoViewOptions extends ScrollToOptions {
|
@@ -2777,7 +2839,7 @@ declare namespace Cypress {
|
|
2777
2839
|
encoding: Encodings
|
2778
2840
|
}
|
2779
2841
|
|
2780
|
-
// Kind of onerous, but has a nice auto-complete.
|
2842
|
+
// Kind of onerous, but has a nice auto-complete.
|
2781
2843
|
/**
|
2782
2844
|
* @see https://on.cypress.io/should
|
2783
2845
|
*
|
@@ -2968,6 +3030,22 @@ declare namespace Cypress {
|
|
2968
3030
|
* @see https://on.cypress.io/assertions
|
2969
3031
|
*/
|
2970
3032
|
(chainer: 'be.undefined'): Chainable<Subject>
|
3033
|
+
/**
|
3034
|
+
* Asserts that the target is strictly (`===`) equal to null.
|
3035
|
+
* @example
|
3036
|
+
* cy.wrap(null).should('be.null')
|
3037
|
+
* @see http://chaijs.com/api/bdd/#method_null
|
3038
|
+
* @see https://on.cypress.io/assertions
|
3039
|
+
*/
|
3040
|
+
(chainer: 'be.null'): Chainable<Subject>
|
3041
|
+
/**
|
3042
|
+
* Asserts that the target is strictly (`===`) equal to NaN.
|
3043
|
+
* @example
|
3044
|
+
* cy.wrap(NaN).should('be.NaN')
|
3045
|
+
* @see http://chaijs.com/api/bdd/#method_null
|
3046
|
+
* @see https://on.cypress.io/assertions
|
3047
|
+
*/
|
3048
|
+
(chainer: 'be.NaN'): Chainable<Subject>
|
2971
3049
|
/**
|
2972
3050
|
* Asserts that the target is a number or a date greater than or equal to the given number or date `start`, and less than or equal to the given number or date `finish` respectively.
|
2973
3051
|
* However, it’s often best to assert that the target is equal to its expected value.
|
@@ -3096,7 +3174,7 @@ declare namespace Cypress {
|
|
3096
3174
|
* @see http://chaijs.com/api/bdd/#method_all
|
3097
3175
|
* @see https://on.cypress.io/assertions
|
3098
3176
|
*/
|
3099
|
-
(chainer: 'have.all.keys', ...value: string[]): Chainable<Subject>
|
3177
|
+
(chainer: 'have.all.keys' | 'have.keys' | 'have.deep.keys' | 'have.all.deep.keys', ...value: string[]): Chainable<Subject>
|
3100
3178
|
/**
|
3101
3179
|
* Causes all `.keys` assertions that follow in the chain to only require that the target have at least one of the given keys. This is the opposite of `.all`, which requires that the target have all of the given keys.
|
3102
3180
|
* @example
|
@@ -3104,7 +3182,15 @@ declare namespace Cypress {
|
|
3104
3182
|
* @see http://chaijs.com/api/bdd/#method_any
|
3105
3183
|
* @see https://on.cypress.io/assertions
|
3106
3184
|
*/
|
3107
|
-
(chainer: 'have.any.keys', ...value: string[]): Chainable<Subject>
|
3185
|
+
(chainer: 'have.any.keys' | 'include.any.keys', ...value: string[]): Chainable<Subject>
|
3186
|
+
/**
|
3187
|
+
* Causes all `.keys` assertions that follow in the chain to require the target to be a superset of the expected set, rather than an identical set.
|
3188
|
+
* @example
|
3189
|
+
* cy.wrap({ a: 1, b: 2 }).should('include.all.keys', 'a', 'b')
|
3190
|
+
* @see http://chaijs.com/api/bdd/#method_keys
|
3191
|
+
* @see https://on.cypress.io/assertions
|
3192
|
+
*/
|
3193
|
+
(chainer: 'include.all.keys', ...value: string[]): Chainable<Subject>
|
3108
3194
|
/**
|
3109
3195
|
* Asserts that the target has a property with the given key `name`. See the `deep-eql` project page for info on the deep equality algorithm: https://github.com/chaijs/deep-eql.
|
3110
3196
|
* @example
|
@@ -3122,7 +3208,7 @@ declare namespace Cypress {
|
|
3122
3208
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3123
3209
|
* @see https://on.cypress.io/assertions
|
3124
3210
|
*/
|
3125
|
-
(chainer: 'have.length', value: number): Chainable<Subject>
|
3211
|
+
(chainer: 'have.length' | 'have.lengthOf', value: number): Chainable<Subject>
|
3126
3212
|
/**
|
3127
3213
|
* Asserts that the target’s `length` property is greater than to the given number `n`.
|
3128
3214
|
* @example
|
@@ -3131,7 +3217,7 @@ declare namespace Cypress {
|
|
3131
3217
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3132
3218
|
* @see https://on.cypress.io/assertions
|
3133
3219
|
*/
|
3134
|
-
(chainer: 'have.length.greaterThan', value: number): Chainable<Subject>
|
3220
|
+
(chainer: 'have.length.greaterThan' | 'have.lengthOf.greaterThan', value: number): Chainable<Subject>
|
3135
3221
|
/**
|
3136
3222
|
* Asserts that the target’s `length` property is greater than to the given number `n`.
|
3137
3223
|
* @example
|
@@ -3140,7 +3226,7 @@ declare namespace Cypress {
|
|
3140
3226
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3141
3227
|
* @see https://on.cypress.io/assertions
|
3142
3228
|
*/
|
3143
|
-
(chainer: 'have.length.gt', value: number): Chainable<Subject>
|
3229
|
+
(chainer: 'have.length.gt' | 'have.lengthOf.gt' | 'have.length.above' | 'have.lengthOf.above', value: number): Chainable<Subject>
|
3144
3230
|
/**
|
3145
3231
|
* Asserts that the target’s `length` property is greater than or equal to the given number `n`.
|
3146
3232
|
* @example
|
@@ -3149,7 +3235,7 @@ declare namespace Cypress {
|
|
3149
3235
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3150
3236
|
* @see https://on.cypress.io/assertions
|
3151
3237
|
*/
|
3152
|
-
(chainer: 'have.length.gte', value: number): Chainable<Subject>
|
3238
|
+
(chainer: 'have.length.gte' | 'have.lengthOf.gte' | 'have.length.at.least' | 'have.lengthOf.at.least', value: number): Chainable<Subject>
|
3153
3239
|
/**
|
3154
3240
|
* Asserts that the target’s `length` property is less than to the given number `n`.
|
3155
3241
|
* @example
|
@@ -3158,7 +3244,7 @@ declare namespace Cypress {
|
|
3158
3244
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3159
3245
|
* @see https://on.cypress.io/assertions
|
3160
3246
|
*/
|
3161
|
-
(chainer: 'have.length.lessThan', value: number): Chainable<Subject>
|
3247
|
+
(chainer: 'have.length.lessThan' | 'have.lengthOf.lessThan', value: number): Chainable<Subject>
|
3162
3248
|
/**
|
3163
3249
|
* Asserts that the target’s `length` property is less than to the given number `n`.
|
3164
3250
|
* @example
|
@@ -3167,7 +3253,7 @@ declare namespace Cypress {
|
|
3167
3253
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3168
3254
|
* @see https://on.cypress.io/assertions
|
3169
3255
|
*/
|
3170
|
-
(chainer: 'have.length.lt', value: number): Chainable<Subject>
|
3256
|
+
(chainer: 'have.length.lt' | 'have.lengthOf.lt' | 'have.length.below' | 'have.lengthOf.below', value: number): Chainable<Subject>
|
3171
3257
|
/**
|
3172
3258
|
* Asserts that the target’s `length` property is less than or equal to the given number `n`.
|
3173
3259
|
* @example
|
@@ -3176,7 +3262,15 @@ declare namespace Cypress {
|
|
3176
3262
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3177
3263
|
* @see https://on.cypress.io/assertions
|
3178
3264
|
*/
|
3179
|
-
(chainer: 'have.length.lte', value: number): Chainable<Subject>
|
3265
|
+
(chainer: 'have.length.lte' | 'have.lengthOf.lte' | 'have.length.at.most' | 'have.lengthOf.at.most', value: number): Chainable<Subject>
|
3266
|
+
/**
|
3267
|
+
* Asserts that the target’s `length` property is within `start` and `finish`.
|
3268
|
+
* @example
|
3269
|
+
* cy.wrap([1, 2, 3]).should('have.length.within', 1, 5)
|
3270
|
+
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3271
|
+
* @see https://on.cypress.io/assertions
|
3272
|
+
*/
|
3273
|
+
(chainer: 'have.length.within' | 'have.lengthOf.within', start: number, finish: number): Chainable<Subject>
|
3180
3274
|
/**
|
3181
3275
|
* Asserts that the target array has the same members as the given array `set`.
|
3182
3276
|
* @example
|
@@ -3184,7 +3278,7 @@ declare namespace Cypress {
|
|
3184
3278
|
* @see http://chaijs.com/api/bdd/#method_members
|
3185
3279
|
* @see https://on.cypress.io/assertions
|
3186
3280
|
*/
|
3187
|
-
(chainer: 'have.members', values: any[]): Chainable<Subject>
|
3281
|
+
(chainer: 'have.members' | 'have.deep.members', values: any[]): Chainable<Subject>
|
3188
3282
|
/**
|
3189
3283
|
* Asserts that the target array has the same members as the given array where order matters.
|
3190
3284
|
* @example
|
@@ -3210,7 +3304,15 @@ declare namespace Cypress {
|
|
3210
3304
|
* @see http://chaijs.com/api/bdd/#method_property
|
3211
3305
|
* @see https://on.cypress.io/assertions
|
3212
3306
|
*/
|
3213
|
-
(chainer: 'have.property', property: string, value?: any): Chainable<Subject>
|
3307
|
+
(chainer: 'have.property' | 'have.nested.property' | 'have.own.property' | 'have.a.property' | 'have.deep.property' | 'have.deep.own.property' | 'have.deep.nested.property', property: string, value?: any): Chainable<Subject>
|
3308
|
+
/**
|
3309
|
+
* Asserts that the target has its own property descriptor with the given key name.
|
3310
|
+
* @example
|
3311
|
+
* cy.wrap({a: 1}).should('have.ownPropertyDescriptor', 'a', { value: 1 })
|
3312
|
+
* @see http://chaijs.com/api/bdd/#method_ownpropertydescriptor
|
3313
|
+
* @see https://on.cypress.io/assertions
|
3314
|
+
*/
|
3315
|
+
(chainer: 'have.ownPropertyDescriptor' | 'haveOwnPropertyDescriptor', name: string, descriptor?: PropertyDescriptor): Chainable<Subject>
|
3214
3316
|
/**
|
3215
3317
|
* Asserts that the target string contains the given substring `str`.
|
3216
3318
|
* @example
|
@@ -3226,7 +3328,7 @@ declare namespace Cypress {
|
|
3226
3328
|
* @see http://chaijs.com/api/bdd/#method_include
|
3227
3329
|
* @see https://on.cypress.io/assertions
|
3228
3330
|
*/
|
3229
|
-
(chainer: 'include', value: any): Chainable<Subject>
|
3331
|
+
(chainer: 'include' | 'deep.include' | 'nested.include' | 'own.include' | 'deep.own.include' | 'deep.nested.include', value: any): Chainable<Subject>
|
3230
3332
|
/**
|
3231
3333
|
* When the target is a string, `.include` asserts that the given string `val` is a substring of the target.
|
3232
3334
|
* @example
|
@@ -3234,21 +3336,29 @@ declare namespace Cypress {
|
|
3234
3336
|
* @see http://chaijs.com/api/bdd/#method_members
|
3235
3337
|
* @see https://on.cypress.io/assertions
|
3236
3338
|
*/
|
3237
|
-
(chainer: 'include.members', value: any[]): Chainable<Subject>
|
3339
|
+
(chainer: 'include.members' | 'include.ordered.members' | 'include.deep.ordered.members', value: any[]): Chainable<Subject>
|
3238
3340
|
/**
|
3239
3341
|
* When one argument is provided, `.increase` asserts that the given function `subject` returns a greater number when it’s
|
3240
3342
|
* invoked after invoking the target function compared to when it’s invoked beforehand.
|
3241
3343
|
* `.increase` also causes all `.by` assertions that follow in the chain to assert how much greater of a number is returned.
|
3242
3344
|
* It’s often best to assert that the return value increased by the expected amount, rather than asserting it increased by any amount.
|
3345
|
+
*
|
3346
|
+
* When two arguments are provided, `.increase` asserts that the value of the given object `subject`’s `prop` property is greater after
|
3347
|
+
* invoking the target function compared to beforehand.
|
3348
|
+
*
|
3243
3349
|
* @example
|
3244
3350
|
* let val = 1
|
3245
3351
|
* function addTwo() { val += 2 }
|
3246
3352
|
* function getVal() { return val }
|
3247
3353
|
* cy.wrap(addTwo).should('increase', getVal)
|
3354
|
+
*
|
3355
|
+
* const myObj = { val: 1 }
|
3356
|
+
* function addTwo() { myObj.val += 2 }
|
3357
|
+
* cy.wrap(addTwo).should('increase', myObj, 'val')
|
3248
3358
|
* @see http://chaijs.com/api/bdd/#method_increase
|
3249
3359
|
* @see https://on.cypress.io/assertions
|
3250
3360
|
*/
|
3251
|
-
(chainer: 'increase', value: object, property
|
3361
|
+
(chainer: 'increase', value: object, property?: string): Chainable<Subject>
|
3252
3362
|
/**
|
3253
3363
|
* Asserts that the target matches the given regular expression `re`.
|
3254
3364
|
* @example
|
@@ -3301,6 +3411,50 @@ declare namespace Cypress {
|
|
3301
3411
|
*/
|
3302
3412
|
// tslint:disable-next-line ban-types
|
3303
3413
|
(chainer: 'throw', error: Error | Function, expected?: string | RegExp): Chainable<Subject>
|
3414
|
+
/**
|
3415
|
+
* Asserts that the target is a member of the given array list.
|
3416
|
+
* @example
|
3417
|
+
* cy.wrap(1).should('be.oneOf', [1, 2, 3])
|
3418
|
+
* @see http://chaijs.com/api/bdd/#method_oneof
|
3419
|
+
* @see https://on.cypress.io/assertions
|
3420
|
+
*/
|
3421
|
+
(chainer: 'be.oneOf', list: ReadonlyArray<any>): Chainable<Subject>
|
3422
|
+
/**
|
3423
|
+
* Asserts that the target is extensible, which means that new properties can be added to it.
|
3424
|
+
* @example
|
3425
|
+
* cy.wrap({a: 1}).should('be.extensible')
|
3426
|
+
* @see http://chaijs.com/api/bdd/#method_extensible
|
3427
|
+
* @see https://on.cypress.io/assertions
|
3428
|
+
*/
|
3429
|
+
(chainer: 'be.extensible'): Chainable<Subject>
|
3430
|
+
/**
|
3431
|
+
* 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.
|
3432
|
+
* @example
|
3433
|
+
* let sealedObject = Object.seal({})
|
3434
|
+
* let frozenObject = Object.freeze({})
|
3435
|
+
* cy.wrap(sealedObject).should('be.sealed')
|
3436
|
+
* cy.wrap(frozenObject).should('be.sealed')
|
3437
|
+
* @see http://chaijs.com/api/bdd/#method_sealed
|
3438
|
+
* @see https://on.cypress.io/assertions
|
3439
|
+
*/
|
3440
|
+
(chainer: 'be.sealed'): Chainable<Subject>
|
3441
|
+
/**
|
3442
|
+
* 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.
|
3443
|
+
* @example
|
3444
|
+
* let frozenObject = Object.freeze({})
|
3445
|
+
* cy.wrap(frozenObject).should('be.frozen')
|
3446
|
+
* @see http://chaijs.com/api/bdd/#method_frozen
|
3447
|
+
* @see https://on.cypress.io/assertions
|
3448
|
+
*/
|
3449
|
+
(chainer: 'be.frozen'): Chainable<Subject>
|
3450
|
+
/**
|
3451
|
+
* Asserts that the target is a number, and isn’t `NaN` or positive/negative `Infinity`.
|
3452
|
+
* @example
|
3453
|
+
* cy.wrap(1).should('be.finite')
|
3454
|
+
* @see http://chaijs.com/api/bdd/#method_finite
|
3455
|
+
* @see https://on.cypress.io/assertions
|
3456
|
+
*/
|
3457
|
+
(chainer: 'be.finite'): Chainable<Subject>
|
3304
3458
|
|
3305
3459
|
// chai.not
|
3306
3460
|
/**
|
@@ -3485,6 +3639,22 @@ declare namespace Cypress {
|
|
3485
3639
|
* @see https://on.cypress.io/assertions
|
3486
3640
|
*/
|
3487
3641
|
(chainer: 'not.be.undefined'): Chainable<Subject>
|
3642
|
+
/**
|
3643
|
+
* Asserts that the target is strictly (`===`) equal to null.
|
3644
|
+
* @example
|
3645
|
+
* cy.wrap(null).should('not.be.null')
|
3646
|
+
* @see http://chaijs.com/api/bdd/#method_null
|
3647
|
+
* @see https://on.cypress.io/assertions
|
3648
|
+
*/
|
3649
|
+
(chainer: 'not.be.null'): Chainable<Subject>
|
3650
|
+
/**
|
3651
|
+
* Asserts that the target is strictly (`===`) equal to NaN.
|
3652
|
+
* @example
|
3653
|
+
* cy.wrap(NaN).should('not.be.NaN')
|
3654
|
+
* @see http://chaijs.com/api/bdd/#method_nan
|
3655
|
+
* @see https://on.cypress.io/assertions
|
3656
|
+
*/
|
3657
|
+
(chainer: 'not.be.NaN'): Chainable<Subject>
|
3488
3658
|
/**
|
3489
3659
|
* Asserts that the target is not a number or a date greater than or equal to the given number or date `start`, and less than or equal to the given number or date `finish` respectively.
|
3490
3660
|
* However, it’s often best to assert that the target is equal to its expected value.
|
@@ -3596,7 +3766,7 @@ declare namespace Cypress {
|
|
3596
3766
|
* @see http://chaijs.com/api/bdd/#method_all
|
3597
3767
|
* @see https://on.cypress.io/assertions
|
3598
3768
|
*/
|
3599
|
-
(chainer: 'not.have.all.keys', ...value: string[]): Chainable<Subject>
|
3769
|
+
(chainer: 'not.have.all.keys' | 'not.have.keys' | 'not.have.deep.keys' | 'not.have.all.deep.keys', ...value: string[]): Chainable<Subject>
|
3600
3770
|
/**
|
3601
3771
|
* Causes all `.keys` assertions that follow in the chain to only require that the target not have at least one of the given keys. This is the opposite of `.all`, which requires that the target have all of the given keys.
|
3602
3772
|
* @example
|
@@ -3604,7 +3774,7 @@ declare namespace Cypress {
|
|
3604
3774
|
* @see http://chaijs.com/api/bdd/#method_any
|
3605
3775
|
* @see https://on.cypress.io/assertions
|
3606
3776
|
*/
|
3607
|
-
(chainer: 'not.have.any.keys', ...value: string[]): Chainable<Subject>
|
3777
|
+
(chainer: 'not.have.any.keys' | 'not.include.any.keys', ...value: string[]): Chainable<Subject>
|
3608
3778
|
/**
|
3609
3779
|
* Asserts that the target does not have a property with the given key `name`. See the `deep-eql` project page for info on the deep equality algorithm: https://github.com/chaijs/deep-eql.
|
3610
3780
|
* @example
|
@@ -3622,7 +3792,7 @@ declare namespace Cypress {
|
|
3622
3792
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3623
3793
|
* @see https://on.cypress.io/assertions
|
3624
3794
|
*/
|
3625
|
-
(chainer: 'not.have.length', value: number): Chainable<Subject>
|
3795
|
+
(chainer: 'not.have.length' | 'not.have.lengthOf', value: number): Chainable<Subject>
|
3626
3796
|
/**
|
3627
3797
|
* Asserts that the target’s `length` property is not greater than to the given number `n`.
|
3628
3798
|
* @example
|
@@ -3631,7 +3801,7 @@ declare namespace Cypress {
|
|
3631
3801
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3632
3802
|
* @see https://on.cypress.io/assertions
|
3633
3803
|
*/
|
3634
|
-
(chainer: 'not.have.length.greaterThan', value: number): Chainable<Subject>
|
3804
|
+
(chainer: 'not.have.length.greaterThan' | 'not.have.lengthOf.greaterThan', value: number): Chainable<Subject>
|
3635
3805
|
/**
|
3636
3806
|
* Asserts that the target’s `length` property is not greater than to the given number `n`.
|
3637
3807
|
* @example
|
@@ -3640,7 +3810,7 @@ declare namespace Cypress {
|
|
3640
3810
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3641
3811
|
* @see https://on.cypress.io/assertions
|
3642
3812
|
*/
|
3643
|
-
(chainer: 'not.have.length.gt', value: number): Chainable<Subject>
|
3813
|
+
(chainer: 'not.have.length.gt' | 'not.have.lengthOf.gt' | 'not.have.length.above' | 'not.have.lengthOf.above', value: number): Chainable<Subject>
|
3644
3814
|
/**
|
3645
3815
|
* Asserts that the target’s `length` property is not greater than or equal to the given number `n`.
|
3646
3816
|
* @example
|
@@ -3649,7 +3819,7 @@ declare namespace Cypress {
|
|
3649
3819
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3650
3820
|
* @see https://on.cypress.io/assertions
|
3651
3821
|
*/
|
3652
|
-
(chainer: 'have.length.gte', value: number): Chainable<Subject>
|
3822
|
+
(chainer: 'not.have.length.gte' | 'not.have.lengthOf.gte' | 'not.have.length.at.least' | 'not.have.lengthOf.at.least', value: number): Chainable<Subject>
|
3653
3823
|
/**
|
3654
3824
|
* Asserts that the target’s `length` property is less than to the given number `n`.
|
3655
3825
|
* @example
|
@@ -3658,7 +3828,7 @@ declare namespace Cypress {
|
|
3658
3828
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3659
3829
|
* @see https://on.cypress.io/assertions
|
3660
3830
|
*/
|
3661
|
-
(chainer: 'not.have.length.lessThan', value: number): Chainable<Subject>
|
3831
|
+
(chainer: 'not.have.length.lessThan' | 'not.have.lengthOf.lessThan', value: number): Chainable<Subject>
|
3662
3832
|
/**
|
3663
3833
|
* Asserts that the target’s `length` property is not less than to the given number `n`.
|
3664
3834
|
* @example
|
@@ -3667,16 +3837,24 @@ declare namespace Cypress {
|
|
3667
3837
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3668
3838
|
* @see https://on.cypress.io/assertions
|
3669
3839
|
*/
|
3670
|
-
(chainer: 'not.have.length.lt', value: number): Chainable<Subject>
|
3840
|
+
(chainer: 'not.have.length.lt' | 'not.have.lengthOf.lt' | 'not.have.length.below' | 'not.have.lengthOf.below', value: number): Chainable<Subject>
|
3671
3841
|
/**
|
3672
3842
|
* Asserts that the target’s `length` property is not less than or equal to the given number `n`.
|
3673
3843
|
* @example
|
3674
|
-
* cy.wrap([1, 2, 3]).should('not.have.length.
|
3844
|
+
* cy.wrap([1, 2, 3]).should('not.have.length.lte', 2)
|
3675
3845
|
* cy.wrap('foo').should('not.have.length.lte', 2)
|
3676
3846
|
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3677
3847
|
* @see https://on.cypress.io/assertions
|
3678
3848
|
*/
|
3679
|
-
(chainer: 'not.have.length.lte', value: number): Chainable<Subject>
|
3849
|
+
(chainer: 'not.have.length.lte' | 'not.have.lengthOf.lte' | 'not.have.length.at.most' | 'not.have.lengthOf.at.most', value: number): Chainable<Subject>
|
3850
|
+
/**
|
3851
|
+
* Asserts that the target’s `length` property is within `start` and `finish`.
|
3852
|
+
* @example
|
3853
|
+
* cy.wrap([1, 2, 3]).should('not.have.length.within', 6, 12)
|
3854
|
+
* @see http://chaijs.com/api/bdd/#method_lengthof
|
3855
|
+
* @see https://on.cypress.io/assertions
|
3856
|
+
*/
|
3857
|
+
(chainer: 'not.have.length.within' | 'not.have.lengthOf.within', start: number, finish: number): Chainable<Subject>
|
3680
3858
|
/**
|
3681
3859
|
* Asserts that the target array does not have the same members as the given array `set`.
|
3682
3860
|
* @example
|
@@ -3684,7 +3862,7 @@ declare namespace Cypress {
|
|
3684
3862
|
* @see http://chaijs.com/api/bdd/#method_members
|
3685
3863
|
* @see https://on.cypress.io/assertions
|
3686
3864
|
*/
|
3687
|
-
(chainer: 'not.have.members', values: any[]): Chainable<Subject>
|
3865
|
+
(chainer: 'not.have.members' | 'not.have.deep.members', values: any[]): Chainable<Subject>
|
3688
3866
|
/**
|
3689
3867
|
* Asserts that the target array does not have the same members as the given array where order matters.
|
3690
3868
|
* @example
|
@@ -3710,7 +3888,15 @@ declare namespace Cypress {
|
|
3710
3888
|
* @see http://chaijs.com/api/bdd/#method_property
|
3711
3889
|
* @see https://on.cypress.io/assertions
|
3712
3890
|
*/
|
3713
|
-
(chainer: 'not.have.property', property: string, value?: any): Chainable<Subject>
|
3891
|
+
(chainer: 'not.have.property' | 'not.have.nested.property' | 'not.have.own.property' | 'not.have.a.property' | 'not.have.deep.property' | 'not.have.deep.own.property' | 'not.have.deep.nested.property', property: string, value?: any): Chainable<Subject>
|
3892
|
+
/**
|
3893
|
+
* Asserts that the target has its own property descriptor with the given key name.
|
3894
|
+
* @example
|
3895
|
+
* cy.wrap({a: 1}).should('not.have.ownPropertyDescriptor', 'a', { value: 2 })
|
3896
|
+
* @see http://chaijs.com/api/bdd/#method_ownpropertydescriptor
|
3897
|
+
* @see https://on.cypress.io/assertions
|
3898
|
+
*/
|
3899
|
+
(chainer: 'not.have.ownPropertyDescriptor' | 'not.haveOwnPropertyDescriptor', name: string, descriptor?: PropertyDescriptor): Chainable<Subject>
|
3714
3900
|
/**
|
3715
3901
|
* Asserts that the target string does not contains the given substring `str`.
|
3716
3902
|
* @example
|
@@ -3726,7 +3912,7 @@ declare namespace Cypress {
|
|
3726
3912
|
* @see http://chaijs.com/api/bdd/#method_include
|
3727
3913
|
* @see https://on.cypress.io/assertions
|
3728
3914
|
*/
|
3729
|
-
(chainer: 'not.include', value: any): Chainable<Subject>
|
3915
|
+
(chainer: 'not.include' | 'not.deep.include' | 'not.nested.include' | 'not.own.include' | 'not.deep.own.include' | 'not.deep.nested.include', value: any): Chainable<Subject>
|
3730
3916
|
/**
|
3731
3917
|
* When the target is a string, `.include` asserts that the given string `val` is not a substring of the target.
|
3732
3918
|
* @example
|
@@ -3734,21 +3920,29 @@ declare namespace Cypress {
|
|
3734
3920
|
* @see http://chaijs.com/api/bdd/#method_members
|
3735
3921
|
* @see https://on.cypress.io/assertions
|
3736
3922
|
*/
|
3737
|
-
(chainer: 'not.include.members', value: any[]): Chainable<Subject>
|
3923
|
+
(chainer: 'not.include.members' | 'not.include.ordered.members' | 'not.include.deep.ordered.members', value: any[]): Chainable<Subject>
|
3738
3924
|
/**
|
3739
3925
|
* When one argument is provided, `.increase` asserts that the given function `subject` returns a greater number when it’s
|
3740
3926
|
* invoked after invoking the target function compared to when it’s invoked beforehand.
|
3741
3927
|
* `.increase` also causes all `.by` assertions that follow in the chain to assert how much greater of a number is returned.
|
3742
3928
|
* It’s often best to assert that the return value increased by the expected amount, rather than asserting it increased by any amount.
|
3929
|
+
*
|
3930
|
+
* When two arguments are provided, `.increase` asserts that the value of the given object `subject`’s `prop` property is greater after
|
3931
|
+
* invoking the target function compared to beforehand.
|
3932
|
+
*
|
3743
3933
|
* @example
|
3744
3934
|
* let val = 1
|
3745
3935
|
* function addTwo() { val += 2 }
|
3746
3936
|
* function getVal() { return val }
|
3747
3937
|
* cy.wrap(() => {}).should('not.increase', getVal)
|
3938
|
+
*
|
3939
|
+
* const myObj = { val: 1 }
|
3940
|
+
* function addTwo() { myObj.val += 2 }
|
3941
|
+
* cy.wrap(addTwo).should('increase', myObj, 'val')
|
3748
3942
|
* @see http://chaijs.com/api/bdd/#method_increase
|
3749
3943
|
* @see https://on.cypress.io/assertions
|
3750
3944
|
*/
|
3751
|
-
(chainer: 'not.increase', value: object, property
|
3945
|
+
(chainer: 'not.increase', value: object, property?: string): Chainable<Subject>
|
3752
3946
|
/**
|
3753
3947
|
* Asserts that the target does not match the given regular expression `re`.
|
3754
3948
|
* @example
|
@@ -3787,7 +3981,7 @@ declare namespace Cypress {
|
|
3787
3981
|
* @see http://chaijs.com/api/bdd/#method_throw
|
3788
3982
|
* @see https://on.cypress.io/assertions
|
3789
3983
|
*/
|
3790
|
-
(chainer: 'throw', value?: string | RegExp): Chainable<Subject>
|
3984
|
+
(chainer: 'not.throw', value?: string | RegExp): Chainable<Subject>
|
3791
3985
|
/**
|
3792
3986
|
* When no arguments are provided, `.throw` invokes the target function and asserts that no error is thrown.
|
3793
3987
|
* When one argument is provided, and it’s a string, `.throw` invokes the target function and asserts that no error is thrown with a message that contains that string.
|
@@ -3800,7 +3994,50 @@ declare namespace Cypress {
|
|
3800
3994
|
* @see https://on.cypress.io/assertions
|
3801
3995
|
*/
|
3802
3996
|
// tslint:disable-next-line ban-types
|
3803
|
-
(chainer: 'throw', error: Error | Function, expected?: string | RegExp): Chainable<Subject>
|
3997
|
+
(chainer: 'not.throw', error: Error | Function, expected?: string | RegExp): Chainable<Subject>
|
3998
|
+
/**
|
3999
|
+
* Asserts that the target is a member of the given array list.
|
4000
|
+
* @example
|
4001
|
+
* cy.wrap(42).should('not.be.oneOf', [1, 2, 3])
|
4002
|
+
* @see http://chaijs.com/api/bdd/#method_oneof
|
4003
|
+
* @see https://on.cypress.io/assertions
|
4004
|
+
*/
|
4005
|
+
(chainer: 'not.be.oneOf', list: ReadonlyArray<any>): Chainable<Subject>
|
4006
|
+
/**
|
4007
|
+
* Asserts that the target is extensible, which means that new properties can be added to it.
|
4008
|
+
* @example
|
4009
|
+
* let o = Object.seal({})
|
4010
|
+
* cy.wrap(o).should('not.be.extensible')
|
4011
|
+
* @see http://chaijs.com/api/bdd/#method_extensible
|
4012
|
+
* @see https://on.cypress.io/assertions
|
4013
|
+
*/
|
4014
|
+
(chainer: 'not.be.extensible'): Chainable<Subject>
|
4015
|
+
/**
|
4016
|
+
* 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.
|
4017
|
+
* @example
|
4018
|
+
* cy.wrap({a: 1}).should('be.sealed')
|
4019
|
+
* cy.wrap({a: 1}).should('be.sealed')
|
4020
|
+
* @see http://chaijs.com/api/bdd/#method_sealed
|
4021
|
+
* @see https://on.cypress.io/assertions
|
4022
|
+
*/
|
4023
|
+
(chainer: 'not.be.sealed'): Chainable<Subject>
|
4024
|
+
/**
|
4025
|
+
* 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.
|
4026
|
+
* @example
|
4027
|
+
* cy.wrap({a: 1}).should('not.be.frozen')
|
4028
|
+
* @see http://chaijs.com/api/bdd/#method_frozen
|
4029
|
+
* @see https://on.cypress.io/assertions
|
4030
|
+
*/
|
4031
|
+
(chainer: 'not.be.frozen'): Chainable<Subject>
|
4032
|
+
/**
|
4033
|
+
* Asserts that the target is a number, and isn’t `NaN` or positive/negative `Infinity`.
|
4034
|
+
* @example
|
4035
|
+
* cy.wrap(NaN).should('not.be.finite')
|
4036
|
+
* cy.wrap(Infinity).should('not.be.finite')
|
4037
|
+
* @see http://chaijs.com/api/bdd/#method_finite
|
4038
|
+
* @see https://on.cypress.io/assertions
|
4039
|
+
*/
|
4040
|
+
(chainer: 'not.be.finite'): Chainable<Subject>
|
3804
4041
|
|
3805
4042
|
// sinon-chai
|
3806
4043
|
/**
|
@@ -3809,80 +4046,80 @@ declare namespace Cypress {
|
|
3809
4046
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwithnew
|
3810
4047
|
* @see https://on.cypress.io/assertions
|
3811
4048
|
*/
|
3812
|
-
(chainer: 'be.always.calledWithNew'): Chainable<Subject>
|
4049
|
+
(chainer: 'be.always.calledWithNew' | 'always.have.been.calledWithNew'): Chainable<Subject>
|
3813
4050
|
/**
|
3814
4051
|
* Assert if spy was always called with matching arguments (and possibly others).
|
3815
4052
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyalwayscalledwithmatcharg1-arg2-
|
3816
4053
|
* @see https://on.cypress.io/assertions
|
3817
4054
|
*/
|
3818
|
-
(chainer: 'be.always.calledWithMatch', ...args: any[]): Chainable<Subject>
|
4055
|
+
(chainer: 'be.always.calledWithMatch' | 'always.have.been.calledWithMatch', ...args: any[]): Chainable<Subject>
|
3819
4056
|
/**
|
3820
4057
|
* Assert spy always returned the provided value.
|
3821
4058
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyalwaysreturnedobj
|
3822
4059
|
* @see https://on.cypress.io/assertions
|
3823
4060
|
*/
|
3824
|
-
(chainer: 'always.returned', value: any): Chainable<Subject>
|
4061
|
+
(chainer: 'always.returned' | 'have.always.returned', value: any): Chainable<Subject>
|
3825
4062
|
/**
|
3826
4063
|
* `true` if the spy was called at least once
|
3827
4064
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalled
|
3828
4065
|
* @see https://on.cypress.io/assertions
|
3829
4066
|
*/
|
3830
|
-
(chainer: 'be.called'): Chainable<Subject>
|
4067
|
+
(chainer: 'be.called' | 'have.been.called'): Chainable<Subject>
|
3831
4068
|
/**
|
3832
4069
|
* Assert spy was called after `anotherSpy`
|
3833
4070
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledafteranotherspy
|
3834
4071
|
* @see https://on.cypress.io/assertions
|
3835
4072
|
*/
|
3836
|
-
(chainer: 'be.calledAfter', spy: sinon.SinonSpy): Chainable<Subject>
|
4073
|
+
(chainer: 'be.calledAfter' | 'have.been.calledAfter', spy: sinon.SinonSpy): Chainable<Subject>
|
3837
4074
|
/**
|
3838
4075
|
* Assert spy was called before `anotherSpy`
|
3839
4076
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledbeforeanotherspy
|
3840
4077
|
* @see https://on.cypress.io/assertions
|
3841
4078
|
*/
|
3842
|
-
(chainer: 'be.calledBefore', spy: sinon.SinonSpy): Chainable<Subject>
|
4079
|
+
(chainer: 'be.calledBefore' | 'have.been.calledBefore', spy: sinon.SinonSpy): Chainable<Subject>
|
3843
4080
|
/**
|
3844
4081
|
* Assert spy was called at least once with `obj` as `this`. `calledOn` also accepts a matcher (see [matchers](http://sinonjs.org/releases/v4.1.3/spies/#matchers)).
|
3845
4082
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledonobj
|
3846
4083
|
* @see https://on.cypress.io/assertions
|
3847
4084
|
*/
|
3848
|
-
(chainer: 'be.calledOn', context: any): Chainable<Subject>
|
4085
|
+
(chainer: 'be.calledOn' | 'have.been.calledOn', context: any): Chainable<Subject>
|
3849
4086
|
/**
|
3850
4087
|
* Assert spy was called exactly once
|
3851
4088
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledonce
|
3852
4089
|
* @see https://on.cypress.io/assertions
|
3853
4090
|
*/
|
3854
|
-
(chainer: 'be.calledOnce'): Chainable<Subject>
|
4091
|
+
(chainer: 'be.calledOnce' | 'have.been.calledOnce'): Chainable<Subject>
|
3855
4092
|
/**
|
3856
4093
|
* Assert spy was called exactly three times
|
3857
4094
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledthrice
|
3858
4095
|
* @see https://on.cypress.io/assertions
|
3859
4096
|
*/
|
3860
|
-
(chainer: 'be.calledThrice'): Chainable<Subject>
|
4097
|
+
(chainer: 'be.calledThrice' | 'have.been.calledThrice'): Chainable<Subject>
|
3861
4098
|
/**
|
3862
4099
|
* Assert spy was called exactly twice
|
3863
4100
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledtwice
|
3864
4101
|
* @see https://on.cypress.io/assertions
|
3865
4102
|
*/
|
3866
|
-
(chainer: 'be.calledTwice'): Chainable<Subject>
|
4103
|
+
(chainer: 'be.calledTwice' | 'have.been.calledTwice'): Chainable<Subject>
|
3867
4104
|
/**
|
3868
4105
|
* Assert spy was called at least once with the provided arguments and no others.
|
3869
4106
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwithexactlyarg1-arg2-
|
3870
4107
|
* @see https://on.cypress.io/assertions
|
3871
4108
|
*/
|
3872
|
-
(chainer: 'be.calledWithExactly', ...args: any[]): Chainable<Subject>
|
4109
|
+
(chainer: 'be.calledWithExactly' | 'have.been.calledWithExactly', ...args: any[]): Chainable<Subject>
|
3873
4110
|
/**
|
3874
4111
|
* Assert spy was called with matching arguments (and possibly others).
|
3875
4112
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwithmatcharg1-arg2-
|
3876
4113
|
* @see https://on.cypress.io/assertions
|
3877
4114
|
*/
|
3878
|
-
(chainer: 'be.calledWithMatch', ...args: any[]): Chainable<Subject>
|
4115
|
+
(chainer: 'be.calledWithMatch' | 'have.been.calledWithMatch', ...args: any[]): Chainable<Subject>
|
3879
4116
|
/**
|
3880
4117
|
* Assert spy/stub was called the `new` operator.
|
3881
4118
|
* 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.
|
3882
4119
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwithnew
|
3883
4120
|
* @see https://on.cypress.io/assertions
|
3884
4121
|
*/
|
3885
|
-
(chainer: 'be.calledWithNew'): Chainable<Subject>
|
4122
|
+
(chainer: 'be.calledWithNew' | 'have.been.calledWithNew'): Chainable<Subject>
|
3886
4123
|
/**
|
3887
4124
|
* Assert spy always threw an exception.
|
3888
4125
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyalwaysthrew
|
@@ -3906,7 +4143,61 @@ declare namespace Cypress {
|
|
3906
4143
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyreturnedobj
|
3907
4144
|
* @see https://on.cypress.io/assertions
|
3908
4145
|
*/
|
3909
|
-
(chainer: 'returned', value: any): Chainable<Subject>
|
4146
|
+
(chainer: 'returned' | 'have.returned', value: any): Chainable<Subject>
|
4147
|
+
/**
|
4148
|
+
* Assert spy was called before anotherSpy, and no spy calls occurred between spy and anotherSpy.
|
4149
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledimmediatelybeforeanotherspy
|
4150
|
+
* @see https://on.cypress.io/assertions
|
4151
|
+
*/
|
4152
|
+
(chainer: 'be.calledImmediatelyBefore' | 'have.been.calledImmediatelyBefore', anotherSpy: sinon.SinonSpy): Chainable<Subject>
|
4153
|
+
/**
|
4154
|
+
* Assert spy was called after anotherSpy, and no spy calls occurred between anotherSpy and spy.
|
4155
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledimmediatelyafteranotherspy
|
4156
|
+
* @see https://on.cypress.io/assertions
|
4157
|
+
*/
|
4158
|
+
(chainer: 'be.calledImmediatelyAfter' | 'have.been.calledImmediatelyAfter', anotherSpy: sinon.SinonSpy): Chainable<Subject>
|
4159
|
+
/**
|
4160
|
+
* Assert the spy was always called with obj as this
|
4161
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyalwayscalledonobj
|
4162
|
+
* @see https://on.cypress.io/assertions
|
4163
|
+
*/
|
4164
|
+
(chainer: 'be.always.calledOn' | 'always.have.been.calledOn', obj: any): Chainable<Subject>
|
4165
|
+
/**
|
4166
|
+
* Assert spy was called at least once with the provided arguments.
|
4167
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwitharg1-arg2-
|
4168
|
+
* @see https://on.cypress.io/assertions
|
4169
|
+
*/
|
4170
|
+
(chainer: 'be.calledWith' | 'have.been.calledWith', ...args: any[]): Chainable<Subject>
|
4171
|
+
/**
|
4172
|
+
* Assert spy was always called with the provided arguments (and possibly others).
|
4173
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyalwayscalledwitharg1-arg2-
|
4174
|
+
* @see https://on.cypress.io/assertions
|
4175
|
+
*/
|
4176
|
+
(chainer: 'be.always.calledWith' | 'always.have.been.calledWith', ...args: any[]): Chainable<Subject>
|
4177
|
+
/**
|
4178
|
+
* Assert spy was called at exactly once with the provided arguments.
|
4179
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwitharg1-arg2-
|
4180
|
+
* @see https://on.cypress.io/assertions
|
4181
|
+
*/
|
4182
|
+
(chainer: 'be.calledOnceWith' | 'have.been.calledOnceWith', ...args: any[]): Chainable<Subject>
|
4183
|
+
/**
|
4184
|
+
* Assert spy was always called with the exact provided arguments.
|
4185
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyalwayscalledwithexactlyarg1-arg2-
|
4186
|
+
* @see https://on.cypress.io/assertions
|
4187
|
+
*/
|
4188
|
+
(chainer: 'be.always.calledWithExactly' | 'have.been.calledWithExactly', ...args: any[]): Chainable<Subject>
|
4189
|
+
/**
|
4190
|
+
* Assert spy was called at exactly once with the provided arguments.
|
4191
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#
|
4192
|
+
* @see https://on.cypress.io/assertions
|
4193
|
+
*/
|
4194
|
+
(chainer: 'be.calledOnceWithExactly' | 'have.been.calledOnceWithExactly', ...args: any[]): Chainable<Subject>
|
4195
|
+
/**
|
4196
|
+
* Assert spy always returned the provided value.
|
4197
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#
|
4198
|
+
* @see https://on.cypress.io/assertions
|
4199
|
+
*/
|
4200
|
+
(chainer: 'have.always.returned', obj: any): Chainable<Subject>
|
3910
4201
|
|
3911
4202
|
// sinon-chai.not
|
3912
4203
|
/**
|
@@ -3915,80 +4206,80 @@ declare namespace Cypress {
|
|
3915
4206
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwithnew
|
3916
4207
|
* @see https://on.cypress.io/assertions
|
3917
4208
|
*/
|
3918
|
-
(chainer: 'not.be.always.calledWithNew'): Chainable<Subject>
|
4209
|
+
(chainer: 'not.be.always.calledWithNew' | 'not.always.have.been.calledWithNew'): Chainable<Subject>
|
3919
4210
|
/**
|
3920
4211
|
* Assert if spy was not always called with matching arguments (and possibly others).
|
3921
4212
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyalwayscalledwithmatcharg1-arg2-
|
3922
4213
|
* @see https://on.cypress.io/assertions
|
3923
4214
|
*/
|
3924
|
-
(chainer: 'not.be.always.calledWithMatch', ...args: any[]): Chainable<Subject>
|
4215
|
+
(chainer: 'not.be.always.calledWithMatch' | 'not.always.have.been.calledWithMatch', ...args: any[]): Chainable<Subject>
|
3925
4216
|
/**
|
3926
4217
|
* Assert spy not always returned the provided value.
|
3927
4218
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyalwaysreturnedobj
|
3928
4219
|
* @see https://on.cypress.io/assertions
|
3929
4220
|
*/
|
3930
|
-
(chainer: 'not.always.returned', value: any): Chainable<Subject>
|
4221
|
+
(chainer: 'not.always.returned' | 'not.have.always.returned', value: any): Chainable<Subject>
|
3931
4222
|
/**
|
3932
4223
|
* `true` if the spy was not called at least once
|
3933
4224
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalled
|
3934
4225
|
* @see https://on.cypress.io/assertions
|
3935
4226
|
*/
|
3936
|
-
(chainer: 'not.be.called'): Chainable<Subject>
|
4227
|
+
(chainer: 'not.be.called' | 'not.have.been.called'): Chainable<Subject>
|
3937
4228
|
/**
|
3938
4229
|
* Assert spy was not.called after `anotherSpy`
|
3939
4230
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledafteranotherspy
|
3940
4231
|
* @see https://on.cypress.io/assertions
|
3941
4232
|
*/
|
3942
|
-
(chainer: 'not.be.calledAfter', spy: sinon.SinonSpy): Chainable<Subject>
|
4233
|
+
(chainer: 'not.be.calledAfter' | 'not.have.been.calledAfter', spy: sinon.SinonSpy): Chainable<Subject>
|
3943
4234
|
/**
|
3944
4235
|
* Assert spy was not called before `anotherSpy`
|
3945
4236
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledbeforeanotherspy
|
3946
4237
|
* @see https://on.cypress.io/assertions
|
3947
4238
|
*/
|
3948
|
-
(chainer: 'not.be.calledBefore', spy: sinon.SinonSpy): Chainable<Subject>
|
4239
|
+
(chainer: 'not.be.calledBefore' | 'not.have.been.calledBefore', spy: sinon.SinonSpy): Chainable<Subject>
|
3949
4240
|
/**
|
3950
4241
|
* Assert spy was not called at least once with `obj` as `this`. `calledOn` also accepts a matcher (see [matchers](http://sinonjs.org/releases/v4.1.3/spies/#matchers)).
|
3951
4242
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledonobj
|
3952
4243
|
* @see https://on.cypress.io/assertions
|
3953
4244
|
*/
|
3954
|
-
(chainer: 'not.be.calledOn', context: any): Chainable<Subject>
|
4245
|
+
(chainer: 'not.be.calledOn' | 'not.have.been.calledOn', context: any): Chainable<Subject>
|
3955
4246
|
/**
|
3956
4247
|
* Assert spy was not called exactly once
|
3957
4248
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledonce
|
3958
4249
|
* @see https://on.cypress.io/assertions
|
3959
4250
|
*/
|
3960
|
-
(chainer: 'not.be.calledOnce'): Chainable<Subject>
|
4251
|
+
(chainer: 'not.be.calledOnce' | 'not.have.been.calledOnce'): Chainable<Subject>
|
3961
4252
|
/**
|
3962
4253
|
* Assert spy was not called exactly three times
|
3963
4254
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledthrice
|
3964
4255
|
* @see https://on.cypress.io/assertions
|
3965
4256
|
*/
|
3966
|
-
(chainer: 'not.be.calledThrice'): Chainable<Subject>
|
4257
|
+
(chainer: 'not.be.calledThrice' | 'not.have.been.calledThrice'): Chainable<Subject>
|
3967
4258
|
/**
|
3968
4259
|
* Assert spy was not called exactly twice
|
3969
4260
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledtwice
|
3970
4261
|
* @see https://on.cypress.io/assertions
|
3971
4262
|
*/
|
3972
|
-
(chainer: 'not.be.calledTwice'): Chainable<Subject>
|
4263
|
+
(chainer: 'not.be.calledTwice' | 'not.have.been.calledTwice'): Chainable<Subject>
|
3973
4264
|
/**
|
3974
4265
|
* Assert spy was not called at least once with the provided arguments and no others.
|
3975
4266
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwithexactlyarg1-arg2-
|
3976
4267
|
* @see https://on.cypress.io/assertions
|
3977
4268
|
*/
|
3978
|
-
(chainer: 'not.be.calledWithExactly', ...args: any[]): Chainable<Subject>
|
4269
|
+
(chainer: 'not.be.calledWithExactly' | 'not.have.been.calledWithExactly', ...args: any[]): Chainable<Subject>
|
3979
4270
|
/**
|
3980
4271
|
* Assert spy was not called with matching arguments (and possibly others).
|
3981
4272
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwithmatcharg1-arg2-
|
3982
4273
|
* @see https://on.cypress.io/assertions
|
3983
4274
|
*/
|
3984
|
-
(chainer: 'not.be.calledWithMatch', ...args: any[]): Chainable<Subject>
|
4275
|
+
(chainer: 'not.be.calledWithMatch' | 'not.have.been.calledWithMatch', ...args: any[]): Chainable<Subject>
|
3985
4276
|
/**
|
3986
4277
|
* Assert spy/stub was not called the `new` operator.
|
3987
4278
|
* 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.
|
3988
4279
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwithnew
|
3989
4280
|
* @see https://on.cypress.io/assertions
|
3990
4281
|
*/
|
3991
|
-
(chainer: 'not.be.calledWithNew'): Chainable<Subject>
|
4282
|
+
(chainer: 'not.be.calledWithNew' | 'not.have.been.calledWithNew'): Chainable<Subject>
|
3992
4283
|
/**
|
3993
4284
|
* Assert spy did not always throw an exception.
|
3994
4285
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyalwaysthrew
|
@@ -4012,7 +4303,61 @@ declare namespace Cypress {
|
|
4012
4303
|
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyreturnedobj
|
4013
4304
|
* @see https://on.cypress.io/assertions
|
4014
4305
|
*/
|
4015
|
-
(chainer: 'not.returned', value: any): Chainable<Subject>
|
4306
|
+
(chainer: 'not.returned' | 'not.have.returned', value: any): Chainable<Subject>
|
4307
|
+
/**
|
4308
|
+
* Assert spy was called before anotherSpy, and no spy calls occurred between spy and anotherSpy.
|
4309
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledimmediatelybeforeanotherspy
|
4310
|
+
* @see https://on.cypress.io/assertions
|
4311
|
+
*/
|
4312
|
+
(chainer: 'not.be.calledImmediatelyBefore' | 'not.have.been.calledImmediatelyBefore', anotherSpy: sinon.SinonSpy): Chainable<Subject>
|
4313
|
+
/**
|
4314
|
+
* Assert spy was called after anotherSpy, and no spy calls occurred between anotherSpy and spy.
|
4315
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledimmediatelyafteranotherspy
|
4316
|
+
* @see https://on.cypress.io/assertions
|
4317
|
+
*/
|
4318
|
+
(chainer: 'not.be.calledImmediatelyAfter' | 'not.have.been.calledImmediatelyAfter', anotherSpy: sinon.SinonSpy): Chainable<Subject>
|
4319
|
+
/**
|
4320
|
+
* Assert the spy was always called with obj as this
|
4321
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyalwayscalledonobj
|
4322
|
+
* @see https://on.cypress.io/assertions
|
4323
|
+
*/
|
4324
|
+
(chainer: 'not.be.always.calledOn' | 'not.always.have.been.calledOn', obj: any): Chainable<Subject>
|
4325
|
+
/**
|
4326
|
+
* Assert spy was called at least once with the provided arguments.
|
4327
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwitharg1-arg2-
|
4328
|
+
* @see https://on.cypress.io/assertions
|
4329
|
+
*/
|
4330
|
+
(chainer: 'not.be.calledWith' | 'not.have.been.calledWith', ...args: any[]): Chainable<Subject>
|
4331
|
+
/**
|
4332
|
+
* Assert spy was always called with the provided arguments (and possibly others).
|
4333
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyalwayscalledwitharg1-arg2-
|
4334
|
+
* @see https://on.cypress.io/assertions
|
4335
|
+
*/
|
4336
|
+
(chainer: 'not.be.always.calledWith' | 'not.always.have.been.calledWith', ...args: any[]): Chainable<Subject>
|
4337
|
+
/**
|
4338
|
+
* Assert spy was called at exactly once with the provided arguments.
|
4339
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spycalledwitharg1-arg2-
|
4340
|
+
* @see https://on.cypress.io/assertions
|
4341
|
+
*/
|
4342
|
+
(chainer: 'not.be.calledOnceWith' | 'not.have.been.calledOnceWith', ...args: any[]): Chainable<Subject>
|
4343
|
+
/**
|
4344
|
+
* Assert spy was always called with the exact provided arguments.
|
4345
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#spyalwayscalledwithexactlyarg1-arg2-
|
4346
|
+
* @see https://on.cypress.io/assertions
|
4347
|
+
*/
|
4348
|
+
(chainer: 'not.be.always.calledWithExactly' | 'not.have.been.calledWithExactly', ...args: any[]): Chainable<Subject>
|
4349
|
+
/**
|
4350
|
+
* Assert spy was called at exactly once with the provided arguments.
|
4351
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#
|
4352
|
+
* @see https://on.cypress.io/assertions
|
4353
|
+
*/
|
4354
|
+
(chainer: 'not.be.calledOnceWithExactly' | 'not.have.been.calledOnceWithExactly', ...args: any[]): Chainable<Subject>
|
4355
|
+
/**
|
4356
|
+
* Assert spy always returned the provided value.
|
4357
|
+
* @see http://sinonjs.org/releases/v4.1.3/spies/#
|
4358
|
+
* @see https://on.cypress.io/assertions
|
4359
|
+
*/
|
4360
|
+
(chainer: 'not.have.always.returned', obj: any): Chainable<Subject>
|
4016
4361
|
|
4017
4362
|
// jquery-chai
|
4018
4363
|
/**
|
@@ -4738,10 +5083,22 @@ declare namespace Cypress {
|
|
4738
5083
|
* Move the clock the specified number of `milliseconds`.
|
4739
5084
|
* Any timers within the affected range of time will be called.
|
4740
5085
|
* @param time Number in ms to advance the clock
|
5086
|
+
* @see https://on.cypress.io/tick
|
4741
5087
|
*/
|
4742
5088
|
tick(time: number): void
|
4743
5089
|
/**
|
4744
|
-
* Restore all overridden native functions.
|
5090
|
+
* Restore all overridden native functions.
|
5091
|
+
* This is automatically called between tests, so should not generally be needed.
|
5092
|
+
* @see https://on.cypress.io/clock
|
5093
|
+
* @example
|
5094
|
+
* cy.clock()
|
5095
|
+
* cy.visit('/')
|
5096
|
+
* ...
|
5097
|
+
* cy.clock().then(clock => {
|
5098
|
+
* clock.restore()
|
5099
|
+
* })
|
5100
|
+
* // or use this shortcut
|
5101
|
+
* cy.clock().invoke('restore')
|
4745
5102
|
*/
|
4746
5103
|
restore(): void
|
4747
5104
|
}
|
@@ -4753,7 +5110,7 @@ declare namespace Cypress {
|
|
4753
5110
|
domain: string
|
4754
5111
|
httpOnly: boolean
|
4755
5112
|
secure: boolean
|
4756
|
-
expiry?:
|
5113
|
+
expiry?: number
|
4757
5114
|
sameSite?: SameSiteStatus
|
4758
5115
|
}
|
4759
5116
|
|