Skip to content

Add automated tests for dashboard pages and data helpers #22

@Lakes41

Description

@Lakes41

Summary

Add a test suite for dashboard rendering, data helpers, and core user flows so regressions are caught before merge.

Current Behaviour

The dashboard package exposes typecheck and lint scripts but does not include a visible test script. Pages and mock-data logic are not covered by automated tests.

Expected Behaviour

Core dashboard pages and data helpers should have deterministic tests that run locally and can be added to CI.

Suggested Implementation

Add Vitest and React Testing Library for component and page-level tests. Add tests for dashboard stats, pass rendering, member wallet truncation, status badges, and any new data access helpers.

Files or Areas Likely Affected

  • apps/dashboard/package.json
  • apps/dashboard/vitest.config.ts
  • apps/dashboard/test/
  • apps/dashboard/app/dashboard/page.tsx
  • apps/dashboard/app/passes/page.tsx
  • apps/dashboard/app/members/page.tsx
  • apps/dashboard/components/
  • apps/dashboard/lib/

Acceptance Criteria

  • pnpm --filter @guildpass/dashboard test runs successfully
  • Dashboard stats are tested against mock data
  • Pass table rendering is tested
  • Member wallet truncation is tested
  • Status badge rendering is tested for supported statuses
  • Data access helpers are tested if introduced

Additional Notes

Keep tests independent from external APIs. Mock live integration boundaries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions