question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Config from cypress.json is considered as cli config in the app

See original GitHub issue
  • Cypress Version: 1.0.3

Is this a Feature or Bug?

Bug

Current behavior:

Environment variables from cypress.json are treated as cli config, thus settings from cypress.json have higher priority than those from cypress.env.json:

screen shot 2017-10-31 at 10 51 39 am

domain env variable config (cypress.json.host), was provided by cypress.json not cli.

Desired behavior:

Configs from cypress.json should appear as configs from cypress.json file, not cli, so cypress.env.json config should overwrite cypress.json one.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brian-manncommented, Oct 31, 2017

I agree its a bit confusing - but the reason is that because there are 4 areas that can set environment variables it’s not really a direct 1:1 comparison of cypress.json. It’s more like saying - these are all the environment variables that have been set from all 4 different sources.

It’s a visual thing only so we could just update it. We’ve actually had this question / confusion at least 1 other time.

If you want submit a PR - this is just the react front end for the packages/desktop-gui. @jennifer-shehane or @chrisbreiding could also do it too.

0reactions
pawelgalazkacommented, Oct 31, 2017

Ahh… cool, ok so I do not nest in cypress.env.json now, and I changed environmentVariables key to env in cypress.json and it seems to work:

screen shot 2017-11-01 at 8 32 42 am

But why app interface keeps environmentVariables name ? Shouldn’t display env ? That’s a bit confusing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration - Cypress Documentation
This guide is for Cypress 10 and the new JavaScript configuration file format. If you are on an older version of Cypress that...
Read more >
Configurations in Cypress and How to Disable Default ...
Firstly, Cypress has a configuration setup, which is called the Global Configuration, which provides a set of default values for various ...
Read more >
Cypress Configuration Settings (cypress.json) - YouTube
Lean now the CYPRESS. JSON file to set the baseUrl, Environment Variables, Timeouts, Video, and Screenshot configurations.
Read more >
Configure Cypress Tests to Run on Multiple Environments
Navigate to the Project Root Folder and look for cypress.json . cypress.json is the configuration file for your Cypress automation framework.
Read more >
BrowserStack-Cypress CLI reference
json configuration file. You can optionally specify the filename you want to use for the BrowserStack configuration file. For example: Command Line.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found