Task-kiosk-260 — Manual Test Cases
Feature version: V1.2.0
Reference doc: Task-kiosk-260 spec
Result notation: ✅ Pass | ❌ Fail | ⏭ Skip | 🐛 Fail + bug report
Changelog
| Date | Version | Change | Author |
|---|
| 2026-06-20 | v1.0 | QC checklist ngắn (T-1 → T-6) | — |
| 2026-06-20 | v1.1 | Mở rộng thành manual test cases đầy đủ cho QC | — |
| 2026-06-20 | v1.2 | Sửa TC-001: shop/agent USD withdrawal là auto payout | — |
| 2026-06-20 | v1.3 | Sửa điều hướng UI: bỏ “tab Activity” | — |
| 2026-06-20 | v1.4 | Xóa TC Transaction Reversal / Refund payout-fail (không tái hiện được trên staging); đánh số lại | — |
Mục tiêu kiểm thử
Xác nhận Admin Portal không còn dùng “Adjustment” làm nhãn chung, và phân biệt rõ các loại hiển thị có thể tái hiện trên staging:
| Nghiệp vụ | UI label mong đợi | Manual QC |
|---|
| Admin trừ balance sửa sai | Balance Correction — Debit | ✅ TC-001 |
| Admin cộng balance sửa sai | Balance Correction — Credit | ✅ TC-002 |
| Đảo giao dịch đã post | Transaction Reversal | ⏭ Không manual — xem §Out of scope |
| Trả tiền/credit cho user | Refund | ⏭ Một phần — game wallet TC-003; payout-fail xem §Out of scope |
Lưu ý: DB enum UsdWalletTransaction.type vẫn là adjustment / reversal — chỉ đổi presentation layer.
Out of scope — không manual test trên staging
Các scenario sau không tái hiện được trên môi trường QC hiện tại (shop/agent USD withdrawal luôn auto payout; không còn admin reject pending):
| Scenario | Lý do bỏ manual QC | Coverage thay thế |
|---|
| Transaction Reversal (admin reject USD withdrawal) | Không tạo withdrawal pending manual; reject bị chặn khi autoPayout: true | Unit test backend usdLedgerDisplayCategoryService; verify trên prod nếu có data cũ |
| Refund (portal payout fail → hoàn USD) | Staging skip external payout → completed ngay; cần gateway fail thật | Unit test backend; prod monitoring |
Điều kiện trước khi test
| # | Yêu cầu | Cách kiểm tra |
|---|
| P-1 | Backend dev (hoặc staging) đã deploy branch có K260 | API ledger row có displayCategory, displayLabel, audit, links |
| P-2 | Admin Portal + @kioskgaming/ui đã deploy (fix list table TYPE/amount) | Row finance correction hiện Balance Correction — Debit, amount âm |
| P-3 | Tài khoản super_admin hoặc finance_admin | Finance correction, refund game wallet |
| P-4 | Shop/agent có USD balance đủ test | Wallets → USD Wallets |
| P-5 | Ghi chú môi trường | URL, ngày, tester, build |
Điều hướng Admin
USD ledger: Sidebar Wallets → USD Wallets → Owner type + Owner → bảng USD wallet transactions → View mở modal detail.
Credit ledger: Wallets → Credit Wallets → Credit transactions.
Kiểm tra nhanh API (tùy chọn)
DevTools → GET .../usd-wallets/.../ledger → row adjustment có displayLabel, displayCategory, audit.
TC-K260-001 — Balance Correction — Debit (finance correction) 🆕 NEW
Precondition: Super/finance admin; shop hoặc agent có USD balance ≥ số tiền correction.
| # | Description | Steps | Expected Result | Actual Result |
|---|
| 1 | Mở modal correction | Account management → shop/agent → Balance correction (debit) | Modal có Balance Correction — Debit (không “Adjustment”) | |
| 2 | Submit correction | Ticket ID, Reason, Amount nhỏ (vd. $1) → Submit | Balance giảm đúng | |
| 3 | Label trên ledger | USD Wallets → cùng owner → row vừa tạo | Balance Correction — Debit; amount -$… (đỏ) | |
| 4 | Detail | View detail row | Correction details: Ticket ID, Reason, Initiated By | |
| 5 | Không “Adjustment” | List + detail | Không chuỗi user-facing Adjustment | |
TC-K260-002 — Balance Correction — Credit (shop CDN credit-adjust) 🆕 NEW
Precondition: Admin có quyền credit-adjust shop. USD wallet credit correction thuần out of scope V1.2.0.
| # | Description | Steps | Expected Result | Actual Result |
|---|
| 1 | Credit-adjust credit | Shop → credit adjust credit (amount nhỏ) + reason | Credit wallet tăng | |
| 2 | Credit ledger label | Credit Wallets → shop → row adjust | Balance correction / Balance Correction — Credit — không “Adjustment” | |
| 3 | Debit adjust (nếu có quyền) | Credit adjust debit | Label debit rõ ràng | |
TC-K260-003 — Refund (admin refund game wallet) 🆕 NEW
Precondition: Game wallet có transaction refundable.
| # | Description | Steps | Expected Result | Actual Result |
|---|
| 1 | Refund transaction | Game Wallets → Refund failed tx + reason | Thành công | |
| 2 | Table label | Row vừa refund | Refund (không Reversal / Adjustment) | |
| 3 | Filter | Filter direction/type | Option adjustment = Balance correction | |
TC-K260-004 — Legacy row / fallback 🆕 NEW
Precondition: Row adjustment cũ (metadata thưa) nếu có.
| # | Description | Steps | Expected Result | Actual Result |
|---|
| 1 | Legacy adjustment | USD Wallets → row adjustment cũ | Không crash; fallback Credit/Debit theo delta — không “Adjustment” | |
| 2 | Reason trống | Detail không có reason | No reason recorded. | |
TC-K260-005 — USD Wallet UI (list + detail) 🆕 NEW
Precondition: Đã chạy TC-001 (và TC-002 nếu có).
| # | Description | Steps | Expected Result | Actual Result |
|---|
| 1 | List column Type | Bảng USD wallet transactions | Cột type = displayLabel | |
| 2 | Detail Correction | View row TC-001 | Section Correction details | |
| 3 | Amount sign | Row debit correction | Balance before > after; amount hiển thị âm | |
TC-K260-006 — CSV export USD ledger 🆕 NEW
| # | Description | Steps | Expected Result | Actual Result |
|---|
| 1 | Export | USD Wallets → Export CSV (period chứa TC-001) | File OK | |
| 2 | Correction label | CSV row correction | Balance Correction — Debit khớp UI | |
| 3 | Raw type | Cột raw type (nếu có) | Vẫn adjustment | |
TC-K260-007 — Các màn Admin khác 🆕 NEW
| # | Description | Steps | Expected Result | Actual Result |
|---|
| 1 | Player wallet tx | Players → transactions | Filter adjustment → Balance correction | |
| 2 | Agent CDN tx | Agents → wallet tx | adjustment → Balance correction | |
| 3 | Finance correction modal | Mở modal debit | Balance Correction — Debit | |
| 4 | Game wallet filter | Game wallet filter | adjustment = Balance correction | |
TC-K260-008 — Regression & Acceptance Criteria 🆕 NEW
| # | Description | Steps | Expected Result | Actual Result |
|---|
| 1 | AC-1 — Không “Adjustment” | Quét USD/Credit/Game/Player wallet + export | Không label Adjustment in-scope | |
| 2 | AC-2 — Credit vs Debit | TC-001 vs TC-002 | Hai label khác nhau | |
| 3 | AC-5 — Reason + Initiated By | Detail correction (TC-001) | Reason + Initiated By (hoặc empty state) | |
| 4 | Deposit / withdrawal unchanged | Row deposit + withdrawal | Deposit / Withdraw không đổi nhầm | |
TC-K260-009 — API filter & tương thích ngược 🆕 NEW
| # | Description | Steps | Expected Result | Actual Result |
|---|
| 1 | Filter type=adjustment | Filter ledger adjustment | Rows vẫn trả; displayLabel đổi | |
| 2 | Filter type=reversal | Filter reversal (nếu có row) | Filter OK; label từ API/fallback | |
Checklist ký duyệt QC
| Mục | Pass? | Ghi chú |
|---|
| TC-K260-001 Balance Correction — Debit | ☐ | |
| TC-K260-002 Balance Correction — Credit | ☐ | |
| TC-K260-003 Game wallet Refund | ☐ | |
| TC-K260-004 Legacy fallback | ☐ | |
| TC-K260-005 USD UI list + detail | ☐ | |
| TC-K260-006 CSV export | ☐ | |
| TC-K260-007 Other admin surfaces | ☐ | |
| TC-K260-008 Regression / AC | ☐ | |
| TC-K260-009 API filter | ☐ | |
| Out of scope: Transaction Reversal / payout Refund | ☐ N/A | Unit test / prod only |
Tester: _______________
Ngày: _______________
Môi trường: _______________
Kết luận: ☐ Pass release · ☐ Fail — bug list attached
Ghi chú khi báo bug
- Screenshot list + detail.
- Ledger row id /
transactionId.
- JSON:
type, displayCategory, displayLabel, audit.
- Steps từ bảng test case.