Files
2026-05-27 23:29:53 +01:00

4.2 KiB

0. Pre-flight (non-negotiable)

  • 0.1 Confirm clean working tree (git status reports nothing) and no in-flight worktrees with uncommitted work (git worktree list then git status in 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.md matches find packages -maxdepth 3 -name package.json count. Drift here means a prior change archived without regenerating the manifest.

1. NetworkMonitor extensions in @suaveplan/testing-e2e

  • 1.1 Add assertNoMissingAssets() method to NetworkMonitor, with resource-type filter for image/font/script/stylesheet.
  • 1.2 Add allow404(predicate) opt-out registry consulted by assertNoMissingAssets().
  • 1.3 Add assertNoMixedContent() method, gated by page.url() scheme.
  • 1.4 Add assertNoCorsErrors() method, sourcing data from page.on('requestfailed') plus net::ERR_CORS_* matching.
  • 1.5 Add assertNoUnexpectedRequests({ allowed }) method.
  • 1.6 Define error subclasses MissingAssetError, MixedContentError, CorsError, UnexpectedRequestError under TESTING_E2E.NETWORK.* codes.
  • 1.7 Co-located .test.ts covering each method with real Playwright fixtures (no mocks).
  • 1.8 Sibling .md files (≥200 words, basic + advanced examples).
  • 1.9 Update openspec/specs/testing-e2e/spec.md deltas folded on archive.
  • 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, MaxDepthExceededError under TESTING_E2E.CRAWL.* codes.
  • 2.4 Co-located .test.ts against 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's specs/testbed/spec.md.
  • 3.2 Author per-route <route>.interaction.spec.ts files under apps/testbed/e2e/ for every entry in apps/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-readiness Playwright project in apps/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/testbed or its dependency closure.
  • 4.7 Configure branch protection so gate failure blocks merge to main and genesis.

5. Documentation

  • 5.1 Update apps/testbed/README.md documenting 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-e2e green.
  • 6.2 bunx turbo test:coverage --filter=@suaveplan/testing-e2e at 100% on touched modules.
  • 6.3 release-readiness project 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.md from the new-capability delta.
  • 7.3 Move openspec/changes/enterprise-testbed-verification/ to openspec/archive/<yyyy-mm-dd>-enterprise-testbed-verification/.