Skip to content

End-to-End Integration Test for Full Invoice Lifecycle #529

Description

@Kingsman-99

Description

There is no single test that exercises the complete invoice lifecycle — creation, contribution, full funding, release, and archival — using realistic token balances and multiple addresses. A comprehensive end-to-end test should serve as a regression suite for all major contract interactions.

Technical Context

Create tests/e2e_lifecycle.rs using soroban_sdk::testutils and the shared helpers from tests/helpers.rs. Simulate three contributors funding an invoice split three ways, verify token balances before and after payout, check event emissions, confirm archival, and assert get_invoice returns InvoiceNotFound while get_archived_invoice succeeds. Use MockAuth for all auth steps.

Acceptance Criteria

  • Test covers create → contribute (×3) → fully funded → release → archived flow
  • Token balances for all parties are asserted before and after each major step
  • All expected events (InvoiceCreated, ContributionMade, InvoiceReleased, etc.) are captured and checked
  • Test fails if the invoice is not found via get_archived_invoice after release
  • Fee recipient balance is asserted to have received the correct fee amount
  • All CI checks (cargo build --target wasm32-unknown-unknown, cargo test, cargo clippy) pass and the branch has no merge conflicts

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 ptstestingTests — unit, integration, fuzz

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions