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

Add warning and example how to pass arguments to Cypress when using npm run script #1418

Closed
bahmutov opened this issue Feb 14, 2019 · 6 comments

Comments

@bahmutov
Copy link
Contributor

I see this problem pretty often: user is trying to npm run cy:run --record ... without separating arguments with -- (should be npm run cy:run -- --record ...)

We need to put this warning in several places, because people not familiar with NPM's quirks will get stuck and frustrated. I see a couple of places where this warning could be added

In the existing https://docs.cypress.io/guides/guides/command-line.html#How-to-run-commands warning, we need to stress this point by adding "important"

It would be nice to create reusable warning template that we can include on demand, just like @flotwig has done with network stubbing warning in this commit 50c4c71

I have existing NPM run warning here: https://github.com/cypress-io/cypress-documentation/blob/develop/source/guides/guides/command-line.md#how-to-run-commands

Maybe we could have a shorter version of the above warning that can be inserted into more places

@bahmutov
Copy link
Contributor Author

I think for cypress open cases we could show passing one of the options that cypress open allows see https://github.com/cypress-io/cypress-documentation/blob/develop/source/guides/guides/command-line.md#cypress-open

something like

npm run cy:open -- --config baseUrl=http://localhost:4400

@nupurgrover
Copy link

@bahmutov I would like to work on this, if this is still up for grabs

@jennifer-shehane
Copy link
Member

@nupurgrover Yes! Is still available.

@nupurgrover
Copy link

Great! I'll submit a PR

@bhayward93
Copy link

I could do this if its still needed @jennifer-shehane

@jennifer-shehane
Copy link
Member

@bhayward93 Yes, feel free to pick up.

@jennifer-shehane jennifer-shehane closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants