In cypress.json there is one env variable:
"env": {
"AUTH_TOKEN": "token_1"
},
I have multiple users in db and would like to test them separately without editing cypress.json. Cypress documentation provides two possible ways how to override env variables form command line:
cypress run --env AUTH_TOKEN="token_2"
and
AUTH_TOKEN="token_2" cypress run
When I run cypress interface with
npm run cy:open --env AUTH_TOKEN="token_2"
or
AUTH_TOKEN="token_2" npm run cy:open
token_1 does not get overriden with token_2. Why is cypress ignoring options provided in command line?