Files
faunosteo/docs/development/V1-2-6_UX_TESTS.md
T

13 KiB
Raw Blame History

V1-2.6 UX redesign: test matrix per sub-step

Status: PROPOSAL, 2026-11-05, revised after the independent review. Companion of V1-2-6_UX_PLAN.md (the common rules of §3 apply: absolute paths, sandbox-only database commands, forbidden commands). No test is written before the owner approves the plan.

Common gates

Gate Command When
Core pnpm rust:check then pnpm wasm:build any change under crates/
App and packages pnpm typecheck, pnpm test:run, pnpm lint, pnpm build always
Size packages/core-wasm/tests/size.test.ts (Node gzip ≤ 600 000 B), figure recorded in RUST.md any change under crates/core or crates/wasm
Seed and pipeline pnpm r5:import-equine --check with no difference always
Frozen references no change under crates/core/tests/oracles/, apps/app/tests/fixtures/goldens/, supabase/seed/ (git diff --stat on those paths is empty) always
Browser, no backend pnpm e2e:ui always
Sandbox pnpm db:sandbox up fresh, then test-db → e2e-shell → test (LRN-113) always
Worker pnpm worker:image, then pnpm db:sandbox verify-e2e (refuses an image not built from HEAD after U1) U1, U6, U8, U9
Pre-checkpoint pnpm check:all every code sub-step
Reviews fresh verifier on the sub-step contract; fresh security review on the diff every sub-step

Property tests: seeded generators inside Rust tests (fixed-seed linear congruential sequence, a few thousand cases per property, a failing seed kept as a regression case); no new dependency. TypeScript arithmetic is covered by table tests.

Accessibility: axe with zero serious or critical violations per state (docs/development/BROWSER_TESTS.md:73-91), keyboard-only journeys, a text next to every colour, visible focus on every handle. Chromium only until V1-5; WebKit and real tablets are owner trials.

U0 · Contract and decisions

Kind Test
Review fresh verifier: each answer recorded once and cited where it applies; no contradiction between contract §7.4, §8.2-8.4, §16.7, the level-1 criteria (C3, C4, C6, C7, C8, C13, C32, C33, C40) and the boards

U1 · Shell

Kind Tests
Unit four-tab model, initial tab, width tiers (replaces editor-route.test.tsx:66, 128-170, editor-mode.test.ts:99-110); header undo and redo states; undo from each tab reverts the last commit made on another tab; a typed field is flushed before the header undo (behaviour pinned); references panel open, close, return focus; « Aller à » target for every issue kind (verification.ts:64-131)
E2E shell helpers rewritten (e2e/support/editor.ts:326-330, warm-up.ts:43-45, editor-access.spec.ts:34-42); every existing editor journey green on the new shell; sidebar hidden in the editor at 1 024, 1 180, 1 279 px, shown at 1 280 px, menu reachable in one tap; narrow-width read-only unchanged
Tooling verify-e2e refuses an image whose commit label differs from HEAD; the trial command provisions the demo sheet through the application upload path
Accessibility axe on the four tabs and on the open references panel; Tab order header → tabs → panel → canvas
Regression recovery and conflict specs unchanged; each removed assertion mapped to its replacement in the commit message

U2 · Points and polygons

Kind Tests
Unit (tables) slider stops = distinct radii of the view; snapping; red mark from the core value; midpoint insert after the segment start; « − » hidden at 3 vertices; zone translation; nearest-handle priority; keyboard map (arrows, Shift ×10, Insert or Backspace or Delete, Enter, Escape, roving focus); arrows pan only when the box is focused; handle cap fallback
Unit (state) pending preview cancelled and restored on undo, redo, document replacement, tab change, second pointer; toast dismissed on any commit, undo or redo; slider commits once on release (history depth after a keyboard walk)
Core the per-view minimum visible radius equals the marker_too_small threshold on the equine views and on edge frames
E2E mouse drag a vertex, « + », « − », zone drag on a selected zone, redraw accepted, redraw refused by interior_too_small restores the old shape, undo and redo of each, toast « Annuler » undoes the same entry as the header
E2E touch (hasTouch, 1 024, 1 180, 1 280 px) one-finger handle drag; explicit « Déplacer la zone » mode; finger 1 on a vertex handle then finger 2 elsewhere: the pinch zooms, the drag is cancelled, no commit (CDP Input.dispatchTouchEvent with two points); page scroll over the canvas with a selection and outside it
Keyboard create a zone, add and remove a vertex, move the zone, validate, without a pointer; Ctrl+Z on a focused handle after arrow moves restores the pre-move shape
Accessibility axe on selection, tracing and move states; handle names (« sommet 3 de Thoraciques »); live-region message after a move
Performance commit latency under the 500 ms budget (editor-equine.spec.ts:25-34) for drag, insert, remove

U3 · Category panel and own colour

Kind Tests
Unit own colour hidden when null; « Revenir à la couleur de la catégorie » sends one update with color: null; new annotations carry no colour; staged form: preview leaves history untouched, Apply commits one batch, Cancel restores the handle; « Réaffecter à… » commits one batch and one undo entry
E2E demo sheet with the equine own colours: atm shows #ff8800, revert, undo; recolour with preview, cancel, apply; reassign then delete a category
Accessibility every swatch has its name next to it; palette keyboard-operable; axe on states A to D

U4 · Detail view by rectangle (manual)

Kind Tests
Unit rectangle normalised from any drag direction and clamped to the parent frame; keyboard resize of its handles; toolbar without the access tool; view menu « Ajouter un accès »
E2E create a detail view by mouse and by keyboard, view.unreachable until its access exists, place the access, open the view in the practitioner preview
Core regression compose.rs tests and canvas goldens unchanged
Accessibility axe on creation and placement states

U5 · Detail view assisted

Kind Tests
Rust annotations_in_rect circle, polygon, path, trigger; inside, partial, none; rect on an edge; empty view; unknown view; invalid rect
Rust remap_view same aspect, different aspect (uniform, centred); triggers drawn in the view remapped; descendant view with its own drawing untouched; descendant crop refused (remap.descendant_crop); path refused (remap.path); no frame refused; output = command batch; numbers on the 0.01 grid
Properties (seeded) identity mapping returns the geometry exactly; mapping then inverse within 0.01 per number; inside ⇒ bounds within the rect; a rect equal to the frame ⇒ every annotation of the view inside
Hostile (op level) non-finite and out-of-range rect, unknown ids, oversized command output bounded; no panic
Wasm core-wasm proofs through the preview handle; size gate after each op, figure printed
Unit app name formatting FR and EN (one, two, three, more with « … », none → « Vue détaillée n »); access box checked only with an empty overlap list and a category available; view and access inserted in one batch
E2E board 08: rectangle over the elbow, proposed name, access unchecked with its reason, explicit placement, preview; rectangle over an empty area: access created, no annotation under it; attach the seed head drawing to a crop with the same viewBox: no question, positions kept; attach a re-based fixture drawing: choice offered, transposition, all remapped annotations to_confirm, one undo entry; a remap failing the geometry accept leaves the document unchanged and the drawing held
Accessibility axe on the dialogs; the reason of the unchecked box is announced

U6 · Category model

Kind Tests
Rust serialisation both keys round-trip; absent keys not written (no role or fill_opacity text in the re-serialised seed); explicit null refused; out-of-range opacity and unknown role refused
Rust identity pins equine fingerprint 12d78872… and alias 27c7383c… recomputed equal; every seed review digest equal to its value pinned before the change; characterisation_serde_tolerance.rs, sheet_fingerprint.rs, r5_6_switch.rs green unchanged
Rust rules edit refusals (remove, role change, duplicate role, rename of a role-bearing category); report issues against a base (role disappears, duplicate role) mapped to verification.validation.rules; none fires on the seed, the oracles or any fixture; validate.rs issue lists identical before and after on every fixture
Rust empty sheet sheet.empty creates the three categories with the T5 ids, names, roles and colours and passes sheet.check
Rust layer absent keys → R3 trees identical; present fill_opacity changes only the twin and zone fill attributes; triggers unchanged; svg_marker_isolation.rs green
Rust snapshot lean_document and the export gate strip both keys; a snapshot from a New-present document passes the gate and the N-1 shape
App and N-1 New-present sheet fixture and harness: exported PDFs pass the assertions of n-1.reader.test.ts:178-196; contracts.types.test.ts green with ts(optional); measure.test.ts green; PDF goldens unchanged
SQL the round-withdrawal migration: pgTAP with rounds in verifying, open, approved before it and withdrawn after with the reason; pnpm db:sandbox up upgrade from the current migration set; types --check
Worker image rebuilt from HEAD; verify-e2e with a New-absent and a New-present draft; verdict passes for both
Unit and E2E app board 07 locks (no delete, name read-only, role badge, « Couleur d'origine »); opacity slider and field synchronised, commit on release; board 09: regions from the vertebra-role category, picker filtered, staged « Appliquer (n erreurs) »; fallback entry when no category has the role (T17)
Acceptance journey a new non-equine sheet with the new UX (drawing, rectangle view, points, zones, access, findings, custom opacity), saved, submitted, worker verdict passes, round open; its PDF exported, reopened by the app and read by N-1 (archive kept)
Recovery a copy taken before an opacity edit restored after reload; conflict journey on a role-bearing category; « Garder ma version » with a keyless document shows the report issue
Security fresh review: no path writes the keys into an envelope; no new SQL business rule
Accessibility axe on board 07 and 09 states; the opacity value is exposed to assistive technology

U7 · Common text

Kind Tests
Unit insertion only into empty FR and EN fields; never overwrites; template id and version in the change note; comparison read-only
E2E insert, edit, undo, save, reload
Accessibility axe on General with the comparison open

U8 · Closure

Kind Tests
Full run common gates, check:all, sandbox order, verify-e2e, N-1 suite, frozen references unchanged, axe on every tab and state, keyboard-only journey, tablet touch journey
Acceptance contract §16.7 journey re-run on the redesigned editor
Owner trial V1-2-6_OWNER_TRIAL.md updated; WebKit iPad and a real tablet by the owner

U9 · Curves (if kept, T16)

Kind Tests
Frozen reader oracle before any change: number_list, path_bounds, path_outline on a corpus (fixtures, hostile paths, owner exports) recorded; compared byte for byte after the change
Rust conformance every command absolute and relative; implicit repeats; M followed by pairs; H and V along and off axis; S and T kept or converted; arcs (endpoint move, λ rescale reported); Z then relative; numbers at ±2^20, exponent forms, .5.5, 1-2 separator merges
Properties (seeded) untouched numbers keep their bytes; moving point i never changes the absolute position of point j ≠ i (exact decimal arithmetic); translate then inverse translate restores the path byte for byte; bounds after translate = bounds shifted
Hostile unreadable d, 2 MiB d, unknown index, non-finite or out-of-range move; no panic
SQL round-withdrawal migration, as U6
E2E fixture sheet with paths (never the seed): drag an anchor, a control, move the zone, save, reload, untouched bytes identical; remap of a crop view holding a path; preview transform during the drag, one core call on release
Size gate with the figure printed