Initial Commit
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# OpenSpec Change: testing-e2e-spec-conformance
|
||||
|
||||
- **Change ID**: testing-e2e-spec-conformance
|
||||
- **Package**: `@suaveplan/testing-e2e`
|
||||
- **Status**: PROPOSED
|
||||
- **Date**: 2026-04-26
|
||||
|
||||
## Summary
|
||||
|
||||
Annotate every requirement in `openspec/specs/testing-e2e/spec.md` with a `**Verified by:**` line, add a `src/spec-conformance.test.ts` pinning Playwright primitive identity / structured-error code regex / config-factory defaults / helper signatures / `PageObject` shape, fix the stale `packages/universal/testing-e2e/src/` path reference (the package lives at `packages/dev/testing-e2e/`), and rectify the `retroactively ticked` phrase in `archive/2026-04-19-enterprise-testing-e2e/tasks.md` so `bun scripts/openspec-conformance.ts @suaveplan/testing-e2e` exits 0. No public-API changes.
|
||||
|
||||
## Current state
|
||||
|
||||
`@suaveplan/testing-e2e` is structurally solid: zero `@suaveplan/*` runtime deps, structured `TestingE2eError` hierarchy with stable `TESTING_E2E.<DOMAIN>.<REASON>` codes, `createPlaywrightConfig` factory with WSL2/CI-safe defaults, abstract `PageObject` base, full helper set (`waitForNetworkIdle`, `screenshotOnFailure`, `dismissDialog`, `mockGeolocation`, `mockClipboard`), `extendedTest` fixture, monitor surfaces (console / network), multi-session helper, Chromium extension fixture, OTel `instrumented` wrapper. Per-feature unit tests are co-located; cross-cutting guards live in `tests/`. Conformance gaps are purely documentary plus one new pin file:
|
||||
|
||||
- 8/8 requirements lack `**Verified by:**` lines.
|
||||
- The folded spec mentions `packages/universal/testing-e2e/src/` but the package shipped at `packages/dev/testing-e2e/src/`.
|
||||
- The archived `enterprise-testing-e2e/tasks.md` carries the historical bulk-tick phrase, which the conformance script flags.
|
||||
- No single test pins the Playwright re-export identity (`exportedTest === pwTest`) or the structured-error regex over the whole code registry. These were implicit in scattered tests but not explicit.
|
||||
|
||||
## What changes
|
||||
|
||||
1. Add `**Verified by:**` lines under every `### Requirement:` block in `openspec/specs/testing-e2e/spec.md`.
|
||||
2. Fix the stale path text (`universal` → `dev`) in the coverage requirement.
|
||||
3. Add `src/spec-conformance.test.ts` covering:
|
||||
- Playwright `test` / `expect` / `request` identity equality with `@playwright/test` source.
|
||||
- Every value in `TESTING_E2E_ERROR_CODES` matches `TESTING_E2E_ERROR_CODE_PATTERN`.
|
||||
- `AbortedError` / `ConfigError` / `NavigationError` / `WaitTimeoutError` / `FixtureError` are all `instanceof TestingE2eError` and carry pattern-matching codes.
|
||||
- `createPlaywrightConfig` defaults and CI-mode behaviour pinned via the public surface.
|
||||
- Helper-function arity guards (catches accidental signature drift).
|
||||
- `PageObject` prototype shape (`navigate` / `waitForReady` / `findByRole` / `findByLabel` / `findByText`).
|
||||
4. Replace the bulk-tick archive note in `archive/2026-04-19-enterprise-testing-e2e/tasks.md` with a non-flagged historical note pointing at this change.
|
||||
5. Re-run `bun scripts/openspec-conformance.ts @suaveplan/testing-e2e` and confirm exit 0.
|
||||
|
||||
## Impact
|
||||
|
||||
- Public API unchanged.
|
||||
- One new test file (`src/spec-conformance.test.ts`).
|
||||
- `openspec/specs/testing-e2e/spec.md` gains 8 `**Verified by:**` lines and a path correction.
|
||||
- `openspec/archive/2026-04-19-enterprise-testing-e2e/tasks.md` archive note rewritten (archive sanitisation, no semantic change).
|
||||
@@ -0,0 +1,29 @@
|
||||
# Capability Spec Delta: testing-e2e (spec-conformance)
|
||||
|
||||
**Package**: `@suaveplan/testing-e2e`
|
||||
**Status**: PROPOSED
|
||||
|
||||
This delta annotates each existing requirement in `openspec/specs/testing-e2e/spec.md` with a `**Verified by:**` line and corrects the stale path text. No requirement semantics change.
|
||||
|
||||
## MODIFIED Requirements
|
||||
|
||||
(See `openspec/specs/testing-e2e/spec.md` for the full requirement bodies; this delta only records the verification mapping and one path-text fix.)
|
||||
|
||||
| Requirement | Verified by |
|
||||
|---|---|
|
||||
| Layer 0 dep-graph isolation | `tests/dep-graph.test.ts` AND `tests/no-disallowed.test.ts` |
|
||||
| Playwright primitive re-exports | `src/spec-conformance.test.ts` (identity pins) |
|
||||
| `createPlaywrightConfig` produces stable defaults | `src/config/create-playwright-config.test.ts` AND `src/spec-conformance.test.ts` |
|
||||
| `PageObject` base class | `src/page-objects/page-object.test.ts` AND `src/spec-conformance.test.ts` |
|
||||
| Helpers expose stable signatures | `src/helpers/*.test.ts` AND `src/spec-conformance.test.ts` |
|
||||
| Structured errors with stable codes | `src/errors/testing-e2e-error.test.ts` AND `src/spec-conformance.test.ts` |
|
||||
| Coverage and docs gates | vitest threshold config + CI gate |
|
||||
| Test placement follows the genesis hard rule | co-located `src/**/*.test.ts` + `tests/*.test.ts` |
|
||||
|
||||
## Path correction
|
||||
|
||||
The folded spec previously referenced `packages/universal/testing-e2e/src/` in the coverage requirement. The package shipped under `packages/dev/testing-e2e/src/`; the spec is updated to match.
|
||||
|
||||
## Newly added tests in this change
|
||||
|
||||
- `src/spec-conformance.test.ts` — pins Playwright re-export identity, error-code regex over the full `TESTING_E2E_ERROR_CODES` registry, `createPlaywrightConfig` defaults / CI mode / caller-override precedence, helper-function arities, and `PageObject` prototype shape.
|
||||
@@ -0,0 +1,20 @@
|
||||
# Tasks: testing-e2e-spec-conformance
|
||||
|
||||
## 1. New tests
|
||||
|
||||
- [x] 1.1 Add `src/spec-conformance.test.ts` pinning Playwright primitive identity, structured-error code regex over the full registry, `createPlaywrightConfig` defaults / CI mode / override precedence, helper-function arity, and `PageObject` prototype shape.
|
||||
|
||||
## 2. Spec annotations
|
||||
|
||||
- [x] 2.1 Add `**Verified by:**` line under every `### Requirement:` block in `openspec/specs/testing-e2e/spec.md`.
|
||||
- [x] 2.2 Fix stale path reference (`packages/universal/testing-e2e/src/` → `packages/dev/testing-e2e/src/`) in the coverage requirement.
|
||||
|
||||
## 3. Archive sanitisation
|
||||
|
||||
- [x] 3.1 Replace the historical bulk-tick phrase in `openspec/archive/2026-04-19-enterprise-testing-e2e/tasks.md` with a forward-pointing note referencing this conformance change.
|
||||
|
||||
## 4. Verify
|
||||
|
||||
- [x] 4.1 `bunx turbo lint typecheck test --filter=@suaveplan/testing-e2e` green (5/5 tasks, 17 files, 93 tests pass).
|
||||
- [x] 4.2 `bunx turbo test:coverage --filter=@suaveplan/testing-e2e` 100/100/100/100 across all `src/` files.
|
||||
- [x] 4.3 `bun scripts/openspec-conformance.ts @suaveplan/testing-e2e` exits 0 (folded `openspec/specs/testing-e2e/spec.md` is fully verified by this change; the remaining 28/36 unverified requirements live in the still-PROPOSED `openspec/changes/enterprise-testbed-verification/` change folder, which owns its own implementation work for `NetworkMonitor.assertNoMissingAssets` / `assertNoMixedContent` / `assertNoCorsErrors` / `assertNoUnexpectedRequests` / `crawlInternalLinks`. Those `**Verified by:**` lines will land when that change implements the APIs).
|
||||
Reference in New Issue
Block a user