cypress 13.17.0 → 14.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/angular/README.md +5 -0
- package/angular/angular/README.md +5 -0
- package/angular/angular/dist/index.d.ts +11 -2
- package/angular/angular/dist/index.js +944 -4
- package/angular/angular/package.json +16 -9
- package/angular/dist/index.d.ts +11 -2
- package/angular/dist/index.js +944 -4
- package/angular/package.json +16 -9
- package/lib/cli.js +1 -30
- package/lib/exec/spawn.js +17 -7
- package/mount-utils/dist/index.d.ts +0 -28
- package/mount-utils/dist/index.js +0 -27
- package/mount-utils/mount-utils/dist/index.d.ts +0 -28
- package/mount-utils/mount-utils/dist/index.js +0 -27
- package/package.json +5 -23
- package/react/README.md +5 -0
- package/react/dist/cypress-react.cjs.js +21 -676
- package/react/dist/cypress-react.esm-bundler.js +22 -676
- package/react/dist/index.d.ts +13 -30
- package/react/package.json +13 -15
- package/react/react/README.md +5 -0
- package/react/react/dist/cypress-react.cjs.js +21 -676
- package/react/react/dist/cypress-react.esm-bundler.js +22 -676
- package/react/react/dist/index.d.ts +13 -30
- package/react/react/package.json +13 -15
- package/svelte/README.md +6 -2
- package/svelte/dist/cypress-svelte.cjs.js +12 -12
- package/svelte/dist/cypress-svelte.esm-bundler.js +12 -12
- package/svelte/dist/index.d.ts +8 -179
- package/svelte/package.json +2 -2
- package/svelte/svelte/README.md +6 -2
- package/svelte/svelte/dist/cypress-svelte.cjs.js +12 -12
- package/svelte/svelte/dist/cypress-svelte.esm-bundler.js +12 -12
- package/svelte/svelte/dist/index.d.ts +8 -179
- package/svelte/svelte/package.json +2 -2
- package/types/cypress.d.ts +32 -49
- package/types/net-stubbing.d.ts +2 -7
- package/vue/dist/cypress-vue.cjs.js +380 -275
- package/vue/dist/cypress-vue.esm-bundler.js +382 -276
- package/vue/dist/index.d.ts +61 -78
- package/vue/package.json +2 -5
- package/vue/vue/dist/cypress-vue.cjs.js +380 -275
- package/vue/vue/dist/cypress-vue.esm-bundler.js +382 -276
- package/vue/vue/dist/index.d.ts +61 -78
- package/vue/vue/package.json +2 -5
- package/angular-signals/README.md +0 -11
- package/angular-signals/angular-signals/README.md +0 -11
- package/angular-signals/angular-signals/dist/index.d.ts +0 -136
- package/angular-signals/angular-signals/dist/index.js +0 -1861
- package/angular-signals/angular-signals/package.json +0 -74
- package/angular-signals/dist/index.d.ts +0 -136
- package/angular-signals/dist/index.js +0 -1861
- package/angular-signals/package.json +0 -74
- package/react18/README.md +0 -7
- package/react18/dist/cypress-react.cjs.js +0 -597
- package/react18/dist/cypress-react.esm-bundler.js +0 -574
- package/react18/dist/index.d.ts +0 -78
- package/react18/package.json +0 -71
- package/react18/react18/README.md +0 -7
- package/react18/react18/dist/cypress-react.cjs.js +0 -597
- package/react18/react18/dist/cypress-react.esm-bundler.js +0 -574
- package/react18/react18/dist/index.d.ts +0 -78
- package/react18/react18/package.json +0 -71
- package/vue2/README.md +0 -7
- package/vue2/dist/cypress-vue2.cjs.js +0 -20045
- package/vue2/dist/cypress-vue2.esm-bundler.js +0 -20042
- package/vue2/dist/index.d.ts +0 -207
- package/vue2/package.json +0 -65
- package/vue2/vue2/README.md +0 -7
- package/vue2/vue2/dist/cypress-vue2.cjs.js +0 -20045
- package/vue2/vue2/dist/cypress-vue2.esm-bundler.js +0 -20042
- package/vue2/vue2/dist/index.d.ts +0 -207
- package/vue2/vue2/package.json +0 -65
package/react/dist/index.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
import * as React from 'react';
|
4
4
|
import React__default from 'react';
|
5
|
-
import * as
|
5
|
+
import * as react_dom_client from 'react-dom/client';
|
6
6
|
|
7
7
|
interface UnmountArgs {
|
8
8
|
log: boolean;
|
@@ -10,7 +10,7 @@ interface UnmountArgs {
|
|
10
10
|
}
|
11
11
|
type MountOptions = Partial<MountReactComponentOptions>;
|
12
12
|
interface MountReactComponentOptions {
|
13
|
-
ReactDom: typeof
|
13
|
+
ReactDom: typeof react_dom_client;
|
14
14
|
/**
|
15
15
|
* Log the mounting command into Cypress Command Log,
|
16
16
|
* true by default.
|
@@ -23,8 +23,8 @@ interface MountReactComponentOptions {
|
|
23
23
|
strict: boolean;
|
24
24
|
}
|
25
25
|
interface InternalMountOptions {
|
26
|
-
reactDom: typeof
|
27
|
-
render: (reactComponent: ReturnType<typeof React__default.createElement>, el: HTMLElement, reactDomToUse: typeof
|
26
|
+
reactDom: typeof react_dom_client;
|
27
|
+
render: (reactComponent: ReturnType<typeof React__default.createElement>, el: HTMLElement, reactDomToUse: typeof react_dom_client) => void;
|
28
28
|
unmount: (options: UnmountArgs) => void;
|
29
29
|
cleanup: () => boolean;
|
30
30
|
}
|
@@ -38,13 +38,6 @@ interface MountReturn {
|
|
38
38
|
* or have asynchronous updates (`useEffect`, `useLayoutEffect`).
|
39
39
|
*/
|
40
40
|
rerender: (component: React__default.ReactNode) => globalThis.Cypress.Chainable<MountReturn>;
|
41
|
-
/**
|
42
|
-
* Removes the mounted component.
|
43
|
-
*
|
44
|
-
* Removed as of Cypress 11.0.0.
|
45
|
-
* @see https://on.cypress.io/migration-11-0-0-component-testing-updates
|
46
|
-
*/
|
47
|
-
unmount: (payload: UnmountArgs) => void;
|
48
41
|
}
|
49
42
|
|
50
43
|
/**
|
@@ -78,10 +71,10 @@ declare const getContainerEl: () => HTMLElement;
|
|
78
71
|
|
79
72
|
/**
|
80
73
|
* Mounts a React component into the DOM.
|
81
|
-
* @param
|
82
|
-
* @param
|
83
|
-
* @param
|
84
|
-
*
|
74
|
+
* @param {import('react').JSX.Element} jsx The React component to mount.
|
75
|
+
* @param {MountOptions} options Options to pass to the mount function.
|
76
|
+
* @param {string} rerenderKey A key to use to force a rerender.
|
77
|
+
*
|
85
78
|
* @example
|
86
79
|
* import { mount } from '@cypress/react'
|
87
80
|
* import { Stepper } from './Stepper'
|
@@ -91,21 +84,11 @@ declare const getContainerEl: () => HTMLElement;
|
|
91
84
|
* cy.get('[data-cy=increment]').click()
|
92
85
|
* cy.get('[data-cy=counter]').should('have.text', '1')
|
93
86
|
* }
|
87
|
+
*
|
88
|
+
* @see {@link https://on.cypress.io/mounting-react} for more details.
|
89
|
+
*
|
90
|
+
* @returns {Cypress.Chainable<MountReturn>} The mounted component.
|
94
91
|
*/
|
95
92
|
declare function mount(jsx: React__default.ReactNode, options?: MountOptions, rerenderKey?: string): Cypress.Chainable<MountReturn>;
|
96
|
-
/**
|
97
|
-
* Removed as of Cypress 11.0.0.
|
98
|
-
* @see https://on.cypress.io/migration-11-0-0-component-testing-updates
|
99
|
-
*/
|
100
|
-
declare function unmount(options?: {
|
101
|
-
log: boolean;
|
102
|
-
}): void;
|
103
|
-
|
104
|
-
/**
|
105
|
-
* Mounts a React hook function in a test component for testing.
|
106
|
-
* Removed as of Cypress 11.0.0.
|
107
|
-
* @see https://on.cypress.io/migration-11-0-0-component-testing-updates
|
108
|
-
*/
|
109
|
-
declare const mountHook: <T>(hookFn: (...args: any[]) => T) => void;
|
110
93
|
|
111
|
-
export { InternalMountOptions, MountOptions, MountReactComponentOptions, MountReturn, UnmountArgs, createMount, getContainerEl, makeMountFn, makeUnmountFn, mount
|
94
|
+
export { InternalMountOptions, MountOptions, MountReactComponentOptions, MountReturn, UnmountArgs, createMount, getContainerEl, makeMountFn, makeUnmountFn, mount };
|
package/react/package.json
CHANGED
@@ -17,25 +17,26 @@
|
|
17
17
|
},
|
18
18
|
"devDependencies": {
|
19
19
|
"@cypress/mount-utils": "0.0.0-development",
|
20
|
-
"@types/semver": "7.5.
|
21
|
-
"@vitejs/plugin-react": "4.3.
|
22
|
-
"axios": "
|
20
|
+
"@types/semver": "7.5.8",
|
21
|
+
"@vitejs/plugin-react": "4.3.3",
|
22
|
+
"axios": "1.7.7",
|
23
23
|
"cypress": "0.0.0-development",
|
24
|
-
"prop-types": "15.
|
25
|
-
"react": "
|
26
|
-
"react-dom": "
|
27
|
-
"react-router": "6.
|
28
|
-
"react-router-dom": "6.
|
24
|
+
"prop-types": "15.8.1",
|
25
|
+
"react": "18.3.1",
|
26
|
+
"react-dom": "18.3.1",
|
27
|
+
"react-router": "6.28.0",
|
28
|
+
"react-router-dom": "6.28.0",
|
29
29
|
"semver": "^7.5.3",
|
30
30
|
"typescript": "~5.4.5",
|
31
|
-
"vite": "5.
|
31
|
+
"vite": "5.4.10",
|
32
32
|
"vite-plugin-require-transform": "1.0.12"
|
33
33
|
},
|
34
34
|
"peerDependencies": {
|
35
|
-
"@types/react": "^
|
35
|
+
"@types/react": "^18 || ^19",
|
36
|
+
"@types/react-dom": "^18 || ^19",
|
36
37
|
"cypress": "*",
|
37
|
-
"react": "
|
38
|
-
"react-dom": "
|
38
|
+
"react": "^18 || ^19",
|
39
|
+
"react-dom": "^18 || ^19"
|
39
40
|
},
|
40
41
|
"files": [
|
41
42
|
"dist"
|
@@ -90,9 +91,6 @@
|
|
90
91
|
"nx": {
|
91
92
|
"targets": {
|
92
93
|
"build": {
|
93
|
-
"dependsOn": [
|
94
|
-
"!@cypress/react18:build"
|
95
|
-
],
|
96
94
|
"outputs": [
|
97
95
|
"{workspaceRoot}/cli/react",
|
98
96
|
"{projectRoot}/dist"
|
package/react/react/README.md
CHANGED
@@ -3,6 +3,11 @@
|
|
3
3
|
Mount React components in the open source [Cypress.io](https://www.cypress.io/) test runner
|
4
4
|
|
5
5
|
> **Note:** This package is bundled with the `cypress` package and should not need to be installed separately. See the [React Component Testing Docs](https://docs.cypress.io/guides/component-testing/react/overview) for mounting React components. Installing and importing `mount` from `@cypress/react` should only be done for advanced use-cases.
|
6
|
+
|
7
|
+
## Requirements
|
8
|
+
|
9
|
+
- React 18.0.0+ (Cypress 13 and under supports React 16 and 17)
|
10
|
+
|
6
11
|
## Development
|
7
12
|
|
8
13
|
Run `yarn build` to compile and sync packages to the `cypress` cli package.
|