@@ -168,7 +168,7 @@ declare namespace Cypress {
168
168
/**
169
169
* The interface for user-defined properties in Window object under test.
170
170
*/
171
- interface ApplicationWindow { } // tslint:disable-line
171
+ interface ApplicationWindow { } // tslint:disable-line
172
172
173
173
/**
174
174
* Several libraries are bundled with Cypress by default.
@@ -521,7 +521,7 @@ declare namespace Cypress {
521
521
/**
522
522
* @see https://on.cypress.io/keyboard-api
523
523
*/
524
- Keyboard : {
524
+ Keyboard : {
525
525
defaults ( options : Partial < KeyboardDefaultsOptions > ) : void
526
526
}
527
527
@@ -579,7 +579,7 @@ declare namespace Cypress {
579
579
}
580
580
581
581
interface SessionOptions {
582
- validate ?: ( ) => false | void
582
+ validate ?: ( ) => false | void
583
583
}
584
584
585
585
type CanReturnChainable = void | Chainable | Promise < unknown >
@@ -717,36 +717,36 @@ declare namespace Cypress {
717
717
```
718
718
*/
719
719
clearLocalStorage ( re : RegExp ) : Chainable < Storage >
720
- /**
721
- * Clear data in local storage.
722
- * Cypress automatically runs this command before each test to prevent state from being
723
- * shared across tests. You shouldn’t need to use this command unless you’re using it
724
- * to clear localStorage inside a single test. Yields `localStorage` object.
725
- *
726
- * @see https://on.cypress.io/clearlocalstorage
727
- * @param {options } [object] - options object
728
- * @example
729
- ```
730
- // Removes all local storage items, without logging
731
- cy.clearLocalStorage({ log: false })
732
- ```
733
- */
720
+ /**
721
+ * Clear data in local storage.
722
+ * Cypress automatically runs this command before each test to prevent state from being
723
+ * shared across tests. You shouldn’t need to use this command unless you’re using it
724
+ * to clear localStorage inside a single test. Yields `localStorage` object.
725
+ *
726
+ * @see https://on.cypress.io/clearlocalstorage
727
+ * @param {options } [object] - options object
728
+ * @example
729
+ ```
730
+ // Removes all local storage items, without logging
731
+ cy.clearLocalStorage({ log: false })
732
+ ```
733
+ */
734
734
clearLocalStorage ( options : Partial < Loggable > ) : Chainable < Storage >
735
- /**
736
- * Clear data in local storage.
737
- * Cypress automatically runs this command before each test to prevent state from being
738
- * shared across tests. You shouldn’t need to use this command unless you’re using it
739
- * to clear localStorage inside a single test. Yields `localStorage` object.
740
- *
741
- * @see https://on.cypress.io/clearlocalstorage
742
- * @param {string } [key] - name of a particular item to remove (optional).
743
- * @param {options } [object] - options object
744
- * @example
745
- ```
746
- // Removes item "todos" without logging
747
- cy.clearLocalStorage("todos", { log: false })
748
- ```
749
- */
735
+ /**
736
+ * Clear data in local storage.
737
+ * Cypress automatically runs this command before each test to prevent state from being
738
+ * shared across tests. You shouldn’t need to use this command unless you’re using it
739
+ * to clear localStorage inside a single test. Yields `localStorage` object.
740
+ *
741
+ * @see https://on.cypress.io/clearlocalstorage
742
+ * @param {string } [key] - name of a particular item to remove (optional).
743
+ * @param {options } [object] - options object
744
+ * @example
745
+ ```
746
+ // Removes item "todos" without logging
747
+ cy.clearLocalStorage("todos", { log: false })
748
+ ```
749
+ */
750
750
clearLocalStorage ( key : string , options : Partial < Loggable > ) : Chainable < Storage >
751
751
752
752
/**
@@ -834,7 +834,7 @@ declare namespace Cypress {
834
834
* // or use this shortcut
835
835
* cy.clock().invoke('restore')
836
836
*/
837
- clock ( now : number | Date , options ?: Loggable ) : Chainable < Clock >
837
+ clock ( now : number | Date , options ?: Loggable ) : Chainable < Clock >
838
838
/**
839
839
* Mocks global clock but only overrides specific functions.
840
840
*
@@ -843,7 +843,7 @@ declare namespace Cypress {
843
843
* // keep current date but override "setTimeout" and "clearTimeout"
844
844
* cy.clock(null, ['setTimeout', 'clearTimeout'])
845
845
*/
846
- clock ( now : number | Date , functions ?: Array < 'setTimeout' | 'clearTimeout' | 'setInterval' | 'clearInterval' | 'Date' > , options ?: Loggable ) : Chainable < Clock >
846
+ clock ( now : number | Date , functions ?: Array < 'setTimeout' | 'clearTimeout' | 'setInterval' | 'clearInterval' | 'Date' > , options ?: Loggable ) : Chainable < Clock >
847
847
/**
848
848
* Mocks global clock and all functions.
849
849
*
@@ -977,14 +977,14 @@ declare namespace Cypress {
977
977
*/
978
978
debug ( options ?: Partial < Loggable > ) : Chainable < Subject >
979
979
980
- /**
981
- * Save/Restore browser Cookies, LocalStorage, and SessionStorage data resulting from the supplied `setup` function.
982
- *
983
- * Only available if the `experimentalSessionSupport` config option is enabled.
984
- *
985
- * @see https://on.cypress.io/session
986
- */
987
- session ( id : string | object , setup ?: SessionOptions [ 'validate' ] , options ?: SessionOptions ) : Chainable < null >
980
+ /**
981
+ * Save/Restore browser Cookies, LocalStorage, and SessionStorage data resulting from the supplied `setup` function.
982
+ *
983
+ * Only available if the `experimentalSessionSupport` config option is enabled.
984
+ *
985
+ * @see https://on.cypress.io/session
986
+ */
987
+ session ( id : string | object , setup ?: SessionOptions [ 'validate' ] , options ?: SessionOptions ) : Chainable < null >
988
988
989
989
/**
990
990
* Get the window.document of the page that is currently active.
@@ -1648,17 +1648,11 @@ declare namespace Cypress {
1648
1648
scrollTo ( x : number | string , y : number | string , options ?: Partial < ScrollToOptions > ) : Chainable < Subject >
1649
1649
1650
1650
/**
1651
- * Select an `<option>` with specific text within a `<select>`.
1652
- *
1653
- * @see https://on.cypress.io/select
1654
- */
1655
- select ( text : string | string [ ] , options ?: Partial < SelectOptions > ) : Chainable < Subject >
1656
- /**
1657
- * Select an `<option>` with specific value(s) within a `<select>`.
1651
+ * Select an `<option>` with specific text, value, or index within a `<select>`.
1658
1652
*
1659
1653
* @see https://on.cypress.io/select
1660
1654
*/
1661
- select ( value : string | string [ ] , options ?: Partial < SelectOptions > ) : Chainable < Subject >
1655
+ select ( valueOrTextOrIndex : string | number | Array < string | number > , options ?: Partial < SelectOptions > ) : Chainable < Subject >
1662
1656
1663
1657
/**
1664
1658
* @deprecated Use `cy.intercept()` instead.
@@ -1909,13 +1903,13 @@ declare namespace Cypress {
1909
1903
*
1910
1904
* @see https://on.cypress.io/then
1911
1905
*/
1912
- then < S extends HTMLElement > ( options : Partial < Timeoutable > , fn : ( this : ObjectLike , currentSubject : Subject ) => S ) : Chainable < JQuery < S > >
1913
- /**
1914
- * Enables you to work with the subject yielded from the previous command / promise.
1915
- *
1916
- * @see https://on.cypress.io/then
1917
- */
1918
- then < S extends ArrayLike < HTMLElement > > ( options : Partial < Timeoutable > , fn : ( this : ObjectLike , currentSubject : Subject ) => S ) : Chainable < JQuery < S extends ArrayLike < infer T > ? T : never > >
1906
+ then < S extends HTMLElement > ( options : Partial < Timeoutable > , fn : ( this : ObjectLike , currentSubject : Subject ) => S ) : Chainable < JQuery < S > >
1907
+ /**
1908
+ * Enables you to work with the subject yielded from the previous command / promise.
1909
+ *
1910
+ * @see https://on.cypress.io/then
1911
+ */
1912
+ then < S extends ArrayLike < HTMLElement > > ( options : Partial < Timeoutable > , fn : ( this : ObjectLike , currentSubject : Subject ) => S ) : Chainable < JQuery < S extends ArrayLike < infer T > ? T : never > >
1919
1913
/**
1920
1914
* Enables you to work with the subject yielded from the previous command / promise.
1921
1915
*
@@ -2754,7 +2748,7 @@ declare namespace Cypress {
2754
2748
* To enable test retries only in runMode, set e.g. `{ openMode: null, runMode: 2 }`
2755
2749
* @default null
2756
2750
*/
2757
- retries : Nullable < number | { runMode ?: Nullable < number > , openMode ?: Nullable < number > } >
2751
+ retries : Nullable < number | { runMode ?: Nullable < number > , openMode ?: Nullable < number > } >
2758
2752
/**
2759
2753
* Enables including elements within the shadow DOM when using querying
2760
2754
* commands (e.g. cy.get(), cy.find()). Can be set globally in cypress.json,
@@ -2891,7 +2885,7 @@ declare namespace Cypress {
2891
2885
* All configuration items are optional.
2892
2886
*/
2893
2887
type CoreConfigOptions = Partial < Omit < ResolvedConfigOptions , TestingType > >
2894
- type ConfigOptions = CoreConfigOptions & { e2e ?: CoreConfigOptions , component ?: CoreConfigOptions }
2888
+ type ConfigOptions = CoreConfigOptions & { e2e ?: CoreConfigOptions , component ?: CoreConfigOptions }
2895
2889
2896
2890
interface PluginConfigOptions extends ResolvedConfigOptions {
2897
2891
/**
@@ -2998,6 +2992,7 @@ declare namespace Cypress {
2998
2992
disableTimersAndAnimations : boolean
2999
2993
padding : Padding
3000
2994
scale : boolean
2995
+ overwrite : boolean
3001
2996
onBeforeScreenshot : ( $el : JQuery ) => void
3002
2997
onAfterScreenshot : ( $el : JQuery , props : {
3003
2998
path : string
@@ -5703,48 +5698,48 @@ declare namespace Cypress {
5703
5698
}
5704
5699
```
5705
5700
*/
5706
- interface cy extends Chainable < undefined > { }
5701
+ interface cy extends Chainable < undefined > { }
5707
5702
}
5708
5703
5709
5704
declare namespace Mocha {
5710
5705
interface TestFunction {
5711
- /**
5712
- * Describe a specification or test-case with the given `title`, TestOptions, and callback `fn` acting
5713
- * as a thunk.
5714
- */
5715
- ( title : string , config : Cypress . TestConfigOverrides , fn ?: Func ) : Test
5716
-
5717
- /**
5718
- * Describe a specification or test-case with the given `title`, TestOptions, and callback `fn` acting
5719
- * as a thunk.
5720
- */
5721
- ( title : string , config : Cypress . TestConfigOverrides , fn ?: AsyncFunc ) : Test
5706
+ /**
5707
+ * Describe a specification or test-case with the given `title`, TestOptions, and callback `fn` acting
5708
+ * as a thunk.
5709
+ */
5710
+ ( title : string , config : Cypress . TestConfigOverrides , fn ?: Func ) : Test
5711
+
5712
+ /**
5713
+ * Describe a specification or test-case with the given `title`, TestOptions, and callback `fn` acting
5714
+ * as a thunk.
5715
+ */
5716
+ ( title : string , config : Cypress . TestConfigOverrides , fn ?: AsyncFunc ) : Test
5722
5717
}
5723
5718
interface ExclusiveTestFunction {
5724
- /**
5725
- * Describe a specification or test-case with the given `title`, TestOptions, and callback `fn` acting
5726
- * as a thunk.
5727
- */
5728
- ( title : string , config : Cypress . TestConfigOverrides , fn ?: Func ) : Test
5729
-
5730
- /**
5731
- * Describe a specification or test-case with the given `title`, TestOptions, and callback `fn` acting
5732
- * as a thunk.
5733
- */
5734
- ( title : string , config : Cypress . TestConfigOverrides , fn ?: AsyncFunc ) : Test
5719
+ /**
5720
+ * Describe a specification or test-case with the given `title`, TestOptions, and callback `fn` acting
5721
+ * as a thunk.
5722
+ */
5723
+ ( title : string , config : Cypress . TestConfigOverrides , fn ?: Func ) : Test
5724
+
5725
+ /**
5726
+ * Describe a specification or test-case with the given `title`, TestOptions, and callback `fn` acting
5727
+ * as a thunk.
5728
+ */
5729
+ ( title : string , config : Cypress . TestConfigOverrides , fn ?: AsyncFunc ) : Test
5735
5730
}
5736
5731
interface PendingTestFunction {
5737
- /**
5738
- * Describe a specification or test-case with the given `title`, TestOptions, and callback `fn` acting
5739
- * as a thunk.
5740
- */
5741
- ( title : string , config : Cypress . TestConfigOverrides , fn ?: Func ) : Test
5742
-
5743
- /**
5744
- * Describe a specification or test-case with the given `title`, TestOptions, and callback `fn` acting
5745
- * as a thunk.
5746
- */
5747
- ( title : string , config : Cypress . TestConfigOverrides , fn ?: AsyncFunc ) : Test
5732
+ /**
5733
+ * Describe a specification or test-case with the given `title`, TestOptions, and callback `fn` acting
5734
+ * as a thunk.
5735
+ */
5736
+ ( title : string , config : Cypress . TestConfigOverrides , fn ?: Func ) : Test
5737
+
5738
+ /**
5739
+ * Describe a specification or test-case with the given `title`, TestOptions, and callback `fn` acting
5740
+ * as a thunk.
5741
+ */
5742
+ ( title : string , config : Cypress . TestConfigOverrides , fn ?: AsyncFunc ) : Test
5748
5743
}
5749
5744
5750
5745
interface SuiteFunction {
0 commit comments