Cypress: Configuration shows `env` variables as `undefined`

Created on 3 Dec 2019  路  4Comments  路  Source: cypress-io/cypress

Settings Panel does not show env variables

Screenshot 2019-12-03 at 14 21 06

cypress/config/foo.json file content

{
  "baseUrl": "http://localhost:8081/",
  "env": {
    "login.email": "foo",
    "login.password": "baz",
    "bar": "bar"
  }
}

Desired behavior:

The Settings panel should show all environments as they are defined in the selected config file.

Steps to reproduce: (app code and test code)

  1. cypress open or cypress open --config-file _PATH_TO_CONFIG_FILE (applies for both, with default or with custom config file)
  2. As soon as the panel shows up, switch to Settings tab (top-left corner)
  3. Open Configuration accordion
  4. env key shows undefined and no source item when hovering

Versions

Node: 12.0.0
Cypress: 3.7.0

Note: Running the exact configuration with cypress 3.6.1 works as expected.

pkdesktop-gui regression v3.7.0

Most helpful comment

I can confirm this is showing as undefined in the Settings panel when set from a custom config-file or from the regular cypress.json file.

The env does properly display in 3.6.0, so this is a regression introduced in 3.7.0.

I have also confirmed that the env variables are being correctly set and are readable from the spec files, so this appears to only be affecting the display in the settings panel (which was redesigned in 3.7.0)

All 4 comments

Have the same issue.

Environment:

  • Node: 10.15.3
  • Cypress: 3.7.0

I can confirm this is showing as undefined in the Settings panel when set from a custom config-file or from the regular cypress.json file.

The env does properly display in 3.6.0, so this is a regression introduced in 3.7.0.

I have also confirmed that the env variables are being correctly set and are readable from the spec files, so this appears to only be affecting the display in the settings panel (which was redesigned in 3.7.0)

The code for this is done in cypress-io/cypress#5879, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

Released in 3.8.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zbigniewkalinowski picture zbigniewkalinowski  路  3Comments

tahayk picture tahayk  路  3Comments

dkreft picture dkreft  路  3Comments

verheyenkoen picture verheyenkoen  路  3Comments

carloscheddar picture carloscheddar  路  3Comments