Synced from the repo — do not edit here
Canonical source: QA_GUIDE.md. This page is generated by docs/scripts/sync-handbook.mjs. Edit the source file in the repo; changes appear here on the next build.
QA Guide — Basis Health Platform
For QA contractors, testers, and reviewers. This guide covers how to review PRs, report bugs, and verify fixes on the Basis Health Platform.
Quick Start
- Get access: Request GitHub repo access and staging environment credentials from the project lead
- Read first: Skim
CLAUDE.md(project rules) andFEATURES.md(feature status) - Review PRs: Follow the PR Review Checklist below
- Report bugs: Use the GitHub Issue templates
- Track time: Log hours against issue numbers
Environment Access
| Environment | URL | Purpose |
|---|---|---|
| Production | platform.basishealth.io | Live — DO NOT test destructive actions here |
| Staging | Preview channel URLs (posted on PRs) | Safe to test anything |
| Emulator | localhost:5050 (local only) | Full offline testing |
Test Accounts
Use the Admin role for testing (not System Admin — it bypasses permission checks).
Ask the project lead for:
- Staging clinic ID
- Test user credentials
- Stripe test mode keys (if testing payments)
PR Review Checklist
Every PR review should cover these areas:
1. Functional Verification
- Changes match the PR description
- New features work as described
- Edge cases handled (empty states, long text, missing data)
- Error states show user-friendly messages (toasts, not browser alerts)
2. HIPAA Compliance (Critical)
- No patient health information (PHI) in console logs
- No PHI in error messages shown to users
- Permission checks present before accessing patient data
- Audit trail created for significant operations
3. Platform Rules
- Uses
clinicsv2collection (never legacyclinics) - Uses
safeOnSnapshot(never rawonSnapshot) - Uses
useToast()for user feedback (neveralert()) - Uses
camelCasefor all Firestore field names - Firestore data access has fallbacks (
field || '',field ?? 0)
4. Security
- No hardcoded secrets, API keys, or credentials
- No SQL/command injection vectors
- Auth checks present on Cloud Functions
- CORS origins include
localhost:3000for local dev
5. UI/UX
- Responsive on desktop (1024px+) and tablet (768px+)
- Loading states shown during async operations
- Empty states are informative (not blank screens)
- Toast shown on success AND error for every async action
Bug Report Process
Step 1: Reproduce
Before reporting, confirm the bug is reproducible:
- Try in an incognito/private window
- Try with a different test account
- Check if it's browser-specific
Step 2: File Issue
Use the Bug Report template on GitHub Issues. Include:
- Steps to reproduce (numbered, specific)
- Expected behavior
- Actual behavior
- Screenshot or screen recording (required for UI bugs)
- Browser, OS, and role used during testing
Step 3: Severity
Label your bug with the correct severity:
| Label | Meaning | Examples |
|---|---|---|
P0 | Production down, data loss, security breach | Auth bypass, data corruption, site unreachable |
P1 | Major feature broken, no workaround | Can't book appointments, payments fail |
P2 | Feature broken but workaround exists | Filter doesn't work but search does |
P3 | Cosmetic, minor enhancement | Typo, alignment off, color inconsistency |
QA Report Template
After completing a full QA pass on a PR, post a review comment using this format:
## QA Report
**Tested by:** [Your name]
**Date:** [Date]
**Environment:** [Staging URL or local]
**Role:** [Admin / Manager / Medical / etc.]
**Browser:** [Chrome 120 / Safari 17 / etc.]
### Test Results
| Test Case | Status | Notes |
|-----------|--------|-------|
| [Feature/scenario 1] | PASS/FAIL | [Details] |
| [Feature/scenario 2] | PASS/FAIL | [Details] |
### HIPAA Checklist
- [ ] No PHI in console (DevTools → Console)
- [ ] No PHI in network responses (DevTools → Network)
- [ ] Permission errors show generic message
### Issues Found
1. [Issue description + screenshot]
2. [Issue description + screenshot]
### Verdict
- [ ] **APPROVED** — Ready to merge
- [ ] **CHANGES REQUESTED** — Issues must be fixed first
- [ ] **BLOCKED** — Cannot test (missing data/access/etc.)
Testing Specific Areas
Scheduling & Booking
- Create, edit, cancel appointments
- Test recurring appointments
- Test availability conflicts
- Test with different service types and durations
Payments & Billing
- Use Stripe test cards (
4242 4242 4242 4242) - Test membership subscription creation/cancellation
- Verify invoice generation
- Test failed payment scenarios (
4000 0000 0000 0002)
AI / Copilot
- Test Copilot responses for accuracy
- Verify knowledge base search returns relevant results
- Test with different clinic configurations
- Check that AI responses don't contain PHI
Client Portal (basisweb)
- Test patient-facing flows (booking, viewing protocols)
- Verify document upload/download
- Test on mobile viewport (375px width)
Merge Process
- QA reviewer posts QA Report on PR
- If APPROVED: Add
qa:passlabel - Project lead reviews and merges
- Staging deploy auto-triggers on merge
- Production deploy requires manual approval
Never merge without: QA report + qa:pass label + at least 1 human approval
Common Pitfalls
| Pitfall | How to Catch |
|---|---|
| Testing as System Admin | System Admin bypasses all permission checks — always test as Admin role |
| Missing toast on error | Trigger an error (disconnect WiFi, use invalid data) — should see a toast, not silence |
Raw onSnapshot listener | Search PR diff for onSnapshot( — should always be safeOnSnapshot( |
| Stale Firestore permissions | After rule changes, hard-refresh (Cmd+Shift+R) — cached listeners cache denials |
| Date timezone issues | Test with users in different timezones — dates should not shift by 1 day |
Contact
- GitHub Issues: Primary communication channel
- Slack:
#basis-devfor real-time questions - Escalation: Tag project lead on critical/blocking issues