From e8a81df416f7b1786206317c91985c139834a36c Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Thu, 13 Aug 2026 00:19:18 -0500 Subject: [PATCH] docs: harden CHRNX grunge verification --- .../2026-08-13-music-podcast-grunge-stages.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/superpowers/plans/2026-08-13-music-podcast-grunge-stages.md b/docs/superpowers/plans/2026-08-13-music-podcast-grunge-stages.md index b80b4cd..ee8141d 100644 --- a/docs/superpowers/plans/2026-08-13-music-podcast-grunge-stages.md +++ b/docs/superpowers/plans/2026-08-13-music-podcast-grunge-stages.md @@ -304,6 +304,7 @@ git commit -m "feat: add responsive CHRNX podcast atmosphere" - Modify: `tests/php/PatternsTest.php` - Modify: `tests/php/BlockRenderingTest.php` - Modify: `tests/smoke/visual-integration.test.mjs` +- Modify: `tests/e2e/visual-states.spec.mjs` - Create: `tests/e2e/pattern-editor-validity.spec.mjs` - [ ] **Step 1: Write failing block-tree and semantic tests** @@ -331,15 +332,20 @@ Podcast assertions: Create `tests/e2e/pattern-editor-validity.spec.mjs`. In the Post Editor, open each seeded Music/Podcasts page and assert every `core/block` tree reports `isValid !== false`, no “Attempt Block Recovery”/“unexpected or invalid content” UI appears, and the expected stage layer order exists in editor state. In the Site Editor, insert each registered pattern into an unsaved temporary editing canvas and assert the same validity and layer order. Record the `wp_template` row count before and after. Never save, publish, or update content. +Extend the existing no-JavaScript/reduced-motion matrix in `visual-states.spec.mjs` to `/music/` and `/podcasts/`. With JavaScript disabled, require stage copy, art, Podcast atmosphere, and latest card to remain visible and usable with zero horizontal overflow. With `prefers-reduced-motion: reduce`, require the same layer order and visible content as the settled normal state, with no animation/transition displacement or overflow. Cover light/dark at 375 and 1440 in Chromium, Firefox, and WebKit. + - [ ] **Step 2: Run focused RED** ```bash PATH=/opt/homebrew/opt/docker/bin:$PATH npm run test:php -- --filter PatternsTest node --test tests/smoke/visual-integration.test.mjs CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/pattern-editor-validity.spec.mjs --project=chromium --grep 'Post Editor|Site Editor' +CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/visual-states.spec.mjs --project=chromium --grep 'Music and Podcast without JavaScript|Music and Podcast reduced motion' +CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/visual-states.spec.mjs --project=firefox --grep 'Music and Podcast without JavaScript|Music and Podcast reduced motion' +CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/visual-states.spec.mjs --project=webkit --grep 'Music and Podcast without JavaScript|Music and Podcast reduced motion' ``` -Expected: PHP/smoke fail because Music is vertically stacked and Podcast lacks its atmosphere/copy/latest composition. The four real-editor cases (Music/Podcast × Post/Site Editor) fail on the new required layer structure while proving the test reaches both editors without saving. +Expected: PHP/smoke fail because Music is vertically stacked and Podcast lacks its atmosphere/copy/latest composition. The four real-editor cases (Music/Podcast × Post/Site Editor) fail on the new required layer structure while proving the test reaches both editors without saving. The three-engine no-JavaScript/reduced-motion matrix fails because the old Music stack and incomplete Podcast pattern cannot satisfy the required atmosphere/art/latest content. - [ ] **Step 3: Implement minimal block-valid pattern changes** @@ -361,9 +367,12 @@ Music keeps the meaningful collage visible to assistive technology. Podcast mark PATH=/opt/homebrew/opt/docker/bin:$PATH npm run test:php -- --filter 'PatternsTest|BlockRenderingTest' node --test tests/smoke/visual-integration.test.mjs PATH=/opt/homebrew/opt/docker/bin:$PATH npx wp-env run cli wp eval 'foreach ( array("chrnx/music-landing","chrnx/podcast-landing") as $slug ) { $pattern = WP_Block_Patterns_Registry::get_instance()->get_registered( $slug ); $blocks = parse_blocks( $pattern["content"] ); echo $slug . "=" . count( $blocks ) . PHP_EOL; }' +CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/visual-states.spec.mjs --project=chromium --grep 'Music and Podcast without JavaScript|Music and Podcast reduced motion' +CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/visual-states.spec.mjs --project=firefox --grep 'Music and Podcast without JavaScript|Music and Podcast reduced motion' +CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/visual-states.spec.mjs --project=webkit --grep 'Music and Podcast without JavaScript|Music and Podcast reduced motion' ``` -Expected: PHP/smoke pass; both registered patterns parse to nonzero block trees without freeform corruption. +Expected: PHP/smoke pass; both registered patterns parse to nonzero block trees without freeform corruption; the three-engine no-JavaScript/reduced-motion matrix passes in both themes at 375 and 1440. - [ ] **Step 5: Prove both patterns remain valid in Gutenberg** @@ -380,7 +389,7 @@ Expected: four cases pass (Music/Podcast × Post/Site Editor), no recovery UI, n - [ ] **Step 6: Commit structural composition** ```bash -git add patterns/music-landing.php patterns/podcast-landing.php tests/fixtures/pages.json tests/php/PatternsTest.php tests/php/BlockRenderingTest.php tests/smoke/visual-integration.test.mjs tests/e2e/pattern-editor-validity.spec.mjs +git add patterns/music-landing.php patterns/podcast-landing.php tests/fixtures/pages.json tests/php/PatternsTest.php tests/php/BlockRenderingTest.php tests/smoke/visual-integration.test.mjs tests/e2e/pattern-editor-validity.spec.mjs tests/e2e/visual-states.spec.mjs git commit -m "refactor: compose CHRNX music and podcast stages" ``` @@ -414,7 +423,7 @@ At 375 and 768, require text → art → latest visual order, positive dimension For long-copy regression, modify only the rendered DOM in the browser: replace the latest title with a 120+ character phrase and the excerpt with repeated fixture prose. Compare the content width against a hidden `width:28ch` probe using the same computed font, require `min-width:0`, normal wrapping, and zero clipping. Do not mutate the database or add a thirteenth post. -Extend the existing no-JavaScript/reduced-motion matrix in `visual-states.spec.mjs` to `/music/` and `/podcasts/`. With JavaScript disabled, require the stage copy, character art, Podcast background, and latest card to remain visible and usable with zero horizontal overflow. With `prefers-reduced-motion: reduce`, compare settled geometry with the normal static state and require equal layer order, equivalent visible content, no animation/transition displacement, and zero overflow. Run both themes at 375 and 1440; keep normal keyboard/link behavior native and do not add a JS-only fallback. +Retain the Task 3 no-JavaScript/reduced-motion matrix unchanged as a regression gate while repairing geometry. Keep normal keyboard/link behavior native and do not add a JS-only fallback. Use immutable Projects/About assertions rather than an unrecorded before/after snapshot: exact approved asset filenames/counts, direct atmosphere/content/art order, unchanged heading/copy text, 35–48% desktop art ratio, contained art, and zero horizontal overflow at 375/1440 in both themes. Add a smoke assertion that the new CSS block contains no `.chrnx-home-projects`, `.chrnx-about`, or `.chrnx-related-` selector. Run existing Related Stories E2E unchanged. @@ -426,7 +435,7 @@ CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/music-pod CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/visual-states.spec.mjs --project=chromium --grep 'Music and Podcast without JavaScript|Music and Podcast reduced motion' ``` -Expected: Podcast reproduces the screenshot defect: content width is a narrow strip/clips; Music still fails single-stage composition/height; new stage selectors are absent; the expanded no-JavaScript/reduced-motion matrix fails because Music/Podcast are not yet part of that contract. +Expected: the new geometry suite fails because Podcast content remains a narrow clipped strip and the stage/card specialization is absent. The already-green Task 3 no-JavaScript/reduced-motion matrix stays green, proving the CSS repair does not regress server-rendered content or static accessibility. - [ ] **Step 4: Implement minimal stage and card CSS**