test(e2e): Playwright suite — happy path + 2 bug regression guards#9
Closed
abk1969 wants to merge 1 commit into
Closed
test(e2e): Playwright suite — happy path + 2 bug regression guards#9abk1969 wants to merge 1 commit into
abk1969 wants to merge 1 commit into
Conversation
Closes the last TDD audit recommendation: end-to-end coverage of the 7-step parcours in a real browser. Catches the class of bug where the React tree renders successfully and unit/component tests pass, but the user flow lands on the wrong screen — exactly what happened pre-PR #8 with the art. 25 flip unreachable Step 7 and the prohibition short-circuit ignoring carve-outs. Infrastructure: - devDep: @playwright/test - playwright.config.js — auto-spawns `npm run dev` on :5173, single Chromium project, retain trace + screenshot on failure - .gitignore — exclude test-results/ + playwright-report/ Tests (e2e/parcours.spec.js): 1. happy path — provider with no triggers → RISQUE_MINIMAL 2. high-risk deployer Annex III §3 → HAUT_RISQUE_ANNEXE_III + FRIA visible 3. art. 25 flip — integrator + substantialModification + systemic risk → GPAI_RS (regression guard for Bug #1 from the parcours audit) 4. art. 5 carve-out claim does NOT short-circuit — user advances to Step 4 instead of jumping to verdict (regression guard for Bug #2) Selectors anchor on the OptionCard aria-label, which composes `<title> — <sub> — <desc>`. Matching unique sub fragments (e.g. "art. 3(3)", "art. 5(1)(h)", "art. 5(2)-(3)") keeps selectors stable across copy edits. Run: `npx playwright test` — 4 tests pass in ~25 s. Not wired into `npm test` (Vitest scope); future CI could add a separate e2e job. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4 tasks
Owner
Author
|
Merged into main via rebase fast-forward (commits applied via stack rebase, see main's history). Branch deleted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the last TDD audit recommendation: end-to-end coverage of the 7-step parcours in a real browser. Stacks on PR #8 (the parcours bug fixes).
This is the final layer of the test pyramid for ai_act_compass:
Tests added
Infrastructure
Selector strategy
OptionCard renders as `` (single-select) or `` (multi-select). The accessible name composes `<title> — — `. Tests anchor on unique `sub` fragments (`art. 3(3)`, `art. 5(1)(h)`, `art. 5(2)-(3)`, etc.) which are regulatory citations — stable across copy edits.
Not in scope
Test plan
🤖 Generated with Claude Code