cypress 13.16.1 → 14.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. package/angular/README.md +5 -0
  2. package/angular/angular/README.md +5 -0
  3. package/angular/angular/dist/index.d.ts +11 -2
  4. package/angular/angular/dist/index.js +944 -4
  5. package/angular/angular/package.json +16 -9
  6. package/angular/dist/index.d.ts +11 -2
  7. package/angular/dist/index.js +944 -4
  8. package/angular/package.json +16 -9
  9. package/lib/cli.js +1 -30
  10. package/lib/exec/spawn.js +17 -7
  11. package/mount-utils/dist/index.d.ts +0 -28
  12. package/mount-utils/dist/index.js +0 -27
  13. package/mount-utils/mount-utils/dist/index.d.ts +0 -28
  14. package/mount-utils/mount-utils/dist/index.js +0 -27
  15. package/package.json +5 -23
  16. package/react/README.md +5 -0
  17. package/react/dist/cypress-react.cjs.js +21 -676
  18. package/react/dist/cypress-react.esm-bundler.js +22 -676
  19. package/react/dist/index.d.ts +13 -30
  20. package/react/package.json +13 -15
  21. package/react/react/README.md +5 -0
  22. package/react/react/dist/cypress-react.cjs.js +21 -676
  23. package/react/react/dist/cypress-react.esm-bundler.js +22 -676
  24. package/react/react/dist/index.d.ts +13 -30
  25. package/react/react/package.json +13 -15
  26. package/svelte/README.md +6 -2
  27. package/svelte/dist/cypress-svelte.cjs.js +12 -12
  28. package/svelte/dist/cypress-svelte.esm-bundler.js +12 -12
  29. package/svelte/dist/index.d.ts +8 -179
  30. package/svelte/package.json +2 -2
  31. package/svelte/svelte/README.md +6 -2
  32. package/svelte/svelte/dist/cypress-svelte.cjs.js +12 -12
  33. package/svelte/svelte/dist/cypress-svelte.esm-bundler.js +12 -12
  34. package/svelte/svelte/dist/index.d.ts +8 -179
  35. package/svelte/svelte/package.json +2 -2
  36. package/types/cypress.d.ts +32 -49
  37. package/types/net-stubbing.d.ts +2 -7
  38. package/vue/dist/cypress-vue.cjs.js +380 -275
  39. package/vue/dist/cypress-vue.esm-bundler.js +382 -276
  40. package/vue/dist/index.d.ts +61 -78
  41. package/vue/package.json +2 -5
  42. package/vue/vue/dist/cypress-vue.cjs.js +380 -275
  43. package/vue/vue/dist/cypress-vue.esm-bundler.js +382 -276
  44. package/vue/vue/dist/index.d.ts +61 -78
  45. package/vue/vue/package.json +2 -5
  46. package/angular-signals/README.md +0 -11
  47. package/angular-signals/angular-signals/README.md +0 -11
  48. package/angular-signals/angular-signals/dist/index.d.ts +0 -136
  49. package/angular-signals/angular-signals/dist/index.js +0 -1861
  50. package/angular-signals/angular-signals/package.json +0 -74
  51. package/angular-signals/dist/index.d.ts +0 -136
  52. package/angular-signals/dist/index.js +0 -1861
  53. package/angular-signals/package.json +0 -74
  54. package/react18/README.md +0 -7
  55. package/react18/dist/cypress-react.cjs.js +0 -597
  56. package/react18/dist/cypress-react.esm-bundler.js +0 -574
  57. package/react18/dist/index.d.ts +0 -78
  58. package/react18/package.json +0 -71
  59. package/react18/react18/README.md +0 -7
  60. package/react18/react18/dist/cypress-react.cjs.js +0 -597
  61. package/react18/react18/dist/cypress-react.esm-bundler.js +0 -574
  62. package/react18/react18/dist/index.d.ts +0 -78
  63. package/react18/react18/package.json +0 -71
  64. package/vue2/README.md +0 -7
  65. package/vue2/dist/cypress-vue2.cjs.js +0 -20045
  66. package/vue2/dist/cypress-vue2.esm-bundler.js +0 -20042
  67. package/vue2/dist/index.d.ts +0 -207
  68. package/vue2/package.json +0 -65
  69. package/vue2/vue2/README.md +0 -7
  70. package/vue2/vue2/dist/cypress-vue2.cjs.js +0 -20045
  71. package/vue2/vue2/dist/cypress-vue2.esm-bundler.js +0 -20042
  72. package/vue2/vue2/dist/index.d.ts +0 -207
  73. package/vue2/vue2/package.json +0 -65
@@ -1,207 +0,0 @@
1
- /// <reference types="cypress" />
2
-
3
- import Vue from 'vue';
4
- import { Wrapper, VueTestUtilsConfigOptions } from '@vue/test-utils';
5
- import { ComponentPublicInstanceConstructor } from 'vue/types/v3-component-public-instance';
6
-
7
- /**
8
- * Type for component passed to "mount"
9
- *
10
- * @interface VueComponent
11
- * @example
12
- * import Hello from './Hello.vue'
13
- * ^^^^^ this type
14
- * mount(Hello)
15
- */
16
- type VueComponent = Vue.ComponentOptions<any> | Vue.VueConstructor | ComponentPublicInstanceConstructor;
17
- /**
18
- * Options to pass to the component when creating it, like
19
- * props.
20
- *
21
- * @interface ComponentOptions
22
- */
23
- type ComponentOptions = Record<string, unknown>;
24
- type VueLocalComponents = Record<string, VueComponent>;
25
- type VueFilters = {
26
- [key: string]: (value: string) => string;
27
- };
28
- type VueDirectives = {
29
- [key: string]: Function | Object;
30
- };
31
- type VueMixin = unknown;
32
- type VueMixins = VueMixin | VueMixin[];
33
- type VuePluginOptions = unknown;
34
- type VuePlugin = unknown | [unknown, VuePluginOptions];
35
- /**
36
- * A single Vue plugin or a list of plugins to register
37
- */
38
- type VuePlugins = VuePlugin[];
39
- /**
40
- * Additional Vue services to register while mounting the component, like
41
- * local components, plugins, etc.
42
- *
43
- * @interface MountOptionsExtensions
44
- * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
45
- */
46
- interface MountOptionsExtensions {
47
- /**
48
- * Extra local components
49
- *
50
- * @memberof MountOptionsExtensions
51
- * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
52
- * @example
53
- * import Hello from './Hello.vue'
54
- * // imagine Hello needs AppComponent
55
- * // that it uses in its template like <app-component ... />
56
- * // during testing we can replace it with a mock component
57
- * const appComponent = ...
58
- * const components = {
59
- * 'app-component': appComponent
60
- * },
61
- * mount(Hello, { extensions: { components }})
62
- */
63
- components?: VueLocalComponents;
64
- /**
65
- * Optional Vue filters to install while mounting the component
66
- *
67
- * @memberof MountOptionsExtensions
68
- * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
69
- * @example
70
- * const filters = {
71
- * reverse: (s) => s.split('').reverse().join(''),
72
- * }
73
- * mount(Hello, { extensions: { filters }})
74
- */
75
- filters?: VueFilters;
76
- /**
77
- * Optional Vue mixin(s) to install when mounting the component
78
- *
79
- * @memberof MountOptionsExtensions
80
- * @alias mixins
81
- * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
82
- */
83
- mixin?: VueMixins;
84
- /**
85
- * Optional Vue mixin(s) to install when mounting the component
86
- *
87
- * @memberof MountOptionsExtensions
88
- * @alias mixin
89
- * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
90
- */
91
- mixins?: VueMixins;
92
- /**
93
- * A single plugin or multiple plugins.
94
- *
95
- * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
96
- * @alias plugins
97
- * @memberof MountOptionsExtensions
98
- */
99
- use?: VuePlugins;
100
- /**
101
- * A single plugin or multiple plugins.
102
- *
103
- * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
104
- * @alias use
105
- * @memberof MountOptionsExtensions
106
- */
107
- plugins?: VuePlugins;
108
- /**
109
- * Optional Vue directives to install while mounting the component
110
- *
111
- * @memberof MountOptionsExtensions
112
- * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
113
- * @example
114
- * const directives = {
115
- * custom: {
116
- * name: 'custom',
117
- * bind (el, binding) {
118
- * el.dataset['custom'] = binding.value
119
- * },
120
- * unbind (el) {
121
- * el.removeAttribute('data-custom')
122
- * },
123
- * },
124
- * }
125
- * mount(Hello, { extensions: { directives }})
126
- */
127
- directives?: VueDirectives;
128
- }
129
- /**
130
- * Options controlling how the component is going to be mounted,
131
- * including global Vue plugins and extensions.
132
- *
133
- * @interface MountOptions
134
- */
135
- interface MountOptions {
136
- /**
137
- * Vue instance to use.
138
- *
139
- * @deprecated
140
- * @memberof MountOptions
141
- */
142
- vue: unknown;
143
- /**
144
- * Extra Vue plugins, mixins, local components to register while
145
- * mounting this component
146
- *
147
- * @memberof MountOptions
148
- * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
149
- */
150
- extensions: MountOptionsExtensions;
151
- }
152
- /**
153
- * Utility type for union of options passed to "mount(..., options)"
154
- */
155
- type MountOptionsArgument = Partial<ComponentOptions & MountOptions & VueTestUtilsConfigOptions>;
156
- declare global {
157
- namespace Cypress {
158
- interface Cypress {
159
- /**
160
- * Mounted Vue instance is available under Cypress.vue
161
- * @memberof Cypress
162
- * @example
163
- * mount(Greeting)
164
- * .then(() => {
165
- * Cypress.vue.message = 'Hello There'
166
- * })
167
- * // new message is displayed
168
- * cy.contains('Hello There').should('be.visible')
169
- */
170
- vue: Vue;
171
- vueWrapper: Wrapper<Vue>;
172
- }
173
- }
174
- }
175
- /**
176
- * Mounts a Vue component inside Cypress browser.
177
- * @param {VueComponent} component imported from Vue file
178
- * @param {MountOptionsArgument} optionsOrProps used to pass options to component being mounted
179
- * @returns {Cypress.Chainable<{wrapper: Wrapper<T>, component: T}
180
- * @example
181
- * import { mount } from '@cypress/vue'
182
- * import { Stepper } from './Stepper.vue'
183
- *
184
- * it('mounts', () => {
185
- * cy.mount(Stepper)
186
- * cy.get('[data-cy=increment]').click()
187
- * cy.get('[data-cy=counter]').should('have.text', '1')
188
- * })
189
- * @see {@link https://on.cypress.io/mounting-vue} for more details.
190
- *
191
- */
192
- declare const mount: (component: VueComponent, optionsOrProps?: MountOptionsArgument) => Cypress.Chainable<{
193
- wrapper: Wrapper<Vue, Element>;
194
- component: Wrapper<Vue, Element>['vm'];
195
- }>;
196
- /**
197
- * Helper function for mounting a component quickly in test hooks.
198
- * @example
199
- * import {mountCallback} from '@cypress/vue2'
200
- * beforeEach(mountVue(component, options))
201
- *
202
- * Removed as of Cypress 11.0.0.
203
- * @see https://on.cypress.io/migration-11-0-0-component-testing-updates
204
- */
205
- declare const mountCallback: (component: VueComponent, options?: MountOptionsArgument) => () => void;
206
-
207
- export { mount, mountCallback };
package/vue2/package.json DELETED
@@ -1,65 +0,0 @@
1
- {
2
- "name": "@cypress/vue2",
3
- "version": "0.0.0-development",
4
- "description": "Browser-based Component Testing for Vue.js@2 with Cypress.io ✌️🌲",
5
- "main": "dist/cypress-vue2.cjs.js",
6
- "scripts": {
7
- "build": "rimraf dist && yarn rollup -c rollup.config.mjs",
8
- "postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
9
- "check-ts": "tsc --noEmit",
10
- "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json,.vue .",
11
- "test": "echo \"Tests for @cypress/vue2 are run from system-tests\"",
12
- "test-ci": "node ../../scripts/run-ct-examples.js --examplesList=./examples.env",
13
- "watch": "yarn build --watch --watch.exclude ./dist/**/*"
14
- },
15
- "devDependencies": {
16
- "@cypress/mount-utils": "0.0.0-development",
17
- "@rollup/plugin-json": "^4.1.0",
18
- "@rollup/plugin-replace": "^2.3.1",
19
- "@vue/test-utils": "^1.3.1",
20
- "tslib": "^2.1.0",
21
- "typescript": "~5.4.5",
22
- "vue": "2.7.16"
23
- },
24
- "peerDependencies": {
25
- "cypress": ">=4.5.0",
26
- "vue": "^2.0.0"
27
- },
28
- "files": [
29
- "dist/**/*",
30
- "src/**/*.js"
31
- ],
32
- "engines": {
33
- "node": ">=8"
34
- },
35
- "types": "dist/index.d.ts",
36
- "license": "MIT",
37
- "repository": {
38
- "type": "git",
39
- "url": "https://github.com/cypress-io/cypress.git"
40
- },
41
- "homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/vue/#readme",
42
- "bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Fvue&template=1-bug-report.md&title=",
43
- "keywords": [
44
- "cypress",
45
- "vue"
46
- ],
47
- "unpkg": "dist/cypress-vue2.browser.js",
48
- "module": "dist/cypress-vue2.esm-bundler.js",
49
- "publishConfig": {
50
- "access": "public"
51
- },
52
- "nx": {
53
- "targets": {
54
- "build": {
55
- "outputs": [
56
- "{workspaceRoot}/cli/vue2",
57
- "{projectRoot}/dist"
58
- ]
59
- }
60
- },
61
- "implicitDependencies": [
62
- "!cypress"
63
- ]
64
- }
65
- }
@@ -1,7 +0,0 @@
1
- # @cypress/vue2
2
-
3
- Mount Vue 2 components in the open source [Cypress.io](https://www.cypress.io/) test runner
4
-
5
- > **Note:** This package is bundled with the `cypress` package and should not need to be installed separately. See the [Vue Component Testing Docs](https://docs.cypress.io/guides/component-testing/vue/overview) for mounting Vue components. Installing and importing `mount` from `@cypress/vue2` should only be done for advanced use-cases.
6
-
7
- ## [Changelog](./CHANGELOG.md)