Skip to content

Add more testing#1190

Open
jaykim1213 wants to merge 33 commits intodevfrom
jk/tests
Open

Add more testing#1190
jaykim1213 wants to merge 33 commits intodevfrom
jk/tests

Conversation

@jaykim1213
Copy link
Copy Markdown
Contributor

@jaykim1213 jaykim1213 commented Apr 4, 2026

Does this PR close any open issues?

Closes #1062
Closes #1101

Give a longer description of what this PR addresses and why it's needed

ncreased unit test coverage to 87%

Provide pictures/videos of the behavior before and after these changes (optional)

Screenshot 2026-04-09 at 3 04 39 AM Screenshot 2026-04-09 at 3 04 53 AM Screenshot 2026-04-09 at 3 05 01 AM

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

A preview of 1a0ce53 is uploaded and can be seen here:

https://revisit.dev/study/PR1190

Changes may take a few minutes to propagate.

@jaykim1213 jaykim1213 changed the title Jk/tests Add more testing Apr 4, 2026
@jaykim1213 jaykim1213 requested a review from Copilot April 7, 2026 22:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds broad unit test coverage across hooks, components, storage utilities, and analysis UI, while enabling coverage runs and making library generator scripts testable (closes #1062, #1101).

Changes:

  • Added many new Vitest test suites for hooks/components/storage/analysis flows.
  • Refactored libraryExampleStudyGenerator.cjs and libraryDocGenerator.cjs to export functions and be unit-testable.
  • Added a Vitest coverage script and related dev dependencies; introduced Firebase emulator config.

Reviewed changes

Copilot reviewed 82 out of 113 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/store/hooks/usePreviousStep.spec.ts Adds unit coverage for previous-step navigation logic.
src/store/hooks/useIsAnalysis.spec.tsx Tests query-param driven analysis mode detection.
src/store/hooks/useEvent.spec.tsx Verifies stable callback behavior for useEvent.
src/store/hooks/useAuth.spec.tsx Adds Auth context/provider tests across storage-engine branches.
src/store/hooks/useAsync.spec.tsx Covers async hook state transitions and unmount behavior.
src/storage/types.spec.ts Smoke-test import coverage for storage type module.
src/storage/tests/primitives.spec.ts Removes commented-out engine variants from parameterized tests.
src/storage/tests/highLevel.spec.ts Removes commented-out engine variants from parameterized tests.
src/storage/tests/analysis-study-summary.spec.ts Adds coverage for analysis summary stats/formatting utilities.
src/storage/tests/analysis-manage.spec.ts Expands stage-management tests and moves download helper test here.
src/storage/tests/analysis-data-management.spec.ts Removed; its test content moved into analysis-manage.spec.ts.
src/storage/tests/analysis-config.spec.ts Adds tests for config date formatting and timeframe logic.
src/storage/storageEngineHooks.spec.tsx Tests provider default/update behavior for storage engine context.
src/storage/initialize.spec.ts Adds tests for storage engine initialization and fallback paths.
src/storage/engines/utils.spec.ts Tests cloud-engine detection and progress computation logic.
src/routes/utils.spec.tsx Adds tests for route-derived state (step/component/identifier), with module mocks.
src/parser/types.spec.ts Smoke-test import coverage for parser type module.
src/components/settings/GlobalSettings.spec.tsx Adds tests for auth admin settings UI states and interactions.
src/components/screenRecording/ScreenRecordingReplay.spec.tsx Adds coverage for replay behavior in analysis vs non-analysis.
src/components/response/ResponseBlock.spec.tsx Covers rendering/behavior branches for response block UI.
src/components/interface/ScreenRecordingRejection.spec.tsx Tests rejection modal copy rendering.
src/components/interface/RecordingAudioWaveform.spec.tsx Tests waveform setup/teardown with WebAudio/canvas stubs.
src/components/interface/HelpModal.spec.tsx Tests help modal behavior for missing/found markdown assets.
src/components/interface/DeviceWarning.spec.tsx Adds more device-rule rendering cases + effect coverage.
src/components/interface/DeviceRestrictionString.spec.ts Adds direct unit tests for restriction-string helpers.
src/components/interface/ConfigVersionWarningModal.spec.tsx Adds interactive tests for auto-dismiss and button action.
src/components/interface/AppNavBar.spec.tsx Adds SSR tests for sidebar content rendering rules.
src/components/interface/AppHeader.spec.tsx Adds SSR + effect-branch coverage for header behavior.
src/components/interface/AppAside.spec.tsx Adds SSR tests for analysis aside panel shell.
src/components/interface/AnalysisFooter.spec.tsx Adds SSR tests for think-aloud footer wiring.
src/components/interface/AlertModal.spec.tsx Adds SSR tests for alert modal and diagnostics rendering.
src/components/downloader/DownloadButtons.spec.tsx Adds SSR + click-handler tests for download buttons.
src/components/audioAnalysis/useUpdateProvenance.spec.tsx Adds tests for provenance navigation logic over play time.
src/components/audioAnalysis/provenanceColors.spec.ts Expands tests for provenance label/color helpers and unknown key behavior.
src/components/audioAnalysis/Timer.spec.tsx Adds tests for timeline timer event subscription and callback behavior.
src/components/audioAnalysis/TaskProvenanceTimeline.spec.tsx Adds SSR tests for timeline rendering and filtering rules.
src/components/TrainingFailed.spec.tsx Tests training failure messaging and rejection side effect.
src/components/TimedOut.spec.tsx Tests timed-out messaging rendering.
src/components/StudyEnd.spec.tsx Adds extensive tests for completion/auto-download/redirect behavior.
src/components/StepRenderer.spec.tsx Adds tests for shell rendering and window-event listener wiring.
src/components/Shell.spec.tsx Adds tests for study bootstrapping, widget mode, and error paths.
src/components/ReactMarkdownWrapper.spec.tsx Adds coverage of markdown rendering and required-asterisk plugin branches.
src/components/PreviousButton.spec.tsx Tests previous button rendering, disabled state, and click dispatch.
src/components/NextButton.spec.tsx Adds tests for alerts/timers and enter-to-advance behavior.
src/components/ConfigSwitcher.spec.tsx Adds tests for config listing behavior and summary branches.
src/analysis/interface/ParticipantStatusBadges.spec.tsx Adds SSR tests for participant status badge counts.
src/analysis/interface/AppHeader.spec.tsx Adds SSR tests for analysis header title rules.
src/analysis/individualStudy/thinkAloud/TranscriptLine.spec.tsx Adds interaction tests for transcript editor line actions.
src/analysis/individualStudy/thinkAloud/TextEditor.spec.tsx Adds tests for transcript list editing operations.
src/analysis/individualStudy/summary/SummaryView.spec.tsx Adds SSR tests for summary view sections and MRT column Cell formatting.
src/analysis/individualStudy/ParticipantRejectModal.spec.tsx Adds interaction tests for reject/undo reject flows.
src/ResourceNotFound.spec.tsx Adds SSR tests for error page rendering and optional email.
src/ProtectedRoute.spec.tsx Adds tests for route protection/loading/redirect branches.
src/Login.spec.tsx Adds SSR tests for login UI and signIn helper behavior.
src/GlobalConfigParser.spec.tsx Adds smoke tests for global config parse + routing render.
package.json Adds unit-test coverage script and several test/dev dependencies.
libraryExampleStudyGenerator.cjs Refactors generator into functions + exports for unit tests.
libraryDocGenerator.cjs Refactors doc generator into functions + exports for unit tests.
firebase.json Adds emulator configuration (Firestore port + UI disabled).
LibraryExampleStudyGenerator.spec.ts Adds unit tests for library example generator behavior.
LibraryDocGenerator.spec.ts Adds unit tests for library doc generator behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

jaykim1213 and others added 12 commits April 7, 2026 16:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jaykim1213 jaykim1213 requested a review from Copilot April 9, 2026 08:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 83 out of 134 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jaykim1213 jaykim1213 marked this pull request as ready for review April 9, 2026 09:44
@jaykim1213 jaykim1213 requested a review from JackWilb April 9, 2026 15:38
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.

2 participants