Skip to content

Quality Check

The 🎯 Internal quality checks.. menu item opens a sidebar where the auditor ticks which internal checks to run over the audit before reports are generated. The add-on gathers exactly the sheet data the selected checks need and evaluates each check, returning {passed, errors, warnings, messages} per check. Warnings and errors can carry an entity reference so the sidebar can link the user straight to the offending issue, scenario step, or configuration row.

The five checks

Check key What it does
reports_preflight_checks Delegates to getErrorsForReportsPreflightChecks; blocks report generation on missing or invalid issue fields and on bad NA-or-Support scenario selections.
thomas_issues_minimum_per_scenario Expects at least 10 issues per non-Ad-hoc scenario; warns with the shortfall or reports the surplus.
configuration_defaults_changed Warns for each of High Level Summary, Company Name, Product Name, Product Description, and Deliver Date that still holds a known placeholder value.
language Warns on any issue whose Unique Title contains the word "screenshot" (saying "see image for screenshot" is redundant).
scenarios_quality Self-tests the verb-formatting checker first and hard-fails if the tests fail. Otherwise warns on bare URLs without link text, on action verbs not followed by bold markdown, and on scenarios with fewer than 8 steps.

Quality_check.js

Function Description Facing
runMenuQualityCheck() Menu entry point. Builds the initial screen data and opens the internal_checks sidebar. User-facing (menu)
getScreenDataForQualityChecks(ssId) Returns the minimal bootstrap payload the checks sidebar needs to render. User-facing (sidebar)
runQualityCheckTypes(selectedTypes, processPropertyKeyName) The workhorse called from the sidebar. Runs fillImagesLinks() first, then reads issues, scenarios, the relevant Configuration and Review Report keys and the NA-or-Support tab, computes the needed aggregations, runs qualityCheck, and reports progress back to the sidebar. User-facing (sidebar)
qualityCheck(data, commonData, computed, selectedTypes) Pure evaluation function: loops the selected check keys and produces results. Internal

Quality_check_helper_functions.js

The most substantial piece is the scenario-step "pretty formatting" checker, which converts each markdown step to HTML with Cheerio and walks the text nodes looking for action verbs (Activate, Select, Navigate to, Check, Uncheck, Expand, Collapse, "which takes you to") that are not followed by bold or marked-up target text. Because that check is regex-heavy, the file ships an inline test suite executed every time the check runs.

Function Description Facing
getErrorsForReportsPreflightChecks(data, commonData, computed, isACRIncluded) Produces the blocking-error list before report generation: one error per missing required field and per invalid field on every issue in issues_with_errors, plus (when isACRIncluded) one error per NA-or-Support criteria with a wrong or missing scenario selection. Shared (also called by the reports flow)
checkScenarioStepVerbsPrettyFormatting($, scenario, stepIndex) Entry point for the verb-formatting check on one scenario step. Returns warning objects. Internal
iterateVerbsPrettyFormattingRecursive(...) Recursively walks the parsed HTML, inspecting text nodes whose parent is a <p> or the root, and warns when trailing plain text follows a configured verb. Internal
test_iterateVerbsPrettyFormattingRecursive() Runs ~13 fixed test cases against the checker; called at the start of the scenarios_quality check as a guard. Internal (runtime self-test)
mergeOptions_(defaults, options) Recursively merges a caller's options over defaults (arrays are leaf values). Despite living here, it is the shared options-merge helper used by the Sheets_data.js extractors. Shared internal

Module data: verbsToUseForScenarioSteps (verbs with their allowed pre/post words), commonValidPre, commonValidPost.