Test Plan
Automated Tests
Run:
npm test
Current unit coverage:
src/lib/time.test.tssrc/lib/summary.test.tssrc/lib/analytics.test.tssrc/lib/drift.test.tssrc/lib/rate-limit.test.ts
Build and Lint Gates
npm run lint
npm run build
Functional Manual Checks
A. Auth and Security
- Setup initial account via
/setup. - Login/logout flow.
- Trigger repeated invalid login attempts and confirm rate-limit errors.
- Verify mutating actions fail on invalid cross-origin requests.
B. Team and RBAC
- Create member/admin on
/settings/team. - Update roles (owner only).
- Verify member cannot access owner/admin-only automation/team actions.
- Verify team dashboard aggregates across team users.
C. Daily Workflow
- Add/delete logs.
- Create/delete planning allocations.
- Verify drift cards update.
- Generate AI narrative and verify persistence.
D. Analytics
- Open
/analyticswith custom date range and filters. - Verify weekly and monthly pages reflect selected windows.
- Check chart + drill-down values against raw logs.
E. Export and Automation
- Download personal and team CSV/PDF reports.
- Create scheduled exports in
/settings/automation. - Run
npm run cron:exportsand verify files underexports/<userId>/. - Verify audit log events are created for key actions.