Skip to content
Discussion options

You must be logged in to vote

Figured this out.

"cypress:open:dev": "CYPRESS_BASE_URL=$URL cypress open --env version=development"

The only line I needed to change in my config was the following:

config.baseUrl = config.baseUrl || configFile.env.baseUrl

All my tests were using the following:

 cy.visit(Cypress.env('baseUrl'))

So I needed to change to:

 cy.visit('')

I can now run the script without any argument and it will use the default baseUrl, or I can run URL="https://google.com/ npm run cypress:open:dev and the baseUrl will change

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by GeorgeXCV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant