cypress 10.7.0 → 10.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,28 @@
1
+ # [@cypress/angular-v1.1.0](https://github.com/cypress-io/cypress/compare/@cypress/angular-v1.0.0...@cypress/angular-v1.1.0) (2022-09-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * angular 14.2 mount compilation error ([#23593](https://github.com/cypress-io/cypress/issues/23593)) ([2f337db](https://github.com/cypress-io/cypress/commit/2f337dbfa2bb212754c8fa82e3f4548a2f3a07a4))
7
+ * Fix missing `it.skip` function in Angular tests ([#23829](https://github.com/cypress-io/cypress/issues/23829)) ([64c0f45](https://github.com/cypress-io/cypress/commit/64c0f45182456bd43f4b64b2311e816dde615236))
8
+
9
+
10
+ ### Features
11
+
12
+ * adding svelte component testing support ([#23553](https://github.com/cypress-io/cypress/issues/23553)) ([f6eaad4](https://github.com/cypress-io/cypress/commit/f6eaad40e1836fa9db87c60defa5ae6f390c8fd8))
13
+
14
+ # [@cypress/angular-v1.1.0](https://github.com/cypress-io/cypress/compare/@cypress/angular-v1.0.0...@cypress/angular-v1.1.0) (2022-08-30)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * angular 14.2 mount compilation error ([#23593](https://github.com/cypress-io/cypress/issues/23593)) ([2f337db](https://github.com/cypress-io/cypress/commit/2f337dbfa2bb212754c8fa82e3f4548a2f3a07a4))
20
+
21
+
22
+ ### Features
23
+
24
+ * adding svelte component testing support ([#23553](https://github.com/cypress-io/cypress/issues/23553)) ([f6eaad4](https://github.com/cypress-io/cypress/commit/f6eaad40e1836fa9db87c60defa5ae6f390c8fd8))
25
+
1
26
  # @cypress/angular-v1.0.0 (2022-08-17)
2
27
 
3
28
 
package/angular/README.md CHANGED
@@ -78,7 +78,7 @@ Run `yarn build` to compile and sync packages to the `cypress` cli package.
78
78
 
79
79
  ## License
80
80
 
81
- [![license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cypress-io/cypress/blob/master/LICENSE)
81
+ [![license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cypress-io/cypress/blob/develop/LICENSE)
82
82
 
83
83
  This project is licensed under the terms of the [MIT license](/LICENSE).
84
84
 
@@ -91,6 +91,10 @@ function setupHooks(optionalCallback) {
91
91
  */
92
92
  // @ts-ignore
93
93
  window.Mocha['__zone_patch__'] = false;
94
+ // 'zone.js/testing' is not properly aliasing `it.skip` but it does provide `xit`/`xspecify`
95
+ // Written up under https://github.com/angular/angular/issues/46297 but is not seeing movement
96
+ // so we'll patch here pending a fix in that library
97
+ globalThis.it.skip = globalThis.xit;
94
98
  /**
95
99
  * Bootstraps the TestModuleMetaData passed to the TestBed
96
100
  *
@@ -34,7 +34,7 @@
34
34
  "type": "git",
35
35
  "url": "https://github.com/cypress-io/cypress.git"
36
36
  },
37
- "homepage": "https://github.com/cypress-io/cypress/blob/master/npm/angular/#readme",
37
+ "homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/angular/#readme",
38
38
  "author": "Jordan Powell",
39
39
  "bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Fangular&template=1-bug-report.md&title=",
40
40
  "keywords": [
@@ -1,3 +1,10 @@
1
+ # [@cypress/mount-utils-v2.1.0](https://github.com/cypress-io/cypress/compare/@cypress/mount-utils-v2.0.1...@cypress/mount-utils-v2.1.0) (2022-08-30)
2
+
3
+
4
+ ### Features
5
+
6
+ * adding svelte component testing support ([#23553](https://github.com/cypress-io/cypress/issues/23553)) ([f6eaad4](https://github.com/cypress-io/cypress/commit/f6eaad40e1836fa9db87c60defa5ae6f390c8fd8))
7
+
1
8
  # [@cypress/mount-utils-v2.0.1](https://github.com/cypress-io/cypress/compare/@cypress/mount-utils-v2.0.0...@cypress/mount-utils-v2.0.1) (2022-08-11)
2
9
 
3
10
 
@@ -27,7 +27,7 @@
27
27
  "type": "git",
28
28
  "url": "https://github.com/cypress-io/cypress.git"
29
29
  },
30
- "homepage": "https://github.com/cypress-io/cypress/tree/master/npm/mount-utils#readme",
30
+ "homepage": "https://github.com/cypress-io/cypress/tree/develop/npm/mount-utils#readme",
31
31
  "bugs": "https://github.com/cypress-io/cypress/issues/new?template=1-bug-report.md",
32
32
  "publishConfig": {
33
33
  "access": "public"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cypress",
3
- "version": "10.7.0",
3
+ "version": "10.9.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "postinstall": "node index.js --exec install",
@@ -26,7 +26,7 @@
26
26
  "dayjs": "^1.10.4",
27
27
  "debug": "^4.3.2",
28
28
  "enquirer": "^2.3.6",
29
- "eventemitter2": "^6.4.3",
29
+ "eventemitter2": "6.4.7",
30
30
  "execa": "4.1.0",
31
31
  "executable": "^4.1.1",
32
32
  "extract-zip": "2.0.1",
@@ -118,8 +118,8 @@
118
118
  },
119
119
  "buildInfo": {
120
120
  "commitBranch": "develop",
121
- "commitSha": "b5e6fd67a9080864274ffa54cef30ca6445650d1",
122
- "commitDate": "2022-08-30T14:25:23.000Z",
121
+ "commitSha": "a75d3ec81f3405db6721a89875d89cdca0109013",
122
+ "commitDate": "2022-09-27T02:16:48.000Z",
123
123
  "stable": true
124
124
  },
125
125
  "description": "Cypress.io end to end testing tool",
@@ -1,3 +1,10 @@
1
+ # [@cypress/react-v6.2.0](https://github.com/cypress-io/cypress/compare/@cypress/react-v6.1.1...@cypress/react-v6.2.0) (2022-08-30)
2
+
3
+
4
+ ### Features
5
+
6
+ * adding svelte component testing support ([#23553](https://github.com/cypress-io/cypress/issues/23553)) ([f6eaad4](https://github.com/cypress-io/cypress/commit/f6eaad40e1836fa9db87c60defa5ae6f390c8fd8))
7
+
1
8
  # [@cypress/react-v6.1.1](https://github.com/cypress-io/cypress/compare/@cypress/react-v6.1.0...@cypress/react-v6.1.1) (2022-08-15)
2
9
 
3
10
 
package/react/README.md CHANGED
@@ -112,7 +112,7 @@ Run `yarn test` to execute headless Cypress tests.
112
112
 
113
113
  ## License
114
114
 
115
- [![license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cypress-io/cypress/blob/master/LICENSE)
115
+ [![license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cypress-io/cypress/blob/develop/LICENSE)
116
116
 
117
117
  This project is licensed under the terms of the [MIT license](/LICENSE).
118
118
 
@@ -27,7 +27,7 @@
27
27
  "react-router-dom": "6.0.0-alpha.1",
28
28
  "semver": "^7.3.2",
29
29
  "typescript": "^4.7.4",
30
- "vite": "3.0.3",
30
+ "vite": "3.1.0",
31
31
  "vite-plugin-require-transform": "1.0.3"
32
32
  },
33
33
  "peerDependencies": {
@@ -45,7 +45,7 @@
45
45
  "type": "git",
46
46
  "url": "https://github.com/cypress-io/cypress.git"
47
47
  },
48
- "homepage": "https://github.com/cypress-io/cypress/blob/master/npm/react/#readme",
48
+ "homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/react/#readme",
49
49
  "author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>",
50
50
  "bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Freact&template=1-bug-report.md&title=",
51
51
  "keywords": [
@@ -1,3 +1,10 @@
1
+ # [@cypress/react18-v1.1.0](https://github.com/cypress-io/cypress/compare/@cypress/react18-v1.0.1...@cypress/react18-v1.1.0) (2022-08-30)
2
+
3
+
4
+ ### Features
5
+
6
+ * adding svelte component testing support ([#23553](https://github.com/cypress-io/cypress/issues/23553)) ([f6eaad4](https://github.com/cypress-io/cypress/commit/f6eaad40e1836fa9db87c60defa5ae6f390c8fd8))
7
+
1
8
  # [@cypress/react18-v1.0.1](https://github.com/cypress-io/cypress/compare/@cypress/react18-v1.0.0...@cypress/react18-v1.0.1) (2022-08-15)
2
9
 
3
10
 
@@ -580,6 +580,7 @@ let root;
580
580
  const cleanup = () => {
581
581
  if (root) {
582
582
  root.unmount();
583
+ root = null;
583
584
  return true;
584
585
  }
585
586
  return false;
@@ -588,7 +589,9 @@ function mount(jsx, options = {}, rerenderKey) {
588
589
  const internalOptions = {
589
590
  reactDom: ReactDOM__default["default"],
590
591
  render: (reactComponent, el) => {
591
- root = ReactDOM__default["default"].createRoot(el);
592
+ if (!root) {
593
+ root = ReactDOM__default["default"].createRoot(el);
594
+ }
592
595
  return root.render(reactComponent);
593
596
  },
594
597
  unmount,
@@ -553,6 +553,7 @@ let root;
553
553
  const cleanup = () => {
554
554
  if (root) {
555
555
  root.unmount();
556
+ root = null;
556
557
  return true;
557
558
  }
558
559
  return false;
@@ -561,7 +562,9 @@ function mount(jsx, options = {}, rerenderKey) {
561
562
  const internalOptions = {
562
563
  reactDom: ReactDOM,
563
564
  render: (reactComponent, el) => {
564
- root = ReactDOM.createRoot(el);
565
+ if (!root) {
566
+ root = ReactDOM.createRoot(el);
567
+ }
565
568
  return root.render(reactComponent);
566
569
  },
567
570
  unmount,
@@ -38,7 +38,7 @@
38
38
  "type": "git",
39
39
  "url": "https://github.com/cypress-io/cypress.git"
40
40
  },
41
- "homepage": "https://github.com/cypress-io/cypress/blob/master/npm/react18/#readme",
41
+ "homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/react18/#readme",
42
42
  "bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Freact18&template=1-bug-report.md&title=",
43
43
  "keywords": [
44
44
  "react",
@@ -0,0 +1,6 @@
1
+ # @cypress/svelte-v1.0.0 (2022-08-30)
2
+
3
+
4
+ ### Features
5
+
6
+ * adding svelte component testing support ([#23553](https://github.com/cypress-io/cypress/issues/23553)) ([f6eaad4](https://github.com/cypress-io/cypress/commit/f6eaad40e1836fa9db87c60defa5ae6f390c8fd8))
package/svelte/README.md CHANGED
@@ -76,7 +76,7 @@ Run `yarn test` to execute headless Cypress tests.
76
76
 
77
77
  ## License
78
78
 
79
- [![license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cypress-io/cypress/blob/master/LICENSE)
79
+ [![license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cypress-io/cypress/blob/develop/LICENSE)
80
80
 
81
81
  This project is licensed under the terms of the [MIT license](/LICENSE).
82
82
 
@@ -189,7 +189,7 @@ function mount(Component, options = {}) {
189
189
  // by waiting, we are delaying test execution for the next tick of event loop
190
190
  // and letting hooks and component lifecycle methods to execute mount
191
191
  return cy.wait(0, { log: false }).then(() => {
192
- if (options.log) {
192
+ if (options.log !== false) {
193
193
  const mountMessage = `<${getComponentDisplayName(Component)} ... />`;
194
194
  Cypress.log({
195
195
  name: 'mount',
@@ -185,7 +185,7 @@ function mount(Component, options = {}) {
185
185
  // by waiting, we are delaying test execution for the next tick of event loop
186
186
  // and letting hooks and component lifecycle methods to execute mount
187
187
  return cy.wait(0, { log: false }).then(() => {
188
- if (options.log) {
188
+ if (options.log !== false) {
189
189
  const mountMessage = `<${getComponentDisplayName(Component)} ... />`;
190
190
  Cypress.log({
191
191
  name: 'mount',
@@ -28,7 +28,7 @@
28
28
  "type": "git",
29
29
  "url": "https://github.com/cypress-io/cypress.git"
30
30
  },
31
- "homepage": "https://github.com/cypress-io/cypress/blob/master/npm/svelte/#readme",
31
+ "homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/svelte/#readme",
32
32
  "bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Fsvelte&template=1-bug-report.md&title=",
33
33
  "keywords": [
34
34
  "cypress",
@@ -82,7 +82,7 @@ declare namespace Cypress {
82
82
 
83
83
  type BrowserChannel = 'stable' | 'canary' | 'beta' | 'dev' | 'nightly' | string
84
84
 
85
- type BrowserFamily = 'chromium' | 'firefox'
85
+ type BrowserFamily = 'chromium' | 'firefox' | 'webkit'
86
86
 
87
87
  /**
88
88
  * Describes a browser Cypress can control
@@ -641,6 +641,12 @@ declare namespace Cypress {
641
641
  */
642
642
  off: Actions
643
643
 
644
+ /**
645
+ * Used to import dependencies within the cy.origin() callback
646
+ * @see https://on.cypress.io/origin
647
+ */
648
+ require: (id: string) => any
649
+
644
650
  /**
645
651
  * Trigger action
646
652
  * @private
@@ -655,7 +661,22 @@ declare namespace Cypress {
655
661
  }
656
662
 
657
663
  interface SessionOptions {
658
- validate?: () => false | void
664
+ /**
665
+ * Whether or not to persist the session across all specs in the run.
666
+ * @default {false}
667
+ */
668
+ cacheAcrossSpecs?: boolean,
669
+ /**
670
+ * Function to run immediately after the session is created and `setup` function runs or
671
+ * after a session is restored and the page is cleared. If this returns `false`, throws an
672
+ * exception, returns a Promise which resolves to `false` or rejects or contains any failing
673
+ * Cypress command, the session is considered invalid.
674
+ *
675
+ * If validation fails immediately after `setup`, the test will fail.
676
+ * If validation fails after restoring a session, `setup` will re-run.
677
+ * @default {false}
678
+ */
679
+ validate?: () => Promise<false | void> | false | void
659
680
  }
660
681
 
661
682
  type CanReturnChainable = void | Chainable | Promise<unknown>
@@ -705,7 +726,7 @@ declare namespace Cypress {
705
726
  * cy.get('input[type=file]').selectFile(Cypress.Buffer.from('text'))
706
727
  * cy.get('input[type=file]').selectFile({
707
728
  * fileName: 'users.json',
708
- * fileContents: [{name: 'John Doe'}]
729
+ * contents: [{name: 'John Doe'}]
709
730
  * })
710
731
  */
711
732
  selectFile(files: FileReference | FileReference[], options?: Partial<SelectFileOptions>): Chainable<Subject>
@@ -1074,7 +1095,7 @@ declare namespace Cypress {
1074
1095
  *
1075
1096
  * @see https://on.cypress.io/session
1076
1097
  */
1077
- session(id: string | object, setup?: SessionOptions['validate'], options?: SessionOptions): Chainable<null>
1098
+ session(id: string | object, setup?: () => void, options?: SessionOptions): Chainable<null>
1078
1099
 
1079
1100
  /**
1080
1101
  * Get the window.document of the page that is currently active.
@@ -2720,6 +2741,13 @@ declare namespace Cypress {
2720
2741
  * @default 60000
2721
2742
  */
2722
2743
  pageLoadTimeout: number
2744
+ /**
2745
+ * Whether Cypress will search for and replace
2746
+ * obstructive JS code in .js or .html files.
2747
+ *
2748
+ * @see https://on.cypress.io/configuration#modifyObstructiveCode
2749
+ */
2750
+ modifyObstructiveCode: boolean
2723
2751
  /**
2724
2752
  * Time, in milliseconds, to wait for an XHR request to go out in a [cy.wait()](https://on.cypress.io/wait) command
2725
2753
  * @default 5000
@@ -2876,6 +2904,11 @@ declare namespace Cypress {
2876
2904
  * @default false
2877
2905
  */
2878
2906
  experimentalStudio: boolean
2907
+ /**
2908
+ * Adds support for testing in the WebKit browser engine used by Safari. See https://on.cypress.io/webkit-experiment for more information.
2909
+ * @default false
2910
+ */
2911
+ experimentalWebKitSupport: boolean
2879
2912
  /**
2880
2913
  * Number of times to retry a failed test.
2881
2914
  * If a number is set, tests will retry in both runMode and openMode.
@@ -2968,13 +3001,6 @@ declare namespace Cypress {
2968
3001
  * Whether Cypress was launched via 'cypress open' (interactive mode)
2969
3002
  */
2970
3003
  isInteractive: boolean
2971
- /**
2972
- * Whether Cypress will search for and replace
2973
- * obstructive JS code in .js or .html files.
2974
- *
2975
- * @see https://on.cypress.io/configuration#modifyObstructiveCode
2976
- */
2977
- modifyObstructiveCode: boolean
2978
3004
  /**
2979
3005
  * The platform Cypress is running on.
2980
3006
  */
@@ -2988,6 +3014,7 @@ declare namespace Cypress {
2988
3014
  // Internal or Unlisted at server/lib/config_options
2989
3015
  namespace: string
2990
3016
  projectRoot: string
3017
+ repoRoot: string | null
2991
3018
  devServerPublicPathRoute: string
2992
3019
  cypressBinaryRoot: string
2993
3020
  }
@@ -3061,18 +3088,21 @@ declare namespace Cypress {
3061
3088
 
3062
3089
  type DevServerFn<ComponentDevServerOpts = any> = (cypressDevServerConfig: DevServerConfig, devServerConfig: ComponentDevServerOpts) => ResolvedDevServerConfig | Promise<ResolvedDevServerConfig>
3063
3090
 
3091
+ type ConfigHandler<T> = T
3092
+ | (() => T | Promise<T>)
3093
+
3064
3094
  type DevServerConfigOptions = {
3065
3095
  bundler: 'webpack'
3066
3096
  framework: 'react' | 'vue' | 'vue-cli' | 'nuxt' | 'create-react-app' | 'next' | 'svelte'
3067
- webpackConfig?: PickConfigOpt<'webpackConfig'>
3097
+ webpackConfig?: ConfigHandler<PickConfigOpt<'webpackConfig'>>
3068
3098
  } | {
3069
3099
  bundler: 'vite'
3070
3100
  framework: 'react' | 'vue' | 'svelte'
3071
- viteConfig?: Omit<Exclude<PickConfigOpt<'viteConfig'>, undefined>, 'base' | 'root'>
3101
+ viteConfig?: ConfigHandler<Omit<Exclude<PickConfigOpt<'viteConfig'>, undefined>, 'base' | 'root'>>
3072
3102
  } | {
3073
3103
  bundler: 'webpack',
3074
3104
  framework: 'angular',
3075
- webpackConfig?: PickConfigOpt<'webpackConfig'>,
3105
+ webpackConfig?: ConfigHandler<PickConfigOpt<'webpackConfig'>>,
3076
3106
  options?: {
3077
3107
  projectConfig: AngularDevServerProjectConfig
3078
3108
  }
@@ -5480,6 +5510,7 @@ declare namespace Cypress {
5480
5510
  extensions: string[]
5481
5511
  preferences: { [key: string]: any }
5482
5512
  args: string[]
5513
+ env: { [key: string]: any }
5483
5514
  }
5484
5515
 
5485
5516
  interface Dimensions {
package/vue/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [@cypress/vue-v4.2.0](https://github.com/cypress-io/cypress/compare/@cypress/vue-v4.1.0...@cypress/vue-v4.2.0) (2022-08-30)
2
+
3
+
4
+ ### Features
5
+
6
+ * adding svelte component testing support ([#23553](https://github.com/cypress-io/cypress/issues/23553)) ([f6eaad4](https://github.com/cypress-io/cypress/commit/f6eaad40e1836fa9db87c60defa5ae6f390c8fd8))
7
+
1
8
  # [@cypress/vue-v4.1.0](https://github.com/cypress-io/cypress/compare/@cypress/vue-v4.0.0...@cypress/vue-v4.1.0) (2022-08-11)
2
9
 
3
10
 
package/vue/README.md CHANGED
@@ -81,7 +81,7 @@ Run `yarn test` to execute headless Cypress tests.
81
81
 
82
82
  ## License
83
83
 
84
- [![license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cypress-io/cypress/blob/master/LICENSE)
84
+ [![license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cypress-io/cypress/blob/develop/LICENSE)
85
85
 
86
86
  This project is licensed under the terms of the [MIT license](/LICENSE).
87
87
 
@@ -1,7 +1,7 @@
1
1
  /// <reference types="cypress" />
2
2
  /// <reference types="cypress" />
3
- import type { ComponentPublicInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, ExtractDefaultPropTypes, DefineComponent, FunctionalComponent, ComputedOptions, MethodOptions, ComponentOptionsMixin, EmitsOptions, ComponentOptionsWithObjectProps, ComponentPropsOptions, ComponentOptionsWithArrayProps, ComponentOptionsWithoutProps } from 'vue';
4
- import type { MountingOptions, VueWrapper } from './@vue/test-utils';
3
+ import type { ComponentPublicInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, ExtractDefaultPropTypes, DefineComponent, FunctionalComponent, ComputedOptions, MethodOptions, ComponentOptionsMixin, EmitsOptions, ComponentOptionsWithObjectProps, ComponentPropsOptions, ComponentOptionsWithArrayProps, ComponentOptionsWithoutProps, Prop } from 'vue';
4
+ import type { MountingOptions as VTUMountingOptions, VueWrapper } from './@vue/test-utils';
5
5
  import { StyleOptions } from '@cypress/mount-utils';
6
6
  import * as _VueTestUtils from './@vue/test-utils';
7
7
  declare const VueTestUtils: {
@@ -36,7 +36,7 @@ declare const VueTestUtils: {
36
36
  createWrapperError: typeof _VueTestUtils.createWrapperError;
37
37
  };
38
38
  export { VueTestUtils };
39
- declare type GlobalMountOptions = Required<MountingOptions<any>>['global'];
39
+ declare type GlobalMountOptions = Required<VTUMountingOptions<any>>['global'];
40
40
  declare global {
41
41
  namespace Cypress {
42
42
  interface Cypress {
@@ -45,7 +45,7 @@ declare global {
45
45
  }
46
46
  }
47
47
  }
48
- export declare type CyMountOptions<Props, Data = {}> = Omit<MountingOptions<Props, Data>, 'attachTo'> & {
48
+ declare type MountingOptions<Props, Data = {}> = Omit<VTUMountingOptions<Props, Data>, 'attachTo'> & {
49
49
  log?: boolean;
50
50
  /**
51
51
  * @deprecated use vue-test-utils `global` instead
@@ -55,31 +55,48 @@ export declare type CyMountOptions<Props, Data = {}> = Omit<MountingOptions<Prop
55
55
  mixin?: GlobalMountOptions['mixins'];
56
56
  };
57
57
  } & Partial<StyleOptions>;
58
+ export declare type CyMountOptions<Props, Data = {}> = MountingOptions<Props, Data>;
58
59
  /**
59
- * the types for mount have been copied directly from the VTU mount
60
- * https://github.com/vuejs/vue-test-utils-next/blob/master/src/mount.ts
60
+ * The types for mount have been copied directly from the VTU mount
61
+ * https://github.com/vuejs/vue-test-utils-next/blob/master/src/mount.ts.
61
62
  *
62
- * If they are updated please copy and pase them again here.
63
+ * There isn't a good way to make them generic enough that we can extend them.
64
+ *
65
+ * In addition, we modify the types slightly.
66
+ *
67
+ * `MountOptions` are modifying, including some Cypress specific options like `styles`.
68
+ * The return type is different. Instead of VueWrapper, it's Cypress.Chainable<VueWrapper<...>>.
63
69
  */
64
70
  declare type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps;
65
- export declare function mount<V>(originalComponent: {
71
+ declare type ComponentMountingOptions<T> = T extends DefineComponent<infer PropsOrPropOptions, any, infer D, any, any> ? MountingOptions<Partial<ExtractDefaultPropTypes<PropsOrPropOptions>> & Omit<Readonly<ExtractPropTypes<PropsOrPropOptions>> & PublicProps, keyof ExtractDefaultPropTypes<PropsOrPropOptions>>, D> & Record<string, any> : MountingOptions<any>;
72
+ export declare function mount<V extends {}>(originalComponent: {
73
+ new (...args: any[]): V;
74
+ __vccOpts: any;
75
+ }, options?: MountingOptions<any> & Record<string, any>): Cypress.Chainable<VueWrapper<ComponentPublicInstance<V>>>;
76
+ export declare function mount<V extends {}, P>(originalComponent: {
77
+ new (...args: any[]): V;
78
+ __vccOpts: any;
79
+ defaultProps?: Record<string, Prop<any>> | string[];
80
+ }, options?: MountingOptions<P & PublicProps> & Record<string, any>): Cypress.Chainable<VueWrapper<ComponentPublicInstance<V>>>;
81
+ export declare function mount<V extends {}>(originalComponent: {
66
82
  new (...args: any[]): V;
67
83
  registerHooks(keys: string[]): void;
68
- }, options?: MountingOptions<any>): Cypress.Chainable;
69
- export declare function mount<V, P>(originalComponent: {
84
+ }, options?: MountingOptions<any> & Record<string, any>): Cypress.Chainable<VueWrapper<ComponentPublicInstance<V>>>;
85
+ export declare function mount<V extends {}, P>(originalComponent: {
70
86
  new (...args: any[]): V;
71
87
  props(Props: P): any;
72
88
  registerHooks(keys: string[]): void;
73
- }, options?: CyMountOptions<P & PublicProps>): Cypress.Chainable;
74
- export declare function mount<Props, E extends EmitsOptions = {}>(originalComponent: FunctionalComponent<Props, E>, options?: CyMountOptions<Props & PublicProps>): Cypress.Chainable;
75
- 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;
76
- 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;
77
- 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<{
89
+ }, options?: MountingOptions<P & PublicProps> & Record<string, any>): Cypress.Chainable<VueWrapper<ComponentPublicInstance<V>>>;
90
+ export declare function mount<Props extends {}, E extends EmitsOptions = {}>(originalComponent: FunctionalComponent<Props, E>, options?: MountingOptions<Props & PublicProps> & Record<string, any>): Cypress.Chainable<VueWrapper<ComponentPublicInstance<Props>>>;
91
+ 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 extends {} = ExtractDefaultPropTypes<PropsOrPropOptions>>(component: DefineComponent<PropsOrPropOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, PP, Props, Defaults>, options?: MountingOptions<Partial<Defaults> & Omit<Props & PublicProps, keyof Defaults>, D> & Record<string, any>): Cypress.Chainable<VueWrapper<InstanceType<DefineComponent<PropsOrPropOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, PP, Props, Defaults>>>>;
92
+ export declare function mount<T extends DefineComponent<any, any, any, any>>(component: T, options?: ComponentMountingOptions<T>): Cypress.Chainable<VueWrapper<InstanceType<T>>>;
93
+ export declare function mount<Props = {}, 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: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, E, Mixin, Extends, EE>, options?: MountingOptions<Props & PublicProps, D>): Cypress.Chainable<VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E, VNodeProps & Props>>> & Record<string, any>;
94
+ export declare function mount<PropNames extends string, 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, Props extends Readonly<{
78
95
  [key in PropNames]?: any;
79
96
  }> = Readonly<{
80
97
  [key in PropNames]?: any;
81
- }>>(componentOptions: ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, E, Mixin, Extends, EE, Props>, options?: CyMountOptions<Props & PublicProps, D>): Cypress.Chainable;
82
- 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;
98
+ }>>(componentOptions: ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, E, Mixin, Extends, EE, Props>, options?: MountingOptions<Props & PublicProps, D>): Cypress.Chainable<VueWrapper<ComponentPublicInstance<Props, RawBindings, D, C, M, E>>>;
99
+ export declare function mount<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<ExtractPropTypes<PropsOptions> & PublicProps, D>): Cypress.Chainable<VueWrapper<ComponentPublicInstance<ExtractPropTypes<PropsOptions>, RawBindings, D, C, M, E, VNodeProps & ExtractPropTypes<PropsOptions>>>>;
83
100
  /**
84
101
  * Helper function for mounting a component quickly in test hooks.
85
102
  * @example
package/vue/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "globby": "^11.0.1",
26
26
  "tailwindcss": "1.1.4",
27
27
  "typescript": "^4.7.4",
28
- "vite": "3.0.3",
28
+ "vite": "3.1.0",
29
29
  "vue": "3.2.31",
30
30
  "vue-i18n": "9.0.0-rc.6",
31
31
  "vue-router": "^4.0.0",
@@ -50,7 +50,7 @@
50
50
  "type": "git",
51
51
  "url": "https://github.com/cypress-io/cypress.git"
52
52
  },
53
- "homepage": "https://github.com/cypress-io/cypress/blob/master/npm/vue/#readme",
53
+ "homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/vue/#readme",
54
54
  "author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>",
55
55
  "bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Fvue&template=1-bug-report.md&title=",
56
56
  "keywords": [
package/vue2/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [@cypress/vue2-v1.1.0](https://github.com/cypress-io/cypress/compare/@cypress/vue2-v1.0.2...@cypress/vue2-v1.1.0) (2022-08-30)
2
+
3
+
4
+ ### Features
5
+
6
+ * adding svelte component testing support ([#23553](https://github.com/cypress-io/cypress/issues/23553)) ([f6eaad4](https://github.com/cypress-io/cypress/commit/f6eaad40e1836fa9db87c60defa5ae6f390c8fd8))
7
+
1
8
  # [@cypress/vue2-v1.0.2](https://github.com/cypress-io/cypress/compare/@cypress/vue2-v1.0.1...@cypress/vue2-v1.0.2) (2022-08-11)
2
9
 
3
10
 
package/vue2/README.md CHANGED
@@ -70,7 +70,7 @@ the `options`.
70
70
 
71
71
  ## License
72
72
 
73
- [![license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cypress-io/cypress/blob/master/LICENSE)
73
+ [![license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cypress-io/cypress/blob/develop/LICENSE)
74
74
 
75
75
  This project is licensed under the terms of the [MIT license](/LICENSE).
76
76
 
@@ -37,14 +37,14 @@ declare type VuePlugins = VuePlugin[];
37
37
  * local components, plugins, etc.
38
38
  *
39
39
  * @interface MountOptionsExtensions
40
- * @see https://github.com/cypress-io/cypress/tree/master/npm/vue#examples
40
+ * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
41
41
  */
42
42
  interface MountOptionsExtensions {
43
43
  /**
44
44
  * Extra local components
45
45
  *
46
46
  * @memberof MountOptionsExtensions
47
- * @see https://github.com/cypress-io/cypress/tree/master/npm/vue#examples
47
+ * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
48
48
  * @example
49
49
  * import Hello from './Hello.vue'
50
50
  * // imagine Hello needs AppComponent
@@ -61,7 +61,7 @@ interface MountOptionsExtensions {
61
61
  * Optional Vue filters to install while mounting the component
62
62
  *
63
63
  * @memberof MountOptionsExtensions
64
- * @see https://github.com/cypress-io/cypress/tree/master/npm/vue#examples
64
+ * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
65
65
  * @example
66
66
  * const filters = {
67
67
  * reverse: (s) => s.split('').reverse().join(''),
@@ -74,7 +74,7 @@ interface MountOptionsExtensions {
74
74
  *
75
75
  * @memberof MountOptionsExtensions
76
76
  * @alias mixins
77
- * @see https://github.com/cypress-io/cypress/tree/master/npm/vue#examples
77
+ * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
78
78
  */
79
79
  mixin?: VueMixins;
80
80
  /**
@@ -82,13 +82,13 @@ interface MountOptionsExtensions {
82
82
  *
83
83
  * @memberof MountOptionsExtensions
84
84
  * @alias mixin
85
- * @see https://github.com/cypress-io/cypress/tree/master/npm/vue#examples
85
+ * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
86
86
  */
87
87
  mixins?: VueMixins;
88
88
  /**
89
89
  * A single plugin or multiple plugins.
90
90
  *
91
- * @see https://github.com/cypress-io/cypress/tree/master/npm/vue#examples
91
+ * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
92
92
  * @alias plugins
93
93
  * @memberof MountOptionsExtensions
94
94
  */
@@ -96,7 +96,7 @@ interface MountOptionsExtensions {
96
96
  /**
97
97
  * A single plugin or multiple plugins.
98
98
  *
99
- * @see https://github.com/cypress-io/cypress/tree/master/npm/vue#examples
99
+ * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
100
100
  * @alias use
101
101
  * @memberof MountOptionsExtensions
102
102
  */
@@ -121,7 +121,7 @@ interface MountOptions {
121
121
  * mounting this component
122
122
  *
123
123
  * @memberof MountOptions
124
- * @see https://github.com/cypress-io/cypress/tree/master/npm/vue#examples
124
+ * @see https://github.com/cypress-io/cypress/tree/develop/npm/vue#examples
125
125
  */
126
126
  extensions: MountOptionsExtensions;
127
127
  }
package/vue2/package.json CHANGED
@@ -9,8 +9,7 @@
9
9
  "postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
10
10
  "build-prod": "yarn build",
11
11
  "test": "echo \"Tests for @cypress/vue2 are run from system-tests\"",
12
- "watch": "yarn build --watch --watch.exclude ./dist/**/*",
13
- "test-ci": "node ../../scripts/run-ct-examples.js --examplesList=./examples.env"
12
+ "watch": "yarn build --watch --watch.exclude ./dist/**/*"
14
13
  },
15
14
  "dependencies": {
16
15
  "@vue/test-utils": "^1.1.3"
@@ -40,7 +39,7 @@
40
39
  "type": "git",
41
40
  "url": "https://github.com/cypress-io/cypress.git"
42
41
  },
43
- "homepage": "https://github.com/cypress-io/cypress/blob/master/npm/vue/#readme",
42
+ "homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/vue/#readme",
44
43
  "bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Fvue&template=1-bug-report.md&title=",
45
44
  "keywords": [
46
45
  "cypress",