QC — Cashier Management
Test cases mapped to acceptance criteria in spec.
AC-01 Shop tạo Cashier
| ID | Steps | Expected |
|---|---|---|
| QC-CA-01 | Shop tạo cashier với username, email, phone | Cashier active, thuộc đúng shop |
| QC-CA-02 | Suspend cashier đang active shift | Sessions revoked, shift → suspended |
| QC-CA-03 | Unsuspend cashier | Status active, có thể login lại |
AC-02 Cashier login
| ID | Steps | Expected |
|---|---|---|
| QC-AU-01 | Login bằng username | Token + session |
| QC-AU-02 | Login bằng email/phone | Token + session |
| QC-AU-03 | Login trên device chưa approve | Device pending (shop approve) |
AC-03 Scheduled shift
| ID | Steps | Expected |
|---|---|---|
| QC-SH-01 | Shop tạo shift với cashier + device + time | Status scheduled |
| QC-SH-02 | Tạo shift overlap cùng cashier | 409 SHIFT_OVERLAP |
| QC-SH-03 | Tạo shift overlap cùng device | 409 SHIFT_OVERLAP |
| QC-SH-04 | No-show sau grace | Status no_show, notify shop |
AC-04 Start shift
| ID | Steps | Expected |
|---|---|---|
| QC-ST-01 | Cashier start với opening denominations | Status active, actualStartAt set |
| QC-ST-02 | Start trên device sai fingerprint | 403 DEVICE_MISMATCH |
| QC-ST-03 | Start khi đã có active shift khác | 409 SHIFT_ALREADY_ACTIVE |
AC-05 Transactions
| ID | Steps | Expected |
|---|---|---|
| QC-TX-01 | Deposit cash | Credit cộng, cashDelta +, deviceId ghi |
| QC-TX-02 | Redeem dưới threshold | Immediate complete |
| QC-TX-03 | Redeem vượt threshold | pending_approval |
| QC-TX-04 | Shop approve redemption | Credit trừ, tx completed |
| QC-TX-05 | Tx khi shift auto_locked | 409 SHIFT_LOCKED |
AC-06 Cash drop
| ID | Steps | Expected |
|---|---|---|
| QC-CD-01 | Cashier tạo drop | pending_receiver_confirmation |
| QC-CD-02 | Shop confirm drop | confirmed, trừ expected closing |
AC-07 Blind closing
| ID | Steps | Expected |
|---|---|---|
| QC-CL-01 | Close không thấy expected trước submit | API không leak expected |
| QC-CL-02 | Close balanced | pending_reconciliation |
| QC-CL-03 | Close có 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