Part of the Full App QA Pass (#281). Covers the platform operator tier — the super-admin surface that sits above school admins and is not touched by any existing sub-issue (those all test the per-tenant school admin).
Scope
The /platform/* console and /dashboard/admin/tenants, gated by isSuperAdmin() (queries the super_admins table directly — does NOT trust JWT).
Persona
| Who |
Email |
Note |
| Super Admin |
owner@e2etest.com |
seeded in super_admins (also Default School admin) |
| Normal admin |
creator@codeacademy.com |
NOT a super admin — used for negative guard test |
Routes Under Test
| Route |
Description |
/platform |
Platform operator landing/overview |
/platform/tenants · /platform/tenants/[tenantId] |
All tenants across the platform; drill-in |
/platform/billing |
Platform-wide billing/MRR |
/platform/plans |
Platform plan catalog (free/starter/pro/business/enterprise) |
/platform/referrals |
Referral codes + redemptions |
/dashboard/admin/tenants |
Super-admin tenant switcher (in the school admin shell) |
Test Cases
Access Control (P0)
Tenants Console
Platform Billing & Plans
Referrals
Tenant Switcher
Definition of Done
- All
/platform/* routes load for super admins, redirect for everyone else
- Tenant list/detail figures reconcile with DB
- Referrals page does not crash on the missing tables
- No cross-tenant leakage in the operator console
Found during the post-#281 gap analysis: this whole privilege tier had zero QA coverage.
Part of the Full App QA Pass (#281). Covers the platform operator tier — the super-admin surface that sits above school admins and is not touched by any existing sub-issue (those all test the per-tenant school admin).
Scope
The
/platform/*console and/dashboard/admin/tenants, gated byisSuperAdmin()(queries thesuper_adminstable directly — does NOT trust JWT).Persona
owner@e2etest.comsuper_admins(also Default School admin)creator@codeacademy.comRoutes Under Test
/platform/platform/tenants·/platform/tenants/[tenantId]/platform/billing/platform/plans/platform/referrals/dashboard/admin/tenantsTest Cases
Access Control (P0)
owner@e2etest.com(super admin) can load every/platform/*routecreator@codeacademy.com(non-super) →/platform/*and/dashboard/admin/tenantsredirect away (no leak)/auth/loginsuper_adminstable, not JWT claims (can't be spoofed)Tenants Console
/platform/tenantslists all tenants (currently 2: Default School, Code Academy Pro) with plan, status, counts/platform/tenants/[tenantId]shows tenant detail (users, courses, billing)Platform Billing & Plans
/platform/billingshows platform-wide revenue/MRR; figures reconcile withplatform_subscriptions(1 active)/platform/planslists all 5 plans with correct prices ($0/$9/$29/$79/$199) and limitsReferrals
/platform/referralsloads without errorreferral_codes/referral_redemptions, which do not exist in the DB — verify the page degrades gracefully (empty state) rather than crashing, or fix the missing tables/featureTenant Switcher
/dashboard/admin/tenantslets a super admin switch active tenant; after switchsupabase.auth.refreshSession()updates JWT claims (per CLAUDE.md)Definition of Done
/platform/*routes load for super admins, redirect for everyone elseFound during the post-#281 gap analysis: this whole privilege tier had zero QA coverage.