cypress 9.6.0 → 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/index.mjs +15 -0
- package/lib/cli.js +72 -23
- package/lib/errors.js +16 -1
- package/lib/exec/open.js +45 -10
- package/lib/exec/run.js +17 -10
- package/lib/exec/shared.js +30 -9
- package/lib/exec/spawn.js +4 -0
- package/lib/exec/xvfb.js +1 -0
- package/lib/util.js +10 -3
- package/mount-utils/CHANGELOG.md +20 -0
- package/mount-utils/README.md +14 -0
- package/mount-utils/dist/index.d.ts +54 -0
- package/mount-utils/dist/index.js +134 -0
- package/mount-utils/package.json +31 -0
- package/package.json +39 -4
- package/react/CHANGELOG.md +373 -0
- package/react/README.md +414 -0
- package/react/dist/cypress-react.browser.js +497 -0
- package/react/dist/cypress-react.cjs.js +495 -0
- package/react/dist/cypress-react.esm-bundler.js +467 -0
- package/react/dist/getDisplayName.d.ts +8 -0
- package/react/dist/index.d.ts +2 -0
- package/react/dist/mount.d.ts +143 -0
- package/react/dist/mountHook.d.ts +11 -0
- package/react/package.json +105 -0
- package/types/bluebird/index.d.ts +18 -4
- package/types/cypress-eventemitter.d.ts +1 -1
- package/types/cypress-global-vars.d.ts +2 -2
- package/types/cypress-npm-api.d.ts +4 -10
- package/types/cypress.d.ts +180 -120
- package/types/minimatch/index.d.ts +15 -5
- package/vue/CHANGELOG.md +380 -0
- package/vue/README.md +678 -0
- package/vue/dist/cypress-vue.cjs.js +13535 -0
- package/vue/dist/cypress-vue.esm-bundler.js +13511 -0
- package/vue/dist/index.d.ts +56 -0
- package/vue/package.json +86 -0
- package/vue2/CHANGELOG.md +5 -0
- package/vue2/README.md +693 -0
- package/vue2/dist/cypress-vue2.browser.js +20191 -0
- package/vue2/dist/cypress-vue2.cjs.js +20188 -0
- package/vue2/dist/cypress-vue2.esm-bundler.js +20179 -0
- package/vue2/dist/index.d.ts +171 -0
- package/vue2/package.json +59 -0
@@ -0,0 +1,56 @@
|
|
1
|
+
/// <reference types="cypress" />
|
2
|
+
import { ComponentPublicInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, ExtractDefaultPropTypes, DefineComponent, FunctionalComponent, ComputedOptions, MethodOptions, ComponentOptionsMixin, EmitsOptions, ComponentOptionsWithObjectProps, ComponentPropsOptions, ComponentOptionsWithArrayProps, ComponentOptionsWithoutProps } from 'vue';
|
3
|
+
import { MountingOptions, VueWrapper } from '@vue/test-utils';
|
4
|
+
import { StyleOptions } from '@cypress/mount-utils';
|
5
|
+
declare type GlobalMountOptions = Required<MountingOptions<any>>['global'];
|
6
|
+
declare global {
|
7
|
+
namespace Cypress {
|
8
|
+
interface Cypress {
|
9
|
+
vueWrapper: VueWrapper<ComponentPublicInstance>;
|
10
|
+
vue: ComponentPublicInstance;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
export declare type CyMountOptions<Props, Data = {}> = Omit<MountingOptions<Props, Data>, 'attachTo'> & {
|
15
|
+
log?: boolean;
|
16
|
+
/**
|
17
|
+
* @deprecated use vue-test-utils `global` instead
|
18
|
+
*/
|
19
|
+
extensions?: GlobalMountOptions & {
|
20
|
+
use?: GlobalMountOptions['plugins'];
|
21
|
+
mixin?: GlobalMountOptions['mixins'];
|
22
|
+
};
|
23
|
+
} & Partial<StyleOptions>;
|
24
|
+
/**
|
25
|
+
* the types for mount have been copied directly from the VTU mount
|
26
|
+
* https://github.com/vuejs/vue-test-utils-next/blob/master/src/mount.ts
|
27
|
+
*
|
28
|
+
* If they are updated please copy and pase them again here.
|
29
|
+
*/
|
30
|
+
declare type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
31
|
+
export declare function mount<V>(originalComponent: {
|
32
|
+
new (...args: any[]): V;
|
33
|
+
registerHooks(keys: string[]): void;
|
34
|
+
}, options?: MountingOptions<any>): Cypress.Chainable;
|
35
|
+
export declare function mount<V, P>(originalComponent: {
|
36
|
+
new (...args: any[]): V;
|
37
|
+
props(Props: P): any;
|
38
|
+
registerHooks(keys: string[]): void;
|
39
|
+
}, options?: CyMountOptions<P & PublicProps>): Cypress.Chainable;
|
40
|
+
export declare function mount<Props, E extends EmitsOptions = {}>(originalComponent: FunctionalComponent<Props, E>, options?: CyMountOptions<Props & PublicProps>): Cypress.Chainable;
|
41
|
+
export declare function mount<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string, PP = PublicProps, Props = Readonly<ExtractPropTypes<PropsOrPropOptions>>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>>(component: DefineComponent<PropsOrPropOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, PP, Props, Defaults>, options?: CyMountOptions<Partial<Defaults> & Omit<Props & PublicProps, keyof Defaults>, D>): Cypress.Chainable;
|
42
|
+
export declare function mount<Props = {}, RawBindings = {}, D = {}, 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>, options?: CyMountOptions<Props & PublicProps, D>): Cypress.Chainable;
|
43
|
+
export declare function mount<PropNames extends string, RawBindings, D, 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<{
|
44
|
+
[key in PropNames]?: any;
|
45
|
+
}> = Readonly<{
|
46
|
+
[key in PropNames]?: any;
|
47
|
+
}>>(componentOptions: ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, E, Mixin, Extends, EE, Props>, options?: CyMountOptions<Props & PublicProps, D>): Cypress.Chainable;
|
48
|
+
export declare function mount<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D, 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: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, E, Mixin, Extends, EE>, options?: CyMountOptions<ExtractPropTypes<PropsOptions> & PublicProps, D>): Cypress.Chainable;
|
49
|
+
/**
|
50
|
+
* Helper function for mounting a component quickly in test hooks.
|
51
|
+
* @example
|
52
|
+
* import {mountCallback} from '@cypress/vue'
|
53
|
+
* beforeEach(mountVue(component, options))
|
54
|
+
*/
|
55
|
+
export declare function mountCallback(component: any, options?: any): () => Cypress.Chainable;
|
56
|
+
export {};
|
package/vue/package.json
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
{
|
2
|
+
"name": "@cypress/vue",
|
3
|
+
"version": "0.0.0-development",
|
4
|
+
"description": "Browser-based Component Testing for Vue.js with Cypress.io ✌️🌲",
|
5
|
+
"private": true,
|
6
|
+
"main": "dist/cypress-vue.cjs.js",
|
7
|
+
"scripts": {
|
8
|
+
"build-prod": "yarn build",
|
9
|
+
"cy:open": "node ../../scripts/cypress.js open --component --project ${PWD}",
|
10
|
+
"cy:run": "node ../../scripts/cypress.js run --component --project ${PWD}",
|
11
|
+
"build": "rimraf dist && rollup -c rollup.config.js",
|
12
|
+
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
|
13
|
+
"typecheck": "vue-tsc --noEmit",
|
14
|
+
"test": "yarn cy:run",
|
15
|
+
"watch": "yarn build --watch --watch.exclude ./dist/**/*"
|
16
|
+
},
|
17
|
+
"dependencies": {
|
18
|
+
"@vue/test-utils": "2.0.0-rc.19"
|
19
|
+
},
|
20
|
+
"devDependencies": {
|
21
|
+
"@cypress/code-coverage": "3.8.1",
|
22
|
+
"@cypress/mount-utils": "0.0.0-development",
|
23
|
+
"@rollup/plugin-commonjs": "^17.1.0",
|
24
|
+
"@rollup/plugin-node-resolve": "^11.1.1",
|
25
|
+
"@vitejs/plugin-vue": "2.3.1",
|
26
|
+
"@vue/compiler-sfc": "3.2.31",
|
27
|
+
"axios": "0.21.2",
|
28
|
+
"cypress": "0.0.0-development",
|
29
|
+
"debug": "^4.3.2",
|
30
|
+
"rollup": "^2.38.5",
|
31
|
+
"rollup-plugin-istanbul": "2.0.1",
|
32
|
+
"rollup-plugin-typescript2": "^0.29.0",
|
33
|
+
"tailwindcss": "1.1.4",
|
34
|
+
"typescript": "^4.2.3",
|
35
|
+
"vite": "2.9.5",
|
36
|
+
"vue": "3.2.31",
|
37
|
+
"vue-i18n": "9.0.0-rc.6",
|
38
|
+
"vue-router": "^4.0.0",
|
39
|
+
"vue-tsc": "^0.3.0",
|
40
|
+
"vuex": "^4.0.0"
|
41
|
+
},
|
42
|
+
"peerDependencies": {
|
43
|
+
"@cypress/webpack-dev-server": "*",
|
44
|
+
"cypress": ">=7.0.0",
|
45
|
+
"vue": ">=3.0.0"
|
46
|
+
},
|
47
|
+
"files": [
|
48
|
+
"dist/**/*",
|
49
|
+
"src/**/*.js"
|
50
|
+
],
|
51
|
+
"engines": {
|
52
|
+
"node": ">=8"
|
53
|
+
},
|
54
|
+
"types": "dist",
|
55
|
+
"license": "MIT",
|
56
|
+
"repository": {
|
57
|
+
"type": "git",
|
58
|
+
"url": "https://github.com/cypress-io/cypress.git"
|
59
|
+
},
|
60
|
+
"homepage": "https://github.com/cypress-io/cypress/blob/master/npm/vue/#readme",
|
61
|
+
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>",
|
62
|
+
"bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Fvue&template=1-bug-report.md&title=",
|
63
|
+
"keywords": [
|
64
|
+
"cypress",
|
65
|
+
"vue"
|
66
|
+
],
|
67
|
+
"contributors": [
|
68
|
+
{
|
69
|
+
"name": "Jessica Sachs",
|
70
|
+
"social": "@JessicaSachs"
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"name": "Amir Rustamzadeh",
|
74
|
+
"social": "@amirrustam"
|
75
|
+
}
|
76
|
+
],
|
77
|
+
"module": "dist/cypress-vue.esm-bundler.js",
|
78
|
+
"peerDependenciesMeta": {
|
79
|
+
"@cypress/webpack-dev-server": {
|
80
|
+
"optional": true
|
81
|
+
}
|
82
|
+
},
|
83
|
+
"publishConfig": {
|
84
|
+
"access": "public"
|
85
|
+
}
|
86
|
+
}
|