How CivicLoop County OS is tested. Tests verify real behavior (forms save, data is visible, actions persist, no JS errors), never just "page loaded".
cd web && npm test. ~53 specs across smoke (db-integrity, page-scan), feature (auth/mfa/console/dashboard/track/report-flow/admin/notifications/close-flow/voice-intake/duplicate/ai-insights/open311), journey (hero-flow, i18n round-trips, open311 round-trip), cross-cutting (RBAC), and mobile viewport. tests/helpers.ts has loginAsStaff().node scripts/ui-sweep.mjs. Logs in as each role (supervisor, director, admin), visits every page including all County OS modules, /feeds, /assistant, and the public portals, clicks every SAFE button, and FAILS on any uncaught JS error. This is the regression test for client-reference / server-component crashes (the class of bug that produces a blank error boundary). Destructive/navigating buttons are deny-listed; dialogs auto-dismiss.node scripts/prod-smoke.mjs. 20 checks across the app, docs site, and Open311 endpoints. Run before any dress rehearsal and after every deploy.node scripts/record-demo.mjs produces a silent, caption-burned .webm walking all roles + modules; a clean run is a QA pass.node scripts/make-walkthrough-video.mjs doubles as an end-to-end smoke (it logs in and tours every surface) while producing the sales videos.npm run build exits 0 (compile + lint + types).node scripts/ui-sweep.mjs reports 0 errors across all roles and pages.node scripts/prod-smoke.mjs all checks pass.DELETE /api/test-verify?...).information_schema (or the schema dump) before asserting on DB shape..test-TLD accounts on production. Demo staff use @pgc.example.gov.agent@, supervisor@, director@, admin@, mfatest@pgc.example.gov - password in TEST_COUNTY_SETUP.md. Do not reuse the reserved test phone numbers listed there for new tests.
networkidle; the dashboard's auto-refresh can delay it (45s timeout, then continues).