webui: decide a DOM/SFC test harness so the SFC-bound controls can be tested #1130
Notifications
Due Date
No due date set.
Depends on
Reference: sam/archie#1130
Reference in new issue
Block a user
micl.4's acceptance asks for node tests per control for conversion/keyboard logic, with accessible names and role=switch/radiogroup verified. Only 2 of the 8 controls can satisfy that with the harness that exists.
Landed: duration-input and byte-size-input have real module tests (ui/test/duration-input.test.ts, ui/test/byte-size-input.test.ts, merged) over the Go-duration conversion and the decimal-MB -> bytes conversion.
The other six -- number-field, input-group, switch, segmented-control, secret-reference, tags-input -- have no archie logic to test. Their role=switch / role=radiogroup / arrow-key / enter-to-chip behaviour lives in reka-ui, and their wiring is SFC template logic: a v-if, a prop, an aria-label. The runner is
node --test --experimental-strip-types test/*.test.tsover pure TS modules -- there is no SFC loader, no DOM, no happy-dom/jsdom/@vue/test-utils in devDependencies, and no test under ui/test/ imports a .vue.So "each control has node tests" is either:
(a) accepted as module-level only, with the SFC wiring left to reka-ui's own upstream tests and a documented scope reduction in micl.4's acceptance; or
(b) satisfied by adding a DOM + SFC mount harness (happy-dom + @vue/test-utils plus a compile step), which is a decision about the project's whole ui test story and its gate, not a lane's call.
Decide (a) or (b), record it, and update micl.4's acceptance to match. Nothing else depends on this, but six controls are currently uncovered either way.
Notes
Decided: option (a). Recorded in docs/development/frontend-ui.md with its measured evidence and the rejected option (b). Measured: a mount harness works -- vitest 5.0.2 + happy-dom 20.14.5 + @vue/test-utils 2.5.1, with real passing mounts of Switch (role=switch, aria-checked) and SegmentedControl (role=radiogroup) -- at +27MB node_modules and about +1.5-2s in task check. Absorbing node:test into vitest is infeasible (all 29 existing files fail collection under vitest); node --test cannot mount SFCs (.vue ERR_UNKNOWN_FILE_EXTENSION); reka-ui's shipped tarball carries no tests while its upstream repo keeps per-component Vitest+axe suites in CI.
Close reason
Closed
Imported from beads
archie-core-7svn· GitHub #1469 · type task · priority P2 · created 2026-09-29 · closed 2026-09-29