4.2 KiB
4.2 KiB
0. Pre-flight (non-negotiable)
- 0.1 Confirm clean working tree (
git statusreports nothing) and no in-flight worktrees with uncommitted work (git worktree listthengit statusin each) - 0.2 If any worktrees exist under
.claude/worktrees/, account for each one: still-active agent, work-pending-merge, or stale-and-prune. Stale worktrees MUST be removed (git worktree remove) before opening a new one — code that has been lost twice on main is the failure mode this guards against. - 0.3 Confirm the package set in
MANIFEST.mdmatchesfind packages -maxdepth 3 -name package.jsoncount. Drift here means a prior change archived without regenerating the manifest.
1. NetworkMonitor extensions in @suaveplan/testing-e2e
- 1.1 Add
assertNoMissingAssets()method toNetworkMonitor, with resource-type filter for image/font/script/stylesheet. - 1.2 Add
allow404(predicate)opt-out registry consulted byassertNoMissingAssets(). - 1.3 Add
assertNoMixedContent()method, gated bypage.url()scheme. - 1.4 Add
assertNoCorsErrors()method, sourcing data frompage.on('requestfailed')plusnet::ERR_CORS_*matching. - 1.5 Add
assertNoUnexpectedRequests({ allowed })method. - 1.6 Define error subclasses
MissingAssetError,MixedContentError,CorsError,UnexpectedRequestErrorunderTESTING_E2E.NETWORK.*codes. - 1.7 Co-located
.test.tscovering each method with real Playwright fixtures (no mocks). - 1.8 Sibling
.mdfiles (≥200 words, basic + advanced examples). - 1.9 Update
openspec/specs/testing-e2e/spec.mddeltas folded on archive.
2. Broken-link crawler in @suaveplan/testing-e2e
- 2.1 Implement
crawlInternalLinks(page, { maxDepth, sameOriginOnly, ignore })with BFS over<a href>. - 2.2 HEAD-then-GET fallback for status checks; honour redirects with circular detection.
- 2.3 Define error subclasses
BrokenLinkError,CircularRedirectError,MaxDepthExceededErrorunderTESTING_E2E.CRAWL.*codes. - 2.4 Co-located
.test.tsagainst a fixture site served by Playwright's request fixture. - 2.5 Sibling
.md(≥200 words, basic + advanced examples).
3. New testbed capability
- 3.1 Create
openspec/specs/testbed/(folded on archive) seeded from this change'sspecs/testbed/spec.md. - 3.2 Author per-route
<route>.interaction.spec.tsfiles underapps/testbed/e2e/for every entry inapps/testbed/src/routes.ts. - 3.3 Each interaction spec attaches console + network + axe + visual + crawler invariants per the spec contract.
- 3.4 Remove or supplement any existing "baseline-only" specs so they are no longer the sole coverage for any route.
4. Release-readiness CI gate
- 4.1 Add
release-readinessPlaywright project inapps/testbed/playwright.config.ts. - 4.2 Compose the gate against the Docker stack from
enterprise-testing-operational. - 4.3 Wire load-smoke step from
enterprise-testing-load-perf. - 4.4 Wire visual baseline step from
enterprise-testing-visual-regression. - 4.5 Wire axe step from
enterprise-testing-a11y. - 4.6 Configure CI workflow to run the gate on any PR touching
apps/testbedor its dependency closure. - 4.7 Configure branch protection so gate failure blocks merge to
mainandgenesis.
5. Documentation
- 5.1 Update
apps/testbed/README.mddocumenting the per-page invariant contract. - 5.2 Cross-link this change folder from
enterprise-testing-a11y,enterprise-testing-visual-regression,enterprise-testing-load-perf,enterprise-testing-operational.
6. Verification
- 6.1
bunx turbo lint typecheck test --filter=@suaveplan/testing-e2egreen. - 6.2
bunx turbo test:coverage --filter=@suaveplan/testing-e2eat 100% on touched modules. - 6.3
release-readinessproject passes against the testbed Docker stack. - 6.4 Confirm every CLAUDE.md "Web App & Page Verification" bullet maps to at least one passing assertion in the gate.
7. Archive
- 7.1 Fold testing-e2e delta into
openspec/specs/testing-e2e/spec.md. - 7.2 Create
openspec/specs/testbed/spec.mdfrom the new-capability delta. - 7.3 Move
openspec/changes/enterprise-testbed-verification/toopenspec/archive/<yyyy-mm-dd>-enterprise-testbed-verification/.