Skip to content

Add contract tests between dashboard and integration client #33

Description

@Lakes41

Summary

Add contract tests to ensure the dashboard's data models stay compatible with @guildpass/integration-client responses.

Current Behaviour

The dashboard view models and integration client types can drift independently. When live mode is wired in, mismatches may only appear at runtime.

Expected Behaviour

CI should catch breaking changes between integration client response types and dashboard mapping logic.

Suggested Implementation

Create fixture responses for membership lookup, wallet verification, error responses, and missing data. Test that the dashboard mapping layer converts them into the expected member, guild, activity, and verification view models.

Files or Areas Likely Affected

  • apps/dashboard/lib/data/
  • apps/dashboard/test/fixtures/
  • packages/integration-client/src/types.ts
  • packages/integration-client/src/client.ts
  • apps/dashboard/package.json

Acceptance Criteria

  • Fixtures cover successful membership lookup by wallet
  • Fixtures cover successful membership lookup by Discord user
  • Fixtures cover wallet verification success and failure
  • Dashboard mapping tests fail when required response fields drift
  • Error responses are mapped into safe dashboard error states
  • Contract test commands are documented for contributors

Additional Notes

Assumption: the integration client is the intended live boundary for at least some dashboard data.

Metadata

Metadata

Assignees

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