cypress-io / cypress-realworld-testing

Next.js project for learn.cypress.io
https://learn.cypress.io
MIT License
77 stars 63 forks source link

Confusing reference to Cypress.env variables #324

Open rsivan opened 10 months ago

rsivan commented 10 months ago

On content/real-world-examples/overview/custom-cypress-commands.mdx, under cy.loginByAPI(), it says: Note how we are using [Cypress.env()](https://docs.cypress.io/api/cypress-api/env) to handle our environment variables. You can find these in cypres/plugins/index.ts and cypress.json, respectively.

I find the statement "You can find these in cypres/plugins/index.ts and cypress.json, respectively." confusing or misleading, as the variables are actually defined in cypress.config.ts

MikeMcC399 commented 10 months ago

@rsivan

You're right. The description became incorrect after the Cypress Real World App was migrated to Cypress 10.x. It used to be correct for legacy configurations of Cypress 9.x and lower.