-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
difficulty: hardComplex engineering like integrationsComplex engineering like integrations
Description
Context
The project has 12 unit/integration test files but zero end-to-end tests. Critical user journeys — wallet connection, stream creation, distribution submission, offramp flow — are completely untested at the integration level. A single broken import or missing provider can break an entire page, and unit tests won't catch it. E2E tests provide the safety net for shipping with confidence.
What Success Looks Like
- Playwright is set up and configured for the Next.js app
- E2E tests cover these critical flows:
- Wallet connection — user opens modal, selects wallet, sees address in navbar
- Payment stream creation — user fills form, sees summary, confirms transaction
- Distribution flow — user adds recipients (manual + CSV), submits distribution
- History page — user views transactions, filters by type, exports CSV
- Navigation — sidebar links work, pages load without errors
- Tests run in CI and locally with
pnpm test:e2e - Wallet interactions are mocked (no real browser extensions needed)
Implementation Guidance
- Install Playwright:
pnpm add -D @playwright/testin theapps/webpackage - Create
apps/web/playwright.config.tswith the Next.js dev server as the web server - Create
apps/web/e2e/directory for test files - Mock the wallet context by injecting test state via a custom provider or
page.addInitScript() - Start with navigation and page-load tests (simplest) before tackling transaction flows
- Use Playwright's
page.route()to intercept and mock RPC/API calls - Add a
test:e2escript topackage.json - Consider using Playwright's codegen (
npx playwright codegen) to bootstrap test recording
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
difficulty: hardComplex engineering like integrationsComplex engineering like integrations