← ClaudeAtlas

pattern-e2e-coding-standardlisted

E2E coding standard. Contract is iron on two axes. SEEDING: via API (Playwright `request` fixture, raw HTTP) respect `docs/api-contract/<entity>.yaml` — path, verb, status codes, request/response body; direct-to-DB (SQL fixtures, ORM helpers, factory scripts) respect `docs/data-model/<entity>.yaml` — table, column types, constraints, defaults, FKs. DRIVING/ASSERTING: respect `docs/ui-contract/<screen>.yaml` — query by the declared role + accessible name, scoped to the declared regions, and assert on the declared outcome states. Halt on missing/contradictory contracts; never invent shape or selectors. Activate on any E2E spec / fixture / seed helper.
MartinKChen/harness-claude-code · ★ 0 · Testing & QA · score 72
Install: claude install-skill MartinKChen/harness-claude-code
# pattern-e2e-coding-standard ## When to activate Activate when authoring, extending, or fixing Playwright E2E specs and their supporting fixtures / seed helpers. Specifically: - Editing `.spec.ts` / `.spec.tsx` files under the E2E test root. - Editing any fixture, factory, or seed helper used by E2E specs (e.g. `playwright/fixtures/*`, `playwright/seed/*`, `e2e/support/*`). - Designing the data shape a test will arrive at — whether via the UI, via the Playwright `request` fixture, or via direct DB seeding. - Driving a surface or asserting an outcome through the rendered UI — the locators and outcome assertions are bound by `docs/ui-contract/<screen>.yaml` (see "Drive and assert through the UI interaction contract"). Skip for production code (engineer's lane) and for backend / frontend unit / integration tests inside the service packages. ## Project memory overlay After loading this skill, also check `$MAIN_ROOT/.claude/memory/patterns/pattern-e2e-coding-standard.md` in the consuming project (resolve `MAIN_ROOT="$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")"`). If present, load it as an **additive overlay** to the rules below; if absent, skip silently. See `memory-convention` for the full contract (additivity, severity floor, conflict surfacing). ## Patterns ### Contract is iron (non-negotiable) Published contracts decide the shape of seeded data. The E2E spec conforms to the contract, never the reverse. The **contract** = whichever of these a