From 6a131057d5626fd6d13596e6eeef850913e07a1a Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Wed, 12 Aug 2026 18:45:23 -0500 Subject: [PATCH] docs: cover Related Stories scenario isolation --- .../plans/2026-08-12-related-stories-layouts.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/superpowers/plans/2026-08-12-related-stories-layouts.md b/docs/superpowers/plans/2026-08-12-related-stories-layouts.md index 3821606..54092df 100644 --- a/docs/superpowers/plans/2026-08-12-related-stories-layouts.md +++ b/docs/superpowers/plans/2026-08-12-related-stories-layouts.md @@ -376,6 +376,7 @@ git commit -m "style: add Related Stories layouts" - Modify: `tests/e2e/related-stories.spec.mjs` - Create: `tests/e2e/related-stories-scenarios.spec.mjs` - Modify: `playwright.config.mjs` +- Modify: `tests/smoke/e2e-harness.test.mjs` - Modify: `scripts/seed-test-content.sh` - Modify: `scripts/seed-test-content.php` - Modify: `tests/fixtures/posts.json` and `tests/e2e/global-setup.mjs` only if a RED test proves existing fixtures cannot provide five deterministic related stories @@ -397,14 +398,17 @@ On a seeded single-post route containing the default block, add tests for: Create the mutation spec before changing the seed. It requests local scenarios `related-1`, `related-2`, and `related-4`, asserts exact rendered counts, and restores `default` in both `finally` and `afterAll`. Add a dedicated Playwright `related-scenarios` project with `workers:1`, `fullyParallel:false`, `dependencies:['scenarios']`, and `testMatch:'related-stories-scenarios.spec.mjs'`. The existing `scenarios` project already depends on every read-only browser project, so this explicit chain guarantees the two database-mutating projects never overlap. Every reader project and the existing `scenarios` project ignore the new mutation spec; `related-scenarios` ignores the older mutation spec. +Before implementation, extend `tests/smoke/e2e-harness.test.mjs` with a RED contract that recognizes exactly `visual-scenarios.spec.mjs` and `related-stories-scenarios.spec.mjs` as mutation specs, continues rejecting `seed-test-content`, `wp-env`, and `execFileSync` from every reader spec, and requires the dependency chain `chromium/firefox/webkit → scenarios → related-scenarios` with both mutation projects single-worker and non-parallel. + - [ ] **Step 2: Run acceptance RED** ```bash CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/related-stories.spec.mjs --project=chromium --grep 'interaction|no JavaScript|permalink|accessibility' CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/related-stories-scenarios.spec.mjs --project=related-scenarios +node --test tests/smoke/e2e-harness.test.mjs ``` -Expected: tests that require the new block behavior fail before final integration; fixture changes are authorized only if the permalink/count precondition itself fails. +Expected: tests that require the new block behavior fail before final integration; harness smoke fails because the second mutation spec/project is not yet allowlisted and chained; fixture changes are authorized only if the permalink/count precondition itself fails. - [ ] **Step 3: Make the minimum integration/fixture correction** @@ -417,6 +421,7 @@ CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/related-s CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/related-stories.spec.mjs --project=firefox CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/related-stories.spec.mjs --project=webkit CHRNX_E2E_BASE_URL=http://localhost:8908 npx playwright test tests/e2e/related-stories-scenarios.spec.mjs --project=related-scenarios +node --test tests/smoke/e2e-harness.test.mjs ``` Expected: all behavior passes in Chromium, Firefox, and WebKit. Axe may remain intentionally Chromium-only and must be explicitly skipped elsewhere. @@ -424,7 +429,7 @@ Expected: all behavior passes in Chromium, Firefox, and WebKit. Axe may remain i - [ ] **Step 5: Commit Task 5** ```bash -git add tests/e2e/related-stories.spec.mjs tests/e2e/related-stories-scenarios.spec.mjs playwright.config.mjs scripts/seed-test-content.sh scripts/seed-test-content.php tests/fixtures/posts.json tests/e2e/global-setup.mjs assets/js/related-posts.js blocks/related-posts/render.php blocks/related-posts/style.css +git add tests/e2e/related-stories.spec.mjs tests/e2e/related-stories-scenarios.spec.mjs playwright.config.mjs tests/smoke/e2e-harness.test.mjs scripts/seed-test-content.sh scripts/seed-test-content.php tests/fixtures/posts.json tests/e2e/global-setup.mjs assets/js/related-posts.js blocks/related-posts/render.php blocks/related-posts/style.css git commit -m "test: verify Related Stories workflows" ```