-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --config-file
CLI argument
#1369
Comments
Would probably call the arg |
That sounds great 👍 |
Yeah this has come up before in a longer thread here - #909 (comment) I agree with the need for this. At the moment cypress is hard coded to look for the But, today -- for dynamic configuration - you could use We have some examples that might satisfy your requirements today. |
The problem is that I'm trying to hide away all the configuration and if I have to tell people they have to do something fancy in This isn't a huge rush for me, but I don't know that I'll be able to do any work on paypal-scripts in this regard until this has been done. |
i am facing the exact same issue at SpotHero at the moment and would love to also have this option available. |
Also have a use for this. I have a repo with tests for multiple services that each needs its own config file. |
This comment has been minimized.
This comment has been minimized.
You can use the plugins API to programmatically alter the configuration in whatever way you want today. You can simply have an empty https://docs.cypress.io/api/plugins/configuration-api.html I am confident this can handle whatever you want to throw at it. |
Probably so, but that would require that people have the plugin installed. For my use case I want people to be able to simply run: |
The docs here kind of allow for this, although I had to fix it to get it working properly in a freshly setup project on version 3.1.0. const pathToConfigFile = path.resolve('..', 'config', `${file}.json`) became const pathToConfigFile = path.resolve('cypress', 'config', `${file}.json`) It is strange to me that something like this would not be built in. It is a necessity to be able to differentiate between environments and fixtures. |
Also consider allowing user to pass |
Working on this right now. Should we replace all the references to "cypress.json" in the desktop-gui with something else, to indicate that the user is using a custom config? |
Would be great to see this feature in master. |
Eagerly waiting! 👍 |
Same here! |
Very much needed! |
This is cool that option is merged but it doesn't seem to be working :/
Cypress version: 3.4.1 |
@talentlessguy our |
@talentlessguy actually the |
@brian-mann okay, good luck with fixing |
Same here - this would be a great option. We tried to modify the blacklistsHosts list in the plugins file, but for some an unknown reason, the config always ended with the same blacklistsHosts that in the .json file. It must be a bug. All other properties modified by the plugin were actually showing the expected values. |
Released in |
Current behavior:
I cannot specify a configuration file path
Desired behavior:
I want to specify a configuration file path
Test code:
Additional Info (images, stack traces, etc)
I'm building a tool for PayPal called
paypal-scripts
(similar toreact-scripts
). One of the purposes is to cover 80% of the use cases by hiding all configuration from the user of the tool so they can focus on just writing the code. If they do create acypress.json
file then we'll use that one, but for most people they should be able to just use the built-in configuration ofpaypal-scripts
and they wont need to have and maintain acypress.json
file at all. There's honestly not a lot of configuration we'd need (mostly thebaseUrl
I think), but a lot of the value proposition ofpaypal-scripts
is that people don't need to worry about configuring anything and it all just works out of the box.I'm able to do this with
eslint
,babel
, and many other tools, but I can't currently do it withcypress
and I'd like to be able to do that if possible :) Thoughts?The text was updated successfully, but these errors were encountered: