Skip to content
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

(Cypress) Make ELECTRON_EXTRA_LAUNCH_ARGS optional for local development #191

Open
a8trejo opened this issue Aug 21, 2024 · 0 comments
Open

Comments

@a8trejo
Copy link

a8trejo commented Aug 21, 2024

Is your feature request related to a problem? Please describe.
There are cases while running cypress locally when there's no need to run chromatic nor to upload builds. Example:

  • While debugging a CI failure
  • While working on a new feature branch and locally running cypress
  • Overall local development

However npx cypress run won't work and throw the error Error: Please provide a port number since ELECTRON_EXTRA_LAUNCH_ARGS is mandatory for the current chromatic plugin configuration.
image

Describe the solution you'd like
Been able to locally run npx cypress run without errors, knowing no snapshots will be taken. If ELECTRON_EXTRA_LAUNCH_ARGS is provided, that's the flag to make chromatic work, but it shouldn't just break local development and force us to pass ELECTRON_EXTRA_LAUNCH_ARGS even if we don't need snapshots.

Describe alternatives you've considered
Have tried adding a default value for process.env.ELECTRON_EXTRA_LAUNCH_ARGS = "--remote-debugging-port=9222" on cypress.config.ts but got this error err Error: connect ECONNREFUSED 127.0.0.1:9222

image

Also tried adding a new before:browser:launch event and passing the args there, but got the port error

Additional context
Created this as a feature request because everything works as expected when ELECTRON_EXTRA_LAUNCH_ARGS is passed as an environment variable, but would just like to not pass it, and run cypress as usual without chromatic snapshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant