Trường Số QA/10 Settings and administration
Trường Số · QA test suite · Phase 1 · 10/09/2026
10 · Settings and administration
Test cases for PRD 10. Every case names the fixture data it needs (see the dashboard fixtures table), numbered steps, and one observable expected result. Trace points to the user story or rule in the PRD.
Key facts, origin and limits
Drafted by an AI assistant in a single session on 10/09/2026 as part of the Trường Số QA suite, under the request quoted verbatim on the dashboard. A proposal for team review, not a sign-off.
Sources
- The Trường Số PRD set (Draft v1, 10/09/2026): user stories, screen tables, business rules and permission matrices, plus the Cloud theme reference.
Limits
- Phase 1 (authoring) only. Cases are executed in Phase 2 against the local build; results are recorded in
testcases.jsonandruns/run-1/, and every result field is stillnot_run. - Cases inherit any open question or inconsistency in the PRDs they trace to.
1Summary
P0
12
P1
20
P2
7
P3
0
| Type | functional | ui-ux | edge | negative | regression | flow | a11y | perf | security | i18n |
|---|---|---|---|---|---|---|---|---|---|---|
| Count | 19 | 1 | 2 | 6 | 2 | 1 | 1 | 0 | 6 | 1 |
2Test cases
| ID | Title | Type | Priority | Phase | Preconditions | Steps | Expected result | PRD trace | Data needed | Run 1 |
|---|---|---|---|---|---|---|---|---|---|---|
| TS-SET-001 | Settings left sub-navigation lists every page in order | functional | P0 | P1 | As U-OWNER on /settings. |
| Items in order: Trung tâm, Chi nhánh, Người dùng, Vai trò, Quy trình tuyển sinh, Nguồn & Kênh, Nhãn, Trường tuỳ chỉnh, Gói tư vấn, Khoá học & Gói phí, Trình độ, Phòng học, Chức danh, Danh mục chi, Tài chính, Điểm danh, Thông báo, Tích hợp, Nhật ký hệ thống, Dữ liệu; sub-nav width 220 px; each routes to /settings/<slug>. | 10 §3 | Fixtures below | Not run |
| TS-SET-002 | Settings navigation is role-filtered | security | P1 | P1 | U-BM-A, U-ACC, U-ACAD-A. |
| U-BM-A: Chi nhánh (own profile), Người dùng (invite non-owner), Phòng học, Nhật ký (branch), Dữ liệu (imports). U-ACC: Trung tâm legal info, Danh mục chi, Khoá học & Gói phí, Tài chính, Tích hợp (SePay, e-invoice), Nhật ký (finance), Dữ liệu. U-ACAD-A: Trình độ, Phòng học, Khoá học, Dữ liệu (students, classes). Direct URLs to hidden pages return 403 page. | 10 §9 | Fixtures below | Not run |
| TS-SET-003 | Onboarding checklist ticks items when done | functional | P1 | P1 | Owner of EMPTY. |
| That item shows a tick and a done date; GET /onboarding-checklist reflects it; event onboarding_checklist_item_done. | SET-01 | Fixtures below | Not run |
| TS-SET-004 | Invite a user with role and branches | functional | P0 | P1 | As U-OWNER on /settings/users. |
| Row with status Chờ mời, actions Gửi lại and Thu hồi; invitation has a 7-day expiry; email stub records the link. | SET-02 | Fixtures below | Not run |
| TS-SET-005 | Accept an invitation creates memberships | flow | P0 | P1 | Invitation link from the previous case. |
| User lands in the console as Giáo vụ with branch Quận 1 only; Users list shows Đã kích hoạt; sale profile and school membership (ADMIN derived) created. | SET-02, D2 derived school role | Fixtures below | Not run |
| TS-SET-006 | Expired or revoked invitation link | negative | P1 | P1 | Revoke the invitation; also simulate 8 days elapsed. |
| Page "Lời mời không còn hiệu lực" with a contact hint; no account created. | SET-02 7-day link | Fixtures below | Not run |
| TS-SET-007 | Invite an existing member converts to a role change | edge | P2 | P1 | U-ACAD-A already a member. |
| No new invitation; the user's role changes (or a confirm dialog says so); audit entry. | 10 §10 edge | Fixtures below | Not run |
| TS-SET-008 | Branch manager can invite only non-owner roles for own branch | security | P1 | P1 | As U-BM-A. |
| Role list excludes Chủ trung tâm; branches limited to Quận 1; API refuses role owner (403). | 10 §9 settings.users branch | Fixtures below | Not run |
| TS-SET-009 | Deactivate and reactivate a user | functional | P0 | P1 | U-ACAD-A logged in elsewhere. |
| Status Vô hiệu; U-ACAD-A's next request is rejected (session revoked, redirect to login); history (audit rows) still visible; after reactivation login works again. | 10 §4 deactivation | Fixtures below | Not run |
| TS-SET-010 | Last owner cannot be removed or deactivated | negative | P0 | P1 | Single owner tenant. |
| Both refused with "Cần ít nhất một Chủ trung tâm"; API 409. | 10 §6 last owner, 12 §5 | Fixtures below | Not run |
| TS-SET-011 | Users list columns and status chips | functional | P1 | P1 | /settings/users. |
| Họ tên, Email/SĐT, Vai trò chips, Chi nhánh chips, Đăng nhập gần nhất, Trạng thái (Đã kích hoạt / Chờ mời / Vô hiệu); actions Sửa, Vô hiệu, Gửi lại lời mời. | 10 §6 Người dùng | Fixtures below | Not run |
| TS-SET-012 | Branch scope update replaces the non-spec school-access endpoint | functional | P1 | P1 | U-ACAD-A. |
| PUT /sale-profiles/{id}/branches {school_ids} called; the branch switcher now offers both; no call to users/{id}/school-access. | 10 §8, 00 §6 inconsistency | Fixtures below | Not run |
| TS-SET-013 | Removing the last branch from a user is refused | negative | P1 | P1 | U-ACAD-A with one branch. |
| Refused "Người dùng cần ít nhất một chi nhánh; hãy vô hiệu hoá thay vì bỏ chi nhánh". | 10 §10 | Fixtures below | Not run |
| TS-SET-014 | Clone Giáo vụ into Lễ tân and remove a permission | functional | P0 | P1 | As U-OWNER on /settings/roles. |
| POST /roles/{id}/clone then PUT /roles/{id}/permissions with [{code, scope}]; the new role appears with cloned_from; the assigned user has no Thu tiền button and gets 403 on pay. | SET-03 | Fixtures below | Not run |
| TS-SET-015 | Role create is real, not a mock toast | regression | P0 | P1 | /settings/roles. |
| Role persists (POST /v3/crm/roles); no "mock" toast. | 10 §2 roles create mock | Fixtures below | Not run |
| TS-SET-016 | Default role permissions can be adjusted and reset | functional | P1 | P1 | Giáo viên role. |
| Change persists; reset returns to own; code/name stay locked; audit entries role.permissions.put. | 10 §4 Khôi phục mặc định | Fixtures below | Not run |
| TS-SET-017 | Role delete refused while assigned | negative | P1 | P1 | Role Lễ tân assigned to a user. |
| Refused "Đang có 1 người dùng; phân lại vai trò trước". | 10 §10 | Fixtures below | Not run |
| TS-SET-018 | Matrix shows permissions grouped by module with scope radios | ui-ux | P1 | P1 | Role drawer. |
| Rows grouped by module in PRD order; columns Không / Của mình / Chi nhánh / Tất cả; labels localised from the permissions catalog (X-Locale). | 10 §6 Vai trò | Fixtures below | Not run |
| TS-SET-019 | Elevation events are audited and the user notified | security | P1 | P1 | Change U-ACAD-A role to branch_manager. |
| Audit entry role change; in-app notification "Vai trò của bạn đã được cập nhật". | 12 §5 elevation events | Fixtures below | Not run |
| TS-SET-020 | Branch profile fields persist and are used on receipts and messages | functional | P0 | P1 | As U-OWNER /settings/branches → Quận 1. |
| Values persist after reload; receipt PDF shows the address and phone; absence message renders {chi_nhanh} "Quận 1" and {sdt} 02838220001. | SET-04 | Fixtures below | Not run |
| TS-SET-021 | Add a branch creates a school and updates the switcher | functional | P0 | P1 | As U-OWNER. |
| POST /v3/school/branches; owner is a member; branch switcher lists Bình Thạnh; branch list row shows 0 students, 0 classes, 1 user. | SET-05 | Fixtures below | Not run |
| TS-SET-022 | Branch code unique | negative | P1 | P1 | Code Q1 exists. |
| Inline "Mã chi nhánh đã tồn tại". | 10 §6 Chi nhánh list | Fixtures below | Not run |
| TS-SET-023 | Branch manager edits only own branch profile | security | P1 | P1 | As U-BM-A. |
| Only Quận 1 editable; no + Thêm chi nhánh; PATCH /branches/<B> → 403/404. | 10 §9 settings.branches | Fixtures below | Not run |
| TS-SET-024 | Tenant profile persists | functional | P0 | P1 | As U-OWNER /settings/tenant. |
| All persisted (PATCH /centers/{id}, PUT /company, school-config); no "not persisted" behaviour; logo shows in the sidebar. | 10 §2 tenant not persisted | Fixtures below | Not run |
| TS-SET-025 | Tax id and citizen id validation | negative | P1 | P1 | Tenant legal info. |
| Errors "10 hoặc 13 chữ số" and "12 chữ số". | 10 §6 Trung tâm | Fixtures below | Not run |
| TS-SET-026 | Generic master-data page behaviour (levels, rooms, job titles, expense categories) | functional | P1 | P1 | As U-OWNER. |
| Inline create; drag reorder persists position; deactivate keeps history and hides from pickers; delete not offered for items in use; name unique per tenant. | 10 §6 generic MasterDataPage | Fixtures below | Not run |
| TS-SET-027 | Custom fields and CRM packages surfaced under settings | functional | P2 | P1 | /settings/custom-fields and /settings/packages. |
| Custom fields list with create; packages list (Gói tư vấn) distinct from fee plans. | 10 §2 | Fixtures below | Not run |
| TS-SET-028 | Finance settings: receipt prefix, discount limits, thresholds, VAT defaults, credit rule, refund policy | functional | P0 | P1 | As U-ACC /settings/finance. |
| Values persist; the 7% invoice no longer needs approval; percent fields reject > 100. | 10 §6 Tài chính | Fixtures below | Not run |
| TS-SET-029 | Bank accounts list with SePay status | regression | P1 | P1 | /settings/finance. |
| BA1 with chip "SePay: Đã kết nối"; manual accounts with "Thủ công"; link-token flow button present. | 05 §2 bank accounts | Fixtures below | Not run |
| TS-SET-030 | Integration cards show status, last sync, errors, disconnect | functional | P1 | P1 | /settings/integrations. |
| Each card: status chip, last sync time, last error (if any), Ngắt kết nối; Zalo shows "Mẫu đã duyệt 5/8". | SET-07 | Fixtures below | Not run |
| TS-SET-031 | Outgoing webhook config and delivery | functional | P2 | P1 | Webhook card. |
| Stub receives an event payment.recorded with an HMAC header; secret masked after save. | 10 §6 Webhooks, 11 §1 events | Fixtures below | Not run |
| TS-SET-032 | Zalo OA already used by another center | edge | P2 | P1 | Stub returns "OA in use". |
| Guidance text shown; card stays disconnected. | 10 §10 | Fixtures below | Not run |
| TS-SET-033 | Audit log viewer filters and diff | functional | P0 | P1 | As U-OWNER /settings/audit-log after several writes. |
| Columns Thời gian, Người thực hiện, Hành động, Đối tượng, Chi nhánh, IP; expanded row shows before/after diff of changed fields; rows read-only; Xuất CSV downloads. | SET-06 | Fixtures below | Not run |
| TS-SET-034 | Audit log is append-only | security | P1 | P1 | API. |
| 405 or 404; no route exists. | 12 §6 append-only | Fixtures below | Not run |
| TS-SET-035 | Audit scope by role | security | P1 | P1 | U-BM-A and U-ACC. |
| U-BM-A sees branch A entries only; U-ACC sees finance actions only. | 10 §9 settings.audit | Fixtures below | Not run |
| TS-SET-036 | Data page: imports, exports, anonymisation requests, PDPD template | functional | P1 | P1 | As U-OWNER /settings/data. |
| Sections Nhập dữ liệu (links to the wizard per entity), Xuất toàn bộ (POST /exports/full → job), Yêu cầu ẩn danh hoá (list), download link for "Hồ sơ đánh giá tác động" template. | 10 §3 Dữ liệu, 12 §4 Art. 24, 12 §7 | Fixtures below | Not run |
| TS-SET-037 | Full tenant export job | functional | P2 | P1 | Owner. |
| Job created; signed download within the SLA (24 h; stub immediate) containing CSV per entity and a documents zip; audited. | 12 §7 tenant export | Fixtures below | Not run |
| TS-SET-038 | Settings pages in en locale | i18n | P2 | P1 | en. |
| Left nav Center, Branches, Users, Roles, Admissions pipelines, Sources & Channels, Tags, Custom fields, Sales packages, Courses & Fee plans, Levels, Rooms, Job titles, Expense categories, Finance, Attendance, Notifications, Integrations, Audit log, Data; forms translated. | 12 §8 | Fixtures below | Not run |
| TS-SET-039 | Settings forms keyboard and error linking | a11y | P2 | P1 | Any settings form. |
| Error text linked via aria-describedby; focus moves to the first invalid field. | 12 §9 | Fixtures below | Not run |
Trường Số (truongso.net) · FLYER internal