Skip to content

test(frontend): add unit tests for remaining page/UI components#108

Merged
jodeleeuw merged 3 commits into
mainfrom
test/frontend-component-tests
Jun 18, 2026
Merged

test(frontend): add unit tests for remaining page/UI components#108
jodeleeuw merged 3 commits into
mainfrom
test/frontend-component-tests

Conversation

@htsukamoto5

Copy link
Copy Markdown
Member

Summary

  • Adds component-level unit tests for the remaining untested frontend pages/components: DataUpload, Variables, Authors, JsonViewer, PageHeader, PreviewDrawer, Sidebar, ProjectInfo, and AppShell.
  • 201 tests across these 9 new files, all passing, using React Testing Library patterns consistent with the existing test suite (userEvent, within, waitFor, findBy*).
  • AppShell tests mock its child page components to isolate routing/step-completion logic (including the "skip Data for existing projects" behavior).
  • Closes Creating test suite for the frontend package #9.

Test plan

  • npx jest packages/frontend/tests/ --no-coverage — 201 tests passing across 15 suites
  • No regressions in previously-existing frontend test suites

🤖 Generated with Claude Code

Covers DataUpload, Variables, Authors, JsonViewer, PageHeader,
PreviewDrawer, Sidebar, ProjectInfo, and AppShell (201 tests total).
Closes #9.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 74475d5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

jodeleeuw and others added 2 commits June 18, 2026 18:37
…changes

The DataUpload component gained a parseJsonData-based join-key preflight (#115) and a
buildPsychDSDataFiles conversion step (#103/#114) since these tests were written. Expand
the @jspsych/metadata mock (parseJsonData, parseCSV, buildPsychDSDataFiles, deriveFallbackBase,
isValidPsychDSDataFilename, PSYCHDS_IGNORE_*) and the metadata stub (getExtractedArrays/Objects,
getArrayJoinKeys) so the join-key chooser and session-sync paths exercise correctly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jodeleeuw jodeleeuw merged commit 96cc3e4 into main Jun 18, 2026
2 checks passed
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.

Creating test suite for the frontend package

2 participants