E2E Test Plan: Drop — Fintech Payment App
E2E Test Plan: Drop — Fintech Payment App
Project: Drop — Remittance + QR Payments Version: 1.0 Date: 2026-02-23 Author: John (AI Director) Status: Approved Reviewers: Alem Bašić (CEO)
Document History
| Version | Date | Author | Changes |
|---|---|---|---|
| 0.1 | 2026-02-23 | John | Initial |
1. TestE2E Testing Objectives
This test plan covers testing for Drop MVP + Phase 0.5 Security Hardening (v0.5.0).
Primary objectives:Objectives:
VerifyValidate thatalltheauthentication5andmostonboardingcriticalflowsDrop(registration,userOTP, PIN, login)journeys workcorrectlyend-to-endforonNorwegian residents (age ≥ 18, phone +47)stagingVerifyCatchthatintegrationremittancefailurestransactionsbetweenapplyNext.jscorrectfrontend,0.5%APIfeeroutes,acrossSQLiteallDB,6 NOK corridors withand mock BaaS that unit/integration tests cannot detectVerifyProvidethatconfidenceQRbeforepaymentseveryapplyproductioncorrectdeployment1%viamerchantpost-stagingfeedeploywith mock BaaSgateConfirmServetheaspass-throughlivingmodeldocumentationinvariant:ofDrop NEVER storescritical userbalances or full card dataConfirm Phase 0.5 security hardening: bcrypt 12 rounds, persistent rate limiting, CSRF, security headers, audit loggingValidate performance under expected load (40+ concurrent users; target 200flows forPhaseCEO1)UAT
OutWhat E2E tests are NOT for:
- Complete feature coverage (handled by unit/integration tests — 40+ Vitest tests)
- Testing every error state (too expensive to maintain; covered by input-chaos.spec.ts for validation)
- Performance benchmarking (handled by api-benchmarks.test.ts)
- Visual pixel-perfection (Figma source of
scopetruth:formockups/figma-make-export/)
2. FeaturesCritical UnderUser TestJourneys
Journey 1: User Registration — 3-Step Onboarding
| Value | |
|---|---|
| Priority | Critical |
| Business Impact | Core user acquisition — no registration = no users |
| Frequency | Every new user (one-time) |
| Test File | src/drop-app/__tests__/e2e/user-flows.spec.ts |
Steps:
Assertions:
- 201 Created on registration (no password hash in response)
- JWT httpOnly cookie set after PIN setup
- Dashboard visible with user's name
- Audit log entry created
Journey 2: User Login + Dashboard Access
| Field | Value |
|---|---|
| Priority | Critical |
| Business Impact | Core returning user flow — no login = no revenue |
| Frequency | Every user, every session |
| Test File | src/drop-app/__tests__/e2e/user-flows.spec.ts |
Steps:
Assertions:
- 200 on login; JWT cookie set; SameSite=Strict; httpOnly
- GET /api/auth/me returns user object (no password hash)
- Balance shown is from mock BaaS (not stored in Drop DB)
Journey 3: Remittance — NOK to RSD
| Field | Value |
|---|---|
| Priority | Critical |
| Business Impact | Core revenue — 0.5% fee per transaction |
| Frequency | Multiple times per month per user |
| Test File | src/drop-app/__tests__/e2e/full-flows.spec.ts |
Steps:
- Log in as KYC-approved consumer
- Navigate to "Send penger" (Send Money)
- Select recipient; enter amount = 1,000 NOK; select currency = RSD
- Review: fee shown as 5 NOK (0.5%); exchange rate shown
- Confirm and submit
- Transaction created with status = completed
- Navigate to Transaction History — transaction visible
Assertions:
- 201 Created; transaction in DB with fee = 5 NOK
- Transaction history shows amount, fee, currency, status
- No balance change in Drop DB (pass-through — balance read from mock AISP)
Journey 4: QR Payment — Scan + Pay
| Field | Value |
|---|---|
| Priority | Critical |
| Business Impact | Core QR revenue — 1% merchant fee |
| Frequency | Multiple times per week per merchant |
| Test File | src/drop-app/__tests__/e2e/full-flows.spec.ts |
Steps:
- Log in as KYC-approved consumer
- Navigate to "Scan QR"
- Enter valid merchantId (pre-seeded merchant)
- Enter amount = 200 NOK
- Review: merchant_fee = 2 NOK (1%)
- Confirm payment
- Transaction created; visible in history
Assertions:
- 201 Created; merchant_fee = 2 NOK; amount = 200 NOK
- Transaction visible in consumer history
- Mock PISP payment recorded
Journey 5: Merchant Registration + QR Generation
| Field | Value |
|---|---|
| Priority | High |
| Business Impact | Merchant onboarding — enables QR revenue |
| Frequency | One-time per merchant |
| Test File | src/drop-app/__tests__/e2e/full-flows.spec.ts |
Steps:
- Log in as user (not yet a merchant)
- Navigate to "Bli Merchant" (Become Merchant)
- Enter business_name and bank_account
- Submit — merchant created with unique QR code value
- Navigate to merchant dashboard — QR code visible
Assertions:
- 201 Created; merchant has unique qr_code_value
- GET /api/merchants/me returns merchant details + QR code
- QR code is unique (no two merchants share a code)
All Journeys Summary
| Journey | Priority | Playwright Project | ||
|---|---|---|---|---|
| User Registration |
Critical | user-flows | ||
| User Login |
Critical | user-flows | ||
| Remittance |
Critical | |||
| QR Payment |
Critical | full-flows | ||
| Merchant Registration |
High | |||
| Input | 20+ ||||
| High | ||||
3. ScopeBrowser & Device Matrix
InDesktop Scope
Authentication module: registration, OTP verification, PIN setup, login, logout,/api/auth/meRemittance module:POST /api/transactions/remittance,GET /api/transactions, exchange ratesQR payments module:POST /api/transactions/qr-payment,POST /api/merchants,GET /api/merchants/meSecurity middleware: rate limiting, CSRF, JWT validation, security headersDatabase compliance: schema assertions (no balance, no card_number, no cvv), FK constraints, transaction type enumPerformance benchmarks: bcrypt timing, DB query latency, concurrent rate limit check throughputRegression testing of all 26 API routesInput validation: XSS, SQL injection, boundary ages, Unicode names, long passwords
Out of ScopeBrowsers
| OS | Priority | Notes | ||
|---|---|---|---|---|
| macOS, |
Critical | Primary test browser in Playwright CI | ||
| macOS | High | WebKit engine — | ||
Mobile 4. Test Schedule & Milestones
Browsers
| Priority | Notes | |||
|---|---|---|---|---|
| Critical | Primary Drop platform — iPhone SE to iPhone Pro Max | |||
Screen 5.Resolutions Resource(configured Allocation
in playwright.config.ts)
| Medium | Fallback / | admin
6. Entry Criteria
Testing may begin when:
Feature development is code-complete (all ticketsMatrix in"ReadyCI:forChromiumQA")+ Unit tests passingWebKit (≥mobile100%viewportspass375pxrateand 428px) onunitevery+ integration suite)Build artifact deployed to staging (https://drop-staging.fly.dev/)Staging environment is stable (health checks passing)Test data is seeded (npm run db:seed)Previous known blocking bugs resolved (Mission Control backlog reviewed)
7. Exit Criteria
Testing is complete when:
All 14 test files execute cleanly≥ 100% of unit + integration tests passAll Critical and High test cases in AC-001–AC-092 passCode coverage ≥ 80% overall; 100% for auth + transaction pathsAll Playwright E2E tests passing on staging (user-flows, full-flows, input-chaos)Performance benchmarks meeting NFR-P01..P06 targets (api-benchmarks.test.ts green)DB compliance tests passing (db.test.ts: no balance, no card_number/cvv columns)UAT sign-off obtained from Alem Bašić (CEO) — or conditional approval documentedSecurity audit score ≥ 80/100 (post Phase 0.5 hardening)
Exceptional circumstances: If exit criteria cannot be met, a documented risk acceptance from Alem Bašić (CEO) is required.deployment.
8.4. Test Data Setup & Teardown
Setup Strategy Summary Per Type
| Data Type | ||||
|---|---|---|---|---|
beforeAll |
||||
beforeAll via | ||||
| ||||
9. Test Environment Requirements
| |||
| |||
Environment requirements:
Staging must haveNEXT_PUBLIC_SERVICE_MODE=mock(no real BaaS)Staging SQLite DB seeded with synthetic test data (no real PII)Monitoring enabled (Fly.io metrics)
10. Test Data Requirements
| Test | | ||
| |||
| Test recipients (for remittance) | in |
||
beforeEach with unique email |
DataSeed cleanup:command: Allnpm run db:seed (populates staging SQLite with synthetic test data removed after test run via Vitest afterEach teardown. Staging DB reset between major test runs.data)
Teardown 11. Risk-Based Test Prioritization
Strategy
afterEach |
||||
afterEach |
||||
Rule: Tests must not leave state that affects other tests. Each test creates its own isolated data.
Test Accounts
| Account | Role | Purpose | ||
|---|---|---|---|---|
| Consumer (Amir) | [email protected] |
Standard |
||
[email protected] |
||||
e2e-fresh-{timestamp}@test.alai.no |
Credentials stored in: Vaultwarden (vault.basicconsulting.no) → "Drop E2E Test Accounts"
5. Authentication Handling in Tests
Strategy: API-based auth — authenticate via POST /api/auth/login in beforeAll, save storage state, reuse for all tests in the suite. Only use UI login when testing the login flow itself.
// playwright.config.ts approach:
// 1. beforeAll: POST /api/auth/login → save JWT cookie to storage state
// 2. Each test that needs auth: restore storage state (< 1ms overhead)
// 3. Tests for login UI: always fresh (no saved state)
Session reuse:
- Session state saved per role (consumer, merchant) after first auth
- Reused for all tests requiring that role
- JWT expires in 7 days — within test run duration
6. Test Environment Requirements
| Requirement | Specification | |||
|---|---|---|---|---|
| Environment | https://drop-staging.fly.dev/) |
|||
|
||||
NEXT_PUBLIC_SERVICE_MODE=mock); |
||||
| Stability | ||||
| Data persistence | ||||
| Response times |
Critical: E2E tests must NOT run against a production environment. Drop handles financial data — all E2E tests use mock BaaS exclusively.
7. Flaky Test Management Strategy
Definition: A test that fails inconsistently for the same code.
Prevention:
- Use explicit waits:
waitForResponse('/api/...')notpage.waitForTimeout(1000) - Isolate test data — unique emails per test run (
e2e-fresh-{Date.now()}@test.alai.no) - Use
data-testidselectors — not CSS classes or text (can change with Norwegian/English toggle) - Disable animations in test env via
prefers-reduced-motion
Detection:
- Any test failing > 5% of runs without code changes = flaky
- Playwright HTML report shows flaky tests in CI artifacts
Response:
- Tag flaky test with
test.fixme()annotation in Playwright - Create Mission Control task with P2 priority
- Fix within 3 days or remove the test
- Monthly flaky test review during sprint retrospective
8. Visual Regression Testing
Approach: Playwright screenshot comparisons on critical screens.
Baseline: Stored in src/drop-app/__tests__/e2e/snapshots/ (committed to repo)
Source of Truth: Figma Make export: mockups/figma-make-export/src/components/
| Check | Scope | Trigger |
|---|---|---|
| Dashboard screenshot | Dashboard screen | Post-staging deploy |
| Send Money form | Remittance form | On UI changes |
| QR Scan screen | QR payment screen | On UI changes |
| Mobile 375px layout | All critical screens | On responsive changes |
Review process: Screenshot diffs require Builder + Validator sign-off before merge. Figma is the source of truth — any diff vs Figma is a regression.
9. Performance Assertions Within E2E
| Assertion | Metric | Threshold | Journey |
|---|---|---|---|
| Page load | Time to Interactive | < 3,000ms | Dashboard, Send Money |
| Core Web Vitals — LCP | Largest Contentful Paint | < 2,500ms | Homepage, Dashboard |
| API response | Remittance endpoint | < 1,000ms | Journey 3 |
| API response | Login endpoint | < 1,000ms | Journey 2 |
| API response | Exchange rates | < 200ms | Journey 3 (rates call) |
10. CI Integration
Trigger: Post-staging deployment (GitHub Actions workflow: .github/workflows/e2e.yml)
Parallelization:
- 3 Playwright projects run in parallel: user-flows, full-flows, input-chaos
- 2 workers per project on CI (total: 6 parallel Playwright workers)
- Estimated total time: < 10 minutes
CI configuration:
# .github/workflows/e2e.yml
# Key settings:
# - Projects: user-flows, full-flows, input-chaos
# - Retries: 1 (flaky detection; not masking failures)
# - Timeout per test: 30,000ms
# - Timeout total: 600,000ms (10 min)
# - Base URL: https://drop-staging.fly.dev/
On failure:
- Collect screenshots, videos, Playwright traces as CI artifacts
- Retain artifacts for 7 days
- Alert Slack #drop-e2e-failures on alai-talk.slack.com
- Block production deployment until fixed
11. Test Report Format & Artifacts
Report format: Playwright HTML report + JUnit XML for CI Report location: GitHub Actions CI artifacts (7-day retention)
Artifacts collected on failure:
| Artifact | Format | When Collected |
|---|---|---|
| Screenshot | PNG | On step failure |
| Screen recording | WebM video | On test failure |
| Network trace | HAR file | On test failure |
| Browser console log | JSON | On test failure |
| Playwright trace | .zip (Playwright trace viewer) |
On test failure |
12. DependenciesMaintenance & AssumptionsStrategy
Dependencies:Page Object Pattern:
StagingAllenvironmentpageprovisionedinteractionsandwrappedaccessibleinatlightweighthttps://drop-staging.fly.dev/Page Object classesMockSelectorsBaaS and Mock Sumsub configuredcentralized instaging environment variablestests/e2e/pages/PlaywrightLocation:installed in CI (npx playwright installsrc/drop-app/__tests__/e2e/pages/)
Assumptions:Selector strategy (Drop-specific):
data-testidattributes — preferred (e.g.,data-testid="remittance-amount")- ARIA roles + accessible name (e.g.,
getByRole('button', { name: 'Send penger' })) - Text content — acceptable for stable Norwegian/English text
- CSS class names — avoid (Tailwind classes can change)
- XPath — never
Review cadence:
FeatureE2ErequirementstestswillupdatednotinchangesameduringPR as feature changes (tests are part of thetesting phase without John (AI Director) reviewPR)AllMonthlyBuilderreview:agent PRs includeremove testsalongsideforcodedeprecated featuresValidatorFigma-make-exportagentcheckedreviewsaftertesteveryfilesUIbefore mergeBaaS partnership not confirmed — mock mode accepted for MVP/stagingchange
13. Defect Management Process
Bug tracker: Mission Control tasks + Slack #drop-bugs on alai-talk.slack.com
Severity levels:
Bug lifecycle: Open → Assigned (Mission Control) → In Progress → Fixed → Verified by Validator → Closed
Triage cadence: On each PR/commit (CI-driven); daily for active test phase
14. Test Deliverables
Related Documents
- Test Strategy
- Test
Case TemplatePlan E2ETestPlanCase Template- Performance Test Plan
Definition of DoneUAT Sign-off- Testing Guide
- Test Inventory
Approval
| Role | Name | Date | Signature |
|---|---|---|---|
| Author | John (AI Director) | 2026-02-23 | Approved (AI) |
| QA Lead | Validator Agent | 2026-02-23 | Approved (AI) |
| AI Director (John) | John | 2026-02-23 | Approved |
| CEO (Alem) | Alem Bašić | TBD |