Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Cypress plugin to reflect new cross-browser capabilities #5139

Closed
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/@vue/cli-plugin-e2e-cypress/README.md
Expand Up @@ -4,15 +4,17 @@

This adds E2E testing support using [Cypress](https://www.cypress.io/).

Cypress offers a rich interactive interface for running E2E tests, but currently only supports running the tests in Chromium. If you have a hard requirement on E2E testing in multiple browsers, consider using the Selenium-based [@vue/cli-plugin-e2e-nightwatch](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-e2e-nightwatch).
Cypress offers a rich interactive interface for running E2E tests in Firefox and Chromium based browsers (Chrome, MS Edge, Brave, Electron). To learn more about cross browser testing, visit the [Cypress Cross Browser Testing Guide](https://on.cypress.io/cross-browser-testing).

> **Note:** If you have a hard requirement on E2E testing in IE or Safari, consider using the Selenium-based [@vue/cli-plugin-e2e-nightwatch](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-e2e-nightwatch).

## Injected Commands

- **`vue-cli-service test:e2e`**

Run e2e tests with `cypress run`.

By default it launches Cypress in interactive mode with a GUI. If you want to run the tests in headless mode (e.g. for CI), you can do so with the `--headless` option.
By default it launches Cypress in interactive mode with a GUI (via `cypress open`). If you want to run the tests in headless mode (e.g. for CI), you can do so with the `--headless` option.

The command automatically starts a server in production mode to run the e2e tests against. If you want to run the tests multiple times without having to restart the server every time, you can start the server with `vue-cli-service serve --mode production` in one terminal, and then run e2e tests against that server using the `--url` option.

Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-e2e-cypress/package.json
Expand Up @@ -24,7 +24,7 @@
},
"dependencies": {
"@vue/cli-shared-utils": "^4.1.2",
"cypress": "^3.8.3",
"cypress": "^4.0.0",
amirrustam marked this conversation as resolved.
Show resolved Hide resolved
"eslint-plugin-cypress": "^2.8.1"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli/lib/promptModules/e2e.js
Expand Up @@ -17,7 +17,7 @@ module.exports = cli => {
message: 'Pick a E2E testing solution:',
choices: [
{
name: 'Cypress (Chrome only)',
name: 'Cypress (Test in Chrome, Firefox, MS Edge, and Electron)',
value: 'cypress',
short: 'Cypress'
},
Expand Down