Skip to content

Add unit tests for SenderDashboard – stream list, metrics display, and create flow #249

@ritik4ever

Description

@ritik4ever

The SenderDashboard.tsx has no test file. It aggregates stream metrics (active count, total vested) and renders the stream creation entry point. Missing test coverage means layout regressions or incorrect metric computation go undetected.

Implementation:
Create frontend/src/components/SenderDashboard.test.tsx:

  • Render with 3 active and 2 completed streams → assert metric counts are correct
  • Render with no streams → assert zero metrics and "create your first stream" prompt
  • Click "Create Stream" button → assert CreateStreamForm is shown
  • Mock API error fetching streams → assert error state renders

Acceptance Criteria:

  • Active and completed stream counts are computed correctly
  • Zero-stream empty state renders the creation prompt
  • API error surfaces a user-visible message

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions