cypress 13.16.1 → 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/vue/dist/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="cypress" />
|
2
2
|
|
3
3
|
import * as vue from 'vue';
|
4
|
-
import { ComponentInternalInstance, FunctionalComponent, ComponentOptions, Component, Directive, Plugin as Plugin$1, AppConfig, VNode, VNodeProps, ComponentPublicInstance, ComputedOptions, MethodOptions, CreateComponentPublicInstance,
|
4
|
+
import { ComponentInternalInstance, FunctionalComponent, ComponentOptions, Component, Directive, Plugin as Plugin$1, AppConfig, VNode, VNodeProps, ComponentPublicInstance, ComputedOptions, MethodOptions, CreateComponentPublicInstance, App, ConcreteComponent, DefineComponent, Prop, EmitsOptions, ComponentOptionsMixin, ExtractPropTypes, ExtractDefaultPropTypes, ComponentOptionsWithoutProps, ComponentOptionsWithArrayProps, ComponentPropsOptions, ComponentOptionsWithObjectProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
|
5
5
|
|
6
6
|
interface RefSelector {
|
7
7
|
ref: string;
|
@@ -22,7 +22,7 @@ type RawProps = VNodeProps & {
|
|
22
22
|
__v_isVNode?: never;
|
23
23
|
[Symbol.iterator]?: never;
|
24
24
|
} & Record<string, any>;
|
25
|
-
interface
|
25
|
+
interface BaseMountingOptions<Props, Data = {}> {
|
26
26
|
/**
|
27
27
|
* Overrides component's default data. Must be a function.
|
28
28
|
* @see https://test-utils.vuejs.org/api/#data
|
@@ -53,18 +53,32 @@ interface MountingOptions$1<Props, Data = {}> {
|
|
53
53
|
* Provides global mounting options to the component.
|
54
54
|
*/
|
55
55
|
global?: GlobalMountOptions$1;
|
56
|
+
/**
|
57
|
+
* Automatically stub out all the child components.
|
58
|
+
* @default false
|
59
|
+
* @see https://test-utils.vuejs.org/api/#slots
|
60
|
+
*/
|
61
|
+
shallow?: boolean;
|
62
|
+
}
|
63
|
+
/**
|
64
|
+
* Mounting options for `mount` and `shallowMount`
|
65
|
+
*/
|
66
|
+
interface MountingOptions$1<Props, Data = {}> extends BaseMountingOptions<Props, Data> {
|
56
67
|
/**
|
57
68
|
* Specify where to mount the component.
|
58
69
|
* Can be a valid CSS selector, or an Element connected to the document.
|
59
70
|
* @see https://test-utils.vuejs.org/api/#attachto
|
60
71
|
*/
|
61
|
-
attachTo?:
|
72
|
+
attachTo?: Element | string;
|
73
|
+
}
|
74
|
+
/**
|
75
|
+
* Mounting options for `renderToString`
|
76
|
+
*/
|
77
|
+
interface RenderMountingOptions<Props, Data = {}> extends BaseMountingOptions<Props, Data> {
|
62
78
|
/**
|
63
|
-
*
|
64
|
-
* @default false
|
65
|
-
* @see https://test-utils.vuejs.org/api/#slots
|
79
|
+
* Attach to is not available in SSR mode
|
66
80
|
*/
|
67
|
-
|
81
|
+
attachTo?: never;
|
68
82
|
}
|
69
83
|
type Stub = boolean | Component | Directive;
|
70
84
|
type Stubs = Record<string, Stub> | Array<string>;
|
@@ -1150,9 +1164,7 @@ declare abstract class BaseWrapper<ElementType extends Node> implements WrapperL
|
|
1150
1164
|
trigger(eventString: string, options?: TriggerOptions): Promise<void>;
|
1151
1165
|
}
|
1152
1166
|
|
1153
|
-
declare class VueWrapper<T extends
|
1154
|
-
$emit: (event: any, ...args: any[]) => void;
|
1155
|
-
} & ComponentCustomProperties = ComponentPublicInstance> extends BaseWrapper<Node> {
|
1167
|
+
declare class VueWrapper<VM = unknown, T extends ComponentPublicInstance = VM & ComponentPublicInstance> extends BaseWrapper<Node> {
|
1156
1168
|
private readonly componentVM;
|
1157
1169
|
private readonly rootVM;
|
1158
1170
|
private readonly __app;
|
@@ -1168,17 +1180,15 @@ declare class VueWrapper<T extends Omit<ComponentPublicInstance, '$emit' | keyof
|
|
1168
1180
|
findAll<K extends keyof SVGElementTagNameMap>(selector: K): DOMWrapper<SVGElementTagNameMap[K]>[];
|
1169
1181
|
findAll<T extends Element>(selector: string): DOMWrapper<T>[];
|
1170
1182
|
private attachNativeEventListener;
|
1171
|
-
get element():
|
1183
|
+
get element(): T['$el'];
|
1172
1184
|
get vm(): T;
|
1173
|
-
props():
|
1174
|
-
|
1175
|
-
};
|
1176
|
-
props(selector: string): any;
|
1185
|
+
props(): T['$props'];
|
1186
|
+
props<Selector extends keyof T['$props']>(selector: Selector): T['$props'][Selector];
|
1177
1187
|
emitted<T = unknown>(): Record<string, T[]>;
|
1178
1188
|
emitted<T = unknown[]>(eventName: string): undefined | T[];
|
1179
1189
|
isVisible(): boolean;
|
1180
1190
|
setData(data: Record<string, unknown>): Promise<void>;
|
1181
|
-
setProps(props:
|
1191
|
+
setProps(props: Partial<T['$props']>): Promise<void>;
|
1182
1192
|
setValue(value: unknown, prop?: string): Promise<void>;
|
1183
1193
|
unmount(): void;
|
1184
1194
|
}
|
@@ -1186,6 +1196,10 @@ declare class VueWrapper<T extends Omit<ComponentPublicInstance, '$emit' | keyof
|
|
1186
1196
|
type CustomCreateStub = (params: {
|
1187
1197
|
name: string;
|
1188
1198
|
component: ConcreteComponent;
|
1199
|
+
registerStub: (config: {
|
1200
|
+
source: Component;
|
1201
|
+
stub: Component;
|
1202
|
+
}) => void;
|
1189
1203
|
}) => ConcreteComponent;
|
1190
1204
|
|
1191
1205
|
interface GlobalConfigOptions {
|
@@ -1216,36 +1230,35 @@ declare class Pluggable<Instance = DOMWrapper<Node>> {
|
|
1216
1230
|
reset(): void;
|
1217
1231
|
}
|
1218
1232
|
|
1219
|
-
type
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
}
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
declare function renderToString<
|
1244
|
-
|
1245
|
-
}
|
1246
|
-
[key in PropNames]?: any;
|
1247
|
-
}
|
1248
|
-
declare function renderToString<PropsOptions extends Readonly<ComponentPropsOptions>, 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: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, E, Mixin, Extends, EE>, options?: MountingOptions$1<ExtractPropTypes<PropsOptions> & PublicProps$1, D>): Promise<string>;
|
1233
|
+
type ComponentProps<T> = T extends new (...args: any) => {
|
1234
|
+
$props: infer P;
|
1235
|
+
} ? NonNullable<P> : T extends (props: infer P, ...args: any) => any ? P : {};
|
1236
|
+
type ComponentSlots<T> = T extends new (...args: any) => {
|
1237
|
+
$slots: infer S;
|
1238
|
+
} ? NonNullable<S> : T extends (props: any, ctx: {
|
1239
|
+
slots: infer S;
|
1240
|
+
attrs: any;
|
1241
|
+
emit: any;
|
1242
|
+
}, ...args: any) => any ? NonNullable<S> : {};
|
1243
|
+
|
1244
|
+
type ShimSlotReturnType<T> = T extends (...args: infer P) => any ? (...args: P) => any : never;
|
1245
|
+
type WithArray<T> = T | T[];
|
1246
|
+
type ComponentData<T> = T extends {
|
1247
|
+
data?(...args: any): infer D;
|
1248
|
+
} ? D : {};
|
1249
|
+
type ComponentMountingOptions$1<T, P extends ComponentProps<T> = ComponentProps<T>> = Omit<MountingOptions$1<P, ComponentData<T>>, 'slots'> & {
|
1250
|
+
slots?: {
|
1251
|
+
[K in keyof ComponentSlots<T>]: WithArray<ShimSlotReturnType<ComponentSlots<T>[K]> | string | VNode | (new () => any) | {
|
1252
|
+
template: string;
|
1253
|
+
}>;
|
1254
|
+
};
|
1255
|
+
} & Record<string, unknown>;
|
1256
|
+
|
1257
|
+
declare function renderToString<T, C = T extends ((...args: any) => any) | (new (...args: any) => any) ? T : T extends {
|
1258
|
+
props?: infer Props;
|
1259
|
+
} ? DefineComponent<Props extends Readonly<(infer PropNames)[]> | (infer PropNames)[] ? {
|
1260
|
+
[key in PropNames extends string ? PropNames : string]?: any;
|
1261
|
+
} : Props> : DefineComponent>(originalComponent: T, options?: ComponentMountingOptions$1<C> & Pick<RenderMountingOptions<any>, 'attachTo'>): Promise<string>;
|
1249
1262
|
|
1250
1263
|
declare function createWrapperError<T extends object>(wrapperType: 'DOMWrapper' | 'VueWrapper'): T;
|
1251
1264
|
|
@@ -1258,27 +1271,7 @@ declare const VueTestUtils: {
|
|
1258
1271
|
renderToString: typeof renderToString;
|
1259
1272
|
enableAutoUnmount: typeof enableAutoUnmount;
|
1260
1273
|
disableAutoUnmount: typeof disableAutoUnmount;
|
1261
|
-
RouterLinkStub:
|
1262
|
-
to: {
|
1263
|
-
type: (ObjectConstructor | StringConstructor)[];
|
1264
|
-
required: true;
|
1265
|
-
};
|
1266
|
-
custom: {
|
1267
|
-
type: BooleanConstructor;
|
1268
|
-
default: boolean;
|
1269
|
-
};
|
1270
|
-
}, unknown, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
1271
|
-
to: {
|
1272
|
-
type: (ObjectConstructor | StringConstructor)[];
|
1273
|
-
required: true;
|
1274
|
-
};
|
1275
|
-
custom: {
|
1276
|
-
type: BooleanConstructor;
|
1277
|
-
default: boolean;
|
1278
|
-
};
|
1279
|
-
}>>, {
|
1280
|
-
custom: boolean;
|
1281
|
-
}>;
|
1274
|
+
RouterLinkStub: any;
|
1282
1275
|
VueWrapper: typeof VueWrapper;
|
1283
1276
|
DOMWrapper: typeof DOMWrapper;
|
1284
1277
|
BaseWrapper: typeof BaseWrapper;
|
@@ -1378,15 +1371,5 @@ declare function mount<PropsOptions extends Readonly<ComponentPropsOptions>, Raw
|
|
1378
1371
|
wrapper: VueWrapper<ComponentPublicInstance<ExtractPropTypes<PropsOptions>, RawBindings, D, C, M, E, VNodeProps & ExtractPropTypes<PropsOptions>>>;
|
1379
1372
|
component: VueWrapper<ComponentPublicInstance<ExtractPropTypes<PropsOptions>, RawBindings, D, C, M, E, VNodeProps & ExtractPropTypes<PropsOptions>>>['vm'];
|
1380
1373
|
}>;
|
1381
|
-
/**
|
1382
|
-
* Helper function for mounting a component quickly in test hooks.
|
1383
|
-
* @example
|
1384
|
-
* import {mountCallback} from '@cypress/vue'
|
1385
|
-
* beforeEach(mountVue(component, options))
|
1386
|
-
*
|
1387
|
-
* Removed as of Cypress 11.0.0.
|
1388
|
-
* @see https://on.cypress.io/migration-11-0-0-component-testing-updates
|
1389
|
-
*/
|
1390
|
-
declare function mountCallback(component: any, options?: any): () => void;
|
1391
1374
|
|
1392
|
-
export { CyMountOptions, VueTestUtils, mount
|
1375
|
+
export { CyMountOptions, VueTestUtils, mount };
|
package/vue/package.json
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
"@cypress/mount-utils": "0.0.0-development",
|
19
19
|
"@vitejs/plugin-vue": "5.0.4",
|
20
20
|
"@vue/compiler-sfc": "3.2.47",
|
21
|
-
"@vue/test-utils": "2.
|
21
|
+
"@vue/test-utils": "2.4.6",
|
22
22
|
"axios": "0.21.2",
|
23
23
|
"cypress": "0.0.0-development",
|
24
24
|
"debug": "^4.3.4",
|
@@ -42,7 +42,7 @@
|
|
42
42
|
"src/**/*.js"
|
43
43
|
],
|
44
44
|
"engines": {
|
45
|
-
"node": ">=
|
45
|
+
"node": ">=18"
|
46
46
|
},
|
47
47
|
"types": "dist/index.d.ts",
|
48
48
|
"license": "MIT",
|
@@ -82,9 +82,6 @@
|
|
82
82
|
"nx": {
|
83
83
|
"targets": {
|
84
84
|
"build": {
|
85
|
-
"dependsOn": [
|
86
|
-
"!@cypress/react18:build"
|
87
|
-
],
|
88
85
|
"outputs": [
|
89
86
|
"{workspaceRoot}/cli/vue",
|
90
87
|
"{projectRoot}/dist"
|