Skip to content

test(frontend): audit cleanup — drop overlapping operator cases, launcher cases on controlled time - #144

Merged
Ezo-mas merged 1 commit into
mainfrom
test/frontend-audit-cleanup
Nov 25, 2026
Merged

Ezo-mas merged 1 commit into
mainfrom
test/frontend-audit-cleanup

Conversation

@Ezo-mas

@Ezo-mas Ezo-mas commented Nov 25, 2026

Copy link
Copy Markdown
Member

Frontend test-only cleanup from the test audit (run at 6b65570, still current HEAD). No production code or generated bundles touched.

Operator

  1. Removed App.scriptureSearch.test.tsx › resolves "gen 1 1-3" to Genesis 1:1-3. Still covered by:
    • scriptureQuery.test.ts › resolves "gen 1 1-3" to Genesis 1:1-3 (range end, label)
    • App.plan.test.tsx › Ctrl+Enter adds the best match, clears the box, and sends nothing (finds the range result by its accessible name)
  2. Merged counts its passages in its head into lists the planned passages in order, numbered, always in view (same header-scoped .operator-card-head .operator-section-count query).

Kept untouched: search-box and focused-result Meta+Enter tests, the active spoken-language no-POST test. Operator Settings left for its own audit.

Launcher (frontend/src/launcher/App.test.tsx)

Four cases now run on vi.useFakeTimers() with the suite's try { … } finally { app.unmount(); vi.useRealTimers() } pattern, still against the real App, demo bridge, polling and rendered controls:

  • toggles the audience QR code beside the projector and shows the operator code in Network
  • keeps the projector action beside its select in both views
  • moves the live wave with the pipeline levels, flat without them, the meter at rest
  • uses the same elapsed status in both views and restores the idle microphone meter on stop — now asserts Live · 00:00:00 at go-live, 00:00:06 after 6 s (Simple and Advanced), 00:00:09 after 3 s more in Advanced. The old regex passed with a frozen 00:00:00.

Mutation checks (each fault applied alone, then reverted)

Fault QR Projector Wave Elapsed
none (clean) pass pass pass pass
QR sends current visibility instead of !shown fail pass pass pass
Show routed to identify_screens pass fail pass pass
live pipeline levels discarded pass pass fail pass
elapsed frozen at started_at pass pass pass fail

Plan count: {items.length + 1} and {items.length - 1} each fail the merged plan case.

Timing (four launcher cases combined, sum of test durations, 3 focused runs each)

  • Before: 7.94 / 7.58 / 7.92 s → median 7.92 s
  • After: 2.81 / 2.91 / 2.47 s → median 2.81 s

(Audit reference ≈ 7.48 → 2.75 s.)

Checks

npm run lint, npm run typecheck, npm run format:check clean; npm test -- --run: 66 files, 753 tests passed, 0 skipped.

…ses on controlled time

- Remove the App.scriptureSearch 'gen 1 1-3' case; scriptureQuery's unit case
  and App.plan's Ctrl+Enter range case cover it.
- Fold the Plan header count into the ordered-list plan case.
- Run the audience QR, Show on projector, live wave and elapsed launcher cases
  on fake timers; the elapsed case now advances the clock and checks the value
  in Simple and Advanced.
@Ezo-mas
Ezo-mas merged commit 7b51c59 into main Nov 25, 2026
1 check passed
@Ezo-mas
Ezo-mas deleted the test/frontend-audit-cleanup branch November 26, 2026 00: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