Skip to content

E2E Integration Test + Seed Script Improvements#58

Merged
johneliud merged 4 commits into
mainfrom
test/e2e-payment-flow
Jun 8, 2026
Merged

E2E Integration Test + Seed Script Improvements#58
johneliud merged 4 commits into
mainfrom
test/e2e-payment-flow

Conversation

@johneliud

Copy link
Copy Markdown
Owner

Summary

  • Add a headless Node.js E2E integration test (scripts/integration-test.ts) that runs the full client → freelancer payment flow against Stellar testnet without needing a browser or Freighter extension
  • Expand seed script from 5 to 10 demo listings covering a wider range of skills
  • Simplify seed script to only create listings — applications are no longer seeded automatically

Changes

scripts/integration-test.ts (new)

Runs via npm run test:e2e. Covers the full flow in order:

  1. Pre-flight: validates CONTRACT_ID and XLM_TOKEN_ID are set
  2. Auto-funds both keypairs via Friendbot if balance < 10 XLM
  3. Creates a project with 2 milestones on-chain
  4. Client funds Milestone 1 → asserts status becomes Funded
  5. Freelancer marks Milestone 1 complete → asserts Completed
  6. Client approves → asserts Released and freelancer XLM balance increased
  7. Client funds Milestone 2, freelancer disputes → asserts Disputed
  8. Prints ✓ / ✗ per assertion, exits with code 1 on any failure

scripts/seed-demo.ts

  • Expanded from 5 to 10 listings (added: e-commerce store, DevOps/CI-CD pipeline, technical writing, Python scraper, full-stack API)
  • Removed all application seeding — DEMO_FREELANCER_ADDRESS is no longer required
  • Simplified seedListing function signature (no appMessage param)

package.json

  • Added "test:e2e": "tsx scripts/integration-test.ts"

.env.example

  • Documented INTEGRATION_CLIENT_SECRET and INTEGRATION_FREELANCER_SECRET (optional — random keypairs are generated and Friendbot-funded automatically if left blank)

Test plan

  • npm run seed — all 10 listings created, no applications inserted
  • npm run test:e2e — all assertions pass against testnet
  • Re-running npm run seed skips already-existing listings without error

Closes #17

@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mile-stack Ready Ready Preview, Comment Jun 8, 2026 5:24am

@johneliud johneliud changed the title test: E2E integration test + seed script improvements E2E Integration Test + Seed Script Improvements Jun 8, 2026
@johneliud johneliud self-assigned this Jun 8, 2026
@johneliud johneliud merged commit 82c3f26 into main Jun 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

End-to-end integration test: full client → freelancer payment flow

1 participant