Trường Số QA/00 Shell, tenancy, roles and decisions
Trường Số · QA test suite · Phase 1 · 10/09/2026
00 · Shell, tenancy, roles and decisions
Test cases for PRD 00. 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
6
P1
21
P2
6
P3
0
| Type | functional | ui-ux | edge | negative | regression | flow | a11y | perf | security | i18n |
|---|---|---|---|---|---|---|---|---|---|---|
| Count | 22 | 4 | 0 | 0 | 1 | 0 | 0 | 0 | 4 | 2 |
2Test cases
| ID | Title | Type | Priority | Phase | Preconditions | Steps | Expected result | PRD trace | Data needed | Run 1 |
|---|---|---|---|---|---|---|---|---|---|---|
| TS-OVW-001 | Sidebar shows the target navigation tree in the specified order | functional | P1 | P1 | Logged in as U-OWNER on tenant BIG at 1440 px. |
| Order is exactly: Tổng quan; group TUYỂN SINH with Khách hàng, Lịch hẹn & cuộc gọi, Học thử, Kiểm tra xếp lớp, Nhập dữ liệu; group HỌC VỤ with Học viên, Lớp học, Thời khoá biểu, Điểm danh, Sổ liên lạc; group TÀI CHÍNH with Học phí, Công nợ, Thu chi, Kho; group NHÂN SỰ with Nhân sự, Bảng công; BÁO CÁO; CÀI ĐẶT. No other top-level items. | 00 §5 navigation map, D8 | Fixtures below | Not run |
| TS-OVW-002 | Each sidebar item routes to the specified path | functional | P1 | P1 | As U-OWNER. |
| URLs are /dashboard, /crm/customers, /crm/schedules, /crm/trials, /crm/placement-tests, /crm/imports, /students, /classes, /timetable, /attendance, /communication, /finance/tuition, /finance/debt, /finance/cashbook, /inventory, /staff, /staff/timesheets, /reports, /settings. Each page renders an h1 matching the sidebar label. | 00 §5, D8 | Fixtures below | Not run |
| TS-OVW-003 | Legacy /crm/settings/* routes redirect to /settings | functional | P1 | P1 | As U-OWNER. |
| Each request ends on /settings/users, /settings/roles, /settings/tags respectively (HTTP 301/302 or client redirect); the page content is the new settings page; no 404. | 00 §5 route prefix note, 10 §3 | Fixtures below | Not run |
| TS-OVW-004 | Existing CRM routes remain under /crm and old bookmarks keep working | regression | P1 | P1 | As U-ADM. |
| Both pages render (Kanban/table list, then lead detail shell) with HTTP 200; no redirect to a root route. | D8 | Fixtures below | Not run |
| TS-OVW-005 | Sidebar conforms to Cloud theme geometry | ui-ux | P2 | P1 | As U-OWNER at 1440 px. |
| Sidebar width 292 px, white background, 1 px right border; group headings uppercase 11 px; active item has light purple background (#F3EBFA) and purple text (#6A309B), no solid bar. | Cloud theme §2 | Fixtures below | Not run |
| TS-OVW-006 | Top bar contains branch switcher, quick search, bell and user menu | functional | P1 | P1 | As U-OWNER. |
| Controls present: branch dropdown showing "Tất cả chi nhánh", search field with ⌘K hint (opens on Cmd/Ctrl+K), notification bell with unread count, user avatar menu. Pipeline selector is NOT shown on /students. | 00 §5 top bar | Fixtures below | Not run |
| TS-OVW-007 | Pipeline selector appears only on CRM pages | functional | P2 | P1 | As U-ADM. |
| Pipeline selector visible on /crm/customers; absent on /classes and every non-/crm route. | 00 §5 top bar | Fixtures below | Not run |
| TS-OVW-008 | Branch switcher lists exactly the user's accessible branches | functional | P0 | P1 | U-BM-A (branch A only) and U-OWNER. |
| U-BM-A sees only "Quận 1" preselected and no "Tất cả chi nhánh" option. U-OWNER sees "Tất cả chi nhánh", "Quận 1", "Thủ Đức", "Gò Vấp". | D1, 00 §3 | Fixtures below | Not run |
| TS-OVW-009 | Switching branch filters every branch-scoped list | functional | P0 | P1 | As U-OWNER. |
| With Thủ Đức: /students lists S2 but not S1; /classes lists C3 but not C1; /finance/tuition lists INV-2 but not INV-1. With all branches: both sets appear and a "Chi nhánh" column is shown on /students. | D1, 02 §5 Chi nhánh column | Fixtures below | Not run |
| TS-OVW-010 | Branch selection persists across navigation and reload | functional | P2 | P1 | As U-OWNER. |
| Branch dropdown still shows "Thủ Đức" after navigation and after reload. | D1 | Fixtures below | Not run |
| TS-OVW-011 | Leads are tenant-level and not filtered by the branch switcher | functional | P1 | P1 | As U-OWNER with branch "Thủ Đức" selected. |
| L1 is listed; the leads list ignores the branch switcher (leads are per center). | 00 §3 consequences | Fixtures below | Not run |
| TS-OVW-012 | Branch-A user cannot read branch-B rows by URL | security | P0 | P1 | As U-BM-A. |
| UI shows a not-found page (text "Không tìm thấy" / 404); API returns HTTP 404 (not 403) with no student fields in the body. | 12 §3 authorisation, 00 §3 | Fixtures below | Not run |
| TS-OVW-013 | Default roles exist and are locked | functional | P1 | P1 | As U-OWNER. |
| Rows for Chủ trung tâm (owner), Quản lý chi nhánh (branch_manager), Tư vấn tuyển sinh (admissions), Giáo vụ (academic_admin), Kế toán (accountant), Giáo viên (teacher), Chỉ xem (viewer) exist with "Mặc định" tick; the delete action is absent or disabled for each; code and name fields are read-only. | D2, 10 §4 default roles | Fixtures below | Not run |
| TS-OVW-014 | Role matrix per module matches PRD 00 §4 for owner | functional | P1 | P1 | As U-OWNER. |
| Every permission group shows scope "Tất cả" (all) for all nine module groups. | 00 §4 | Fixtures below | Not run |
| TS-OVW-015 | Role matrix for teacher matches PRD 00 §4 | functional | P1 | P1 | As U-OWNER. |
| Leads: Không; Students: Của mình (own classes); Classes: Của mình read; Attendance: mark own sessions; Finance: Không; Staff: self; Communication: own classes; Inventory: read; Reports: own classes; Settings: Không. | 00 §4 | Fixtures below | Not run |
| TS-OVW-016 | Viewer role is read-only everywhere | security | P1 | P1 | As U-VIEWER. |
| Lists and dashboard render; no "+ Thêm", "Sửa", "Thu tiền" or kebab actions are shown; the API returns HTTP 403 with an error code. | 10 §4 viewer | Fixtures below | Not run |
| TS-OVW-017 | Permission change takes effect on the next request without re-login | functional | P1 | P1 | U-OWNER and U-ACAD-A logged in in two browsers. |
| Button "Thu học phí" is no longer shown after a page navigation; API returns 403. No logout was required. | 00 §4, 10 SET-03, test seed 00/10 | Fixtures below | Not run |
| TS-OVW-018 | Stub PermissionGate is removed: Kanban actions respect real permissions | security | P0 | P1 | As U-VIEWER (or a role without customers.edit). |
| Drag is disabled or reverts with an error toast; Won/Lost/Delete are hidden; PATCH /customers/{id}/kanban-position returns 403 when sent manually. | 00 §6 known inconsistencies | Fixtures below | Not run |
| TS-OVW-019 | Scope vocabulary is own | branch | all everywhere | functional | P1 | P1 | As U-OWNER. |
| Matrix scope radios are exactly Không / Của mình / Chi nhánh / Tất cả; the API returns scope values only from {own, branch, all}; no "team", "read", "write", "manage" values appear. | 00 §6, 10 §4 vocabulary | Fixtures below | Not run |
| TS-OVW-020 | D3: every new module ships a table view and no board | ui-ux | P1 | P1 | As U-OWNER. |
| Each page opens in a table list; no Kanban/board toggle exists on these pages. /crm/customers still offers Kanban and table. | D3 | Fixtures below | Not run |
| TS-OVW-021 | D4: an enrolled student always has a FLYER learner profile | functional | P0 | P1 | As U-ACAD-A. |
| S1 shows a username and last-active time. The new-student form blocks submit with an inline error under Tài khoản FLYER ("Bắt buộc" or equivalent). | D4, 02 STU-02 | Fixtures below | Not run |
| TS-OVW-022 | D5: sessions are materialised rows | functional | P1 | P1 | As U-ACAD-A. |
| 48 numbered session rows exist, each with date, time, room, teacher, status; the 20 held sessions show "Đã điểm danh" or an attendance marker. | D5, 03 §6 | Fixtures below | Not run |
| TS-OVW-023 | D6: invoices reuse the Tuition model with payment_code | functional | P1 | P1 | As U-ACC. |
| Detail shows Mã HĐ TS1A0001 and a QR; the API response is a Tuition object with lines[], payment_code, qr_url. | D6, 05 §2 | Fixtures below | Not run |
| TS-OVW-024 | D7: no SMS channel anywhere in the product | functional | P1 | P1 | As U-OWNER. |
| Channel options are Zalo ZNS, Zalo OA, Ứng dụng (push), Email, Cổng phụ huynh only; no SMS checkbox; no "SMS" string in message files except in a "not available" explanation, if any. | D7, 07 §3 | Fixtures below | Not run |
| TS-OVW-025 | D9: switching locale to en translates every visible string | i18n | P1 | P1 | As U-OWNER. |
| All labels, tabs, buttons, empty states and column headers are English; no Vietnamese string remains; no raw i18n keys (e.g. "students.list.title") are rendered. | D9, 12 §8 | Fixtures below | Not run |
| TS-OVW-026 | D9: vi and en message files have identical key sets | i18n | P1 | P1 | Repo checkout of the build. |
| Zero keys missing on either side; the CI check passes. | D9, 12 §8, 12 §11 | Fixtures below | Not run |
| TS-OVW-027 | D10: phase 2 modules are feature-flagged per tenant | functional | P2 | P1 | Tenant BIG with flags inventory=false, staff_pay=false; tenant with flags on. |
| With flags off the sidebar hides Kho and Bảng công and direct URL shows a "Tính năng chưa bật" page (not a crash); with flags on both pages render. | D10, 12 §10 feature flags | Fixtures below | Not run |
| TS-OVW-028 | Unauthenticated access redirects to login and back | security | P0 | P1 | Logged out. |
| Redirect to the login page; after login the browser lands on /students/<S1 id> (return URL preserved). | 11 §1 auth 401 redirects | Fixtures below | Not run |
| TS-OVW-029 | Global search finds students, classes and leads | functional | P1 | P1 | As U-OWNER. |
| Results group by type: Học viên S1 (Nguyễn An); Lớp học C1; Khách hàng L1 by phone. Enter on a result navigates to its detail. Accent-insensitive matching works. | 00 §5 ⌘K, 12 §8 collation | Fixtures below | Not run |
| TS-OVW-030 | Onboarding checklist appears for a new tenant | functional | P1 | P1 | As owner of tenant EMPTY. |
| A checklist card lists 7 items: thêm chi nhánh, mời nhân sự, tạo khoá học và gói phí, thêm phòng, kết nối tài khoản ngân hàng, kết nối Zalo, nhập học viên; each is a link to its settings page; none is ticked. | 10 SET-01 | Fixtures below | Not run |
| TS-OVW-031 | Console has a minimum viewport of 1280 px; 1024 shows horizontal scroll inside tables only | ui-ux | P2 | P1 | As U-OWNER. |
| At 1024 the sidebar collapses to icons or a drawer, the page body does not scroll horizontally, the table scrolls inside its own container. At 1440 the full layout shows with no overflow. | 12 §9 viewport | Fixtures below | Not run |
| TS-OVW-032 | Error pages show a support code | ui-ux | P2 | P1 | Any user. |
| Not-found page shows a short message and a code in the format TS-4xxx; the 500 page shows TS-5xxx and a "Thử lại" button; no stack trace. | 12 §10 observability | Fixtures below | Not run |
| TS-OVW-033 | User menu shows name, role and tenant; logout ends the session | functional | P1 | P1 | As U-ACAD-A. |
| Menu shows display name, role "Giáo vụ", tenant "Big Center", locale switch, Đăng xuất. After logout, Back does not show protected content (redirect to login). | 12 §3 authentication | Fixtures below | Not run |
Trường Số (truongso.net) · FLYER internal