cypress 10.1.0 → 10.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/lib/exec/open.js +1 -2
  2. package/lib/exec/spawn.js +14 -2
  3. package/lib/tasks/download.js +10 -11
  4. package/lib/tasks/install.js +7 -6
  5. package/lib/util.js +54 -10
  6. package/mount-utils/CHANGELOG.md +19 -0
  7. package/mount-utils/dist/index.js +8 -1
  8. package/mount-utils/package.json +1 -1
  9. package/package.json +13 -13
  10. package/react/CHANGELOG.md +44 -0
  11. package/react/dist/cypress-react.browser.js +17 -2
  12. package/react/dist/cypress-react.cjs.js +17 -2
  13. package/react/dist/cypress-react.esm-bundler.js +17 -2
  14. package/react/package.json +1 -3
  15. package/types/cypress.d.ts +3 -3
  16. package/vue/CHANGELOG.md +42 -0
  17. package/vue/README.md +1 -0
  18. package/vue/dist/@vue/test-utils/baseWrapper.d.ts +61 -0
  19. package/vue/dist/@vue/test-utils/components/RouterLinkStub.d.ts +21 -0
  20. package/vue/dist/@vue/test-utils/config.d.ts +28 -0
  21. package/vue/dist/@vue/test-utils/constants/dom-events.d.ts +900 -0
  22. package/vue/dist/@vue/test-utils/createDomEvent.d.ts +9 -0
  23. package/vue/dist/@vue/test-utils/domWrapper.d.ts +18 -0
  24. package/vue/dist/@vue/test-utils/emit.d.ts +4 -0
  25. package/vue/dist/@vue/test-utils/errorWrapper.d.ts +1 -0
  26. package/vue/dist/@vue/test-utils/index.d.ts +10 -0
  27. package/vue/dist/@vue/test-utils/interfaces/wrapperLike.d.ts +56 -0
  28. package/vue/dist/@vue/test-utils/mount.d.ts +33 -0
  29. package/vue/dist/@vue/test-utils/stubs.d.ts +26 -0
  30. package/vue/dist/@vue/test-utils/types.d.ts +125 -0
  31. package/vue/dist/@vue/test-utils/utils/autoUnmount.d.ts +5 -0
  32. package/vue/dist/@vue/test-utils/utils/compileSlots.d.ts +2 -0
  33. package/vue/dist/@vue/test-utils/utils/componentName.d.ts +4 -0
  34. package/vue/dist/@vue/test-utils/utils/find.d.ts +10 -0
  35. package/vue/dist/@vue/test-utils/utils/flushPromises.d.ts +1 -0
  36. package/vue/dist/@vue/test-utils/utils/getRootNodes.d.ts +2 -0
  37. package/vue/dist/@vue/test-utils/utils/isElement.d.ts +1 -0
  38. package/vue/dist/@vue/test-utils/utils/isElementVisible.d.ts +6 -0
  39. package/vue/dist/@vue/test-utils/utils/matchName.d.ts +1 -0
  40. package/vue/dist/@vue/test-utils/utils/stringifyNode.d.ts +1 -0
  41. package/vue/dist/@vue/test-utils/utils/vueCompatSupport.d.ts +8 -0
  42. package/vue/dist/@vue/test-utils/utils/vueShared.d.ts +3 -0
  43. package/vue/dist/@vue/test-utils/utils.d.ts +13 -0
  44. package/vue/dist/@vue/test-utils/vueWrapper.d.ts +34 -0
  45. package/vue/dist/@vue/test-utils/wrapperFactory.d.ts +14 -0
  46. package/vue/dist/cypress-vue.cjs.js +224 -139
  47. package/vue/dist/cypress-vue.esm-bundler.js +224 -140
  48. package/vue/dist/index.d.ts +34 -3
  49. package/vue/package.json +10 -7
  50. package/vue2/CHANGELOG.md +32 -0
  51. package/vue2/dist/cypress-vue2.browser.js +17 -2
  52. package/vue2/dist/cypress-vue2.cjs.js +17 -2
  53. package/vue2/dist/cypress-vue2.esm-bundler.js +17 -2
  54. package/vue2/package.json +2 -4
package/vue/CHANGELOG.md CHANGED
@@ -1,3 +1,45 @@
1
+ # [@cypress/vue-v4.0.0](https://github.com/cypress-io/cypress/compare/@cypress/vue-v3.1.2...@cypress/vue-v4.0.0) (2022-06-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * display cy.mount command log ([#21500](https://github.com/cypress-io/cypress/issues/21500)) ([140b4ba](https://github.com/cypress-io/cypress/commit/140b4ba2110243712a614a39b2408c30cce4d0b1))
7
+ * Doc changes around vue2 ([#21066](https://github.com/cypress-io/cypress/issues/21066)) ([17905a7](https://github.com/cypress-io/cypress/commit/17905a79ee5106b0d72c8e74bb717fcd7b796dee))
8
+ * scope config to current testing type ([#20677](https://github.com/cypress-io/cypress/issues/20677)) ([61f7cfc](https://github.com/cypress-io/cypress/commit/61f7cfc59284a2938e0a1c15d74ee75215ba5f8b))
9
+ * update scaffold template to use correct path ([#20047](https://github.com/cypress-io/cypress/issues/20047)) ([6e80359](https://github.com/cypress-io/cypress/commit/6e803597a379222cf936e5977c8314d693ee1912))
10
+ * wire up scaffolded indexHtml to dev servers ([#20453](https://github.com/cypress-io/cypress/issues/20453)) ([3a8797e](https://github.com/cypress-io/cypress/commit/3a8797e54db9fd0ef93a14ddc71c138ba8251e53))
11
+ * **unified-desktop-gui branch:** initial installation on windows ([#18247](https://github.com/cypress-io/cypress/issues/18247)) ([8614e97](https://github.com/cypress-io/cypress/commit/8614e978029bcbf7155b7ae98ac54feb11f2e7f3))
12
+
13
+
14
+ ### chore
15
+
16
+ * prep npm packages for use with Cypress v10 ([b924d08](https://github.com/cypress-io/cypress/commit/b924d086ee2e2ccc93303731e001b2c9e9d0af17))
17
+
18
+
19
+ ### Features
20
+
21
+ * add devServer to config file ([#18962](https://github.com/cypress-io/cypress/issues/18962)) ([2573375](https://github.com/cypress-io/cypress/commit/2573375b5b6616efd2d213a94cd55fd8e0385864))
22
+ * Add vue2 package from npm/vue/v2 branch ([#21026](https://github.com/cypress-io/cypress/issues/21026)) ([3aa69e2](https://github.com/cypress-io/cypress/commit/3aa69e2538aae5702bfc48789c54f37263ce08fc))
23
+ * adding settings accordion ([e977b60](https://github.com/cypress-io/cypress/commit/e977b60521b863a227eb37189ab1b3081af00d9f))
24
+ * Deprecate run-ct / open-ct, and update all examples to use --ct instead ([#18422](https://github.com/cypress-io/cypress/issues/18422)) ([196e8f6](https://github.com/cypress-io/cypress/commit/196e8f62cc6d27974f235945cb5700624b3dae41))
25
+ * embedding mount into the cypress binary (real dependency) ([#20930](https://github.com/cypress-io/cypress/issues/20930)) ([3fe5f50](https://github.com/cypress-io/cypress/commit/3fe5f50e7832a4bfb20df8e71648434eb7f263d5))
26
+ * merging / delegating remote queries to cloud schema ([#17875](https://github.com/cypress-io/cypress/issues/17875)) ([94541d4](https://github.com/cypress-io/cypress/commit/94541d4f18591e8fa4b8702c39e92b0a7238aa5d))
27
+ * Structuring context & schema so it can be used on the client ([#17489](https://github.com/cypress-io/cypress/issues/17489)) ([e2f395e](https://github.com/cypress-io/cypress/commit/e2f395e330f384993ed1116469102a5315a21270)), closes [#17551](https://github.com/cypress-io/cypress/issues/17551)
28
+ * support specPattern, deprecate integrationFolder and componentFolder ([#19319](https://github.com/cypress-io/cypress/issues/19319)) ([792980a](https://github.com/cypress-io/cypress/commit/792980ac12746ef47b9c944ebe4c6c353a187ab2))
29
+ * swap the #__cy_root id selector to become data-cy-root for component mounting ([#20951](https://github.com/cypress-io/cypress/issues/20951)) ([0e7b555](https://github.com/cypress-io/cypress/commit/0e7b555f93fb403f431c5de4a07ae7ad6ac89ba2))
30
+ * update on-links ([#19235](https://github.com/cypress-io/cypress/issues/19235)) ([cc2d734](https://github.com/cypress-io/cypress/commit/cc2d7348185e2a090c60d92d9319ab460d8c7827))
31
+ * Use .config files ([#18578](https://github.com/cypress-io/cypress/issues/18578)) ([081dd19](https://github.com/cypress-io/cypress/commit/081dd19cc6da3da229a7af9c84f62730c85a5cd6))
32
+ * use devServer instad of startDevServer ([#20092](https://github.com/cypress-io/cypress/issues/20092)) ([8a6768f](https://github.com/cypress-io/cypress/commit/8a6768fee6f46b908c5a9daf23da8b804a6c627f))
33
+ * Use plugins on config files ([#18798](https://github.com/cypress-io/cypress/issues/18798)) ([bb8251b](https://github.com/cypress-io/cypress/commit/bb8251b752ac44f1184f9160194cf12d41fc867f))
34
+ * use supportFile by testingType ([#19364](https://github.com/cypress-io/cypress/issues/19364)) ([0366d4f](https://github.com/cypress-io/cypress/commit/0366d4fa8971e5e5189c6fd6450cc3c8d72dcfe1))
35
+ * validate specPattern root level ([#19980](https://github.com/cypress-io/cypress/issues/19980)) ([5d52758](https://github.com/cypress-io/cypress/commit/5d52758d82c47033803c69c7858fc786a900faaf))
36
+ * vue-cli and nuxt preset for CT object API architecture ([#20956](https://github.com/cypress-io/cypress/issues/20956)) ([57659c4](https://github.com/cypress-io/cypress/commit/57659c42468591265143aae2ff06bae4e440085f))
37
+
38
+
39
+ ### BREAKING CHANGES
40
+
41
+ * new version of packages for Cypress v10
42
+
1
43
  # [@cypress/vue-v3.1.2](https://github.com/cypress-io/cypress/compare/@cypress/vue-v3.1.1...@cypress/vue-v3.1.2) (2022-05-03)
2
44
 
3
45
 
package/vue/README.md CHANGED
@@ -19,6 +19,7 @@ This package allows you to use the [Cypress](https://www.cypress.io/) test runne
19
19
  It uses [Vue Test Utils](https://github.com/vuejs/vue-test-utils) under the hood. This is more of a replacement for node-based testing than it is replacing Vue Test Utils and its API. Instead of running your tests in node (using Jest or Mocha), the Cypress Component Testing Library runs each component in the **real browser** with full power of the Cypress Framework: [live GUI, full API, screen recording, CI support, cross-platform](https://www.cypress.io/features/). One benefit to using Cypress instead of a node-based runner is that limitations of Vue Test Utils in Node (e.g. manually awaiting Vue's internal event loop) are hidden from the user due to Cypress's retry-ability logic.
20
20
 
21
21
  - If you like using `@testing-library/vue`, you can use `@testing-library/cypress` for the same `findBy`, `queryBy` commands, see one of the examples in the list below
22
+ - If you need to access the underlying Vue Test Utils API, you can do so by importing it: `import { VueTestUtils } from 'cypress/vue'`.
22
23
 
23
24
  ### How is this different from @cypress/vue2?
24
25
  Cypress packages the current version of Vue under @cypress/vue, and older versions under separate package names. Use [@cypress/vue2](cypress-vue2-npm-url) if you're still using vue@2, and this package if you're on vue@3.
@@ -0,0 +1,61 @@
1
+ import type { TriggerOptions } from './createDomEvent';
2
+ import { ComponentInternalInstance, ComponentPublicInstance, FunctionalComponent } from 'vue';
3
+ import { DomEventNameWithModifier } from './constants/dom-events';
4
+ import type { VueWrapper } from './vueWrapper';
5
+ import { DefinedComponent, FindAllComponentsSelector, FindComponentSelector, NameSelector, RefSelector, VueNode } from './types';
6
+ import WrapperLike from './interfaces/wrapperLike';
7
+ import type { DOMWrapper } from './domWrapper';
8
+ export default abstract class BaseWrapper<ElementType extends Node> implements WrapperLike {
9
+ protected readonly wrapperElement: VueNode<ElementType>;
10
+ protected abstract getRootNodes(): VueNode[];
11
+ get element(): VueNode<ElementType>;
12
+ constructor(element: ElementType);
13
+ protected findAllDOMElements(selector: string): Element[];
14
+ find<K extends keyof HTMLElementTagNameMap>(selector: K): DOMWrapper<HTMLElementTagNameMap[K]>;
15
+ find<K extends keyof SVGElementTagNameMap>(selector: K): DOMWrapper<SVGElementTagNameMap[K]>;
16
+ find<T extends Element = Element>(selector: string): DOMWrapper<T>;
17
+ find<T extends Node = Node>(selector: string | RefSelector): DOMWrapper<T>;
18
+ abstract findAll<K extends keyof HTMLElementTagNameMap>(selector: K): DOMWrapper<HTMLElementTagNameMap[K]>[];
19
+ abstract findAll<K extends keyof SVGElementTagNameMap>(selector: K): DOMWrapper<SVGElementTagNameMap[K]>[];
20
+ abstract findAll<T extends Element>(selector: string): DOMWrapper<T>[];
21
+ abstract findAll(selector: string): DOMWrapper<Element>[];
22
+ findComponent<T extends never>(selector: string): WrapperLike;
23
+ findComponent<T extends DefinedComponent>(selector: T | Exclude<FindComponentSelector, FunctionalComponent>): VueWrapper<InstanceType<T>>;
24
+ findComponent<T extends FunctionalComponent>(selector: T): DOMWrapper<Node>;
25
+ findComponent<T extends FunctionalComponent>(selector: string): DOMWrapper<Element>;
26
+ findComponent<T extends never>(selector: NameSelector | RefSelector): VueWrapper;
27
+ findComponent<T extends ComponentPublicInstance>(selector: T | FindComponentSelector): VueWrapper<T>;
28
+ findComponent<T extends never>(selector: FindComponentSelector): WrapperLike;
29
+ findAllComponents<T extends never>(selector: string): WrapperLike[];
30
+ findAllComponents<T extends DefinedComponent>(selector: T | Exclude<FindAllComponentsSelector, FunctionalComponent>): VueWrapper<InstanceType<T>>[];
31
+ findAllComponents<T extends FunctionalComponent>(selector: T): DOMWrapper<Node>[];
32
+ findAllComponents<T extends FunctionalComponent>(selector: string): DOMWrapper<Element>[];
33
+ findAllComponents<T extends never>(selector: NameSelector): VueWrapper[];
34
+ findAllComponents<T extends ComponentPublicInstance>(selector: T | FindAllComponentsSelector): VueWrapper<T>[];
35
+ findAllComponents<T extends never>(selector: FindAllComponentsSelector): WrapperLike[];
36
+ abstract setValue(value?: any): Promise<void>;
37
+ html(): string;
38
+ classes(): string[];
39
+ classes(className: string): boolean;
40
+ attributes(): {
41
+ [key: string]: string;
42
+ };
43
+ attributes(key: string): string | undefined;
44
+ text(): string;
45
+ exists(): boolean;
46
+ get<K extends keyof HTMLElementTagNameMap>(selector: K): Omit<DOMWrapper<HTMLElementTagNameMap[K]>, 'exists'>;
47
+ get<K extends keyof SVGElementTagNameMap>(selector: K): Omit<DOMWrapper<SVGElementTagNameMap[K]>, 'exists'>;
48
+ get<T extends Element = Element>(selector: string): Omit<DOMWrapper<T>, 'exists'>;
49
+ get<T extends Node = Node>(selector: string | RefSelector): Omit<DOMWrapper<T>, 'exists'>;
50
+ getComponent<T extends never>(selector: string): Omit<WrapperLike, 'exists'>;
51
+ getComponent<T extends DefinedComponent>(selector: T | Exclude<FindComponentSelector, FunctionalComponent>): Omit<VueWrapper<InstanceType<T>>, 'exists'>;
52
+ getComponent<T extends FunctionalComponent>(selector: T | string): Omit<DOMWrapper<Element>, 'exists'>;
53
+ getComponent<T extends never>(selector: NameSelector | RefSelector): Omit<VueWrapper, 'exists'>;
54
+ getComponent<T extends ComponentPublicInstance>(selector: T | FindComponentSelector): Omit<VueWrapper<T>, 'exists'>;
55
+ getComponent<T extends never>(selector: FindComponentSelector): Omit<WrapperLike, 'exists'>;
56
+ protected isDisabled: () => boolean;
57
+ isVisible(): boolean;
58
+ protected abstract getCurrentComponent(): ComponentInternalInstance | void;
59
+ trigger(eventString: DomEventNameWithModifier, options?: TriggerOptions): Promise<void>;
60
+ trigger(eventString: string, options?: TriggerOptions): Promise<void>;
61
+ }
@@ -0,0 +1,21 @@
1
+ export declare const RouterLinkStub: import("vue").DefineComponent<{
2
+ to: {
3
+ type: (StringConstructor | ObjectConstructor)[];
4
+ required: true;
5
+ };
6
+ custom: {
7
+ type: BooleanConstructor;
8
+ default: boolean;
9
+ };
10
+ }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
+ to: {
12
+ type: (StringConstructor | ObjectConstructor)[];
13
+ required: true;
14
+ };
15
+ custom: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
19
+ }>>, {
20
+ custom: boolean;
21
+ }>;
@@ -0,0 +1,28 @@
1
+ import { GlobalMountOptions } from './types';
2
+ import { VueWrapper } from './vueWrapper';
3
+ import { DOMWrapper } from './domWrapper';
4
+ import { CustomCreateStub } from './stubs';
5
+ export interface GlobalConfigOptions {
6
+ global: Required<GlobalMountOptions>;
7
+ plugins: {
8
+ VueWrapper: Pluggable<VueWrapper>;
9
+ DOMWrapper: Pluggable<DOMWrapper<Node>>;
10
+ createStubs?: CustomCreateStub;
11
+ };
12
+ renderStubDefaultSlot: boolean;
13
+ }
14
+ interface Plugin<Instance, O> {
15
+ handler(instance: Instance): Record<string, any>;
16
+ handler(instance: Instance, options: O): Record<string, any>;
17
+ options: O;
18
+ }
19
+ declare class Pluggable<Instance = DOMWrapper<Node>> {
20
+ installedPlugins: Plugin<Instance, any>[];
21
+ install<O>(handler: (instance: Instance) => Record<string, any>): void;
22
+ install<O>(handler: (instance: Instance, options: O) => Record<string, any>, options: O): void;
23
+ extend(instance: Instance): void;
24
+ /** For testing */
25
+ reset(): void;
26
+ }
27
+ export declare const config: GlobalConfigOptions;
28
+ export {};