Skip to content

test: add component unit tests for critical UI components (Closes #535) - #588

Open
waterWang wants to merge 1 commit into
Protocol-Guild:mainfrom
waterWang:test/component-unit-tests-535
Open

test: add component unit tests for critical UI components (Closes #535)#588
waterWang wants to merge 1 commit into
Protocol-Guild:mainfrom
waterWang:test/component-unit-tests-535

Conversation

@waterWang

Copy link
Copy Markdown

Summary

Add component unit tests for 5 critical UI components as described in #535.

Changes

  • vitest.config.ts — Vitest configuration with jsdom environment and test setup
  • src/tests/setup.ts — Test setup with mocks for react-router-dom, react-i18next, lucide-react, and @sentry/react
  • src/tests/ErrorBoundary.test.tsx — Tests for error catching, fallback rendering, and Sentry error reporting
  • src/tests/CSVUploader.test.tsx — Tests for file parsing, column validation, error handling, preview table, and custom validators
  • src/tests/EmployeeList.test.tsx — Tests for rendering, sorting, CSV import integration, CRUD operations, and wallet display
  • src/tests/ConnectAccount.test.tsx — Tests for wallet connection flow, social login, and disconnect
  • src/tests/BulkPaymentStatusTracker.test.tsx — Tests for loading state, empty state, title, and refresh button

Test Results

All 30 tests pass across 5 test files.

Acceptance Criteria

  • EmployeeList: renders, filters, pagination
  • CSVUploader: file selection, validation, preview
  • ErrorBoundary: catches errors, shows fallback
  • ConnectAccount: wallet connection flow

…undary, ConnectAccount, and BulkPaymentStatusTracker (Closes Protocol-Guild#535)

- Add vitest config and test setup
- EmployeeList: tests for rendering, sorting, CSV import, CRUD, wallet format
- CSVUploader: tests for file parsing, validation, preview, custom validators
- ErrorBoundary: tests for error catching, fallback rendering, Sentry reporting
- ConnectAccount: tests for wallet connection flow, social login, disconnect
- BulkPaymentStatusTracker: tests for loading, empty state, title, refresh
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