Skip to content

Add component tests for AcquirePositionDialog wallet and KYC gating #727

Description

@king-aj-the-first

GitHub labels: Stellar Wave

Drips complexity: Medium (100 points)

Area: Testing

Description

AcquirePositionDialog replaced alert() on secondary acquire, but component-level tests for disconnected wallet and KYC gate are missing.

Requirements and Context

Regression risk is high on the P2P flow. Mock useWallet and KYC state to assert dialog blocks submit appropriately.

Suggested Execution

git checkout -b test/acquire-position-dialog
  1. Create branch test/acquire-position-dialog
  2. Render dialog with mock listing
  3. Assert connect prompt when wallet disconnected
  4. Assert KYC block when required
  5. Mock useTransaction execute path

Example commit message

test(secondary): add component tests for AcquirePositionDialog gating

File Paths

  • components/invoice/AcquirePositionDialog.tsx
  • app/secondary/page.tsx
  • hooks/useTransaction.ts

Guidelines

  • Assignment required before starting
  • PR description must include: Closes #<issue_number>
  • Run npm run lint, npm run type-check, npm run test, and npm run build before opening PR
  • Add screenshots or recordings for UI changes
  • Complexity: Medium (100 points) — focused test coverage work

Acceptance Criteria

  • Disconnected wallet shows connect CTA
  • KYC gate blocks submit with message
  • Connected verified user can open simulation
  • No real network calls
  • Tests use Testing Library

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions