ci: add GitHub Actions test workflow + README badge#2
Merged
Conversation
Runs npm ci, npm run test:coverage, npm run build on every push to main and every pull request. Node 20 matches the Dockerfile build stage. Concurrency group cancels superseded runs on the same branch. README gets a tests badge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 15, 2026
abk1969
added a commit
that referenced
this pull request
May 16, 2026
Bug #1 (critical) — Step 7 systemic-risk question was hidden for art. 25 flip Integrators flipping to provider via substantialModification='oui' could never reach GPAI_RS classification because Step 7's gpaiQuestionApplicable check only matched nature==='gpai'. Now also matches the flip path: nature==='systeme_sur_gpai' && substantialModification==='oui'. canNext updated symmetrically. The classifier already supported GPAI_RS for the flip path (PR #3 D1) — this UI fix makes that path reachable. Bug #2 (important) — Prohibition short-circuit ignored carve-out claims goToResultIfProhibited jumped to verdict on ANY prohibition selection, bypassing Annex I/III/50/GPAI steps. A user with prohibition (h) + art. 5(2)-(3) carve-out claim would land on RISQUE_MINIMAL without ever being asked about Annex III §1 biometrics. Now short-circuits only if at least one selected prohibition has no claimed-and-matched carve-out. Bug #3 (copy) — q7Sub / q7NotApplicable mentioned only GPAI providers Updated EN+FR to acknowledge the art. 25 flip path so the "not applicable" message no longer contradicts a flipped integrator's status. UX note — added a cumulativity rappel to q5Sub Reminds the user that art. 5 prohibitions (step 3), Annex III §1 (step 5), and art. 50 transparency (step 6) are cumulative — same underlying tech may need ticking in multiple steps because each tests a distinct legal regime. Tests + build green at 113/113. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
abk1969
added a commit
that referenced
this pull request
May 16, 2026
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>
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
Adds CI for the 49-test Vitest suite landed in #1 so it runs automatically on every push to `main` and every PR — without it the suite is only as protective as people remembering to run `npm test`.
What changed
Verification
This PR itself is the smoke test — if the badge goes green, the workflow works.
🤖 Generated with Claude Code