Skip to content

Add unit tests for the invoice detail page correctly hiding the invest button for expired and settled invoices #55

Description

@Chucks1093

Summary

The invest button should only be visible on invoices in the published state. Unit tests should confirm the button is hidden for expired, settled, funded, and draft states and that the correct message is shown in its place.

Scope

  • Test published state shows the invest button
  • Test expired state hides the invest button and shows 'This invoice has expired'
  • Test settled state hides the invest button and shows 'This invoice has been settled'
  • Test funded state hides the invest button and shows 'This invoice is fully funded'
  • Test draft state hides the invest button with no replacement message (draft not publicly visible)

Acceptance Criteria

  • Invest button visible only for published invoices
  • Correct replacement message for expired, settled, and funded states
  • Draft state hides both the button and any replacement message
  • No test throws during render for any status

ETA: 12 hours


Coordinate on Telegram

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