Cypress environment variables can be set during a test by passing in the desired value as the second argument.
Cypress.env('HOST', 'asdf');
In the documentation, env
API syntax should look like something below:
- Cypress.env()- Cypress.env(name)- Cypress.env(name, value)- Cypress.env(object)
In your case the following will work
Cypress.env('myUsername', 'testUser')