cypress 16.2.0 → 16.3.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.js +10 -12
- package/angular/package.json +7 -22
- package/dist/bin/cypress +8 -8
- package/dist/{cli-AgTnS5LO.js → cli-y9Bb9Y77.js} +215 -40
- package/dist/cli.js +6 -6
- package/dist/{cypress-CdDm9AVa.js → cypress-CvEs5adm.js} +2 -2
- package/dist/cypress.js +8 -8
- package/dist/exec/spawn.js +4 -4
- package/dist/exec/xvfb.js +7 -4
- package/dist/index.js +8 -8
- package/dist/{spawn-DElwyZHC.js → spawn-Bx99tBTm.js} +529 -69
- package/dist/{tap-WHD3nHJC.js → tap-BMFGLoCT.js} +108 -26
- package/dist/{xvfb-CbW2_YXR.js → xvfb-DxbcANVl.js} +238 -25
- package/mount-utils/dist/index.js +1 -1
- package/mount-utils/package.json +15 -14
- package/package.json +5 -5
- package/react/dist/cypress-react.cjs.js +9 -7
- package/react/dist/cypress-react.esm-bundler.js +9 -7
- package/react/package.json +26 -46
- package/svelte/dist/cypress-svelte.cjs.js +3 -2
- package/svelte/dist/cypress-svelte.esm-bundler.js +3 -2
- package/svelte/package.json +24 -22
- package/types/cy-bluebird.d.ts +1 -0
- package/types/cy-chai.d.ts +99 -2
- package/types/cypress.d.ts +216 -43
- package/types/net-stubbing.d.ts +1 -1
- package/vue/dist/cypress-vue.cjs.js +4 -2
- package/vue/dist/cypress-vue.esm-bundler.js +4 -2
- package/vue/dist/index.d.ts +3 -3
- package/vue/package.json +35 -42
- package/angular/angular/README.md +0 -18
- package/angular/angular/dist/index.d.ts +0 -120
- package/angular/angular/dist/index.js +0 -479
- package/angular/angular/package.json +0 -82
- package/mount-utils/mount-utils/README.md +0 -140
- package/mount-utils/mount-utils/dist/index.d.ts +0 -12
- package/mount-utils/mount-utils/dist/index.js +0 -41
- package/mount-utils/mount-utils/package.json +0 -52
- package/react/react/README.md +0 -19
- package/react/react/dist/cypress-react.cjs.js +0 -293
- package/react/react/dist/cypress-react.esm-bundler.js +0 -268
- package/react/react/dist/index.d.ts +0 -95
- package/react/react/package.json +0 -113
- package/svelte/svelte/README.md +0 -19
- package/svelte/svelte/dist/cypress-svelte.cjs.js +0 -122
- package/svelte/svelte/dist/cypress-svelte.esm-bundler.js +0 -120
- package/svelte/svelte/dist/index.d.ts +0 -31
- package/svelte/svelte/package.json +0 -63
- package/vue/vue/README.md +0 -14
- package/vue/vue/dist/cypress-vue.cjs.js +0 -8692
- package/vue/vue/dist/cypress-vue.esm-bundler.js +0 -8671
- package/vue/vue/dist/index.d.ts +0 -1413
- package/vue/vue/package.json +0 -97
package/vue/dist/index.d.ts
CHANGED
|
@@ -1392,11 +1392,11 @@ declare function mount<T extends DefineComponent<any, any, any, any, any>>(compo
|
|
|
1392
1392
|
wrapper: VueWrapper<InstanceType<T>>;
|
|
1393
1393
|
component: VueWrapper<InstanceType<T>>['vm'];
|
|
1394
1394
|
}>;
|
|
1395
|
-
declare function mount<Props = {}, RawBindings = {}, D extends {} = {}, C extends ComputedOptions = {}, M extends
|
|
1395
|
+
declare function mount<Props = {}, RawBindings = {}, D extends {} = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, 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<{
|
|
1396
1396
|
wrapper: VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>> & Record<string, any>;
|
|
1397
1397
|
component: VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>> & Record<string, any>['vm'];
|
|
1398
1398
|
}>;
|
|
1399
|
-
declare function mount<PropNames extends string, RawBindings, D extends {}, C extends ComputedOptions = {}, M extends
|
|
1399
|
+
declare function mount<PropNames extends string, RawBindings, D extends {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = Record<string, any>, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string, Props extends Readonly<{
|
|
1400
1400
|
[key in PropNames]?: any;
|
|
1401
1401
|
}> = Readonly<{
|
|
1402
1402
|
[key in PropNames]?: any;
|
|
@@ -1404,7 +1404,7 @@ declare function mount<PropNames extends string, RawBindings, D extends {}, C ex
|
|
|
1404
1404
|
wrapper: VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E>>;
|
|
1405
1405
|
component: VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E>>['vm'];
|
|
1406
1406
|
}>;
|
|
1407
|
-
declare function mount<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D extends {}, C extends ComputedOptions = {}, M extends
|
|
1407
|
+
declare function mount<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D extends {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = Record<string, any>, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string>(componentOptions: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, E, Mixin, Extends, EE>, options?: MountingOptions<ExtractPropTypes<PropsOptions> & PublicProps, D>): Cypress.Chainable<{
|
|
1408
1408
|
wrapper: VueWrapper<ComponentPublicInstance<ExtractPropTypes<PropsOptions>, RawBindings, D, C, M, E, VNodeProps & ExtractPropTypes<PropsOptions>>>;
|
|
1409
1409
|
component: VueWrapper<ComponentPublicInstance<ExtractPropTypes<PropsOptions>, RawBindings, D, C, M, E, VNodeProps & ExtractPropTypes<PropsOptions>>>['vm'];
|
|
1410
1410
|
}>;
|
package/vue/package.json
CHANGED
|
@@ -2,11 +2,33 @@
|
|
|
2
2
|
"name": "@cypress/vue",
|
|
3
3
|
"version": "0.0.0-development",
|
|
4
4
|
"description": "Browser-based Component Testing for Vue.js with Cypress.io",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cypress",
|
|
7
|
+
"vue",
|
|
8
|
+
"vue3",
|
|
9
|
+
"component-testing",
|
|
10
|
+
"vue-testing",
|
|
11
|
+
"testing",
|
|
12
|
+
"sfc"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/vue/#readme",
|
|
15
|
+
"bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Fvue&template=1-bug-report.md&title=",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/cypress-io/cypress.git"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
5
21
|
"main": "dist/cypress-vue.cjs.js",
|
|
22
|
+
"module": "dist/cypress-vue.esm-bundler.js",
|
|
23
|
+
"types": "dist/index.d.ts",
|
|
24
|
+
"files": [
|
|
25
|
+
"dist/**/*",
|
|
26
|
+
"src/**/*.js"
|
|
27
|
+
],
|
|
6
28
|
"scripts": {
|
|
7
29
|
"build": "rimraf dist && rollup -c rollup.config.mjs",
|
|
8
30
|
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
|
|
9
|
-
"check-ts": "yarn tsd && vue-tsc --noEmit",
|
|
31
|
+
"check-ts": "yarn tsd && vue-tsc --noEmit && vue-tsc --noEmit -p cypress/tsconfig.json",
|
|
10
32
|
"cy:open": "node ../../scripts/cypress.js open --component --project ${PWD}",
|
|
11
33
|
"cy:run": "node ../../scripts/cypress.js run --component --project ${PWD}",
|
|
12
34
|
"lint": "eslint",
|
|
@@ -14,21 +36,26 @@
|
|
|
14
36
|
"tsd": "yarn build && yarn tsc -p test-tsd/tsconfig.json",
|
|
15
37
|
"watch": "yarn build --watch --watch.exclude ./dist/**/*"
|
|
16
38
|
},
|
|
39
|
+
"lint-staged": {
|
|
40
|
+
"**/*.{js,jsx,ts,tsx,json,vue}": "eslint --fix"
|
|
41
|
+
},
|
|
17
42
|
"devDependencies": {
|
|
18
|
-
"@packages/eslint-config": "0.0.0-development",
|
|
19
43
|
"@cypress/mount-utils": "0.0.0-development",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
44
|
+
"@cypress/vite-plugin-cypress-esm": "0.0.0-development",
|
|
45
|
+
"@intlify/unplugin-vue-i18n": "11.2.5",
|
|
46
|
+
"@packages/eslint-config": "0.0.0-development",
|
|
22
47
|
"@vitejs/plugin-vue": "6.0.6",
|
|
23
48
|
"@vue/compiler-sfc": "3.2.47",
|
|
24
49
|
"@vue/test-utils": "2.4.6",
|
|
25
50
|
"axios": "^1.20.0",
|
|
26
51
|
"cypress": "0.0.0-development",
|
|
52
|
+
"eslint": "^9.31.0",
|
|
53
|
+
"jiti": "^2.4.2",
|
|
27
54
|
"rollup": "^4.60.2",
|
|
28
55
|
"typescript": "~5.4.5",
|
|
29
56
|
"vite": "^8.0.9",
|
|
30
|
-
"vue-eslint-parser": "^10.0.0",
|
|
31
57
|
"vue": "3.2.47",
|
|
58
|
+
"vue-eslint-parser": "^10.4.2",
|
|
32
59
|
"vue-i18n": "9.14.5",
|
|
33
60
|
"vue-router": "^4.0.0",
|
|
34
61
|
"vue-tsc": "^2.0.19",
|
|
@@ -39,45 +66,14 @@
|
|
|
39
66
|
"cypress": ">=7.0.0",
|
|
40
67
|
"vue": ">=3.0.0"
|
|
41
68
|
},
|
|
42
|
-
"files": [
|
|
43
|
-
"dist/**/*",
|
|
44
|
-
"src/**/*.js"
|
|
45
|
-
],
|
|
46
|
-
"engines": {
|
|
47
|
-
"node": "^22.0.0 || ^24.0.0 || >=26.0.0"
|
|
48
|
-
},
|
|
49
|
-
"types": "dist/index.d.ts",
|
|
50
|
-
"license": "MIT",
|
|
51
|
-
"repository": {
|
|
52
|
-
"type": "git",
|
|
53
|
-
"url": "https://github.com/cypress-io/cypress.git"
|
|
54
|
-
},
|
|
55
|
-
"homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/vue/#readme",
|
|
56
|
-
"bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Fvue&template=1-bug-report.md&title=",
|
|
57
|
-
"keywords": [
|
|
58
|
-
"cypress",
|
|
59
|
-
"vue"
|
|
60
|
-
],
|
|
61
|
-
"contributors": [
|
|
62
|
-
{
|
|
63
|
-
"name": "Jessica Sachs",
|
|
64
|
-
"social": "@JessicaSachs"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"name": "Amir Rustamzadeh",
|
|
68
|
-
"social": "@amirrustam"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "Lachlan Miller",
|
|
72
|
-
"social": "@Lachlan19900"
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
"module": "dist/cypress-vue.esm-bundler.js",
|
|
76
69
|
"peerDependenciesMeta": {
|
|
77
70
|
"@cypress/webpack-dev-server": {
|
|
78
71
|
"optional": true
|
|
79
72
|
}
|
|
80
73
|
},
|
|
74
|
+
"engines": {
|
|
75
|
+
"node": "^22.0.0 || ^24.0.0 || >=26.0.0"
|
|
76
|
+
},
|
|
81
77
|
"publishConfig": {
|
|
82
78
|
"access": "public"
|
|
83
79
|
},
|
|
@@ -90,8 +86,5 @@
|
|
|
90
86
|
]
|
|
91
87
|
}
|
|
92
88
|
}
|
|
93
|
-
},
|
|
94
|
-
"lint-staged": {
|
|
95
|
-
"**/*.{js,jsx,ts,tsx,vue}": "eslint --fix"
|
|
96
89
|
}
|
|
97
90
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# @cypress/angular
|
|
2
|
-
|
|
3
|
-
Mount Angular 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 [Angular Component Testing Docs](https://docs.cypress.io/guides/component-testing/angular/overview) for mounting Angular components. Installing and importing `mount` from `@cypress/angular` should only be done for advanced use-cases.
|
|
6
|
-
|
|
7
|
-
## Requirements
|
|
8
|
-
|
|
9
|
-
- Angular `>=21.0.0`
|
|
10
|
-
- `@cypress/angular@4` supports Angular 18 - 19
|
|
11
|
-
- `@cypress/angular@3` supports Angular 17
|
|
12
|
-
- `@cypress/angular@2` supports Angular 13 - 16
|
|
13
|
-
|
|
14
|
-
## Development
|
|
15
|
-
|
|
16
|
-
Run `yarn build` to compile and sync packages to the `cypress` cli package.
|
|
17
|
-
|
|
18
|
-
## [Changelog](./CHANGELOG.md)
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
|
|
3
|
-
import { InputSignal, WritableSignal, Type } from '@angular/core';
|
|
4
|
-
import { TestComponentRenderer, TestModuleMetadata, ComponentFixture } from '@angular/core/testing';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Additional module configurations needed while mounting the component, like
|
|
8
|
-
* providers, declarations, imports and even component @Inputs()
|
|
9
|
-
*
|
|
10
|
-
* @interface MountConfig
|
|
11
|
-
* @see https://angular.io/api/core/testing/TestModuleMetadata
|
|
12
|
-
*/
|
|
13
|
-
interface MountConfig<T> extends TestModuleMetadata {
|
|
14
|
-
/**
|
|
15
|
-
* @memberof MountConfig
|
|
16
|
-
* @example
|
|
17
|
-
* import { ButtonComponent } from 'button/button.component'
|
|
18
|
-
* it('renders a button with Save text', () => {
|
|
19
|
-
* cy.mount(ButtonComponent, { componentProperties: { text: 'Save' }})
|
|
20
|
-
* cy.get('button').contains('Save')
|
|
21
|
-
* })
|
|
22
|
-
*
|
|
23
|
-
* it('renders a button with a cy.spy() replacing EventEmitter', () => {
|
|
24
|
-
* cy.mount(ButtonComponent, {
|
|
25
|
-
* componentProperties: {
|
|
26
|
-
* clicked: cy.spy().as('mySpy)
|
|
27
|
-
* }
|
|
28
|
-
* })
|
|
29
|
-
* cy.get('button').click()
|
|
30
|
-
* cy.get('@mySpy').should('have.been.called')
|
|
31
|
-
* })
|
|
32
|
-
*/
|
|
33
|
-
componentProperties?: Partial<{
|
|
34
|
-
[P in keyof T]: T[P] extends InputSignal<infer V> ? InputSignal<V> | WritableSignal<V> | V : T[P];
|
|
35
|
-
}>;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Type that the `mount` function returns
|
|
39
|
-
* @type MountResponse<T>
|
|
40
|
-
*/
|
|
41
|
-
type MountResponse<T> = {
|
|
42
|
-
/**
|
|
43
|
-
* Fixture for debugging and testing a component.
|
|
44
|
-
*
|
|
45
|
-
* @memberof MountResponse
|
|
46
|
-
* @see https://angular.io/api/core/testing/ComponentFixture
|
|
47
|
-
*/
|
|
48
|
-
fixture: ComponentFixture<T>;
|
|
49
|
-
/**
|
|
50
|
-
* The instance of the root component class
|
|
51
|
-
*
|
|
52
|
-
* @memberof MountResponse
|
|
53
|
-
* @see https://angular.io/api/core/testing/ComponentFixture#componentInstance
|
|
54
|
-
*/
|
|
55
|
-
component: T;
|
|
56
|
-
};
|
|
57
|
-
declare class CypressTestComponentRenderer extends TestComponentRenderer {
|
|
58
|
-
insertRootElement(rootElId: string): void;
|
|
59
|
-
removeAllRootElements(): void;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Mounts an Angular component inside Cypress browser
|
|
63
|
-
*
|
|
64
|
-
* @param component Angular component being mounted or its template
|
|
65
|
-
* @param config configuration used to configure the TestBed
|
|
66
|
-
* @example
|
|
67
|
-
* import { mount } from '@cypress/angular'
|
|
68
|
-
* import { StepperComponent } from './stepper.component'
|
|
69
|
-
* import { MyService } from 'services/my.service'
|
|
70
|
-
* import { SharedModule } from 'shared/shared.module';
|
|
71
|
-
* it('mounts', () => {
|
|
72
|
-
* mount(StepperComponent, {
|
|
73
|
-
* providers: [MyService],
|
|
74
|
-
* imports: [SharedModule]
|
|
75
|
-
* })
|
|
76
|
-
* cy.get('[data-cy=increment]').click()
|
|
77
|
-
* cy.get('[data-cy=counter]').should('have.text', '1')
|
|
78
|
-
* })
|
|
79
|
-
*
|
|
80
|
-
* // or
|
|
81
|
-
*
|
|
82
|
-
* it('mounts with template', () => {
|
|
83
|
-
* mount('<app-stepper></app-stepper>', {
|
|
84
|
-
* declarations: [StepperComponent],
|
|
85
|
-
* })
|
|
86
|
-
* })
|
|
87
|
-
*
|
|
88
|
-
* @see {@link https://on.cypress.io/mounting-angular} for more details.
|
|
89
|
-
*
|
|
90
|
-
* @returns A component and component fixture
|
|
91
|
-
*/
|
|
92
|
-
declare function mount<T>(component: Type<T> | string, config?: MountConfig<T>): Cypress.Chainable<MountResponse<T>>;
|
|
93
|
-
/**
|
|
94
|
-
* Creates a new Event Emitter and then spies on it's `emit` method
|
|
95
|
-
*
|
|
96
|
-
* @param {string} alias name you want to use for your cy.spy() alias
|
|
97
|
-
* @returns EventEmitter<T>
|
|
98
|
-
* @example
|
|
99
|
-
* import { StepperComponent } from './stepper.component'
|
|
100
|
-
* import { mount, createOutputSpy } from '@cypress/angular'
|
|
101
|
-
*
|
|
102
|
-
* it('Has spy', () => {
|
|
103
|
-
* mount(StepperComponent, { componentProperties: { change: createOutputSpy('changeSpy') } })
|
|
104
|
-
* cy.get('[data-cy=increment]').click()
|
|
105
|
-
* cy.get('@changeSpy').should('have.been.called')
|
|
106
|
-
* })
|
|
107
|
-
*
|
|
108
|
-
* // Or for use with Angular Signals following the output nomenclature.
|
|
109
|
-
* // see https://v17.angular.io/guide/model-inputs#differences-between-model-and-input/
|
|
110
|
-
*
|
|
111
|
-
* it('Has spy', () => {
|
|
112
|
-
* mount(StepperComponent, { componentProperties: { count: signal(0), countChange: createOutputSpy('countChange') } })
|
|
113
|
-
* cy.get('[data-cy=increment]').click()
|
|
114
|
-
* cy.get('@countChange').should('have.been.called')
|
|
115
|
-
* })
|
|
116
|
-
*/
|
|
117
|
-
declare const createOutputSpy: <T>(alias: string) => any;
|
|
118
|
-
|
|
119
|
-
export { CypressTestComponentRenderer, createOutputSpy, mount };
|
|
120
|
-
export type { MountConfig, MountResponse };
|