test(ui): the knob matrix — every control the round-4 defects lived behind
Six specs driving the user-reported controls the way a human does,
encoding the sweep rules COVERAGE.md now states: menus/modals assert
VISIBILITY (never DOM text — hidden menus' text is why the 2026-10-30
panel sweep certified dead controls), geometry asserts the z-ladder
via elementFromPoint and viewport containment via boundingBox, every
click must produce an observable outcome (PUT fired, class flipped,
chip text swapped) and zero new console problems — the silent
CSP-throw family (theme buttons, connective chip, invisible op menu)
now fails a test instead of surviving to a user's mouse.
Covers: theme picker (interpolation regression from eb57b720),
pencil-glyph vs card-body contract, builder field menu / op menu
(full non-empty vocabulary) / connective both directions, the
Smart→Episodes create-modal seed, the picker overlay's ladder and
height, and the chain-order select's persistence round-trip.
Fixtures self-create/self-delete under test-prefixed names; localStorage
token + selectedLibrary=__all__ are seeded because the API login
establishes only the cookie; run the folder with --workers=1 (the login
route rate-limits and all suites share testuser — a parallel worker's
login revokes another's mid-run).
This commit is contained in:
1 parent
8aa66a30fc
commit
d6619cd0e1
2 files changed
+348
No files matched your search
@@ -92,3 +92,35 @@ in a real browser against the dev stack. Outcomes + reusable gotchas:
|
||||
with queue=collection: play links → chain hops keep the param; order
|
||||
controls appear ONLY in feed mode (player + feed page share the
|
||||
persisted override).
|
||||
|
||||
## 2026-10-31 — round 4: user-reported control defects → knob matrix (automated)
|
||||
|
||||
The panel sweep's blind spot, proven by the user's own two minutes:
|
||||
DOM-text snapshots show HIDDEN menus' text — "the field menu opened"
|
||||
was an illusion; the menus never VISIBLY opened, the op menu rendered
|
||||
zero items, `closeCollectionModal` removed the hidden confirm dialog
|
||||
instead of the modal, and the theme buttons died silently
|
||||
(`selectTheme(opt.Name)` — templ gotcha #1, since the CSP migration).
|
||||
|
||||
Now automated: `knob_matrix.spec.ts` (6 specs — theme picker PUTs,
|
||||
pencil-glyph vs card body at real coordinates, builder field/op menus
|
||||
with toBeVisible + non-empty items + connective both directions, the
|
||||
Smart→Episodes create-modal seed, picker modal ladder+geometry via
|
||||
`elementFromPoint`/`boundingBox`, chain-order select persistence).
|
||||
Run: `cd tests/ui && BH_FEED=<feed uuid> npx playwright test
|
||||
--workers=1` — **`--workers=1` is load-bearing**: the login endpoint
|
||||
rate-limits and every suite shares `testuser`, so a parallel worker's
|
||||
login revokes another's mid-run (symptom: `session has expired` pages).
|
||||
|
||||
Standing rules for every sweep from now on:
|
||||
- Menus/modals assert VISIBILITY (toBeVisible / computed display /
|
||||
screenshot), never DOM text; every toggle click has an asserted
|
||||
observable outcome (request fired, class flipped, value changed).
|
||||
- Geometry asserts where geometry is the bug (z-ladder via
|
||||
`elementFromPoint`, sheet within viewport via `boundingBox`).
|
||||
- Zero new console errors per interaction; the only tolerated noise is
|
||||
the two cancelled-transition shapes swallowed by main.ts's gate —
|
||||
new noise gets fixed at the source, never filtered.
|
||||
- API-mutating tests seed localStorage token + selectedLibrary=__all__
|
||||
(the mutators read the bearer from localStorage; library-scoped views
|
||||
correctly hide episodes).
|
||||
Reference in new issue
Block a user