From d3bb837f773c99e2d50b1f92681e8ee06feed865 Mon Sep 17 00:00:00 2001 From: Caleb Ukle Date: Mon, 1 May 2023 14:06:27 -0500 Subject: [PATCH] fix(testing): add --quiet cypress executor option --- docs/generated/packages/cypress/executors/cypress.json | 6 ++++++ packages/cypress/src/executors/cypress/cypress.impl.ts | 4 ++++ packages/cypress/src/executors/cypress/schema.json | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/docs/generated/packages/cypress/executors/cypress.json b/docs/generated/packages/cypress/executors/cypress.json index 0447d3d6aa7b7..077571da1c381 100644 --- a/docs/generated/packages/cypress/executors/cypress.json +++ b/docs/generated/packages/cypress/executors/cypress.json @@ -138,6 +138,12 @@ { "type": "number" } ], "description": "Pass a specified port value to the devServerTarget, if the value is 'cypress-auto' a free port will automatically be picked for the devServerTarget." + }, + "quiet": { + "aliases": ["q"], + "type": "boolean", + "description": "If passed, Cypress output will not be printed to stdout. Only output from the configured Mocha reporter will print.", + "default": false } }, "additionalProperties": true, diff --git a/packages/cypress/src/executors/cypress/cypress.impl.ts b/packages/cypress/src/executors/cypress/cypress.impl.ts index 448288cb7bdaf..81c68afd2ba6f 100644 --- a/packages/cypress/src/executors/cypress/cypress.impl.ts +++ b/packages/cypress/src/executors/cypress/cypress.impl.ts @@ -52,6 +52,7 @@ export interface CypressExecutorOptions extends Json { testingType?: 'component' | 'e2e'; tag?: string; port?: number | 'cypress-auto'; + quiet?: boolean; } interface NormalizedCypressExecutorOptions extends CypressExecutorOptions { @@ -291,6 +292,9 @@ async function runCypress( if (opts.reporterOptions) { options.reporterOptions = opts.reporterOptions; } + if (opts.quiet) { + options.quiet = opts.quiet; + } options.testingType = opts.testingType; diff --git a/packages/cypress/src/executors/cypress/schema.json b/packages/cypress/src/executors/cypress/schema.json index 4e6f63266431e..1fa4f8995c3e4 100644 --- a/packages/cypress/src/executors/cypress/schema.json +++ b/packages/cypress/src/executors/cypress/schema.json @@ -150,6 +150,12 @@ } ], "description": "Pass a specified port value to the devServerTarget, if the value is 'cypress-auto' a free port will automatically be picked for the devServerTarget." + }, + "quiet": { + "aliases": ["q"], + "type": "boolean", + "description": "If passed, Cypress output will not be printed to stdout. Only output from the configured Mocha reporter will print.", + "default": false } }, "additionalProperties": true,