Trường Số QA/02 Students (SIS)
Trường Số · QA test suite · Phase 1 · 10/09/2026
02 · Students (SIS)
Test cases for PRD 02. 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
13
P1
35
P2
12
P3
1
| Type | functional | ui-ux | edge | negative | regression | flow | a11y | perf | security | i18n |
|---|---|---|---|---|---|---|---|---|---|---|
| Count | 33 | 5 | 6 | 7 | 0 | 0 | 1 | 0 | 7 | 2 |
2Test cases
| ID | Title | Type | Priority | Phase | Preconditions | Steps | Expected result | PRD trace | Data needed | Run 1 |
|---|---|---|---|---|---|---|---|---|---|---|
| TS-STU-001 | Student list header, tabs and counts | functional | P0 | P1 | As U-ACAD-A (branch A) on /students. |
| h1 "Học viên"; buttons Nhập từ Excel and + Thêm học viên; tabs in order Tất cả · Đang học · Chờ xếp lớp · Học thử · Bảo lưu · Sắp hết buổi · Nợ học phí · Đã nghỉ, each with a count; Đang học includes S1, S6, S7; Chờ xếp lớp includes S3; Bảo lưu S4; Sắp hết buổi S6 (2 left) and S1 is NOT included (5 left); Nợ học phí S7; Đã nghỉ S5. | STU list §5 | Fixtures below | Not run |
| TS-STU-002 | Student list columns match the spec | functional | P1 | P1 | As U-OWNER with "Tất cả chi nhánh". |
| Mã HV, Họ tên, Lớp, Trạng thái, Phụ huynh, Buổi còn lại, Công nợ, Điểm danh 30 ngày, Chi nhánh, Ngày nhập học, Thao tác. With one branch selected the Chi nhánh column is hidden. | 02 §5 columns | Fixtures below | Not run |
| TS-STU-003 | Row formatting rules | ui-ux | P1 | P1 | S1, S3, S6, S7 visible. |
| S1: code HV-000123, name link with small text "8 tuổi", class chip "Movers 2A", chip Đang học green; S3: dashed chip "Chưa xếp lớp"; S6: Buổi còn lại "2" in red; S7: Công nợ "3.000.000 đ" in red; monthly-plan S2 shows "-" for Buổi còn lại; guardian phone click copies to clipboard with toast "Đã sao chép". | 02 §5 notes | Fixtures below | Not run |
| TS-STU-004 | Row height 44 px and 50 rows per page | ui-ux | P2 | P1 | Tenant BIG with > 50 students in branch A. |
| Row height 44 px; pagination shows 50 per page with total count; Cloud table header uppercase 12 px light grey. | 02 §5, Cloud theme §2 | Fixtures below | Not run |
| TS-STU-005 | Search by name without accents, guardian phone, code, username | functional | P0 | P1 | As U-ACAD-A. |
| Each query returns the matching student within ~300 ms; the guardian-phone match highlights the phone cell; no client-side full-list filtering (network request per query with q=). | STU-01 | Fixtures below | Not run |
| TS-STU-006 | Filters: branch, class, level, guardian consent, start date range | functional | P1 | P1 | As U-OWNER. |
| Result set narrows at each step and counts update; URL reflects filters; Xoá bộ lọc resets. | 02 §5 filters | Fixtures below | Not run |
| TS-STU-007 | Empty state text | ui-ux | P1 | P1 | Owner of tenant EMPTY. |
| Exactly "Chưa có học viên. Chuyển đổi từ khách hàng hoặc thêm trực tiếp." with a primary + Thêm học viên button. | 02 §5 empty state | Fixtures below | Not run |
| TS-STU-008 | Column visibility persists via view-configs | functional | P2 | P1 | As U-ACAD-A. |
| Column stays hidden in both browsers; GET /v3/crm/view-configs/student_list returns the config. | 02 §5 view key student_list | Fixtures below | Not run |
| TS-STU-009 | Bulk actions: Gửi thông báo, Xuất Excel, Chuyển lớp | functional | P1 | P1 | As U-ACAD-A. |
| Bulk bar shows "2 đã chọn" and the three actions; xlsx downloads with 2 rows and the visible columns. | 02 §5 bulk, students.export | Fixtures below | Not run |
| TS-STU-010 | Teacher sees only students of own classes | security | P0 | P1 | As U-TEACH (C1 at A, C3 at B). |
| List contains only C1 and C3 students (S1, S6, S2, ...) and not S7; direct URL for S7 returns 404 page; API 404. | 02 §9 students.view own classes | Fixtures below | Not run |
| TS-STU-011 | Admissions read scope shows limited fields | security | P1 | P1 | As U-ADM. |
| Only name, class, guardian visible; tabs Học phí, Tài liệu, Ghi chú, Nhật ký hidden; no Sửa button. | 02 §9 admissions read | Fixtures below | Not run |
| TS-STU-012 | Create a walk-in student with all required fields | functional | P0 | P1 | As U-ACAD-A. |
| Drawer closes; toast shows the generated username and a one-time password with "Sao chép" (shown once); student appears in tab Chờ xếp lớp with status Chờ xếp lớp; code is the next sequential HV-number; no lead is created in /crm/customers; guardian record created with E.164 phone +84977000010 displayed as 0977 000 010. | STU-02, 12 §8 phone | Fixtures below | Not run |
| TS-STU-013 | Student form validation matrix | negative | P1 | P1 | Create drawer open. |
| Inline errors: "2–80 ký tự"; "Tuổi 3–80"; "Chọn chi nhánh"; "Bắt buộc"; "Tối đa 5 MB". Save stays disabled until all are fixed. | 02 §5 student form validation | Fixtures below | Not run |
| TS-STU-014 | Adult learner (18+) does not need a guardian phone | edge | P1 | P1 | Create drawer. |
| Save allowed; guardian block shows "Bản thân" relationship auto-created with the student's own phone if entered; no "Thiếu phụ huynh" chip. | 02 §6 rule 3 | Fixtures below | Not run |
| TS-STU-015 | Existing guardian suggested by phone in the form | functional | P1 | P1 | Create drawer. |
| Suggestion "Trần Thị Hoa (mẹ của Nguyễn An, Nguyễn Bình)" appears; selecting it links G1 instead of creating a duplicate. | 02 §5 guardian suggested by phone | Fixtures below | Not run |
| TS-STU-016 | Link an existing FLYER account by username or phone | functional | P1 | P1 | Create drawer. |
| Search returns the learner with display name; selecting fills the link; after save the profile rail shows that username. | STU-02 Tài khoản FLYER radio | Fixtures below | Not run |
| TS-STU-017 | Same learner at a second branch creates a second record | edge | P2 | P1 | S1 exists at A. |
| Save succeeds; a second record with its own code exists at B; both profiles show a note "Cũng học tại Quận 1 / Thủ Đức"; creating a third record at A with the same learner fails with a unique-constraint message. | 02 §6 rule 1 | Fixtures below | Not run |
| TS-STU-018 | Twins with same guardian and birthday allowed after warning | edge | P2 | P1 | Student "Nguyễn An" born 2018 with G1 exists. |
| Duplicate warning listing S1; admin confirms; second student created. | 02 §11 twins | Fixtures below | Not run |
| TS-STU-019 | Profile header and right rail | functional | P0 | P1 | As U-ACAD-A on /students/<S1 id>. |
| Header: avatar, "Nguyễn An", HV-000123, "8 tuổi", chip Đang học, branch Quận 1, class chip Movers 2A, chip "Cần lưu ý"; buttons Sửa · Xếp lớp · Thu học phí · Gửi tin · kebab with Bảo lưu, Nghỉ học, Chuyển chi nhánh, Ẩn danh hoá. Right rail: Phụ huynh chính (Trần Thị Hoa · Mẹ · 0901 234 567 · Zalo: Đã đồng ý), Số dư buổi 5, Công nợ 9.600.000 đ, Tài khoản FLYER username + last active. | 02 §5 profile | Fixtures below | Not run |
| TS-STU-020 | Profile tabs in the specified order | functional | P1 | P1 | On S1 profile. |
| Tổng quan · Phụ huynh · Lớp & lịch sử · Điểm danh · Học phí · Học tập · Tài liệu · Ghi chú · Nhật ký; each tab is deep-linkable (#attendance etc.). | 02 §5 tabs | Fixtures below | Not run |
| TS-STU-021 | Tổng quan tab shows personal info, consent summary and timeline | functional | P1 | P1 | S1 profile. |
| Birthday, gender, school, address, level, allergies (health note) shown; consent summary lists Zalo granted with date; timeline entries created, converted, enrolled in chronological order with actor. | 02 §5 Tổng quan | Fixtures below | Not run |
| TS-STU-022 | Kebab actions hidden for roles without students.status | security | P1 | P1 | As U-ADM and U-ACC. |
| Bảo lưu / Nghỉ học / Chuyển chi nhánh / Ẩn danh hoá absent; U-ACC sees Học phí tab and read-only profile. | 02 §9 | Fixtures below | Not run |
| TS-STU-023 | Add a second guardian with flags | functional | P0 | P1 | S1 profile, tab Phụ huynh. |
| Two cards; G1 keeps Liên hệ chính; new guardian has Người thanh toán and G1 loses it (exactly one payer); guardian_added event fired. | STU-03 | Fixtures below | Not run |
| TS-STU-024 | Exactly one primary contact and one payer | negative | P1 | P1 | S1 with two guardians. |
| Save refused with "Cần một liên hệ chính"; setting it on the other guardian moves the flag. | STU-03 exactly one | Fixtures below | Not run |
| TS-STU-025 | Guardian shared by siblings is one record | functional | P1 | P1 | G1 on S1 and S2. |
| S2 shows the updated email; GET /v3/school/guardians?phone=0901234567 returns one record. | STU-03, 02 §7 unique (tenant, phone) | Fixtures below | Not run |
| TS-STU-026 | Changing a guardian phone writes audit and re-verifies Zalo | functional | P1 | P1 | G1 on S1. |
| Audit row "guardian.update" with before/after phone; Zalo status on the card changes to "Đang kiểm tra" then a result (stub); an audit entry on both students sharing G1. | STU-03, 12 §6 mandatory audit | Fixtures below | Not run |
| TS-STU-027 | Guardian phone uniqueness: entering another guardian's phone merges | edge | P2 | P1 | S6 has G2 (0912000002). |
| Dialog "Số điện thoại thuộc Lê Văn Nam" offers "Liên kết" (links G2 to S1) or cancel; no duplicate record. | 02 §7, test seed 02 | Fixtures below | Not run |
| TS-STU-028 | Gửi lại thông tin đăng nhập sends credentials to primary contact | functional | P2 | P1 | S1 profile tab Phụ huynh; ZALO stub. |
| POST /students/{id}/credentials/resend called; message row type credentials to G1 via ZNS (template credentials) with status sent; toast "Đã gửi". | 02 §8 credentials/resend, 07 §6 credentials to primary contact | Fixtures below | Not run |
| TS-STU-029 | Guardian phone displayed as 0xxx xxx xxx and stored E.164 | i18n | P2 | P1 | G1. |
| Card shows "0901 234 567"; API returns "+84901234567". | 12 §8 phone | Fixtures below | Not run |
| TS-STU-030 | Enroll a Waiting student from the profile | functional | P0 | P1 | S3 (Waiting) as U-ACAD-A; C1 has 11/12. |
| Enrollment created; S3 status Đang học; C1 shows 12/12 and status Đầy; S3 appears on rosters only for sessions on or after the start date; sessions before the start date do not count as absences in S3 attendance tab. | STU-04 | Fixtures below | Not run |
| TS-STU-031 | Enroll into a full class offers waiting list | negative | P1 | P1 | S3 Waiting; C2 12/12. |
| API 409 CLASS_FULL; UI offers "Thêm vào danh sách chờ"; accepting creates enrollment status waiting; S3 stays Chờ xếp lớp. | CLS-07, 03 §8 enrollments 409 | Fixtures below | Not run |
| TS-STU-032 | Enroll a Withdrawn student re-activates the record | functional | P1 | P1 | S5 Withdrawn. |
| Status Đang học; same code HV-000127 (record reused); status history shows withdrawn → active. | 02 §6 rule 6 | Fixtures below | Not run |
| TS-STU-033 | Pause a student (Bảo lưu) | functional | P0 | P1 | S1 Active, package expiry E. |
| Status Bảo lưu; roster of C1 sessions in the window no longer lists S1; package expiry becomes E + pause length (visible on Học phí tab after resume, "frozen" chip meanwhile); a reminder task dated 7 days before expected return appears in the today plan of the care owner; status history row with dates. | STU-05 | Fixtures below | Not run |
| TS-STU-034 | Pause requires reason and dates | negative | P1 | P1 | Pause dialog. |
| Inline errors; API 400 when called directly. | STU-05, 02 §6 manual transitions need reason | Fixtures below | Not run |
| TS-STU-035 | Pause longer than 90 days needs branch manager approval | functional | P1 | P1 | As U-ACAD-A. |
| Dialog shows "Cần quản lý chi nhánh duyệt"; status Bảo lưu with an approval pending marker; U-BM-A gets a notification; as U-BM-A the same request completes without approval. | 02 §6 rule 5 | Fixtures below | Not run |
| TS-STU-036 | Resume asks for the class and re-activates | functional | P0 | P1 | S4 Paused. |
| Status Đang học; enrollment in C1 resumes from the resume date; package expiry shows the extension (original + paused days). | STU-05 resume, 02 §11 pause overlapping expiry | Fixtures below | Not run |
| TS-STU-037 | Pausing a Waiting student is an invalid transition | negative | P1 | P1 | S3 Waiting. |
| HTTP 409 INVALID_TRANSITION; UI does not offer Bảo lưu for a Waiting student. | 02 §3 lifecycle, 02 §8 409 | Fixtures below | Not run |
| TS-STU-038 | Withdraw with reason shows refund estimate | functional | P0 | P1 | S1 Active with 5 remaining sessions on FP3 (unit price 250,000). |
| All enrollments end today; status Đã nghỉ; dialog result shows "Buổi chưa dùng: 5 · Ước tính hoàn: 1.250.000 đ" (minus admin fee if policy) with link "Tạo phiếu hoàn"; churn report lists S1 with reason "chi phí". | STU-06 | Fixtures below | Not run |
| TS-STU-039 | Withdraw reason list and free text | functional | P1 | P1 | Withdraw dialog. |
| Options exactly: chi phí, chuyển nhà, không hài lòng, hoàn thành mục tiêu, khác; choosing khác requires free text. | STU-06 | Fixtures below | Not run |
| TS-STU-040 | Withdrawn student is hidden from rosters and pickers | functional | P1 | P1 | S5 Withdrawn. |
| S5 absent from roster and sheet; picker lists S5 with chip Đã nghỉ (re-enrollment allowed) but not as default. | 02 §6 rule 6 | Fixtures below | Not run |
| TS-STU-041 | Transfer a student to another branch with package balance | functional | P0 | P1 | As U-BM-A? (branch manager needs branch B scope; use U-OWNER). S1 at A with 5 sessions. |
| A enrollment ends; a new B record exists with the same learner profile and code convention; guardians shared; balance 5 at B and 0 at A; Học phí tab at A shows entry "chuyển đi", at B "chuyển đến"; timeline entry on both profiles; API returns new_student_id. | STU-07 | Fixtures below | Not run |
| TS-STU-042 | Academic admin cannot transfer | security | P1 | P1 | As U-ACAD-A. |
| Action absent; API 403. | 02 §9 students.transfer | Fixtures below | Not run |
| TS-STU-043 | Học tập tab shows FLYER data | functional | P1 | P1 | S1 with FLYER activity in the stub. |
| Sections: study time this month, assignments assigned/completed, latest scores per skill (4), placement result, latest exam entries; values match the stub /v3/parent/learner/{id}/report. | STU-08 | Fixtures below | Not run |
| TS-STU-044 | Học tập empty state | ui-ux | P1 | P1 | A student whose learner has no FLYER usage. |
| Exactly "Chưa có dữ liệu học tập"; no zeros rendered as fake data. | STU-08 empty | Fixtures below | Not run |
| TS-STU-045 | Learner deleted on FLYER side | edge | P2 | P1 | Stub returns 404 for the learner. |
| Right rail shows chip "Tài khoản đã xoá"; Học tập tab empty; the rest of the profile works. | 02 §11 | Fixtures below | Not run |
| TS-STU-046 | Teacher can view learning data only for own-class students | security | P2 | P1 | As U-TEACH. |
| S1 works; S7 returns 404. | 02 §9 students.learning.view | Fixtures below | Not run |
| TS-STU-047 | Upload a document with type | functional | P1 | P1 | S1 profile tab Tài liệu as U-ACAD-A. |
| Row with type, name, uploader, time; link is a signed URL that expires (opening after 15 min gives 403); the file is not reachable without the signature. | STU-09, 12 §3 uploads | Fixtures below | Not run |
| TS-STU-048 | Reject disallowed file types and size | negative | P1 | P1 | Tab Tài liệu. |
| Errors "Định dạng không hỗ trợ (pdf, jpg, png, xlsx, docx)" and "Tối đa 20 MB". | 12 §3 file uploads | Fixtures below | Not run |
| TS-STU-049 | Flagged note appears on roster and attendance sheet for teachers | functional | P0 | P1 | S1 note "Dị ứng đậu phộng" flagged Cần lưu ý. |
| S1 row shows "Cần lưu ý: dị ứng đậu phộng"; a non-flagged staff-only note is not visible to the teacher anywhere. | STU-09, 02 §6 rule 8 | Fixtures below | Not run |
| TS-STU-050 | Note visibility staff vs teachers | security | P1 | P1 | A note with visibility staff on S1. |
| Response excludes staff-only notes; includes flagged notes only. | 02 §6 rule 8 | Fixtures below | Not run |
| TS-STU-051 | Teacher can add notes but not edit profile | security | P1 | P1 | As U-TEACH on S1. |
| Note saved with author and time; PATCH 403; no Sửa button. | 02 §9 students.edit teacher notes only | Fixtures below | Not run |
| TS-STU-052 | Anonymise a withdrawn student | functional | P0 | P1 | As U-OWNER on S5 (Withdrawn) with a document and a paid invoice. |
| Name becomes "Học viên đã xoá", phone/email of the guardian null (if not shared), documents deleted; the invoice list still shows the invoice with the anonymised name and amounts intact; audit entry student.anonymise with the reference; event student_anonymised. | STU-10, 12 §4 deletion | Fixtures below | Not run |
| TS-STU-053 | Anonymise refused for Active student and for non-owner | negative | P1 | P1 | S1 Active; U-BM-A. |
| S1: action disabled with tooltip "Chỉ áp dụng cho học viên đã nghỉ"; API 409. U-BM-A: action absent; API 403. | STU-10 Given, 02 §9 students.anonymise owner only | Fixtures below | Not run |
| TS-STU-054 | Student code is tenant-wide sequential and never reused | functional | P1 | P1 | Note the highest code. |
| Codes increase by one across branches; the anonymised code is not reissued. | 02 §6 rule 2 | Fixtures below | Not run |
| TS-STU-055 | Import creates students without guardians with warning chip | edge | P2 | P1 | Import of a student row lacking g1_phone for a child (warning tolerated by import for age ≥ 18 only; for a child this is an error). Use an adult row without guardian and a child row with "Bỏ qua dòng lỗi". |
| Adult imported without chip; a child imported only when the import explicitly allows; such a record shows chip "Thiếu phụ huynh" and the list tab filter "Thiếu phụ huynh" lists it. | 02 §11 import without guardians | Fixtures below | Not run |
| TS-STU-056 | Student attendance tab month view | functional | P1 | P1 | S1 with SES-PAST marked. |
| Month calendar with a chip per session (Có mặt green etc.), rates for 30 and 90 days, absences table (date, class, status, reason, make-up booked), button + Thêm phép. | 02 §5 Điểm danh tab, 04 §4 | Fixtures below | Not run |
| TS-STU-057 | Student Học phí tab | functional | P1 | P1 | S1. |
| Package balance card (5 / 24, expiry date), tuition list with status chips (INV-1 Chưa thanh toán, INV-4 Đã thanh toán), receipts list with PT numbers, button Tạo hoá đơn. | 02 §5 Học phí tab | Fixtures below | Not run |
| TS-STU-058 | Edit drawer prefilled and saves partial changes | functional | P1 | P1 | S1. |
| PATCH sends only changed fields; toast "Đã lưu"; Tổng quan shows the new address; audit entry student.update with before/after. | 02 §8 PATCH partial | Fixtures below | Not run |
| TS-STU-059 | Profile page in en locale | i18n | P2 | P1 | As U-ACAD-A in en. |
| Tabs Overview · Guardians · Classes & history · Attendance · Tuition · Learning · Documents · Notes · Audit log; status chip "Active"; money "9,600,000 đ" or "VND 9,600,000" consistently. | 12 §8 | Fixtures below | Not run |
| TS-STU-060 | Profile at 1024 px and 390 px | ui-ux | P3 | P1 | S1. |
| 1024: right rail moves below the tabs or stays with no horizontal overflow. 390: header stacks; tabs scroll horizontally; console minimum notice acceptable. | 12 §9 | Fixtures below | Not run |
| TS-STU-061 | Keyboard: student list rows and actions reachable | a11y | P2 | P1 | /students. |
| Focus reaches the tab bar, filters, each row link and action buttons in order; Enter opens the profile; focus ring visible. | 12 §9 WCAG | Fixtures below | Not run |
Trường Số (truongso.net) · FLYER internal