Skip to content

Add Playwright e2e coverage for the Raise Dispute flow #280

Description

@Benjtalkshow

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)

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or requestfrontendFrontend developmentgood first issueGood for newcomershelp wantedExtra attention is needed

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