cypress 3.3.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +3 -0
- package/lib/errors.js +36 -35
- package/lib/exec/spawn.js +9 -4
- package/lib/exec/xvfb.js +4 -4
- package/lib/tasks/download.js +124 -15
- package/lib/tasks/install.js +10 -3
- package/lib/tasks/verify.js +19 -7
- package/lib/util.js +95 -15
- package/package.json +16 -17
- package/types/blob-util/package.json +51 -0
- package/types/bluebird/package.json +51 -0
- package/types/chai/package.json +81 -0
- package/types/chai-jquery/package.json +55 -0
- package/types/cy-chai.d.ts +5 -7
- package/types/index.d.ts +231 -13
- package/types/jquery/package.json +132 -0
- package/types/lodash/package.json +85 -0
- package/types/minimatch/package.json +56 -0
- package/types/mocha/README.md +5 -5
- package/types/mocha/index.d.ts +2986 -241
- package/types/mocha/package.json +73 -0
- package/types/sinon/package.json +88 -0
- package/types/sinon-chai/index.d.ts +1 -1
- package/types/sinon-chai/package.json +63 -0
package/types/index.d.ts
CHANGED
@@ -327,6 +327,12 @@ declare namespace Cypress {
|
|
327
327
|
*/
|
328
328
|
on: Actions
|
329
329
|
|
330
|
+
/**
|
331
|
+
* These events come from Cypress as it issues commands and reacts to their state. These are all useful to listen to for debugging purposes.
|
332
|
+
* @see https://on.cypress.io/catalog-of-events#App-Events
|
333
|
+
*/
|
334
|
+
once: Actions
|
335
|
+
|
330
336
|
/**
|
331
337
|
* These events come from Cypress as it issues commands and reacts to their state. These are all useful to listen to for debugging purposes.
|
332
338
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
@@ -573,8 +579,10 @@ declare namespace Cypress {
|
|
573
579
|
* cy.contains(/^b\w+/)
|
574
580
|
* // yields <ul>...</ul>
|
575
581
|
* cy.contains('ul', 'apples')
|
582
|
+
* // tries to find the given text for up to 1 second
|
583
|
+
* cy.contains('my text to find', {timeout: 1000})
|
576
584
|
*/
|
577
|
-
contains(content: string | number | RegExp): Chainable<Subject>
|
585
|
+
contains(content: string | number | RegExp, options?: Partial<Loggable & Timeoutable>): Chainable<Subject>
|
578
586
|
/**
|
579
587
|
* Get the child DOM element that contains given text.
|
580
588
|
*
|
@@ -750,7 +758,7 @@ declare namespace Cypress {
|
|
750
758
|
* cy.get('input').should('be.disabled')
|
751
759
|
* cy.get('button').should('be.visible')
|
752
760
|
*/
|
753
|
-
get<K extends keyof HTMLElementTagNameMap>(selector: K, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<HTMLElementTagNameMap[K]>>
|
761
|
+
get<K extends keyof HTMLElementTagNameMap>(selector: K, options?: Partial<Loggable & Timeoutable & Withinable>): Chainable<JQuery<HTMLElementTagNameMap[K]>>
|
754
762
|
/**
|
755
763
|
* Get one or more DOM elements by selector.
|
756
764
|
* The querying behavior of this command matches exactly how $(…) works in jQuery.
|
@@ -760,7 +768,7 @@ declare namespace Cypress {
|
|
760
768
|
* cy.get('ul li:first').should('have.class', 'active')
|
761
769
|
* cy.get('.dropdown-menu').click()
|
762
770
|
*/
|
763
|
-
get<E extends Node = HTMLElement>(selector: string, options?: Partial<Loggable & Timeoutable>): Chainable<JQuery<E>>
|
771
|
+
get<E extends Node = HTMLElement>(selector: string, options?: Partial<Loggable & Timeoutable & Withinable>): Chainable<JQuery<E>>
|
764
772
|
/**
|
765
773
|
* Get one or more DOM elements by alias.
|
766
774
|
* @see https://on.cypress.io/get#Alias
|
@@ -771,7 +779,7 @@ declare namespace Cypress {
|
|
771
779
|
* //later retrieve the todos
|
772
780
|
* cy.get('@todos')
|
773
781
|
*/
|
774
|
-
get<S = any>(alias: string, options?: Partial<Loggable & Timeoutable>): Chainable<S>
|
782
|
+
get<S = any>(alias: string, options?: Partial<Loggable & Timeoutable & Withinable>): Chainable<S>
|
775
783
|
|
776
784
|
/**
|
777
785
|
* Get a browser cookie by its name.
|
@@ -846,6 +854,8 @@ declare namespace Cypress {
|
|
846
854
|
* @example
|
847
855
|
* cy.location('host') // Get the host of the location object
|
848
856
|
* cy.location('port') // Get the port of the location object
|
857
|
+
* // Assert on the href of the location
|
858
|
+
* cy.location('href').should('contain', '/tag/tutorials')
|
849
859
|
*/
|
850
860
|
location(key: string, options?: Partial<Loggable & Timeoutable>): Chainable<Location>
|
851
861
|
|
@@ -930,6 +940,12 @@ declare namespace Cypress {
|
|
930
940
|
*/
|
931
941
|
on: Actions
|
932
942
|
|
943
|
+
/**
|
944
|
+
* These events come from Cypress as it issues commands and reacts to their state. These are all useful to listen to for debugging purposes.
|
945
|
+
* @see https://on.cypress.io/catalog-of-events#App-Events
|
946
|
+
*/
|
947
|
+
once: Actions
|
948
|
+
|
933
949
|
/**
|
934
950
|
* These events come from Cypress as it issues commands and reacts to their state. These are all useful to listen to for debugging purposes.
|
935
951
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
@@ -1276,6 +1292,9 @@ declare namespace Cypress {
|
|
1276
1292
|
* Create an assertion. Assertions are automatically retried until they pass or time out.
|
1277
1293
|
*
|
1278
1294
|
* @see https://on.cypress.io/should
|
1295
|
+
* @example
|
1296
|
+
* // Assert on the href of the location
|
1297
|
+
* cy.location('href').should('contain', '/tag/tutorials/')
|
1279
1298
|
*/
|
1280
1299
|
should: Chainer<Subject>
|
1281
1300
|
|
@@ -1776,16 +1795,33 @@ declare namespace Cypress {
|
|
1776
1795
|
})
|
1777
1796
|
```
|
1778
1797
|
*/
|
1779
|
-
writeFile<C extends FileContents>(filePath: string, contents: C,
|
1798
|
+
writeFile<C extends FileContents>(filePath: string, contents: C, encoding: Encodings): Chainable<C>
|
1780
1799
|
/**
|
1781
1800
|
* Write to a file with the specified encoding and contents.
|
1782
1801
|
*
|
1783
1802
|
* @see https://on.cypress.io/writefile
|
1803
|
+
```
|
1804
|
+
cy.writeFile('path/to/ascii.txt', 'Hello World', {
|
1805
|
+
flag: 'a+',
|
1806
|
+
encoding: 'ascii'
|
1807
|
+
}).then((text) => {
|
1808
|
+
expect(text).to.equal('Hello World') // true
|
1809
|
+
})
|
1810
|
+
```
|
1811
|
+
*/
|
1812
|
+
writeFile<C extends FileContents>(filePath: string, contents: C, options?: Partial<WriteFileOptions>): Chainable<C>
|
1813
|
+
|
1814
|
+
/**
|
1815
|
+
* jQuery library bound to the AUT
|
1816
|
+
*
|
1817
|
+
* @see https://on.cypress.io/$
|
1818
|
+
* @example
|
1819
|
+
* cy.$$('p')
|
1784
1820
|
*/
|
1785
|
-
|
1821
|
+
$$: JQueryStatic
|
1786
1822
|
}
|
1787
1823
|
|
1788
|
-
interface
|
1824
|
+
interface SinonSpyAgent<A extends sinon.SinonSpy> {
|
1789
1825
|
log(shouldOutput?: boolean): Omit<A, 'withArgs'> & Agent<A>
|
1790
1826
|
|
1791
1827
|
/**
|
@@ -1809,6 +1845,8 @@ declare namespace Cypress {
|
|
1809
1845
|
withArgs(...args: any[]): Omit<A, 'withArgs'> & Agent<A>
|
1810
1846
|
}
|
1811
1847
|
|
1848
|
+
type Agent<T extends sinon.SinonSpy> = SinonSpyAgent<T> & T
|
1849
|
+
|
1812
1850
|
interface CookieDefaults {
|
1813
1851
|
whitelist: string | string[] | RegExp | ((cookie: any) => boolean)
|
1814
1852
|
}
|
@@ -1836,6 +1874,20 @@ declare namespace Cypress {
|
|
1836
1874
|
retryOnNetworkFailure: boolean
|
1837
1875
|
}
|
1838
1876
|
|
1877
|
+
/**
|
1878
|
+
* Options that control how a command behaves in the `within` scope.
|
1879
|
+
* These options will determine how nodes are selected.
|
1880
|
+
*/
|
1881
|
+
|
1882
|
+
interface Withinable {
|
1883
|
+
/**
|
1884
|
+
* Element to search for children in. If null, search begins from root-level DOM element.
|
1885
|
+
*
|
1886
|
+
* @default depends on context, null if outside of within wrapper
|
1887
|
+
*/
|
1888
|
+
withinSubject: JQuery | HTMLElement | null
|
1889
|
+
}
|
1890
|
+
|
1839
1891
|
/**
|
1840
1892
|
* Options that control how a command is logged in the Reporter
|
1841
1893
|
*/
|
@@ -2177,6 +2229,9 @@ declare namespace Cypress {
|
|
2177
2229
|
force404: boolean
|
2178
2230
|
urlMatchingOptions: object
|
2179
2231
|
whitelist(xhr: Request): void
|
2232
|
+
onAnyRequest(route: RouteOptions, proxy: any): void
|
2233
|
+
onAnyResponse(route: RouteOptions, proxy: any): void
|
2234
|
+
onAnyAbort(route: RouteOptions, proxy: any): void
|
2180
2235
|
}
|
2181
2236
|
|
2182
2237
|
interface SetCookieOptions extends Loggable, Timeoutable {
|
@@ -2199,6 +2254,13 @@ declare namespace Cypress {
|
|
2199
2254
|
* @default 10
|
2200
2255
|
*/
|
2201
2256
|
delay: number
|
2257
|
+
/**
|
2258
|
+
* Parse special characters for strings surrounded by `{}`,
|
2259
|
+
* such as `{esc}`. Set to `false` to type the literal characters instead
|
2260
|
+
*
|
2261
|
+
* @default true
|
2262
|
+
*/
|
2263
|
+
parseSpecialCharSequences: boolean
|
2202
2264
|
/**
|
2203
2265
|
* Forces the action, disables waiting for actionability
|
2204
2266
|
*
|
@@ -2307,6 +2369,12 @@ declare namespace Cypress {
|
|
2307
2369
|
cancelable: boolean
|
2308
2370
|
}
|
2309
2371
|
|
2372
|
+
/** Options to change the default behavior of .writeFile */
|
2373
|
+
interface WriteFileOptions extends Loggable {
|
2374
|
+
flag: string
|
2375
|
+
encoding: Encodings
|
2376
|
+
}
|
2377
|
+
|
2310
2378
|
// Kind of onerous, but has a nice auto-complete. Also fallbacks at the end for custom stuff
|
2311
2379
|
/**
|
2312
2380
|
* @see https://on.cypress.io/should
|
@@ -3593,6 +3661,22 @@ declare namespace Cypress {
|
|
3593
3661
|
* @see https://on.cypress.io/assertions
|
3594
3662
|
*/
|
3595
3663
|
(chainer: 'contain', value: string): Chainable<Subject>
|
3664
|
+
/**
|
3665
|
+
* Assert that at least one element of the selection is focused.
|
3666
|
+
* @example
|
3667
|
+
* cy.get('#result').should('have.focus')
|
3668
|
+
* cy.get('#result').should('be.focused')
|
3669
|
+
* @see https://on.cypress.io/assertions
|
3670
|
+
*/
|
3671
|
+
(chainer: 'have.focus'): Chainable<Subject>
|
3672
|
+
/**
|
3673
|
+
* Assert that at least one element of the selection is focused.
|
3674
|
+
* @example
|
3675
|
+
* cy.get('#result').should('be.focused')
|
3676
|
+
* cy.get('#result').should('have.focus')
|
3677
|
+
* @see https://on.cypress.io/assertions
|
3678
|
+
*/
|
3679
|
+
(chainer: 'be.focused'): Chainable<Subject>
|
3596
3680
|
/**
|
3597
3681
|
* Assert that the selection is not empty. Note that this overrides the built-in chai assertion. If the object asserted against is not a jQuery object, the original implementation will be called.
|
3598
3682
|
* @example
|
@@ -3650,6 +3734,22 @@ declare namespace Cypress {
|
|
3650
3734
|
* @see https://on.cypress.io/assertions
|
3651
3735
|
*/
|
3652
3736
|
(chainer: 'have.html', value: string): Chainable<Subject>
|
3737
|
+
/**
|
3738
|
+
* Assert that the html of the first element of the selection partially contains the given html, using `.html()`.
|
3739
|
+
* @example
|
3740
|
+
* cy.get('#result').should('contain.html', '<em>John Doe</em>')
|
3741
|
+
* @see http://chaijs.com/plugins/chai-jquery/#htmlhtml
|
3742
|
+
* @see https://on.cypress.io/assertions
|
3743
|
+
*/
|
3744
|
+
(chainer: 'contain.html', value: string): Chainable<Subject>
|
3745
|
+
/**
|
3746
|
+
* Assert that the html of the first element of the selection partially contains the given html, using `.html()`.
|
3747
|
+
* @example
|
3748
|
+
* cy.get('#result').should('include.html', '<em>John Doe</em>')
|
3749
|
+
* @see http://chaijs.com/plugins/chai-jquery/#htmlhtml
|
3750
|
+
* @see https://on.cypress.io/assertions
|
3751
|
+
*/
|
3752
|
+
(chainer: 'include.html', value: string): Chainable<Subject>
|
3653
3753
|
/**
|
3654
3754
|
* Assert that the first element of the selection has the given id, using `.attr('id')`.
|
3655
3755
|
* @example
|
@@ -3675,6 +3775,22 @@ declare namespace Cypress {
|
|
3675
3775
|
* @see https://on.cypress.io/assertions
|
3676
3776
|
*/
|
3677
3777
|
(chainer: 'have.text', value: string): Chainable<Subject>
|
3778
|
+
/**
|
3779
|
+
* Assert that the text of the first element of the selection partially contains the given text, using `.text()`.
|
3780
|
+
* @example
|
3781
|
+
* cy.get('#result').should('contain.text', 'John Doe')
|
3782
|
+
* @see http://chaijs.com/plugins/chai-jquery/#texttext
|
3783
|
+
* @see https://on.cypress.io/assertions
|
3784
|
+
*/
|
3785
|
+
(chainer: 'contain.text', value: string): Chainable<Subject>
|
3786
|
+
/**
|
3787
|
+
* Assert that the text of the first element of the selection partially contains the given text, using `.text()`.
|
3788
|
+
* @example
|
3789
|
+
* cy.get('#result').should('include.text', 'John Doe')
|
3790
|
+
* @see http://chaijs.com/plugins/chai-jquery/#texttext
|
3791
|
+
* @see https://on.cypress.io/assertions
|
3792
|
+
*/
|
3793
|
+
(chainer: 'include.text', value: string): Chainable<Subject>
|
3678
3794
|
/**
|
3679
3795
|
* Assert that the first element of the selection has the given value, using `.val()`.
|
3680
3796
|
* @example
|
@@ -3683,6 +3799,22 @@ declare namespace Cypress {
|
|
3683
3799
|
* @see https://on.cypress.io/assertions
|
3684
3800
|
*/
|
3685
3801
|
(chainer: 'have.value', value: string): Chainable<Subject>
|
3802
|
+
/**
|
3803
|
+
* Assert that the first element of the selection partially contains the given value, using `.val()`.
|
3804
|
+
* @example
|
3805
|
+
* cy.get('textarea').should('contain.value', 'foo bar baz')
|
3806
|
+
* @see http://chaijs.com/plugins/chai-jquery/#valuevalue
|
3807
|
+
* @see https://on.cypress.io/assertions
|
3808
|
+
*/
|
3809
|
+
(chainer: 'contain.value', value: string): Chainable<Subject>
|
3810
|
+
/**
|
3811
|
+
* Assert that the first element of the selection partially contains the given value, using `.val()`.
|
3812
|
+
* @example
|
3813
|
+
* cy.get('textarea').should('include.value', 'foo bar baz')
|
3814
|
+
* @see http://chaijs.com/plugins/chai-jquery/#valuevalue
|
3815
|
+
* @see https://on.cypress.io/assertions
|
3816
|
+
*/
|
3817
|
+
(chainer: 'include.value', value: string): Chainable<Subject>
|
3686
3818
|
/**
|
3687
3819
|
* Assert that the selection matches a given selector, using `.is()`. Note that this overrides the built-in chai assertion. If the object asserted against is not a jQuery object, the original implementation will be called.
|
3688
3820
|
* @example
|
@@ -3749,6 +3881,22 @@ declare namespace Cypress {
|
|
3749
3881
|
* @see https://on.cypress.io/assertions
|
3750
3882
|
*/
|
3751
3883
|
(chainer: 'not.be.visible'): Chainable<Subject>
|
3884
|
+
/**
|
3885
|
+
* Assert that no element of the selection is focused.
|
3886
|
+
* @example
|
3887
|
+
* cy.get('#result').should('not.have.focus')
|
3888
|
+
* cy.get('#result').should('not.be.focused')
|
3889
|
+
* @see https://on.cypress.io/assertions
|
3890
|
+
*/
|
3891
|
+
(chainer: 'not.have.focus'): Chainable<Subject>
|
3892
|
+
/**
|
3893
|
+
* Assert that no element of the selection is focused.
|
3894
|
+
* @example
|
3895
|
+
* cy.get('#result').should('not.be.focused')
|
3896
|
+
* cy.get('#result').should('not.have.focus')
|
3897
|
+
* @see https://on.cypress.io/assertions
|
3898
|
+
*/
|
3899
|
+
(chainer: 'not.be.focused'): Chainable<Subject>
|
3752
3900
|
/**
|
3753
3901
|
* Assert that the selection does not contain the given text, using `:contains()`. If the object asserted against is not a jQuery object, or if `contain` is not called as a function, the original implementation will be called.
|
3754
3902
|
* @example
|
@@ -3814,6 +3962,22 @@ declare namespace Cypress {
|
|
3814
3962
|
* @see https://on.cypress.io/assertions
|
3815
3963
|
*/
|
3816
3964
|
(chainer: 'not.have.html', value: string): Chainable<Subject>
|
3965
|
+
/**
|
3966
|
+
* Assert that the html of the first element of the selection does not contain the given html, using `.html()`.
|
3967
|
+
* @example
|
3968
|
+
* cy.get('#result').should('not.contain.html', '<em>John Doe</em>')
|
3969
|
+
* @see http://chaijs.com/plugins/chai-jquery/#htmlhtml
|
3970
|
+
* @see https://on.cypress.io/assertions
|
3971
|
+
*/
|
3972
|
+
(chainer: 'not.contain.html', value: string): Chainable<Subject>
|
3973
|
+
/**
|
3974
|
+
* Assert that the html of the first element of the selection does not contain the given html, using `.html()`.
|
3975
|
+
* @example
|
3976
|
+
* cy.get('#result').should('not.include.html', '<em>John Doe</em>')
|
3977
|
+
* @see http://chaijs.com/plugins/chai-jquery/#htmlhtml
|
3978
|
+
* @see https://on.cypress.io/assertions
|
3979
|
+
*/
|
3980
|
+
(chainer: 'not.include.html', value: string): Chainable<Subject>
|
3817
3981
|
/**
|
3818
3982
|
* Assert that the first element of the selection does not have the given id, using `.attr('id')`.
|
3819
3983
|
* @example
|
@@ -3839,6 +4003,22 @@ declare namespace Cypress {
|
|
3839
4003
|
* @see https://on.cypress.io/assertions
|
3840
4004
|
*/
|
3841
4005
|
(chainer: 'not.have.text', value: string): Chainable<Subject>
|
4006
|
+
/**
|
4007
|
+
* Assert that the text of the first element of the selection does not contain the given text, using `.text()`.
|
4008
|
+
* @example
|
4009
|
+
* cy.get('#result').should('not.contain.text', 'John Doe')
|
4010
|
+
* @see http://chaijs.com/plugins/chai-jquery/#texttext
|
4011
|
+
* @see https://on.cypress.io/assertions
|
4012
|
+
*/
|
4013
|
+
(chainer: 'not.contain.text', value: string): Chainable<Subject>
|
4014
|
+
/**
|
4015
|
+
* Assert that the text of the first element of the selection does not contain the given text, using `.text()`.
|
4016
|
+
* @example
|
4017
|
+
* cy.get('#result').should('not.include.text', 'John Doe')
|
4018
|
+
* @see http://chaijs.com/plugins/chai-jquery/#texttext
|
4019
|
+
* @see https://on.cypress.io/assertions
|
4020
|
+
*/
|
4021
|
+
(chainer: 'not.include.text', value: string): Chainable<Subject>
|
3842
4022
|
/**
|
3843
4023
|
* Assert that the first element of the selection does not have the given value, using `.val()`.
|
3844
4024
|
* @example
|
@@ -3847,6 +4027,22 @@ declare namespace Cypress {
|
|
3847
4027
|
* @see https://on.cypress.io/assertions
|
3848
4028
|
*/
|
3849
4029
|
(chainer: 'not.have.value', value: string): Chainable<Subject>
|
4030
|
+
/**
|
4031
|
+
* Assert that the first element of the selection does not contain the given value, using `.val()`.
|
4032
|
+
* @example
|
4033
|
+
* cy.get('textarea').should('not.contain.value', 'foo bar baz')
|
4034
|
+
* @see http://chaijs.com/plugins/chai-jquery/#valuevalue
|
4035
|
+
* @see https://on.cypress.io/assertions
|
4036
|
+
*/
|
4037
|
+
(chainer: 'not.contain.value', value: string): Chainable<Subject>
|
4038
|
+
/**
|
4039
|
+
* Assert that the first element of the selection does not contain the given value, using `.val()`.
|
4040
|
+
* @example
|
4041
|
+
* cy.get('textarea').should('not.include.value', 'foo bar baz')
|
4042
|
+
* @see http://chaijs.com/plugins/chai-jquery/#valuevalue
|
4043
|
+
* @see https://on.cypress.io/assertions
|
4044
|
+
*/
|
4045
|
+
(chainer: 'not.include.value', value: string): Chainable<Subject>
|
3850
4046
|
/**
|
3851
4047
|
* Assert that the selection does not match a given selector, using `.is()`. Note that this overrides the built-in chai assertion. If the object asserted against is not a jQuery object, the original implementation will be called.
|
3852
4048
|
* @example
|
@@ -3936,7 +4132,7 @@ declare namespace Cypress {
|
|
3936
4132
|
(action: 'uncaught:exception', fn: (error: Error, runnable: Mocha.IRunnable) => false | void): void
|
3937
4133
|
/**
|
3938
4134
|
* Fires when your app calls the global `window.confirm()` method.
|
3939
|
-
* Cypress will auto accept confirmations. Return `false` from this event and the confirmation will be
|
4135
|
+
* Cypress will auto accept confirmations. Return `false` from this event and the confirmation will be canceled.
|
3940
4136
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
3941
4137
|
* @example
|
3942
4138
|
```
|
@@ -3946,7 +4142,7 @@ declare namespace Cypress {
|
|
3946
4142
|
})
|
3947
4143
|
```
|
3948
4144
|
*/
|
3949
|
-
(action: 'window:confirm', fn: ((text: string) => false | void) |
|
4145
|
+
(action: 'window:confirm', fn: ((text: string) => false | void) | SinonSpyAgent<sinon.SinonSpy> | SinonSpyAgent<sinon.SinonStub>): void
|
3950
4146
|
/**
|
3951
4147
|
* Fires when your app calls the global `window.alert()` method.
|
3952
4148
|
* Cypress will auto accept alerts. You cannot change this behavior.
|
@@ -3963,7 +4159,7 @@ declare namespace Cypress {
|
|
3963
4159
|
```
|
3964
4160
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
3965
4161
|
*/
|
3966
|
-
(action: 'window:alert', fn: ((text: string) => void) |
|
4162
|
+
(action: 'window:alert', fn: ((text: string) => void) | SinonSpyAgent<sinon.SinonSpy> | SinonSpyAgent<sinon.SinonStub>): void
|
3967
4163
|
/**
|
3968
4164
|
* Fires as the page begins to load, but before any of your applications JavaScript has executed. This fires at the exact same time as `cy.visit()` `onBeforeLoad` callback. Useful to modify the window on a page transition.
|
3969
4165
|
* @see https://on.cypress.io/catalog-of-events#App-Events
|
@@ -4177,22 +4373,44 @@ declare namespace Cypress {
|
|
4177
4373
|
// Diff taken from https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-311923766
|
4178
4374
|
type Diff<T extends string, U extends string> = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]
|
4179
4375
|
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
|
4376
|
+
|
4377
|
+
/**
|
4378
|
+
* Public interface for the global "cy" object. If you want to add
|
4379
|
+
* a custom property to this object, you should extend this interface.
|
4380
|
+
* @see https://on.cypress.io/typescript#Types-for-custom-commands
|
4381
|
+
*
|
4382
|
+
```
|
4383
|
+
// in your TS file
|
4384
|
+
declare namespace Cypress {
|
4385
|
+
interface cy {
|
4386
|
+
// declare additional properties on "cy" object, like
|
4387
|
+
// label: string
|
4388
|
+
}
|
4389
|
+
interface Chainable {
|
4390
|
+
// declare additional custom commands as methods, like
|
4391
|
+
// login(username: string, password: string)
|
4392
|
+
}
|
4393
|
+
}
|
4394
|
+
```
|
4395
|
+
*/
|
4396
|
+
interface cy extends Chainable<undefined> {}
|
4180
4397
|
}
|
4181
4398
|
|
4182
4399
|
/**
|
4183
4400
|
* Global variables `cy` added by Cypress with all API commands.
|
4184
4401
|
* @see https://on.cypress.io/api
|
4185
|
-
*
|
4402
|
+
*
|
4186
4403
|
```
|
4187
4404
|
cy.get('button').click()
|
4188
4405
|
cy.get('.result').contains('Expected text')
|
4189
4406
|
```
|
4190
4407
|
*/
|
4191
|
-
declare const cy: Cypress.
|
4408
|
+
declare const cy: Cypress.cy
|
4409
|
+
|
4192
4410
|
/**
|
4193
4411
|
* Global variable `Cypress` holds common utilities and constants.
|
4194
4412
|
* @see https://on.cypress.io/api
|
4195
|
-
*
|
4413
|
+
*
|
4196
4414
|
```
|
4197
4415
|
Cypress.config("pageLoadTimeout") // => 60000
|
4198
4416
|
Cypress.version // => "1.4.0"
|
@@ -0,0 +1,132 @@
|
|
1
|
+
{
|
2
|
+
"_from": "@types/jquery@3.3.6",
|
3
|
+
"_id": "@types/jquery@3.3.6",
|
4
|
+
"_inBundle": false,
|
5
|
+
"_integrity": "sha512-403D4wN95Mtzt2EoQHARf5oe/jEPhzBOBNrunk+ydQGW8WmkQ/E8rViRAEB1qEt/vssfGfNVD6ujP4FVeegrLg==",
|
6
|
+
"_location": "/@types/jquery",
|
7
|
+
"_phantomChildren": {},
|
8
|
+
"_requested": {
|
9
|
+
"type": "version",
|
10
|
+
"registry": true,
|
11
|
+
"raw": "@types/jquery@3.3.6",
|
12
|
+
"name": "@types/jquery",
|
13
|
+
"escapedName": "@types%2fjquery",
|
14
|
+
"scope": "@types",
|
15
|
+
"rawSpec": "3.3.6",
|
16
|
+
"saveSpec": null,
|
17
|
+
"fetchSpec": "3.3.6"
|
18
|
+
},
|
19
|
+
"_requiredBy": [
|
20
|
+
"#DEV:/",
|
21
|
+
"/@types/chai-jquery"
|
22
|
+
],
|
23
|
+
"_resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.3.6.tgz",
|
24
|
+
"_shasum": "5932ead926307ca21e5b36808257f7c926b06565",
|
25
|
+
"_spec": "@types/jquery@3.3.6",
|
26
|
+
"_where": "/root/cypress/cli",
|
27
|
+
"bugs": {
|
28
|
+
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
29
|
+
},
|
30
|
+
"bundleDependencies": false,
|
31
|
+
"contributors": [
|
32
|
+
{
|
33
|
+
"name": "Leonard Thieu",
|
34
|
+
"url": "https://github.com/leonard-thieu"
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"name": "Boris Yankov",
|
38
|
+
"url": "https://github.com/borisyankov"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"name": "Christian Hoffmeister",
|
42
|
+
"url": "https://github.com/choffmeister"
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"name": "Steve Fenton",
|
46
|
+
"url": "https://github.com/Steve-Fenton"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"name": "Diullei Gomes",
|
50
|
+
"url": "https://github.com/Diullei"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"name": "Tass Iliopoulos",
|
54
|
+
"url": "https://github.com/tasoili"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"name": "Jason Swearingen",
|
58
|
+
"url": "https://github.com/jasons-novaleaf"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"name": "Sean Hill",
|
62
|
+
"url": "https://github.com/seanski"
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"name": "Guus Goossens",
|
66
|
+
"url": "https://github.com/Guuz"
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"name": "Kelly Summerlin",
|
70
|
+
"url": "https://github.com/ksummerlin"
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"name": "Basarat Ali Syed",
|
74
|
+
"url": "https://github.com/basarat"
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"name": "Nicholas Wolverson",
|
78
|
+
"url": "https://github.com/nwolverson"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"name": "Derek Cicerone",
|
82
|
+
"url": "https://github.com/derekcicerone"
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"name": "Andrew Gaspar",
|
86
|
+
"url": "https://github.com/AndrewGaspar"
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"name": "Seikichi Kondo",
|
90
|
+
"url": "https://github.com/seikichi"
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"name": "Benjamin Jackman",
|
94
|
+
"url": "https://github.com/benjaminjackman"
|
95
|
+
},
|
96
|
+
{
|
97
|
+
"name": "Poul Sorensen",
|
98
|
+
"url": "https://github.com/s093294"
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"name": "Josh Strobl",
|
102
|
+
"url": "https://github.com/JoshStrobl"
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"name": "John Reilly",
|
106
|
+
"url": "https://github.com/johnnyreilly"
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"name": "Dick van den Brink",
|
110
|
+
"url": "https://github.com/DickvdBrink"
|
111
|
+
},
|
112
|
+
{
|
113
|
+
"name": "Thomas Schulz",
|
114
|
+
"url": "https://github.com/King2500"
|
115
|
+
}
|
116
|
+
],
|
117
|
+
"dependencies": {},
|
118
|
+
"deprecated": false,
|
119
|
+
"description": "TypeScript definitions for jquery",
|
120
|
+
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
121
|
+
"license": "MIT",
|
122
|
+
"main": "",
|
123
|
+
"name": "@types/jquery",
|
124
|
+
"repository": {
|
125
|
+
"type": "git",
|
126
|
+
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git"
|
127
|
+
},
|
128
|
+
"scripts": {},
|
129
|
+
"typeScriptVersion": "2.3",
|
130
|
+
"typesPublisherContentHash": "fa29764f6d6313daa1dc8e6af76539a12100e3d6e08c92956259f69d2792bb69",
|
131
|
+
"version": "3.3.6"
|
132
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
{
|
2
|
+
"_from": "@types/lodash@4.14.122",
|
3
|
+
"_id": "@types/lodash@4.14.122",
|
4
|
+
"_inBundle": false,
|
5
|
+
"_integrity": "sha512-9IdED8wU93ty8gP06ninox+42SBSJHp2IAamsSYMUY76mshRTeUsid/gtbl8ovnOwy8im41ib4cxTiIYMXGKew==",
|
6
|
+
"_location": "/@types/lodash",
|
7
|
+
"_phantomChildren": {},
|
8
|
+
"_requested": {
|
9
|
+
"type": "version",
|
10
|
+
"registry": true,
|
11
|
+
"raw": "@types/lodash@4.14.122",
|
12
|
+
"name": "@types/lodash",
|
13
|
+
"escapedName": "@types%2flodash",
|
14
|
+
"scope": "@types",
|
15
|
+
"rawSpec": "4.14.122",
|
16
|
+
"saveSpec": null,
|
17
|
+
"fetchSpec": "4.14.122"
|
18
|
+
},
|
19
|
+
"_requiredBy": [
|
20
|
+
"#DEV:/"
|
21
|
+
],
|
22
|
+
"_resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.122.tgz",
|
23
|
+
"_shasum": "3e31394c38cf1e5949fb54c1192cbc406f152c6c",
|
24
|
+
"_spec": "@types/lodash@4.14.122",
|
25
|
+
"_where": "/root/cypress/cli",
|
26
|
+
"bugs": {
|
27
|
+
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
28
|
+
},
|
29
|
+
"bundleDependencies": false,
|
30
|
+
"contributors": [
|
31
|
+
{
|
32
|
+
"name": "Brian Zengel",
|
33
|
+
"url": "https://github.com/bczengel"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"name": "Ilya Mochalov",
|
37
|
+
"url": "https://github.com/chrootsu"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"name": "Stepan Mikhaylyuk",
|
41
|
+
"url": "https://github.com/stepancar"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"name": "AJ Richardson",
|
45
|
+
"url": "https://github.com/aj-r"
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"name": "Junyoung Clare Jang",
|
49
|
+
"url": "https://github.com/ailrun"
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"name": "e-cloud",
|
53
|
+
"url": "https://github.com/e-cloud"
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"name": "Georgii Dolzhykov",
|
57
|
+
"url": "https://github.com/thorn0"
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"name": "Jack Moore",
|
61
|
+
"url": "https://github.com/jtmthf"
|
62
|
+
},
|
63
|
+
{
|
64
|
+
"name": "Dominique Rau",
|
65
|
+
"url": "https://github.com/DomiR"
|
66
|
+
}
|
67
|
+
],
|
68
|
+
"dependencies": {},
|
69
|
+
"deprecated": false,
|
70
|
+
"description": "TypeScript definitions for Lo-Dash",
|
71
|
+
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
72
|
+
"license": "MIT",
|
73
|
+
"main": "",
|
74
|
+
"name": "@types/lodash",
|
75
|
+
"repository": {
|
76
|
+
"type": "git",
|
77
|
+
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
78
|
+
"directory": "types/lodash"
|
79
|
+
},
|
80
|
+
"scripts": {},
|
81
|
+
"typeScriptVersion": "2.8",
|
82
|
+
"types": "index",
|
83
|
+
"typesPublisherContentHash": "f9ef5d346ee8015426be9faf8cae74064821c2dd5f3b1feca7597aa0026191d4",
|
84
|
+
"version": "4.14.122"
|
85
|
+
}
|