diff --git a/docs/accessibility/results-api.mdx b/docs/accessibility/results-api.mdx index 4dabdd93fa..f42d85cd59 100644 --- a/docs/accessibility/results-api.mdx +++ b/docs/accessibility/results-api.mdx @@ -213,7 +213,7 @@ In your CI workflow that runs your Cypress tests, :::info -If you record multiple runs in a single CI build, you must record these runs using the `--tag` parameter and then call `getAccessibilityResults`with the `runTags` argument for each run. +If you record multiple runs in a single CI build, you must record these runs using the `--tag` parameter and then call `getAccessibilityResults` with the `runTags` argument for each run. This is necessary to identify each unique run and return a corresponding set of results. The tags are how each run is uniquely identified. diff --git a/docs/ui-coverage/results-api.mdx b/docs/ui-coverage/results-api.mdx index fdd1877be7..22bd00a455 100644 --- a/docs/ui-coverage/results-api.mdx +++ b/docs/ui-coverage/results-api.mdx @@ -52,41 +52,35 @@ getUICoverageResults({ projectId: '...', // optional if set from env recordKey: '...', // optional if set from env runTags: [process.env.RUN_TAGS], // required if recording multiple runs -}) -.then((results) => { - const { - runNumber, - uiCoverageReportUrl, - summary, - views - } = results +}).then((results) => { + const { runNumber, uiCoverageReportUrl, summary, views } = results - console.log(`Received ${summary.isPartialReport ? 'partial' : ''} results for run #${runNumber}.`). - console.log(`See full report at ${uiCoverageReportUrl}.`) + console + .log( + `Received ${summary.isPartialReport ? 'partial' : ''} results for run #${runNumber}.` + ) + .console.log(`See full report at ${uiCoverageReportUrl}.`) // verify project coverage - if (summary.coverage < 80) { - throw new Error(`Project coverage is ${summary.coverage}, which does not meet the minimum coverage of 80%.`) + if (summary.coverage < 80) { + throw new Error( + `Project coverage is ${summary.coverage}, which does not meet the minimum coverage of 80%.` + ) } - const criticalViews = [ - /login/, - /checkout/ - ] + const criticalViews = [/login/, /checkout/] // verify critical view coverage const criticalViewResults = views.forEach((view) => { - const { - displayName, - coverage, - uiCoverageReportUrl - } = view + const { displayName, coverage, uiCoverageReportUrl } = view const isCriticalView = criticalViews.some((rx) => rx.test(displayName)) if (!isCriticalView) return - if (coverage < 95) { - throw new Error(`The critical view ${displayName} has the coverage of ${coverage}, which does not meet the critical view coverage of 95%. See report at ${uiCoverageReportUrl}.`) + if (coverage < 95) { + throw new Error( + `The critical view ${displayName} has the coverage of ${coverage}, which does not meet the critical view coverage of 95%. See report at ${uiCoverageReportUrl}.` + ) } }) @@ -185,7 +179,7 @@ In your CI workflow that runs your Cypress tests, :::info -If you record multiple runs in a single CI build, you must record these runs using the `--tag` parameter and then call `getUICoverageResults`with the `runTags` argument for each run. +If you record multiple runs in a single CI build, you must record these runs using the `--tag` parameter and then call `getUICoverageResults` with the `runTags` argument for each run. This is necessary to identify each unique run and return a corresponding set of results. The tags are how each run is uniquely identified.