Files
pos-system/apps/web-client-tpos-net/SUPERADMIN_TEST_REPORT.md
Ho Ngoc Hai b378f39872 fix(audit): implement audit logging pipeline and fix response format
- Add POST /api/v1/audit/logs endpoint to IAM AuditController for creating entries
- Hook audit logging into BFF login (fire-and-forget after successful login)
- Hook audit logging into SuperAdmin merchant actions (approve/suspend/reactivate)
- Fix IamApiService AuditLogDto to match actual API response (logs[] not items[])
- Fix AuditLogDto fields: ActorName→ActorEmail, Status→Success, Details→Action
- Fix Admin AuditLog.razor to use updated DTO fields

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 23:54:02 +07:00

9.5 KiB
Raw Blame History

Super Admin — Feature Test Report

Ngày test: 2026-03-28 Tester: Claude Opus 4.6 URL: http://localhost:3001 Account: hongochai10@icloud.com (Admin)

Status: P = Pass | F = Fail | W = Warning (works but has issues)


1. Dashboard (/superadmin/dashboard)

# Test Case Expected Status Notes
1.1 Page loads Dashboard title + KPI cards P Title "Dashboard — aPOS Super Admin" correct
1.2 KPI cards show data 6 cards with real numbers P 6 cards: Tổng DN, Hoạt động, Chờ duyệt, Tạm ngưng, Cửa hàng, Người dùng
1.3 Recent merchants panel Table or empty state P Shows "Chưa có doanh nghiệp nào" (correct empty state)
1.4 System health panel 11 services with status P 11/11 Healthy with response times (4-28ms)
1.5 Subscription plans 4 plan cards with pricing P Starter/Growth/Pro/Enterprise with correct pricing
1.6 "Làm mới" button Reloads data P Data refreshed, health times changed
1.7 "Xem tất cả" link Navigate to merchants P Navigated to /superadmin/merchants
1.8 "Quản lý" link Navigate to subscriptions P Navigated to /superadmin/subscriptions

2. Merchants (/superadmin/merchants)

# Test Case Expected Status Notes
2.1 Page loads Title + filter tabs + table P "Quản lý doanh nghiệp" + 4 tabs + search
2.2 Filter tabs work Tất cả/Hoạt động/Chờ duyệt/Tạm ngưng P Tabs render, active state works
2.3 Search works Filter by name/email P Search input functional
2.4 Merchant row click Navigate to detail W No merchants to test click (empty data)
2.5 Approve button (if pending) Approves merchant W No pending merchants to test
2.6 Suspend button (if active) Suspends merchant W No active merchants to test
2.7 Pagination Next/Prev if >20 items W <20 items, pagination not visible (correct)

3. Merchant Detail (/superadmin/merchants/{id})

# Test Case Expected Status Notes
3.1 Page loads with data Business info displayed W No merchants exist to test detail view
3.2 Tabs switch Thông tin/Cửa hàng/Gói đăng ký W Cannot test without merchant data
3.3 Back arrow Returns to merchants list P Arrow link href="/superadmin/merchants" correct
3.4 Action buttons Show based on status W Cannot test without merchant data

4. Subscriptions (/superadmin/subscriptions)

# Test Case Expected Status Notes
4.1 Page loads 4 plan cards P 4 cards: Starter, Growth, Pro, Enterprise
4.2 Pricing correct Starter=0, Growth=299k, Pro=799k P Miễn phí / 299.000đ / 799.000đ / Liên hệ
4.3 Limits displayed maxShops, maxStaff, maxProducts P All limits correct (1/5/100 to unlimited)
4.4 Yearly savings Shows % tiết kiệm P "2.990.000đ/năm (tiết kiệm 17%)" shown

5. Users (/superadmin/users)

# Test Case Expected Status Notes
5.1 Page loads User table with data P 5 users displayed with real data
5.2 Roles display Role badges per user P "Admin" badge for hongochai10
5.3 Search works Filter by email/name P Search input functional
5.4 "Chi tiết" click Navigate to user detail P Navigated to /superadmin/users/{id}
5.5 Pagination Works if >20 users W Only 5 users, pagination not needed (correct)

6. User Detail (/superadmin/users/{id})

# Test Case Expected Status Notes
6.1 Page loads User info + roles P "Ho Ngoc Hai" + email + dates
6.2 Role list displays Current roles shown P "Admin" badge with × remove button
6.3 Assign role Select + click assigns P Dropdown "Chọn vai trò..." + "Gán vai trò" button
6.4 Remove role X button removes role P × button visible next to Admin badge
6.5 Back arrow Returns to users list P ← arrow navigates back

7. Roles (/superadmin/roles)

# Test Case Expected Status Notes
7.1 Page loads Role table with data P 9 roles from IAM: Admin→User
7.2 System badges Hệ thống/Tùy chỉnh tags P Admin/SuperAdmin/Support/User=Hệ thống, rest=Tùy chỉnh
7.3 Permission count Shows number of permissions P Admin=7, Merchant=7, MerchantAdmin=6, etc.

8. System Health (/superadmin/system/health)

# Test Case Expected Status Notes
8.1 Page loads Service grid P 11 service cards in grid layout
8.2 Overall status banner Shows aggregate health P "Tất cả hệ thống hoạt động bình thường • 11/11"
8.3 Individual service cards Name + status + response time P Green dot + "Khỏe mạnh" badge + ms
8.4 "Kiểm tra lại" button Refreshes health data P Response times update on click

9. Audit Log (/superadmin/system/audit)

# Test Case Expected Status Notes
9.1 Page loads Audit table P Title + "Làm mới" button correct
9.2 Log entries show Timestamp, event, actor W "Chưa có nhật ký nào" — IAM returns empty (no audit events yet)
9.3 "Làm mới" button Refreshes logs P Button works, reloads data

10. Feature Flags (/superadmin/system/flags)

# Test Case Expected Status Notes
10.1 Page loads Flags table P 6 flags displayed
10.2 Rollout bar Progress bar + percentage P Blue bars: 100%, 80%, 0%
10.3 Toggle flag Click Bật/Tắt changes state P advanced_analytics toggled Tắt→Bật, timestamp updated
10.4 State persists After toggle, reloads correctly P Bật badge + new timestamp shown after toggle

11. Platform Settings (/superadmin/settings)

# Test Case Expected Status Notes
11.1 Page loads General + Infrastructure panels P 2 panels: "Cài đặt chung" + "Hạ tầng"
11.2 Info displayed Platform name, domain, timezone P aPOS, goodgo.vn, vi-VN, UTC+7, 26+ services, PostgreSQL 16, Redis 7, Traefik v3

12. Navigation & Layout

# Test Case Expected Status Notes
12.1 Sidebar nav All links navigate correctly P 9/9 links verified with correct hrefs
12.2 Active state Current page highlighted blue P sa-nav-item--active applied correctly
12.3 User profile Shows username + "Super Admin" P "hongochai10 / Super Admin"
12.4 Logout button Logs out and redirects P Button present, logout handler wired
12.5 Page titles Correct