Skip to content

Add coverage enforcement, visual regression, mobile E2E, and payment lifecycle integration tests - #488

Merged
Viky207 merged 5 commits into
Viky207:mainfrom
agbochenuv-bit:drips/385-386-387-388
Oct 23, 2026
Merged

Viky207 merged 5 commits into
Viky207:mainfrom
agbochenuv-bit:drips/385-386-387-388

Conversation

@agbochenuv-bit

Copy link
Copy Markdown
Contributor

Summary

Add coverage enforcement, visual regression, mobile E2E, and payment lifecycle integration tests

What was solved

#385 — test(backend): Achieve 80% unit test coverage across all backend modules

Add an enforced 80% statement coverage threshold to the NestJS backend's Jest unit test configuration and ensure CI uploads the HTML coverage report as an artifact, while identifying the lowest-coverage modules (payments, usernames, links, auth) for prioritised new tests.

Addressed:

  • Changed: app/backend/jest.unit.config.ts, app/backend/jest.config.ts, .github/workflows/backend.yml, .github/workflows/ci.yml
  • Update jest.unit.config.ts with coverageThreshold: { global: { statements: 80, branches: 70, functions: 80, lines: 80 } }
  • Ensure CI fails when coverage drops below the configured thresholds
  • Measure current coverage baseline and prioritise modules below 50% coverage for new tests first

#386 — test(frontend): Implement Playwright visual regression testing for all dashboard pages

Add Playwright visual regression testing for the main dashboard pages: configure screenshot tolerance in playwright.config.ts, add visual test specs under app/frontend/visual/ covering dashboard empty/populated, payment link wizard, username claim, and payment landing pages in light and dark modes, and wire a CI step in .github/workflows/frontend-ci.yml that runs against a mocked API and uploads diff artifacts.

Addressed:

  • Changed: app/frontend/playwright.config.ts, app/frontend/package.json, .github/workflows/frontend-ci.yml
  • Commit baseline screenshots to app/frontend/visual/snapshots/ for dashboard empty state, dashboard populated state (5 mock transactions), payment link generator wizard steps, username claim page, and payment landing page (/username/amount)
  • Configure playwright.config.ts with expect.toHaveScreenshot tolerance of 0.2%
  • CI step runs visual tests against a mocked API (no real Horizon calls)

#387 — test(mobile): Set up Maestro E2E flow tests for core payment journeys on Android and iOS

Add Maestro E2E flow tests for the three core mobile payment journeys (username claim, payment link creation, transaction viewing), plus local setup docs and CI wiring to run flows on the Android emulator in mobile-release.yml.

Addressed:

  • Changed: .github/workflows/mobile-release.yml, app/mobile/.maestro/flows/claim-username.yaml, app/mobile/.maestro/flows/create-payment-link.yaml, app/mobile/.maestro/flows/claim-username.yaml
  • Create app/mobile/.maestro/flows/claim-username.yaml covering the full username claim journey
  • Create app/mobile/.maestro/flows/create-payment-link.yaml covering creating a payment link and copying it
  • Create app/mobile/.maestro/flows/view-transaction.yaml covering navigating to the dashboard and seeing a transaction entry

#388 — test(backend): Integration test suite for the full payment link lifecycle

Add an integration test suite covering the full payment link lifecycle (claim username → create link → simulate Horizon testnet payment → verify dashboard/earnings → delete username) plus a dedicated CI job in the backend workflow to run it against testnet with a seeded test account.

Addressed:

  • Changed: app/backend/test/integration/payment-lifecycle.int.spec.ts, .github/workflows/backend.yml, app/backend/test/integration/payment-lifecycle.int.spec.ts, app/backend/jest.int.config.ts
  • Create new test file at app/backend/test/integration/payment-lifecycle.int.spec.ts
  • Cover scenarios: claim username (verify stored in Supabase), create payment link (verify response structure), submit Horizon testnet payment and verify it appears in GET /payments/{username}, verify earnings total updates, delete username and verify link is invalidated
  • Tests must run against STELLAR_NETWORK=testnet with a seeded test account (mnemonic from CI secrets)

Changes

  • app/backend/jest.unit.config.ts (modify)
  • app/backend/jest.config.ts (modify)
  • app/frontend/playwright.config.ts (modify)
  • .github/workflows/mobile-release.yml (modify)
  • app/backend/test/integration/payment-lifecycle.int.spec.ts (create)
  • .github/workflows/backend.yml (modify)
  • app/frontend/package.json (modify)
  • app/mobile/.maestro/flows/claim-username.yaml (create)
  • app/backend/jest.int.config.ts (modify)
  • .github/workflows/ci.yml (modify)
  • .github/workflows/frontend-ci.yml (modify)
  • app/mobile/.maestro/flows/create-payment-link.yaml (create)

Approach

  1. test(backend): Achieve 80% unit test coverage across all backend modules #385 — test(backend): Achieve 80% unit test coverage across all backend modules (Changed: app/backend/jest.unit.config.ts, app/backend/jest.config.ts, .github/workflows/backend.yml, .github/workflows/ci.yml)
  2. test(frontend): Implement Playwright visual regression testing for all dashboard pages #386 — test(frontend): Implement Playwright visual regression testing for all dashboard pages (Changed: app/frontend/playwright.config.ts, app/frontend/package.json, .github/workflows/frontend-ci.yml)
  3. test(mobile): Set up Maestro E2E flow tests for core payment journeys on Android and iOS #387 — test(mobile): Set up Maestro E2E flow tests for core payment journeys on Android and iOS (Changed: .github/workflows/mobile-release.yml, app/mobile/.maestro/flows/claim-username.yaml, app/mobile/.maestro/flows/create-payment-link.yaml, app/mobile/.maestro/flows/claim-username.yaml)
  4. test(backend): Integration test suite for the full payment link lifecycle #388 — test(backend): Integration test suite for the full payment link lifecycle (Changed: app/backend/test/integration/payment-lifecycle.int.spec.ts, .github/workflows/backend.yml, app/backend/test/integration/payment-lifecycle.int.spec.ts, app/backend/jest.int.config.ts)

Issues

Closes #385
Closes #386
Closes #387
Closes #388

@drips-wave

drips-wave Bot commented Oct 16, 2026

Copy link
Copy Markdown

@agbochenuv-bit Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Viky207
Viky207 merged commit de0f0dd into Viky207:main Oct 23, 2026
1 check 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

2 participants