Skip to content

Add Playwright e2e coverage for the Decline Applicant flow #281

Description

@Benjtalkshow

PR #253 and #269 shipped the Decline Applicant flow: useDeclineApplicant hook, Decline button on each application card, confirmation AlertDialog with optional reason field, optimistic cache filter. No e2e spec covers this yet.

What to do

Add e2e/decline-applicant.spec.ts covering:

  • Creator opens the bounty detail page and sees the application review dashboard
  • Each application card shows a Decline button next to Select
  • Clicking Decline opens the confirmation AlertDialog
  • Submitting the dialog with no reason succeeds (reason is optional)
  • The declined applicant disappears from the dashboard immediately (optimistic)
  • If the applicant was in the comparison selection, they are removed from it
  • On mutation error (mocked rejection from contract binding), the applicant reappears (rollback)

Reuse MOCK_SESSION and setupMocks from e2e/bounty-application.spec.ts. Stub the dashboard input by mocking the bounty detail query response with an applications array. Inject globalThis.__applicationContracts in the page init script to control mutation outcomes.

Acceptance criteria

  • Spec lives at e2e/decline-applicant.spec.ts
  • All test cases pass locally and on CI
  • pnpm exec playwright test e2e/decline-applicant.spec.ts green

Files

  • e2e/decline-applicant.spec.ts (new)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programenhancementNew feature or requestfrontendFrontend development

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions