@@ -168,7 +168,7 @@ declare namespace Cypress {
168168 /**
169169 * The interface for user-defined properties in Window object under test.
170170 */
171- interface ApplicationWindow { } // tslint:disable-line
171+ interface ApplicationWindow { } // tslint:disable-line
172172
173173 /**
174174 * Several libraries are bundled with Cypress by default.
@@ -521,7 +521,7 @@ declare namespace Cypress {
521521 /**
522522 * @see https://on.cypress.io/keyboard-api
523523 */
524- Keyboard : {
524+ Keyboard : {
525525 defaults ( options : Partial < KeyboardDefaultsOptions > ) : void
526526 }
527527
@@ -579,7 +579,7 @@ declare namespace Cypress {
579579 }
580580
581581 interface SessionOptions {
582- validate ?: ( ) => false | void
582+ validate ?: ( ) => false | void
583583 }
584584
585585 type CanReturnChainable = void | Chainable | Promise < unknown >
@@ -717,36 +717,36 @@ declare namespace Cypress {
717717 ```
718718 */
719719 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+ */
734734 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+ */
750750 clearLocalStorage ( key : string , options : Partial < Loggable > ) : Chainable < Storage >
751751
752752 /**
@@ -834,7 +834,7 @@ declare namespace Cypress {
834834 * // or use this shortcut
835835 * cy.clock().invoke('restore')
836836 */
837- clock ( now : number | Date , options ?: Loggable ) : Chainable < Clock >
837+ clock ( now : number | Date , options ?: Loggable ) : Chainable < Clock >
838838 /**
839839 * Mocks global clock but only overrides specific functions.
840840 *
@@ -843,7 +843,7 @@ declare namespace Cypress {
843843 * // keep current date but override "setTimeout" and "clearTimeout"
844844 * cy.clock(null, ['setTimeout', 'clearTimeout'])
845845 */
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 >
847847 /**
848848 * Mocks global clock and all functions.
849849 *
@@ -977,14 +977,14 @@ declare namespace Cypress {
977977 */
978978 debug ( options ?: Partial < Loggable > ) : Chainable < Subject >
979979
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 >
988988
989989 /**
990990 * Get the window.document of the page that is currently active.
@@ -1648,17 +1648,11 @@ declare namespace Cypress {
16481648 scrollTo ( x : number | string , y : number | string , options ?: Partial < ScrollToOptions > ) : Chainable < Subject >
16491649
16501650 /**
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>`.
16581652 *
16591653 * @see https://on.cypress.io/select
16601654 */
1661- select ( value : string | string [ ] , options ?: Partial < SelectOptions > ) : Chainable < Subject >
1655+ select ( valueOrTextOrIndex : string | number | Array < string | number > , options ?: Partial < SelectOptions > ) : Chainable < Subject >
16621656
16631657 /**
16641658 * @deprecated Use `cy.intercept()` instead.
@@ -1909,13 +1903,13 @@ declare namespace Cypress {
19091903 *
19101904 * @see https://on.cypress.io/then
19111905 */
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 > >
19191913 /**
19201914 * Enables you to work with the subject yielded from the previous command / promise.
19211915 *
@@ -2754,7 +2748,7 @@ declare namespace Cypress {
27542748 * To enable test retries only in runMode, set e.g. `{ openMode: null, runMode: 2 }`
27552749 * @default null
27562750 */
2757- retries : Nullable < number | { runMode ?: Nullable < number > , openMode ?: Nullable < number > } >
2751+ retries : Nullable < number | { runMode ?: Nullable < number > , openMode ?: Nullable < number > } >
27582752 /**
27592753 * Enables including elements within the shadow DOM when using querying
27602754 * commands (e.g. cy.get(), cy.find()). Can be set globally in cypress.json,
@@ -2891,7 +2885,7 @@ declare namespace Cypress {
28912885 * All configuration items are optional.
28922886 */
28932887 type CoreConfigOptions = Partial < Omit < ResolvedConfigOptions , TestingType > >
2894- type ConfigOptions = CoreConfigOptions & { e2e ?: CoreConfigOptions , component ?: CoreConfigOptions }
2888+ type ConfigOptions = CoreConfigOptions & { e2e ?: CoreConfigOptions , component ?: CoreConfigOptions }
28952889
28962890 interface PluginConfigOptions extends ResolvedConfigOptions {
28972891 /**
@@ -2998,6 +2992,7 @@ declare namespace Cypress {
29982992 disableTimersAndAnimations : boolean
29992993 padding : Padding
30002994 scale : boolean
2995+ overwrite : boolean
30012996 onBeforeScreenshot : ( $el : JQuery ) => void
30022997 onAfterScreenshot : ( $el : JQuery , props : {
30032998 path : string
@@ -5703,48 +5698,48 @@ declare namespace Cypress {
57035698 }
57045699 ```
57055700 */
5706- interface cy extends Chainable < undefined > { }
5701+ interface cy extends Chainable < undefined > { }
57075702}
57085703
57095704declare namespace Mocha {
57105705 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
57225717 }
57235718 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
57355730 }
57365731 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
57485743 }
57495744
57505745 interface SuiteFunction {
0 commit comments