test: expand frontend coverage to 55% (+65 component/hook tests) - #124
Merged
Conversation
Adds 65 new tests across 5 files covering React components and hooks that were previously at 0% coverage. Coverage: 49.3% → 54.8% (full src/). New test files: - hooks.test.tsx (11): useWindowDrag drag state + click suppression, usePermissions mic/accessibility grant/deny paths - file-import.test.tsx (8): FileImport full state machine (idle→selected →transcribing→result/error), drag-drop, format validation - panels.test.tsx (21): ExportPanel format buttons + error toast, ProcessingPanel mode select + apply, TranscriptionProgress bar/cancel, TextDisplay copy/paste/export callbacks - settings-sections.test.tsx (28, 3 skipped): AboutSection update check flow, PermissionsSection mic/accessibility test buttons, AIConfigSection API key/model/temperature/preset/test/save interactions Total: 931 → 996 tests (+65, 3 skipped). Threshold bumped 47→52 (stmts).
TeFuirnever
added a commit
that referenced
this pull request
Jul 31, 2026
Roadmap hygiene pass after auditing the strategic plan against actual git state. Three issues fixed: 1. CHANGELOG: backfill missing [1.1.0] entry. PRs #123/#124/#125 (frontend coverage work) merged to main but never recorded in CHANGELOG. Documents the vitest coverage scope expansion (helpers only -> full src/**) and threshold bump (62->66 stmts) that caused the 95%->46% apparent coverage drop (same tests, wider scope). 2. README: replace hardcoded '672 tests / 95% coverage' badges with a dynamic CI status badge. The old numbers were stale (95% used the narrow ~40-file scope; full-src reality is ~46%). Coverage badge removed since no codecov/coveralls uploader is wired into CI yet — to restore, add codecov-action and link a codecov badge. Roadmap section numbers also de-hardcoded to 'see CI'. 3. strategic-plan-gap-analysis.md: add HISTORICAL SNAPSHOT freeze notice at top. README linked this as the authoritative 'full plan' but the doc is a 2026-05-24 snapshot with stale .js refs (pre ADR-010 big-bang) and outdated 97% coverage figure. Now points readers to follow-ups.md + CHANGELOG + ADRs as the live sources of truth. Co-authored-by: woshiguanxiaoliang <woshiguanxiaoliang@noreply.gitcode.com>
TeFuirnever
added a commit
that referenced
this pull request
Jul 31, 2026
* docs: fix stale roadmap data and align version bookkeeping Roadmap hygiene pass after auditing the strategic plan against actual git state. Three issues fixed: 1. CHANGELOG: backfill missing [1.1.0] entry. PRs #123/#124/#125 (frontend coverage work) merged to main but never recorded in CHANGELOG. Documents the vitest coverage scope expansion (helpers only -> full src/**) and threshold bump (62->66 stmts) that caused the 95%->46% apparent coverage drop (same tests, wider scope). 2. README: replace hardcoded '672 tests / 95% coverage' badges with a dynamic CI status badge. The old numbers were stale (95% used the narrow ~40-file scope; full-src reality is ~46%). Coverage badge removed since no codecov/coveralls uploader is wired into CI yet — to restore, add codecov-action and link a codecov badge. Roadmap section numbers also de-hardcoded to 'see CI'. 3. strategic-plan-gap-analysis.md: add HISTORICAL SNAPSHOT freeze notice at top. README linked this as the authoritative 'full plan' but the doc is a 2026-05-24 snapshot with stale .js refs (pre ADR-010 big-bang) and outdated 97% coverage figure. Now points readers to follow-ups.md + CHANGELOG + ADRs as the live sources of truth. * test: v1.3.0 coverage 70% → 79% (+58 tests, near industry 80%) Largest single-PR coverage jump: +9pp (70% → 79%). useRecording.ts (520 lines) went from 2.67% → 87.5% — the biggest win in the repo. New test files (58 tests): - useRecording.test.tsx (25): start/stop recording, transcription flow, AI optimization, save callback, error paths, determineProcessingMode. Mocks MediaRecorder + AudioContext + getUserMedia in jsdom. - model-status-indicator.test.tsx (21): all stage branches (need_download/ downloading/loading/ready/error), progress bars, download/cancel buttons. - app-expanded.test.tsx (9): model-ready toggleRecording, file-import mode, transcription result + reset, copy callback. - settings-sections.test.tsx: unskipped 2 AboutSection tests (version + feature list) using container.textContent matchers. Coverage: 69.4% → 79.0% (full src/). Threshold bumped 66→76 (stmts). Tests: 1090 → 1148 (+58). All typecheck + lint clean. --------- Co-authored-by: woshiguanxiaoliang <woshiguanxiaoliang@noreply.gitcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
65 new component/hook integration tests. Full-src coverage: 49.3% → 54.8%.
New tests
hooks.test.tsxfile-import.test.tsxpanels.test.tsxsettings-sections.test.tsxCoverage progress
Verification