import { readdirSync, readFileSync } from "node:fs"; import path from "node:path"; import { load } from "js-yaml"; import { describe, expect, it } from "vitest"; /** * About 2,000 Playwright tests across five configs and three main-config * projects collected and passed locally while no workflow ran any of them. * Editor, docs-site, analytics-privacy, no-auth and visual-regression behaviour * could all regress with every check green. * * A surface is covered when some workflow step actually runs it. Coverage is * read out of `run:` strings only, because a config filename also appears in * ci.yml's path filter and that mention runs nothing. Anything genuinely not * suited to CI has to say so here, with a reason, instead of just being absent. */ const root = path.resolve(import.meta.dirname, "../../.."); /** * Surfaces that deliberately have no automatic lane. Each entry must still be * genuinely unreferenced: a stale reason is itself a failure, so wiring one up * later forces the note to be deleted. */ const MANUAL_ONLY: Record = { "playwright.analytics.config.ts": "In-container browser sweep against a running image at BASE_URL: 1072 tests at workers=1 with 120s timeouts. nightly.yml's docker-e2e job already records in-container browser e2e as a separate follow-up that does not fit its 60-minute budget.", "tests/qa/playwright.qa.config.ts": "Against-production sweep driven by QA_BASE_URL. CI has no deployed target to point it at, so it stays a manual release-verification lane.", "chromium-visual": "Screenshot baselines are platform-suffixed and only darwin baselines are committed (327 darwin, 0 linux). update-visual-baselines.yml exists to generate the linux set and open a PR; until that lands, a linux lane would fail on every missing snapshot.", "chromium-legacy-visual": "visual-regression.spec.ts has no maintained baselines on any platform, as playwright.config.ts states. It is kept explicitly runnable rather than silently skipped.", }; /** Projects that only exist as a dependency of another project. */ const DEPENDENCY_PROJECTS = new Set(["setup"]); interface Workflow { jobs?: Record; } function rootScripts(): Record { return ( JSON.parse(readFileSync(path.join(root, "package.json"), "utf8")) as { scripts: Record; } ).scripts; } /** * Every command any workflow actually executes, with `pnpm