Skip to content

test: add frontend test coverage for critical user flows#77

Merged
Gitsack merged 2 commits intomainfrom
feat/ham-98-frontend-test-coverage
Apr 11, 2026
Merged

test: add frontend test coverage for critical user flows#77
Gitsack merged 2 commits intomainfrom
feat/ham-98-frontend-test-coverage

Conversation

@Gitsack
Copy link
Copy Markdown
Owner

@Gitsack Gitsack commented Apr 4, 2026

Summary

  • Add Vitest + React Testing Library tests for download progress card (15 tests): file size formatting, ETA display, progress %, importing status, empty state
  • Add tests for password reset form (15 tests): form rendering, validation errors, token errors, flash messages, processing state, sign-in link
  • Add tests for library index page (19 tests): tab rendering from settings API, data fetching per tab, search filtering, empty states, view mode toggle, sort dropdown, stats bar

Test plan

  • npm run test:frontend — all 317 tests pass (26/27 suites; 1 pre-existing failure in search page due to missing empty-state component unrelated to this PR)
  • Reviewed — tests cover edge cases, user interactions, error states, and empty states thoroughly

🤖 Generated with Claude Code

…and library index

Cover critical user flows: download progress display with size/ETA formatting,
password reset form with validation and token errors, and library page with
tab rendering, search filtering, view modes, and empty states.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Copy link
Copy Markdown
Owner Author

@Gitsack Gitsack left a comment

Choose a reason for hiding this comment

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

Review: LGTM — Well-structured test coverage.

  • All 3 new test suites pass (60 new tests total across download-progress-card, reset-password, library index)
  • 317/317 tests pass; 1 pre-existing suite failure (search page missing empty-state) is unrelated
  • Good mock isolation (Inertia, icons, layout, fetch)
  • Tests cover meaningful scenarios: edge cases (null size/eta), user interactions (search filtering, tab switching, view toggle), validation states, processing states
  • Test helpers (makeDownload, setupFetchMock) are clean and reusable within their suites

No issues found.

…test-coverage

# Conflicts:
#	inertia/pages/auth/reset_password.test.tsx
#	inertia/pages/library/index.test.tsx
@Gitsack Gitsack merged commit 825e43f into main Apr 11, 2026
@Gitsack Gitsack deleted the feat/ham-98-frontend-test-coverage branch April 11, 2026 10:36
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