cypress 12.3.0 → 12.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/angular/dist/index.d.ts +1 -1
- package/angular/dist/index.js +1 -1
- package/package.json +3 -3
- package/types/cypress.d.ts +57 -27
- package/vue/dist/index.d.ts +4 -4
package/angular/dist/index.d.ts
CHANGED
@@ -114,7 +114,7 @@ declare function mount<T>(component: Type<T> | string, config?: MountConfig<T>):
|
|
114
114
|
* import { mount, createOutputSpy } from '@cypress/angular'
|
115
115
|
*
|
116
116
|
* it('Has spy', () => {
|
117
|
-
* mount(StepperComponent, { change: createOutputSpy('changeSpy') })
|
117
|
+
* mount(StepperComponent, { componentProperties: { change: createOutputSpy('changeSpy') } })
|
118
118
|
* cy.get('[data-cy=increment]').click()
|
119
119
|
* cy.get('@changeSpy').should('have.been.called')
|
120
120
|
* })
|
package/angular/dist/index.js
CHANGED
@@ -286,7 +286,7 @@ function mount(component, config = {}) {
|
|
286
286
|
* import { mount, createOutputSpy } from '@cypress/angular'
|
287
287
|
*
|
288
288
|
* it('Has spy', () => {
|
289
|
-
* mount(StepperComponent, { change: createOutputSpy('changeSpy') })
|
289
|
+
* mount(StepperComponent, { componentProperties: { change: createOutputSpy('changeSpy') } })
|
290
290
|
* cy.get('[data-cy=increment]').click()
|
291
291
|
* cy.get('@changeSpy').should('have.been.called')
|
292
292
|
* })
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "cypress",
|
3
|
-
"version": "12.
|
3
|
+
"version": "12.4.1",
|
4
4
|
"main": "index.js",
|
5
5
|
"scripts": {
|
6
6
|
"postinstall": "node index.js --exec install",
|
@@ -118,8 +118,8 @@
|
|
118
118
|
},
|
119
119
|
"buildInfo": {
|
120
120
|
"commitBranch": "develop",
|
121
|
-
"commitSha": "
|
122
|
-
"commitDate": "2023-01-
|
121
|
+
"commitSha": "e0320f7e047b2115fa32cad9ecb720ca624cfe86",
|
122
|
+
"commitDate": "2023-01-26T22:20:47.000Z",
|
123
123
|
"stable": true
|
124
124
|
},
|
125
125
|
"description": "Cypress is a next generation front end testing tool built for the modern web",
|
package/types/cypress.d.ts
CHANGED
@@ -827,29 +827,13 @@ declare namespace Cypress {
|
|
827
827
|
* @see https://on.cypress.io/variables-and-aliases
|
828
828
|
* @see https://on.cypress.io/get
|
829
829
|
* @example
|
830
|
-
|
831
|
-
|
832
|
-
cy.get('ul#todos').as('todos')
|
833
|
-
//...hack hack hack...
|
834
|
-
// later retrieve the todos
|
835
|
-
cy.get('@todos')
|
836
|
-
```
|
837
|
-
*/
|
838
|
-
as(alias: string): Chainable<Subject>
|
839
|
-
|
840
|
-
/**
|
841
|
-
* Select a file with the given <input> element, or drag and drop a file over any DOM subject.
|
830
|
+
* // Get the aliased 'todos' elements
|
831
|
+
* cy.get('ul#todos').as('todos')
|
842
832
|
*
|
843
|
-
*
|
844
|
-
*
|
845
|
-
* @example
|
846
|
-
* cy.get('input[type=file]').selectFile(Cypress.Buffer.from('text'))
|
847
|
-
* cy.get('input[type=file]').selectFile({
|
848
|
-
* fileName: 'users.json',
|
849
|
-
* contents: [{name: 'John Doe'}]
|
850
|
-
* })
|
833
|
+
* // later retrieve the todos
|
834
|
+
* cy.get('@todos')
|
851
835
|
*/
|
852
|
-
|
836
|
+
as(alias: string, options?: Partial<AsOptions>): Chainable<Subject>
|
853
837
|
|
854
838
|
/**
|
855
839
|
* Blur a focused element. This element must currently be in focus.
|
@@ -1915,6 +1899,20 @@ declare namespace Cypress {
|
|
1915
1899
|
*/
|
1916
1900
|
select(valueOrTextOrIndex: string | number | Array<string | number>, options?: Partial<SelectOptions>): Chainable<Subject>
|
1917
1901
|
|
1902
|
+
/**
|
1903
|
+
* Select a file with the given <input> element, or drag and drop a file over any DOM subject.
|
1904
|
+
*
|
1905
|
+
* @param {FileReference} files - The file(s) to select or drag onto this element.
|
1906
|
+
* @see https://on.cypress.io/selectfile
|
1907
|
+
* @example
|
1908
|
+
* cy.get('input[type=file]').selectFile(Cypress.Buffer.from('text'))
|
1909
|
+
* cy.get('input[type=file]').selectFile({
|
1910
|
+
* fileName: 'users.json',
|
1911
|
+
* contents: [{name: 'John Doe'}]
|
1912
|
+
* })
|
1913
|
+
*/
|
1914
|
+
selectFile(files: FileReference | FileReference[], options?: Partial<SelectFileOptions>): Chainable<Subject>
|
1915
|
+
|
1918
1916
|
/**
|
1919
1917
|
* Set a browser cookie.
|
1920
1918
|
*
|
@@ -2650,6 +2648,7 @@ declare namespace Cypress {
|
|
2650
2648
|
waitForAnimations: boolean
|
2651
2649
|
/**
|
2652
2650
|
* The distance in pixels an element must exceed over time to be considered animating
|
2651
|
+
*
|
2653
2652
|
* @default 5
|
2654
2653
|
*/
|
2655
2654
|
animationDistanceThreshold: number
|
@@ -2661,15 +2660,20 @@ declare namespace Cypress {
|
|
2661
2660
|
scrollBehavior: scrollBehaviorOptions
|
2662
2661
|
}
|
2663
2662
|
|
2664
|
-
|
2663
|
+
/**
|
2664
|
+
* Options to affect how an alias is stored
|
2665
|
+
*
|
2666
|
+
* @see https://on.cypress.io/as
|
2667
|
+
*/
|
2668
|
+
interface AsOptions {
|
2665
2669
|
/**
|
2666
|
-
*
|
2667
|
-
*
|
2668
|
-
*
|
2670
|
+
* The type of alias to store, which impacts how the value is retrieved later in the test.
|
2671
|
+
* If an alias should be a 'query' (re-runs all queries leading up to the resulting value so it's alway up-to-date) or a
|
2672
|
+
* 'static' (read once when the alias is saved and is never updated). `type` has no effect when aliasing intercepts, spies, and stubs.
|
2669
2673
|
*
|
2670
|
-
* @default '
|
2674
|
+
* @default 'query'
|
2671
2675
|
*/
|
2672
|
-
|
2676
|
+
type: 'query' | 'static'
|
2673
2677
|
}
|
2674
2678
|
|
2675
2679
|
interface BlurOptions extends Loggable, Timeoutable, Forceable { }
|
@@ -3019,6 +3023,16 @@ declare namespace Cypress {
|
|
3019
3023
|
* @see https://on.cypress.io/configuration#experimentalModifyObstructiveThirdPartyCode
|
3020
3024
|
*/
|
3021
3025
|
experimentalModifyObstructiveThirdPartyCode: boolean
|
3026
|
+
/**
|
3027
|
+
* Disables setting document.domain to the applications super domain on injection.
|
3028
|
+
* This experiment is to be used for sites that do not work with setting document.domain
|
3029
|
+
* due to cross-origin issues. Enabling this option no longer allows for default subdomain
|
3030
|
+
* navigations, and will require the use of cy.origin(). This option takes an array of
|
3031
|
+
* strings/string globs.
|
3032
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/domain
|
3033
|
+
* @default null
|
3034
|
+
*/
|
3035
|
+
experimentalSkipDomainInjection: string[] | null
|
3022
3036
|
/**
|
3023
3037
|
* Enables AST-based JS/HTML rewriting. This may fix issues caused by the existing regex-based JS/HTML replacement algorithm.
|
3024
3038
|
* @default false
|
@@ -3034,6 +3048,11 @@ declare namespace Cypress {
|
|
3034
3048
|
* @default false
|
3035
3049
|
*/
|
3036
3050
|
experimentalWebKitSupport: boolean
|
3051
|
+
/**
|
3052
|
+
* Enables support for improved memory management within Chromium-based browsers.
|
3053
|
+
* @default false
|
3054
|
+
*/
|
3055
|
+
experimentalMemoryManagement: boolean
|
3037
3056
|
/**
|
3038
3057
|
* Number of times to retry a failed test.
|
3039
3058
|
* If a number is set, tests will retry in both runMode and openMode.
|
@@ -3500,6 +3519,17 @@ declare namespace Cypress {
|
|
3500
3519
|
|
3501
3520
|
type SameSiteStatus = 'no_restriction' | 'strict' | 'lax'
|
3502
3521
|
|
3522
|
+
interface SelectFileOptions extends Loggable, Timeoutable, ActionableOptions {
|
3523
|
+
/**
|
3524
|
+
* Which user action to perform. `select` matches selecting a file while
|
3525
|
+
* `drag-drop` matches dragging files from the operating system into the
|
3526
|
+
* document.
|
3527
|
+
*
|
3528
|
+
* @default 'select'
|
3529
|
+
*/
|
3530
|
+
action: 'select' | 'drag-drop'
|
3531
|
+
}
|
3532
|
+
|
3503
3533
|
interface SetCookieOptions extends Loggable, Timeoutable {
|
3504
3534
|
path: string
|
3505
3535
|
domain: string
|
package/vue/dist/index.d.ts
CHANGED
@@ -1320,14 +1320,14 @@ declare function mount<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C exte
|
|
1320
1320
|
wrapper: VueWrapper<InstanceType<DefineComponent<PropsOrPropOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, PP, Props, Defaults>>>;
|
1321
1321
|
component: VueWrapper<InstanceType<DefineComponent<PropsOrPropOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, PP, Props, Defaults>>>['vm'];
|
1322
1322
|
}>;
|
1323
|
-
declare function mount<T extends DefineComponent<any, any, any, any>>(component: T, options?: ComponentMountingOptions<T>): Cypress.Chainable<{
|
1323
|
+
declare function mount<T extends DefineComponent<any, any, any, any, any>>(component: T, options?: ComponentMountingOptions<T>): Cypress.Chainable<{
|
1324
1324
|
wrapper: VueWrapper<InstanceType<T>>;
|
1325
1325
|
component: VueWrapper<InstanceType<T>>['vm'];
|
1326
1326
|
}>;
|
1327
1327
|
declare function mount<Props = {}, RawBindings = {}, D extends {} = {}, C extends ComputedOptions = {}, M extends Record<string, Function> = {}, E extends EmitsOptions = Record<string, any>, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string>(componentOptions: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, E, Mixin, Extends, EE>, options?: MountingOptions<Props & PublicProps, D>): Cypress.Chainable<{
|
1328
|
-
wrapper: VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props
|
1329
|
-
component: VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>>['vm'];
|
1330
|
-
}
|
1328
|
+
wrapper: VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>> & Record<string, any>;
|
1329
|
+
component: VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>> & Record<string, any>['vm'];
|
1330
|
+
}>;
|
1331
1331
|
declare function mount<PropNames extends string, RawBindings, D extends {}, C extends ComputedOptions = {}, M extends Record<string, Function> = {}, E extends EmitsOptions = Record<string, any>, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string, Props extends Readonly<{
|
1332
1332
|
[key in PropNames]?: any;
|
1333
1333
|
}> = Readonly<{
|