cypress 12.2.0 → 12.4.0
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 +2 -2
- package/package.json +3 -3
- package/react/dist/cypress-react.cjs.js +1 -1
- package/react/dist/cypress-react.esm-bundler.js +1 -1
- package/react18/dist/cypress-react.cjs.js +1 -1
- package/react18/dist/cypress-react.esm-bundler.js +1 -1
- package/svelte/dist/cypress-svelte.cjs.js +2 -2
- package/svelte/dist/cypress-svelte.esm-bundler.js +2 -2
- package/types/cypress.d.ts +62 -27
- package/vue/dist/cypress-vue.cjs.js +1 -1
- package/vue/dist/cypress-vue.esm-bundler.js +1 -1
- package/vue/dist/index.d.ts +4 -4
- package/vue2/dist/cypress-vue2.cjs.js +1 -1
- package/vue2/dist/cypress-vue2.esm-bundler.js +1 -1
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
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
/**
|
3
3
|
* @cypress/angular v0.0.0-development
|
4
|
-
* (c)
|
4
|
+
* (c) 2023 Cypress.io
|
5
5
|
* Released under the MIT License
|
6
6
|
*/
|
7
7
|
|
@@ -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.0",
|
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": "
|
121
|
+
"commitSha": "094e3d03cc9f379965a7f0fb09a9e1cf44992014",
|
122
|
+
"commitDate": "2023-01-24T16:02:45.000Z",
|
123
123
|
"stable": true
|
124
124
|
},
|
125
125
|
"description": "Cypress is a next generation front end testing tool built for the modern web",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
/**
|
3
3
|
* @cypress/svelte v0.0.0-development
|
4
|
-
* (c)
|
4
|
+
* (c) 2023 Cypress.io
|
5
5
|
* Released under the MIT License
|
6
6
|
*/
|
7
7
|
|
@@ -64,7 +64,7 @@ const cleanup = () => {
|
|
64
64
|
// Extract the component name from the object passed to mount
|
65
65
|
const getComponentDisplayName = (Component) => {
|
66
66
|
if (Component.name) {
|
67
|
-
const [
|
67
|
+
const [, match] = /Proxy\<(\w+)\>/.exec(Component.name) || [];
|
68
68
|
return match || Component.name;
|
69
69
|
}
|
70
70
|
return DEFAULT_COMP_NAME;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
/**
|
3
3
|
* @cypress/svelte v0.0.0-development
|
4
|
-
* (c)
|
4
|
+
* (c) 2023 Cypress.io
|
5
5
|
* Released under the MIT License
|
6
6
|
*/
|
7
7
|
|
@@ -62,7 +62,7 @@ const cleanup = () => {
|
|
62
62
|
// Extract the component name from the object passed to mount
|
63
63
|
const getComponentDisplayName = (Component) => {
|
64
64
|
if (Component.name) {
|
65
|
-
const [
|
65
|
+
const [, match] = /Proxy\<(\w+)\>/.exec(Component.name) || [];
|
66
66
|
return match || Component.name;
|
67
67
|
}
|
68
68
|
return DEFAULT_COMP_NAME;
|
package/types/cypress.d.ts
CHANGED
@@ -420,6 +420,11 @@ declare namespace Cypress {
|
|
420
420
|
titlePath: string[]
|
421
421
|
}
|
422
422
|
|
423
|
+
/**
|
424
|
+
* Information about current test retry
|
425
|
+
*/
|
426
|
+
currentRetry: number
|
427
|
+
|
423
428
|
/**
|
424
429
|
* Information about the browser currently running the tests
|
425
430
|
*/
|
@@ -822,29 +827,13 @@ declare namespace Cypress {
|
|
822
827
|
* @see https://on.cypress.io/variables-and-aliases
|
823
828
|
* @see https://on.cypress.io/get
|
824
829
|
* @example
|
825
|
-
|
826
|
-
|
827
|
-
cy.get('ul#todos').as('todos')
|
828
|
-
//...hack hack hack...
|
829
|
-
// later retrieve the todos
|
830
|
-
cy.get('@todos')
|
831
|
-
```
|
832
|
-
*/
|
833
|
-
as(alias: string): Chainable<Subject>
|
834
|
-
|
835
|
-
/**
|
836
|
-
* 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')
|
837
832
|
*
|
838
|
-
*
|
839
|
-
*
|
840
|
-
* @example
|
841
|
-
* cy.get('input[type=file]').selectFile(Cypress.Buffer.from('text'))
|
842
|
-
* cy.get('input[type=file]').selectFile({
|
843
|
-
* fileName: 'users.json',
|
844
|
-
* contents: [{name: 'John Doe'}]
|
845
|
-
* })
|
833
|
+
* // later retrieve the todos
|
834
|
+
* cy.get('@todos')
|
846
835
|
*/
|
847
|
-
|
836
|
+
as(alias: string, options?: Partial<AsOptions>): Chainable<Subject>
|
848
837
|
|
849
838
|
/**
|
850
839
|
* Blur a focused element. This element must currently be in focus.
|
@@ -1910,6 +1899,20 @@ declare namespace Cypress {
|
|
1910
1899
|
*/
|
1911
1900
|
select(valueOrTextOrIndex: string | number | Array<string | number>, options?: Partial<SelectOptions>): Chainable<Subject>
|
1912
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
|
+
|
1913
1916
|
/**
|
1914
1917
|
* Set a browser cookie.
|
1915
1918
|
*
|
@@ -2645,6 +2648,7 @@ declare namespace Cypress {
|
|
2645
2648
|
waitForAnimations: boolean
|
2646
2649
|
/**
|
2647
2650
|
* The distance in pixels an element must exceed over time to be considered animating
|
2651
|
+
*
|
2648
2652
|
* @default 5
|
2649
2653
|
*/
|
2650
2654
|
animationDistanceThreshold: number
|
@@ -2656,15 +2660,20 @@ declare namespace Cypress {
|
|
2656
2660
|
scrollBehavior: scrollBehaviorOptions
|
2657
2661
|
}
|
2658
2662
|
|
2659
|
-
|
2663
|
+
/**
|
2664
|
+
* Options to affect how an alias is stored
|
2665
|
+
*
|
2666
|
+
* @see https://on.cypress.io/as
|
2667
|
+
*/
|
2668
|
+
interface AsOptions {
|
2660
2669
|
/**
|
2661
|
-
*
|
2662
|
-
*
|
2663
|
-
*
|
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.
|
2664
2673
|
*
|
2665
|
-
* @default '
|
2674
|
+
* @default 'query'
|
2666
2675
|
*/
|
2667
|
-
|
2676
|
+
type: 'query' | 'static'
|
2668
2677
|
}
|
2669
2678
|
|
2670
2679
|
interface BlurOptions extends Loggable, Timeoutable, Forceable { }
|
@@ -3014,6 +3023,16 @@ declare namespace Cypress {
|
|
3014
3023
|
* @see https://on.cypress.io/configuration#experimentalModifyObstructiveThirdPartyCode
|
3015
3024
|
*/
|
3016
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
|
3017
3036
|
/**
|
3018
3037
|
* Enables AST-based JS/HTML rewriting. This may fix issues caused by the existing regex-based JS/HTML replacement algorithm.
|
3019
3038
|
* @default false
|
@@ -3029,6 +3048,11 @@ declare namespace Cypress {
|
|
3029
3048
|
* @default false
|
3030
3049
|
*/
|
3031
3050
|
experimentalWebKitSupport: boolean
|
3051
|
+
/**
|
3052
|
+
* Enables support for improved memory management within Chromium-based browsers.
|
3053
|
+
* @default false
|
3054
|
+
*/
|
3055
|
+
experimentalMemoryManagement: boolean
|
3032
3056
|
/**
|
3033
3057
|
* Number of times to retry a failed test.
|
3034
3058
|
* If a number is set, tests will retry in both runMode and openMode.
|
@@ -3495,6 +3519,17 @@ declare namespace Cypress {
|
|
3495
3519
|
|
3496
3520
|
type SameSiteStatus = 'no_restriction' | 'strict' | 'lax'
|
3497
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
|
+
|
3498
3533
|
interface SetCookieOptions extends Loggable, Timeoutable {
|
3499
3534
|
path: string
|
3500
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<{
|