Test Plan — Events admin KPI summary (Approach A)¶
Generated by /plan-eng-review on 2026-04-01
Target implementation branch: feature/events-admin-kpis.
Repo: rakletadmin/rakletv3
Affected pages/routes¶
- Admin Events list:
admin.raklet.com/ng#/manager/events/(or equivalent) — KPI strip above existing list; period 30/60/90; refresh. - API:
GET v2/organisations/{organisationId}/events/summary— auth, presets (last30/60/90,thisweek,thismonth/mtd,thisyear,lastweek,lastmonth,lastyear,ytd, customfromUtc+toUtc), aggregation mode, cache behavior.
Key interactions to verify¶
- Period change: Switching 30 → 60 → 90 days refetches (or cache hit) and updates all tiles; no stale numbers from prior period without loading state.
- Refresh: Forces bypass cache (if implemented); UI shows loading; numbers update.
- Multi-currency org: At least two currencies show separate revenue blocks; no single mixed total.
- Empty period: Zero events in range shows zeros or explicit empty copy, not error.
- Permission: Non-manager user cannot get summary (same as events list).
Edge cases¶
- Org with no events: Summary loads without 500.
- Invalid preset / bad range: API returns 400 with clear message; UI does not blank entire page.
- Cache cold: First load shows spinner; within TTL, second load is fast (manual timing or server log).
- Timezone boundary: Event at period edge; compare to product rule from spike (start vs payment date).
Critical paths¶
- End-to-end: Open Events → summary matches manual sum of per-event detail for same window on a sample org (single currency first, then multi).
- Check-in total: If shown, must match sum of check-in logic used on event detail (ticket-derived), not a different definition.
Automated tests (recommended)¶
- Unit: Preset →
fromUtc/toUtcresolution (last 30 rolling at known "now"). - Unit:
revenueByCurrencygrouping from mockEventDoclist. - Integration: Summary endpoint returns 200 with
HasOrganisationAccess; wrong org returns 403/404 per existing pattern. - Optional: Cache key includes org + bounds + schema version; second request hits cache (if test host wires cache).
Codex-driven cases (add when implementing)¶
- Recurring: parent vs occurrences, boundary moves, archived/unpublished.
- Cache: after purchase, refund/coupon, manual check-in, Zoom with payment, Zoom without payment — summary freshness or documented TTL.
- Labels: If using EventDoc lifetime sums for events-in-window, UI copy matches Mode A (see main design doc Codex section).
Notes¶
- Selenium/UI suites:
Raklet.UI.Test.*— add case only if project pattern covers manager ng routes.