Skip to content

Frontend test hardening + docs sync (rebased onto develop) - #20

Merged
Addi90 merged 6 commits into
developfrom
test/frontend-hardening
Aug 30, 2026
Merged

Addi90 merged 6 commits into
developfrom
test/frontend-hardening

Conversation

@Addi90

@Addi90 Addi90 commented Aug 29, 2026 •

Copy link
Copy Markdown
Owner
  • Adds the missing vitest coverage: API client (10 tests) and modifier panel smoke tests (21)
  • Tightens the existing tests to their actual contracts (no stale selectors or renamed keys)
  • Fixes disabled modifier panels to a real <fieldset disabled> (keyboard + AT), and puts Remove's range toggle on its own row
  • Syncs AGENTS.md / README / DESIGN.md with the modern UI and the new suite (7 files, 98 tests)
  • Rebased onto develop — the fieldset/docs fixes landed there via the modern UI merge, so this is a history re-base with no content change
  • Green: 98/98 vitest, 145 pytest, production build, ux_audit strict

test added 5 commits August 30, 2026 13:02
Remove dead code and hedged assertions that let implementations drift:
- drop ghost "state.path" writes (no such property; guards key off currentPath)
- drop the 250ms waits (the debounce lives in App.svelte's $effect, not in
  the store functions the tests call directly; a 0ms flush suffices)
- assert the /preview payload strictly (names as strings, sanitized config)
- assert duplicateNames as a plain array (the store assigns res.names)
- exercise interpolation with a real key (rename.confirmMsg) instead of a
  fake key that only works via the unknown-key fallback
Adds the two test files identified in the suite review and expands the
store/component smoke tests:

- lib/api.test.js: response parsing + error mapping (10 tests),
  including the new {path, dirs} payload contract
- modifiers smoke: all seven panels (toggle class, bindings,
  conditional inputs, grey-out) as a second component layer (21 tests)
- store: goUp bounds, refreshPreview guards, checkDuplicates,
  performRename happy + 409 paths, dialog resolution semantics
  (13 -> 27 tests)
- components smoke: RenameButton dialog paths mount the Dialog host
  alongside; ModifierCard gets a proper (raw) snippet as children and
  real DataTransfer drag events

Frontend suite: 48 -> 98 tests, all passing. Svelte 5 flushes DOM
updates on a later tick, so DOM assertions follow an explicit settle.
The panels greyed out via CSS only (opacity + pointer-events: none),
which blocks the mouse but not the keyboard: users could Tab into a
"disabled" panel and edit its config, and assistive tech reported
the controls as enabled. Wrap the controls in <fieldset disabled> —
the attribute cascades a real disabled state to every input and
select — and keep the opacity as the visual cue (dropping
pointer-events).

Remove's range inputs already used real disabled attributes for their
sub-option gating and compose with the fieldset unchanged; the
sub-option split becomes a stated rule in AGENTS.md: mode-only
inputs render conditionally ({#if}), persistent-value inputs
disable via attribute.

Tests now assert the fieldset's disabled attribute (a strictly
stronger check than the old class check).
The Range checkbox shared its row with the from/to values and the
until-end checkbox, which read as one crowded strip. Give the toggle
its own row and let the range values (from, to, until end) group on
the row below — the only row that still dims while range is off (the
toggle itself no longer greys out, since it is the control that turns
the section back on). DOM input order is unchanged, so the existing
tests need no selector updates.
@Addi90
Addi90 force-pushed the test/frontend-hardening branch from 5aece15 to 0b8fb06 Compare August 30, 2026 12:40
- AGENTS.md: DESIGN.md + index.css in repo layout; App.svelte line now
  reflects theme toggle and breadcrumb path bar; new theming bullet in
  frontend essentials; dark mode no longer an open item
- README.md: mention the light/dark theme toggle; DESIGN.md in layout
- DESIGN.md: point token reference at frontend/src/index.css (the
  prototype lives on a separate branch)
- drop superseded plan.md (directory renaming shipped in 0.3.0)
@Addi90
Addi90 force-pushed the test/frontend-hardening branch from 0b8fb06 to b95d940 Compare August 30, 2026 12:55
@Addi90 Addi90 changed the title Frontend test hardening + modifier panel fixes Frontend test hardening + docs sync (rebased onto develop) Aug 30, 2026
@Addi90
Addi90 merged commit ba21121 into develop Aug 30, 2026
5 checks passed
@Addi90
Addi90 deleted the test/frontend-hardening branch August 30, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant