docs: docs & test hygiene remainder (SL-014, 028, 031, 032, 033) - #476
Conversation
…033) - SL-014: add the 12 previously-undocumented npm scripts to CLAUDE.md's Key scripts table, prioritizing the CI-gate scripts (check:macros, check:registry, audit:check, lint:css). - SL-028: add tests/README.md documenting the *.spec.js (Playwright) vs *.test.js (node:test) convention, referencing SL-027 as the motivating example of what happens when it's unenforced. - SL-031: retitle docs/migration.md's stale "0.6.25 -> next" header to "0.6.25 -> 0.6.26" (traced via CHANGELOG.md to the release that actually shipped the base-alias removal it documents), matching the versioned-header style used elsewhere in the same file. - SL-032: document the tier1-p2/p7/p8/p10 numbering gaps (no P1, P3-P6, P9 files) in tests/README.md plus a one-line pointer in each of the 4 files - they trace back to the tier-1-color-fallback feature's original property enumeration; not renumbered. - SL-033: extract tests/render-helpers.js (BUNDLE path + renderWithBundle helper) after diffing all 8 page.setContent call sites individually - 5 files (a11y-patterns, layout, macros, states-full, typography) had near-identical setup() functions differing only in viewport/margin/ extra-stylesheet, now parameterized through one shared function; layers.spec.js/print.spec.js/container-queries.spec.js only shared the BUNDLE path constant (their setContent bodies are genuinely per-test or differently-shaped) and were left otherwise untouched, per the plan's explicit caution not to force uniformity where the originals differ. Verified with real browser execution (not just --list): all 5 refactored setup()-using spec files plus layers/print/container-queries ran under a temporary local executablePath override (this sandbox's pinned Playwright browser build isn't pre-installed) - 150/150 tests pass unchanged. lint:css, build, test:unit (31/31), check:llm-guide, check:version all pass; the temporary config was not committed.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoDocs/test hygiene: document scripts & conventions; dedupe Playwright setup
AI Description
Diagram
High-Level Assessment
Files changed (16)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
6 rules 1.
|
- check:macros was labeled a CI gate; verified against .github/workflows/ci.yml directly and it isn't wired into any job (the audit's own SL-014 finding had asserted it was — that assumption was wrong). Corrected the label rather than adding it to CI, since wiring in a new gate is a separate decision with its own blast radius. - test:unit's new row didn't mention it needs badges/ built first; hit this myself moments earlier while verifying PR3 (5 spurious test failures from a stale badges/ dir). CI works around it by downloading the badges artifact from the build job before this step; a clean local checkout needs npm run build first.
45a048d
into
claude/pr-469-audit-rebase-ggp0e4
PR2 from the technical-debt audit remediation plan (#469): the docs/test-hygiene remainder (SL-027/029/030 already landed in batch 1, PR #474). Targets the integration branch, same stacking model as PR1 (#475).
Findings addressed
CLAUDE.md's Key scripts table, prioritizing the two CI gates the audit specifically called out (check:macros,check:registry), plusaudit:checkandlint:css.tests/README.mddocumenting the*.spec.js(Playwright) vs*.test.js(node:test) split, using SL-027 as the concrete example of what happens when it's unenforced.docs/migration.md's header said "0.6.25 → next"; traced the change it documents (base-alias removal) viaCHANGELOG.mdto the release that actually shipped it (0.6.26) and retitled accordingly.tier1-p2/p7/p8/p10skip P1, P3-P6, P9 (they trace to the tier-1-color-fallback feature's original property enumeration — only a subset got dedicated automated tests) intests/README.md, plus a one-line pointer in each of the 4 files. Not renumbered.tests/render-helpers.js. Diffed all 8page.setContentcall sites individually first, per the plan's caution: 5 files (a11y-patterns,layout,macros,states-full,typography) had near-identicalsetup()functions differing only in viewport size / body margin / an extra transition-disabling stylesheet — now parameterized through onerenderWithBundle()helper.layers.spec.js,print.spec.js, andcontainer-queries.spec.jsare genuinely differently-shaped (per-test inline content, or a container-wrapping variant) and were left otherwise untouched — they only now share theBUNDLEpath constant instead of each redefining it.Verification
Real browser execution, not just
--list: this sandbox doesn't have the exact Playwright browser build the project pins pre-installed, so I ran the 7 touched spec files (150 tests total) under a temporary localexecutablePathoverride pointing at the closest available build — all 150 pass unchanged. That temp config was never committed.npm run lint:css,npm run build— cleannpm run test:unit— 31/31 passnpm run check:llm-guide,npm run check:version— passGenerated by Claude Code