-
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
fix: Exit when both --e2e and --component flags are passed in #18855
fix: Exit when both --e2e and --component flags are passed in #18855
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
cli/lib/util.js
Outdated
@@ -241,6 +241,14 @@ const parseOpts = (opts) => { | |||
|
|||
debug('parsed cli options %o', cleanOpts) | |||
|
|||
if (cleanOpts.component && cleanOpts.e2e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move the error text to https://github.com/cypress-io/cypress/blob/develop/cli/lib/errors.js?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I had not realized exactly how many different ways we have to throw errors in the command line. It might be a worthwhile project to examine and consider unifying at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good from a product standpoint. I talked to Brian about this.
* 10.0-release: feat: improve vite DX (#18937) feat: Use plugins on config files (#18798) BREAKING CHANGE: trigger major bump BREAKING CHANGE: trigger major bump fix: fix cypress/package.json crasher fix(breaking): change circle.yml to release binary fix: build-prod-ui deps before build-prod packages feat: implement spec list tree (#18901) chore: adding 10.0-release to the circle.yml build script (#18926) feat(app): remove __vite__ route and default to unified runner (#18909) fix: app layout + specs list review (#18862) feat(app): show previous versions (#18838) feat: scaffold integration files in app (#18763) feat: add footer to the settings (#18867) fix: Exit when both --e2e and --component flags are passed in (#18855)
User facing changelog
When incompatible flags are passed in, we exit rather than assuming which the user preferred.
cypress open --e2e --component
and
cypress run --e2e --component
are both now errors and exit immediately.
How has the user experience changed?
Previously, we would assume end-to-end, and run/open cypress in that mode. Now, we exit with an error:
PR Tasks