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
Cases
39
P0 / P1
12 / 20
Regression pack
13
PRD
10 Settings and administration
Phase
P1

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.json and runs/run-1/, and every result field is still not_run.
  • Cases inherit any open question or inconsistency in the PRDs they trace to.

1Summary

P0
12
P1
20
P2
7
P3
0
Typefunctionalui-uxedgenegativeregressionflowa11yperfsecurityi18n
Count19126211061

2Test cases

IDTitleTypePriorityPhasePreconditionsStepsExpected resultPRD traceData neededRun 1
TS-SET-001Settings left sub-navigation lists every page in orderfunctionalP0P1As U-OWNER on /settings.
  1. Read the left navigation.
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 §3Fixtures belowNot run
TS-SET-002Settings navigation is role-filteredsecurityP1P1U-BM-A, U-ACC, U-ACAD-A.
  1. Open /settings as each.
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 §9Fixtures belowNot run
TS-SET-003Onboarding checklist ticks items when donefunctionalP1P1Owner of EMPTY.
  1. Complete "add branch details" via /settings/branches; return to /dashboard.
That item shows a tick and a done date; GET /onboarding-checklist reflects it; event onboarding_checklist_item_done.SET-01Fixtures belowNot run
TS-SET-004Invite a user with role and branchesfunctionalP0P1As U-OWNER on /settings/users.
  1. Click Mời người dùng: name, email new@test.vn, role Giáo vụ, branches Quận 1.
  2. Send.
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-02Fixtures belowNot run
TS-SET-005Accept an invitation creates membershipsflowP0P1Invitation link from the previous case.
  1. Open the link in a fresh browser; register or sign in.
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 roleFixtures belowNot run
TS-SET-006Expired or revoked invitation linknegativeP1P1Revoke the invitation; also simulate 8 days elapsed.
  1. Open the link.
Page "Lời mời không còn hiệu lực" with a contact hint; no account created.SET-02 7-day linkFixtures belowNot run
TS-SET-007Invite an existing member converts to a role changeedgeP2P1U-ACAD-A already a member.
  1. Invite the same email with role Kế toán.
No new invitation; the user's role changes (or a confirm dialog says so); audit entry.10 §10 edgeFixtures belowNot run
TS-SET-008Branch manager can invite only non-owner roles for own branchsecurityP1P1As U-BM-A.
  1. Open the invite form.
Role list excludes Chủ trung tâm; branches limited to Quận 1; API refuses role owner (403).10 §9 settings.users branchFixtures belowNot run
TS-SET-009Deactivate and reactivate a userfunctionalP0P1U-ACAD-A logged in elsewhere.
  1. As U-OWNER click Vô hiệu on U-ACAD-A.
  2. As U-ACAD-A perform any action.
  3. Reactivate.
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 deactivationFixtures belowNot run
TS-SET-010Last owner cannot be removed or deactivatednegativeP0P1Single owner tenant.
  1. Try to deactivate U-OWNER; try to change their role to Giáo vụ.
Both refused with "Cần ít nhất một Chủ trung tâm"; API 409.10 §6 last owner, 12 §5Fixtures belowNot run
TS-SET-011Users list columns and status chipsfunctionalP1P1/settings/users.
  1. Read the table.
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ùngFixtures belowNot run
TS-SET-012Branch scope update replaces the non-spec school-access endpointfunctionalP1P1U-ACAD-A.
  1. Edit branches to Quận 1 + Thủ Đức; save; log in as 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 inconsistencyFixtures belowNot run
TS-SET-013Removing the last branch from a user is refusednegativeP1P1U-ACAD-A with one branch.
  1. Uncheck the only branch and save.
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 §10Fixtures belowNot run
TS-SET-014Clone Giáo vụ into Lễ tân and remove a permissionfunctionalP0P1As U-OWNER on /settings/roles.
  1. Clone Giáo vụ; rename "Lễ tân"; untick finance.payment.create; save.
  2. Assign to a user and test.
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-03Fixtures belowNot run
TS-SET-015Role create is real, not a mock toastregressionP0P1/settings/roles.
  1. Create a new role from scratch; reload.
Role persists (POST /v3/crm/roles); no "mock" toast.10 §2 roles create mockFixtures belowNot run
TS-SET-016Default role permissions can be adjusted and resetfunctionalP1P1Giáo viên role.
  1. Change students.view scope to Chi nhánh; save; click Khôi phục mặc định.
Change persists; reset returns to own; code/name stay locked; audit entries role.permissions.put.10 §4 Khôi phục mặc địnhFixtures belowNot run
TS-SET-017Role delete refused while assignednegativeP1P1Role Lễ tân assigned to a user.
  1. Delete it.
Refused "Đang có 1 người dùng; phân lại vai trò trước".10 §10Fixtures belowNot run
TS-SET-018Matrix shows permissions grouped by module with scope radiosui-uxP1P1Role drawer.
  1. Read the matrix.
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 belowNot run
TS-SET-019Elevation events are audited and the user notifiedsecurityP1P1Change U-ACAD-A role to branch_manager.
  1. Perform the change; log in as U-ACAD-A.
Audit entry role change; in-app notification "Vai trò của bạn đã được cập nhật".12 §5 elevation eventsFixtures belowNot run
TS-SET-020Branch profile fields persist and are used on receipts and messagesfunctionalP0P1As U-OWNER /settings/branches → Quận 1.
  1. Edit address, phone 02838220001, map link, opening hours, default receiving account BA1, cash drawer name, logo override; save.
  2. Record a cash payment; trigger an absence message.
Values persist after reload; receipt PDF shows the address and phone; absence message renders {chi_nhanh} "Quận 1" and {sdt} 02838220001.SET-04Fixtures belowNot run
TS-SET-021Add a branch creates a school and updates the switcherfunctionalP0P1As U-OWNER.
  1. + Thêm chi nhánh: name "Bình Thạnh", code BT.
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-05Fixtures belowNot run
TS-SET-022Branch code uniquenegativeP1P1Code Q1 exists.
  1. Add a branch with code Q1.
Inline "Mã chi nhánh đã tồn tại".10 §6 Chi nhánh listFixtures belowNot run
TS-SET-023Branch manager edits only own branch profilesecurityP1P1As U-BM-A.
  1. Open /settings/branches.
Only Quận 1 editable; no + Thêm chi nhánh; PATCH /branches/<B> → 403/404.10 §9 settings.branchesFixtures belowNot run
TS-SET-024Tenant profile persistsfunctionalP0P1As U-OWNER /settings/tenant.
  1. Edit name, logo, legal info (tax id 0312345678), default locale, timezone, business hours; save; reload.
All persisted (PATCH /centers/{id}, PUT /company, school-config); no "not persisted" behaviour; logo shows in the sidebar.10 §2 tenant not persistedFixtures belowNot run
TS-SET-025Tax id and citizen id validationnegativeP1P1Tenant legal info.
  1. Tax id 9 digits; 11 digits; citizen id 11 digits.
Errors "10 hoặc 13 chữ số" and "12 chữ số".10 §6 Trung tâmFixtures belowNot run
TS-SET-026Generic master-data page behaviour (levels, rooms, job titles, expense categories)functionalP1P1As U-OWNER.
  1. On /settings/job-titles add "Lễ tân", reorder by drag, deactivate "Trợ giảng" (in use).
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 MasterDataPageFixtures belowNot run
TS-SET-027Custom fields and CRM packages surfaced under settingsfunctionalP2P1/settings/custom-fields and /settings/packages.
  1. Open both.
Custom fields list with create; packages list (Gói tư vấn) distinct from fee plans.10 §2Fixtures belowNot run
TS-SET-028Finance settings: receipt prefix, discount limits, thresholds, VAT defaults, credit rule, refund policyfunctionalP0P1As U-ACC /settings/finance.
  1. Set discount limit academic_admin 8%; approval threshold refund 3,000,000; credit sessions on creation; refund admin fee 10%; save.
  2. Create an invoice as U-ACAD-A with 7% discount.
Values persist; the 7% invoice no longer needs approval; percent fields reject > 100.10 §6 Tài chínhFixtures belowNot run
TS-SET-029Bank accounts list with SePay statusregressionP1P1/settings/finance.
  1. Read the bank account list.
BA1 with chip "SePay: Đã kết nối"; manual accounts with "Thủ công"; link-token flow button present.05 §2 bank accountsFixtures belowNot run
TS-SET-030Integration cards show status, last sync, errors, disconnectfunctionalP1P1/settings/integrations.
  1. Read SePay, Zalo OA, E-invoice, Webhooks cards.
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-07Fixtures belowNot run
TS-SET-031Outgoing webhook config and deliveryfunctionalP2P1Webhook card.
  1. Set URL to the stub receiver and a secret; save; record a payment.
Stub receives an event payment.recorded with an HMAC header; secret masked after save.10 §6 Webhooks, 11 §1 eventsFixtures belowNot run
TS-SET-032Zalo OA already used by another centeredgeP2P1Stub returns "OA in use".
  1. Connect.
Guidance text shown; card stays disconnected.10 §10Fixtures belowNot run
TS-SET-033Audit log viewer filters and difffunctionalP0P1As U-OWNER /settings/audit-log after several writes.
  1. Filter actor U-ACC, action tuition.pay, date today; expand a row.
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-06Fixtures belowNot run
TS-SET-034Audit log is append-onlysecurityP1P1API.
  1. Attempt PATCH/DELETE /v3/school/audit-logs/{id}.
405 or 404; no route exists.12 §6 append-onlyFixtures belowNot run
TS-SET-035Audit scope by rolesecurityP1P1U-BM-A and U-ACC.
  1. Open /settings/audit-log.
U-BM-A sees branch A entries only; U-ACC sees finance actions only.10 §9 settings.auditFixtures belowNot run
TS-SET-036Data page: imports, exports, anonymisation requests, PDPD templatefunctionalP1P1As U-OWNER /settings/data.
  1. Read the page.
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 §7Fixtures belowNot run
TS-SET-037Full tenant export jobfunctionalP2P1Owner.
  1. Request full export.
Job created; signed download within the SLA (24 h; stub immediate) containing CSV per entity and a documents zip; audited.12 §7 tenant exportFixtures belowNot run
TS-SET-038Settings pages in en localei18nP2P1en.
  1. Open /settings and three sub-pages.
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 §8Fixtures belowNot run
TS-SET-039Settings forms keyboard and error linkinga11yP2P1Any settings form.
  1. Submit with an invalid value; inspect the error element.
Error text linked via aria-describedby; focus moves to the first invalid field.12 §9Fixtures belowNot run

Trường Số (truongso.net) · FLYER internal