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

fix: Exit when both --e2e and --component flags are passed in #18855

Merged
merged 4 commits into from
Nov 12, 2021

Conversation

BlueWinds
Copy link
Contributor

@BlueWinds BlueWinds commented Nov 9, 2021

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:

image

PR Tasks

  • Have tests been added/updated?
  • Has the original issue or this PR been tagged with a release in ZenHub?

@BlueWinds BlueWinds requested a review from a team as a code owner November 9, 2021 17:39
@BlueWinds BlueWinds requested review from jennifer-shehane and removed request for a team November 9, 2021 17:39
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 9, 2021

Thanks for taking the time to open a PR!

@BlueWinds BlueWinds changed the title Exit when both --e2e and --component flags are passed in fix: Exit when both --e2e and --component flags are passed in Nov 9, 2021
cli/lib/util.js Outdated Show resolved Hide resolved
@cypress
Copy link

cypress bot commented Nov 9, 2021



Test summary

4228 0 50 2Flakiness 0


Run details

Project cypress
Status Passed
Commit d7a4b20
Started Nov 10, 2021 6:58 PM
Ended Nov 10, 2021 7:10 PM
Duration 11:23 💡
OS Linux Debian - 10.9
Browser Electron 93

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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.

Copy link
Member

@jennifer-shehane jennifer-shehane left a 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.

@BlueWinds BlueWinds merged commit f967908 into unified-desktop-gui Nov 12, 2021
@BlueWinds BlueWinds deleted the issue-18846-exit-on-conflicting-flags branch November 12, 2021 17:15
tgriesser added a commit that referenced this pull request Nov 17, 2021
* 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)
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

Successfully merging this pull request may close these issues.

3 participants