This page complements the main testing page. The difference is that this page focuses on “if I want to test a specific feature, what exact steps should I run?”
Automated commands
| Command | When to use it |
|---|---|
npm run env:check | Before debugging a feature that may not be ready |
npm run lint | Before commit or deployment |
npm run typecheck | After TypeScript or schema changes |
npm test | To verify route, provider, and helper logic |
npm run e2e | To smoke test the main public flows |
Manual recipes by area
Auth and dashboard
Auth and dashboard
Steps:
- Open
/auth/sign-upand create a new test account. - Verify that the default profile and subscription records also exist.
- Log in through
/auth/login. - Make sure
/dashboardopens. - Test forgot password and update password.
- login succeeds,
- the dashboard renders,
- no strange redirect happens after the auth callback.
Profile and avatar
Profile and avatar
Steps:
- Log in with a test user.
- Open
/dashboard/settings. - Change the full name.
- Upload a PNG avatar under 2 MB.
- Save the profile.
POST /api/profile/avatarsucceeds,POST /api/profilesucceeds,- the new avatar appears in the UI,
- the old avatar no longer persists after refresh.
Waitlist and contact
Waitlist and contact
Steps:
- Open
/waitlistand submit a test email. - Submit the same email again to verify duplicate handling.
- Open
/contactand send a test message.
- waitlist insert succeeds,
- duplicates return a clear response,
- the contact form sends email or fails with an explainable message.
Billing and checkout
Billing and checkout
Steps:
- Log in with a test user.
- Open
/dashboard/billing. - Pick a plan.
- run a Midtrans or Doku sandbox checkout.
- Make sure the order page opens after the flow.
- a
paymentsrow is created withPENDING, - the provider webhook arrives,
- the payment moves to the correct final state,
- the subscription becomes active if payment succeeds.
Midtrans or Doku webhook
Midtrans or Doku webhook
Steps:
- Make sure the test order already exists.
- Trigger the sandbox webhook from the provider.
- Inspect
webhook_events,payments, andsubscriptions. - Check the admin dashboard.
- the event is recorded,
- duplicate delivery does not create duplicate side effects,
- the audit log also grows.
Admin dashboard
Admin dashboard
Steps:
- Make sure the test account has the
adminrole. - Open
/admin. - Check metrics, payment history, webhook events, and audit trail.
- Test a role change for another user.
- the admin panel opens,
- data renders,
- the role update succeeds and is written into the audit log.
AI routes
AI routes
Steps:
- Log in with a test user on the right plan.
- Call
POST /api/ai/generatewith a simple prompt. - Call
POST /api/ai/chatfrom UI or a test client. - Verify the behavior when quota is nearly exhausted or rate limits are hit.
- valid requests return output,
ai_usageincreases,429and503responses are understandable when triggered.
Most time-efficient test order
npm run env:check- auth
- profile
- payments and webhooks if active
- admin if active
- AI if active
GET /api/health