2026-06-05 17:45:17 +00:00
|
|
|
---
|
|
|
|
|
name: api-server data
|
|
|
|
|
description: Nature of the EHSAN POC api-server data store and how to reset it.
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# In-memory mockDb
|
|
|
|
|
|
|
|
|
|
`artifacts/api-server` serves an in-memory `mockDb` (no real database). Any POST that
|
|
|
|
|
mutates a request (donate, verify, publish, deliver, thank-you, etc.) persists only for
|
|
|
|
|
the life of the process. Restart the `artifacts/api-server: API Server` workflow to
|
|
|
|
|
re-seed clean demo data.
|
|
|
|
|
|
|
|
|
|
**How to apply:** after running curl-based API tests that mutate state, restart the
|
|
|
|
|
api-server workflow before screenshots/handoff so the user sees a clean seeded demo.
|
2026-06-06 09:20:10 +00:00
|
|
|
|
|
|
|
|
## Donate e2e: use OPEN cases only
|
|
|
|
|
Seed cases req-001..req-006 are already in later pipeline stages (fully funded,
|
|
|
|
|
remaining 0). The donate page clamps any donation to the case's remaining target, so
|
|
|
|
|
on those cases the amount silently becomes 0 and the donate POST returns 400 — you
|
|
|
|
|
never reach the success screen. For donation/success-screen e2e, use a `published`
|
|
|
|
|
case with remaining > 0 (e.g. req-007, req-012..req-017).
|
|
|
|
|
**Why:** cost 3 failed test runs chasing a non-bug. The clamp + funded-seed
|
|
|
|
|
interaction is not obvious from the UI alone.
|