You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package allows you to use the [Cypress](https://www.cypress.io/) test runner to mount and test your components within Cypress. It is built on top of the [Vue Test Utils](https://github.com/vuejs/vue-test-utils) package.
14
+
This package allows you to use the [Cypress](https://www.cypress.io/) test runner to mount and test your Vue 3.x components within Cypress. It is built on top of the [Vue Test Utils](https://github.com/vuejs/vue-test-utils) package.
15
15
16
16

17
17
@@ -20,10 +20,14 @@ It uses [Vue Test Utils](https://github.com/vuejs/vue-test-utils) under the hood
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
22
23
+
### How is this different from @cypress/vue2?
24
+
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.
25
+
23
26
## Installation
24
27
25
28
- Requires Cypress v7.0.0 or later
26
29
- Requires [Node](https://nodejs.org/en/) version 12 or above
30
+
- Requires Vue 3.x. If you are using Vue 2.x, you want [@cypress/vue2](cypress-vue2-npm-url) instead.
27
31
- Supports projects built with Vue CLI, Vite, and Webpack. If you would like us to support another build configuration, please [create an issue](https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm:%20@cypress/vue&template=3-feature.md).
28
32
29
33
Now you are ready to install.
@@ -666,6 +670,7 @@ Let the world know your project is using Cypress.io to test with this cool badge
> Browser-based Component Testing for Vue.js with the Open-Source [Cypress.io](https://www.cypress.io/) Test Runner ✌️🌲
7
+
> Browser-based Component Testing for Vue.js 2.x with the Open-Source [Cypress.io](https://www.cypress.io/) Test Runner ✌️🌲
8
8
>
9
9
**✨ New** We're growing the Cypress Community Discord. We have dedicated sections on Component Testing. 👉 [Join now](https://discord.com/invite/TmzTGUW) and let's chat!
This package allows you to use the [Cypress](https://www.cypress.io/) test runner to mount and test your components within Cypress. It is built on top of the [Vue Test Utils](https://github.com/vuejs/vue-test-utils) package.
13
+
### What is @cypress/vue2?
14
+
This package allows you to use the [Cypress](https://www.cypress.io/) test runner to mount and test your Vue 2 components within Cypress. It is built on top of the [Vue Test Utils](https://github.com/vuejs/vue-test-utils) package.
15
15
16
16

17
17
@@ -20,11 +20,15 @@ It uses [Vue Test Utils](https://github.com/vuejs/vue-test-utils) under the hood
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
22
23
+
### How is this different from @cypress/vue?
24
+
Cypress packages the current version of Vue under @cypress/vue, and older versions under separate package names. Use [@cypress/vue](cypress-vue-npm-url) if you're up to date, and this package if you're still using vue@2.
25
+
23
26
## Installation
24
27
25
28
- Requires Cypress v7.0.0 or later
26
29
- Requires [Node](https://nodejs.org/en/) version 12 or above
27
-
- Supports webpack-based projects, vite in alpha, if you would like us to support another, please [create an issue](https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm:%20@cypress/vue&template=3-feature.md) or, if an issue already exists subscribe to it.
30
+
- Requires Vue 2.x. If you are using Vue 3.0.0 or later, you want [@cypress/vue](cypress-vue-npm-url) instead.
31
+
- Supports webpack-based projects, vite in alpha, if you would like us to support another, please [create an issue](https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm:%20@cypress/vue2&template=3-feature.md) or, if an issue already exists subscribe to it.
28
32
29
33
Now you are ready to install.
30
34
@@ -497,7 +501,7 @@ Calls to `window.alert` are automatically recorded, but do not show up. Instead
497
501
## Comparison
498
502
499
503
<!-- prettier-ignore-start -->
500
-
Feature | Vue Test Utils or @testing-library/vue | Cypress + `@cypress/vue`
504
+
Feature | Vue Test Utils or @testing-library/vue | Cypress + `@cypress/vue2`
501
505
--- | --- | ---
502
506
Test runs in real browser | ❌ | ✅
503
507
Uses full mount | ❌ | ✅
@@ -622,13 +626,13 @@ Larger tests that use full application and run on CI (see [circle.yml](circle.ym
622
626
Run Cypress with environment variable
623
627
624
628
```
625
-
DEBUG=@cypress/vue
629
+
DEBUG=@cypress/vue2
626
630
```
627
631
628
632
If some deeply nested objects are abbreviated and do not print fully, set the maximum logging depth
629
633
630
634
```
631
-
DEBUG=@cypress/vue DEBUG_DEPTH=10
635
+
DEBUG=@cypress/vue2 DEBUG_DEPTH=10
632
636
```
633
637
634
638
## Related info
@@ -680,7 +684,8 @@ Let the world know your project is using Cypress.io to test with this cool badge
3. Include the support file from your project's `cypress/support/index.js` file
23
23
24
24
```js
25
-
import'@cypress/vue/dist/support'
25
+
import'@cypress/vue2/dist/support'
26
26
```
27
27
28
28
4. ⚠️ Turn the experimental component support on in your `cypress.json`. You can also specify where component spec files are located. For exampled to have them located in `src` folder use:
0 commit comments