UAT Test Accounts
Overview
QA test accounts are seeded into the UAT (and dev) database via scripts/seedE2eUsers.ts. Each account is pre-configured with a specific persona so that testers can exercise every role without setting up fresh users.
The seed script is idempotent — re-running it is always safe. On each run it:
- Creates the PostgreSQL user profile if absent, or reconciles
isSuperAdminandpaymentStatusif present - Creates the Better Auth credential account if absent, or updates the password hash to match the current
QA_TEST_PASSWORD - Assigns hospital admin roles and supervisor cross-references as needed
QA Test Account Personas
All accounts use Australian regulatory context (AHPRA) and have paymentStatus=completed so they bypass the payment gate and land directly on the dashboard.
| Password | Role | User Type | Access | isSurgeon | |
|---|---|---|---|---|---|
test-cpd@ppp-test.com | PppTest1 | General Practitioner | consultant | CPD only | true |
test-cpd-nc@ppp-test.com | PppTest1 | Registrar | non-consultant | CPD only | false |
test-full@ppp-test.com | PppTest1 | Consultant Surgeon | consultant | CPD + PPP | true |
test-full-nc@ppp-test.com | PppTest1 | Registrar | non-consultant | CPD + PPP | false |
test-hospital@ppp-test.com | PppTest1 | Hospital Administrator | hospital_staff | Hospital panel (admin) | false |
test-hospital-exec@ppp-test.com | PppTest1 | Hospital Executive | hospital_staff | Hospital panel (exec) | false |
test-superadmin@ppp-test.com | PppTest1 | Platform Administrator | consultant | Full access + super admin | false |
Supervisor wiring
scripts/seedSupervisors.ts (data in scripts/seed-data/supervisorSeedData.ts) seeds three supervisor candidates and wires each non-consultant account to two different ones (a clinician cannot be both Educational and Clinical supervisor of the same trainee), so ProfileCompletionGuard does not redirect them to /my-profile:
| Account | Educational (Professional) Supervisor | Clinical Supervisor |
|---|---|---|
test-cpd-nc@ppp-test.com | Helen Warwick | Raj Mehta |
test-full-nc@ppp-test.com | Raj Mehta | Aisha Okonkwo |
They are not wired to test-full@ppp-test.com. Any further supervisors seen on a shared environment (for example Sarah Chen) were added by hand or by other seeds. Seeded personas may still have incomplete profile items (for example Default Working-Calendar Start) and land on My Profile; complete those by hand before a demo.
Running the Seed Script
UAT — via CD pipeline (automatic)
The CD workflow (cd.yml) runs scripts/seedE2eUsers.ts automatically on every deployment to UAT, passing E2E_TEST_PASSWORD from GitHub Actions secrets. QA accounts use the script's default password (PppTest1) unless QA_TEST_PASSWORD is also set in the environment.
UAT — manually
cd api/backend-ppp
doppler run --project ppp --config uat -- \
env INSTANCE_ID=pppUat tsx scripts/seedE2eUsers.tsNote: Use
tsx scripts/seedE2eUsers.tsdirectly rather thanpnpm seed:e2e. Theseed:e2enpm script runs viadotenvx ... --overloadwhich loads.env.testand overwritesINSTANCE_IDback topppDev.
Dev
cd api/backend-ppp
pnpm seed:e2e
# INSTANCE_ID defaults to pppDevWithout Doppler
cd api/backend-ppp
QA_TEST_PASSWORD=PppTest1 INSTANCE_ID=pppUat pnpm tsx scripts/seedE2eUsers.tsE2E Automated Test Accounts
These are used exclusively by Playwright — not for human login.
| Password | Role | Access | |
|---|---|---|---|
e2e-ppp-consultant@ppp-test.local | E2eTest123!@ | Consultant Surgeon | CPD + PPP |
e2e-ppp-nonconsultant@ppp-test.local | E2eTest123!@ | Registrar | CPD + PPP |
e2e-cpd-only@ppp-test.local | E2eTest123!@ | GP | CPD only |
e2e-admin-full@ppp-test.local | E2eTest123!@ | Head of Department | CPD + PPP + super admin |
e2e-admin-only@ppp-test.local | E2eTest123!@ | System Administrator | PPP only + super admin |
E2E passwords are controlled by the E2E_TEST_PASSWORD env var (default E2eTest123!@).
Safety Guards
- Production safety:
scripts/seedE2eUsers.tshas no automatic production guard. Verify the target environment before running — ensureINSTANCE_IDtargets UAT or dev, never production. - Idempotent: Re-running is always safe —
isSuperAdminandpaymentStatusare reconciled, passwords are re-hashed to the current password env var, and nothing is duplicated.