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

feat: add quiet cli arg/module option #7714

Merged
merged 7 commits into from Jun 22, 2020
Merged

Conversation

slt
Copy link
Contributor

@slt slt commented Jun 16, 2020

User facing changelog

  • There is a new --quiet flag available that will silence any Cypress specific output from stdout.

Additional details

When I saw how noisy our CI was with cypress tests, I assumed by changing the reporter I could make it a little less verbose, but this output comes no matter what reporter is configured.

This pull requests adds --quiet as a option which disables the output for:

  • Run Starting
  • Spec header
  • Video/Screenshots
  • Spec results
  • Run Finished

This should just leave you with whatever the configured reporter is

How has the user experience changed?

PR Tasks

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 16, 2020

Thanks for taking the time to open a PR!

@CLAassistant
Copy link

CLAassistant commented Jun 16, 2020

CLA assistant check
All committers have signed the CLA.

@slt slt force-pushed the develop branch 2 times, most recently from 0f01529 to a14e461 Compare June 16, 2020 04:24
--quiet mode to disable the verbose results to stdout
but still use specified formatter
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.

Very nice. Thanks for the contribution!

We'll want to make sure this covers passing quiet to the Module API also.

We'll have someone from the team more formally review, just noted a typo I found for now.

cli/schema/cypress.schema.json Outdated Show resolved Hide resolved
Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
@jennifer-shehane jennifer-shehane self-requested a review June 17, 2020 07:30
Cypress module support for --quiet
@slt
Copy link
Contributor Author

slt commented Jun 18, 2020

Thank you for taking a look so quickly, I have added a test which verifies the quiet option can be passed in via the module api.

@jennifer-shehane jennifer-shehane dismissed their stale review June 18, 2020 08:48

Dismissing my previous review as resolved

Copy link
Contributor

@flotwig flotwig left a comment

Choose a reason for hiding this comment

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

The only functional change that needs to be made is to remove quiet as a config option. Since we want to use it only as a CLI argument/module option, it shouldn't be passed around or exposed as a config var.

cli/schema/cypress.schema.json Outdated Show resolved Hide resolved
packages/server/lib/config.js Outdated Show resolved Hide resolved
packages/server/lib/modes/run.js Outdated Show resolved Hide resolved
packages/server/lib/modes/run.js Outdated Show resolved Hide resolved
packages/server/lib/modes/run.js Outdated Show resolved Hide resolved
packages/server/lib/modes/run.js Outdated Show resolved Hide resolved
packages/server/lib/modes/run.js Outdated Show resolved Hide resolved
packages/server/lib/modes/run.js Outdated Show resolved Hide resolved
packages/server/lib/modes/run.js Outdated Show resolved Hide resolved
packages/server/test/unit/config_spec.js Outdated Show resolved Hide resolved
Co-authored-by: Zach Bloomquist <github@chary.us>
@slt slt force-pushed the develop branch 5 times, most recently from 208f943 to 14498b1 Compare June 19, 2020 04:33
Address feedback, thanks
@slt slt requested a review from flotwig June 22, 2020 00:17
@slt
Copy link
Contributor Author

slt commented Jun 22, 2020

I can't get the ci jobs to pass consistently, I think it got worse when I merged the develop branch back in, but I don't think these failures are related to my changes

@jennifer-shehane
Copy link
Member

@slt Yeah, there is some unrelated flake in those tests that we're working on fixing.

@flotwig
Copy link
Contributor

flotwig commented Jun 22, 2020

Copy link
Contributor

@flotwig flotwig left a comment

Choose a reason for hiding this comment

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

LGTM. opened a separate PR for minor cleanup #7777

@flotwig flotwig changed the title Option to disable Cypress the verbose results to stdout feat: add quiet cli arg/module option Jun 22, 2020
@flotwig flotwig merged commit 768da16 into cypress-io:develop Jun 22, 2020
@slt
Copy link
Contributor Author

slt commented Jun 23, 2020

Thank you @flotwig @jennifer-shehane

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.

Option to disable Cypress the verbose results to stdout
4 participants