PR #256 and #268 shipped the Raise Dispute flow: useRaiseDispute hook, RaiseDisputeDialog component, /api/disputes REST proxy, and the trigger button on the bounty sidebar. No e2e spec covers this yet, so any regression in the dialog flow will slip through CI.
What to do
Add e2e/raise-dispute.spec.ts covering:
- Eligible user (creator or participant on a bounty in IN_PROGRESS or UNDER_REVIEW) sees an active Raise Dispute button
- Clicking it opens the AlertDialog with reason Select and description Textarea
- Submitting with empty reason or empty description keeps the dialog open and shows inline validation
- Submitting valid input closes the dialog, shows a success toast, and redirects to
/dispute/{newDisputeId}
- On API failure (mocked 500), the dialog stays open and shows an error toast
Mock the POST /api/disputes route via page.route('**/api/disputes', ...). Follow the conventions in e2e/bounty-application.spec.ts for session setup and mock GraphQL responses.
Acceptance criteria
- Spec lives at
e2e/raise-dispute.spec.ts
- All five test cases pass locally and on CI
pnpm exec playwright test e2e/raise-dispute.spec.ts green
- Reuses the
MOCK_SESSION and setupMocks pattern from bounty-application.spec.ts
Files
e2e/raise-dispute.spec.ts (new)
PR #256 and #268 shipped the Raise Dispute flow:
useRaiseDisputehook,RaiseDisputeDialogcomponent,/api/disputesREST proxy, and the trigger button on the bounty sidebar. No e2e spec covers this yet, so any regression in the dialog flow will slip through CI.What to do
Add
e2e/raise-dispute.spec.tscovering:/dispute/{newDisputeId}Mock the
POST /api/disputesroute viapage.route('**/api/disputes', ...). Follow the conventions ine2e/bounty-application.spec.tsfor session setup and mock GraphQL responses.Acceptance criteria
e2e/raise-dispute.spec.tspnpm exec playwright test e2e/raise-dispute.spec.tsgreenMOCK_SESSIONandsetupMockspattern frombounty-application.spec.tsFiles
e2e/raise-dispute.spec.ts(new)