diff --git a/packages/@vue/cli-plugin-e2e-cypress/README.md b/packages/@vue/cli-plugin-e2e-cypress/README.md index eeae70e639..84e71469f0 100644 --- a/packages/@vue/cli-plugin-e2e-cypress/README.md +++ b/packages/@vue/cli-plugin-e2e-cypress/README.md @@ -31,6 +31,10 @@ Cypress offers a rich interactive interface for running E2E tests, but currently We've pre-configured Cypress to place most of the e2e testing related files under `/tests/e2e`. You can also check out [how to configure Cypress via `cypress.json`](https://docs.cypress.io/guides/references/configuration.html#Options). +## Environment Variables + +Cypress doesn't load .env files for your test files the same way as `vue-cli` does for your [application code](https://github.com/vuejs/vue-cli/blob/dev/docs/env.md#using-env-variables-in-client-side-code). Cypress supports a few ways to [define env variables](https://docs.cypress.io/guides/guides/environment-variables.html#) but the easiest one is to use .json files (either `cypress.json` or `cypress.env.json`) to define environment variables. Keep in mind those variables are accessible via `Cypress.env` function instead of regular `process.env` object. + ## Installing in an Already Created Project ``` sh