QC — Cashier Management
Test cases mapped to acceptance criteria in spec.
AC-01 Shop creates Cashier
| ID | Steps | Expected |
|---|---|---|
| QC-CA-01 | Shop creates cashier with username, email, phone | Cashier active, belongs to correct shop |
| QC-CA-02 | Suspend cashier with active shift | Sessions revoked, shift → suspended |
| QC-CA-03 | Unsuspend cashier | Status active, can log in again |
AC-02 Cashier login
| ID | Steps | Expected |
|---|---|---|
| QC-AU-01 | Login with username | Token + session |
| QC-AU-02 | Login with email/phone | Token + session |
| QC-AU-03 | Login on unapproved device | Device pending (shop approve) |
AC-03 Scheduled shift
| ID | Steps | Expected |
|---|---|---|
| QC-SH-01 | Shop creates shift with cashier + device + time | Status scheduled |
| QC-SH-02 | Create overlapping shift for same cashier | 409 SHIFT_OVERLAP |
| QC-SH-03 | Create overlapping shift for same device | 409 SHIFT_OVERLAP |
| QC-SH-04 | No-show after grace period | Status no_show, notify shop |
AC-04 Start shift
| ID | Steps | Expected |
|---|---|---|
| QC-ST-01 | Cashier starts with opening denominations | Status active, actualStartAt set |
| QC-ST-02 | Start on wrong device fingerprint | 403 DEVICE_MISMATCH |
| QC-ST-03 | Start when another active shift exists | 409 SHIFT_ALREADY_ACTIVE |
AC-05 Transactions
| ID | Steps | Expected |
|---|---|---|
| QC-TX-01 | Deposit cash | Credit added, cashDelta +, deviceId recorded |
| QC-TX-02 | Redeem below threshold | Immediate complete |
| QC-TX-03 | Redeem exceeds threshold | pending_approval |
| QC-TX-04 | Shop approves redemption | Credit deducted, tx completed |
| QC-TX-05 | Tx when shift auto_locked | 409 SHIFT_LOCKED |
AC-06 Cash drop
| ID | Steps | Expected |
|---|---|---|
| QC-CD-01 | Cashier creates drop | pending_receiver_confirmation |
| QC-CD-02 | Shop confirms drop | confirmed, expected closing reduced |
AC-07 Blind closing
| ID | Steps | Expected |
|---|---|---|
| QC-CL-01 | Close without seeing expected before submit | API does not leak expected |
| QC-CL-02 | Close balanced | pending_reconciliation |
| QC-CL-03 | Close with discrepancy | pending_manager_review |
AC-08 Reconciliation
| ID | Steps | Expected |
|---|---|---|
| QC-RC-01 | Manager reconcile + finalize | completed / completed_with_discrepancy |
| QC-RC-02 | Manager add adjustment | Expected recalculated |
AC-09 Platform
| ID | Steps | Expected |
|---|---|---|
| QC-PF-01 | Shop Portal add cash (CDN flow) | 200, credits moved; no cashier/shift ledger |
| QC-PF-02 | Cashier deposit cash (active shift) | 200, cashier_transactions + cashDelta recorded |
| QC-PF-03 | Auto-lock sau scheduled end | auto_locked, notify |
Ship gate checklist
- All QC cases above pass manual or automated
- No production path uses POST /cashier/shifts/open|close (410 deprecated)
- Shop 10 screens + Cashier 7 screens reachable
- Migration applied on target DB