Trường Số QA/Flows
Trường Số · QA test suite · Phase 1 · 10/09/2026

End-to-end flows

Scripted user journeys across modules. Each step has a checkpoint that must be observed before continuing; a failed checkpoint stops the flow and files a bug against the linked case. Steps marked (P2) are skipped until the module ships.

Key facts, origin and limits
Flows
14
P0
9
Checkpoints
78
Scope
P1 with P2 steps marked

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.

1Flows

TS-FLW-01Lead to first payment (the daily loop)P0Phase P1Regression

Actors: U-ADM, U-ACAD-A, U-TEACH, U-ACC, G (guardian of the new student), SePay stub, Zalo stub

Preconditions: Tenant BIG; class C1 with 1 free seat and 2 trial seats; FP3 package plan on Movers 2; ZNS templates approved.

#ActionCheckpoint (expected, observable)Run 1
1U-ADM imports a 1-row xlsx creating lead "Ngô Thị Lan" 0977123456 with prospect "Ngô Gia Hân" 2018.Import job done 1/1; lead visible in /crm/customers with Học viên dự kiến "Ngô Gia Hân (2018)".Not run
2U-ADM logs a call outcome Yêu cầu gọi lại at tomorrow 10:00.Row appears in /crm/schedules → Gọi lại under "Sắp tới".Not run
3U-ADM books a trial into the next C1 session with Gửi xác nhận Zalo on.Booking Đã đặt; trial_confirm message row sent (stub); session roster shows the prospect with Học thử chip; trial seats 1/2.Not run
4U-TEACH marks the trial present on the phone and picks "Phù hợp".Booking Đã học; U-ADM notification "Học thử xong: Ngô Gia Hân (Movers 2A)".Not run
5U-ADM creates a placement test and submits 72 overall.Status Hoàn thành; Đề xuất lớp Movers.Not run
6U-ADM runs Chuyển đổi: new learner, guardian consent Zalo, class C1 start next session, FP3, no discount, Tạo hoá đơn ngay.Result cards Học viên · Lớp · Hoá đơn; student Đang học; C1 12/12; invoice 6,000,000 unpaid with QR; lead won.Not run
7SePay stub posts a transfer with the invoice payment code, 6,000,000.Payment auto-created with SePay id; receipt PT-Q1-YYYYMM-#### issued; invoice Đã thanh toán; receipt ZNS to the guardian; package credited 24 sessions with expiry +6 months.Not run
8U-TEACH marks the next C1 session with the new student present.Balance 23; session_consumption row; attendance rate 100% on the profile.Not run
9U-OWNER opens /dashboard this month.Thực thu includes 6,000,000; Nhập học mới +1; Học viên đang học +1; Chuyển đổi +1; all four drill-downs list the new records.Not run

Linked cases:

TS-FLW-02Walk-in student without a leadP0Phase P1Regression

Actors: U-ACAD-A, U-ACC

Preconditions: Tenant BIG; C4 scheduled with seats; FP1 on its course.

#ActionCheckpoint (expected, observable)Run 1
1U-ACAD-A creates the student from /students/new with guardian and new FLYER account.Credentials shown once; status Chờ xếp lớp; no lead created; guardian consent recorded.Not run
2U-ACAD-A clicks Xếp lớp → C4, start = class start date, FP1.Status Đang học; C4 1/12; enrollment row in Lớp & lịch sử.Not run
3U-ACC creates the invoice from the profile (Tạo hoá đơn) and records a partial cash payment 4,000,000.Invoice Thanh toán một phần, remaining 5,600,000; receipt numbered; cash book entry.Not run
4U-ACC opens Công nợ after moving the due date to yesterday (or wait).Student listed in bucket 0–7 with remaining 5,600,000; Gửi nhắc works and updates Nhắc gần nhất.Not run

Linked cases:

TS-FLW-03Pause and returnP0Phase P1Regression

Actors: U-ACAD-A, U-TEACH, U-BM-A

Preconditions: S1 active in C1 with package expiry E and 5 sessions.

#ActionCheckpoint (expected, observable)Run 1
1U-ACAD-A pauses S1 for 30 days with reason.Status Bảo lưu; C1 sessions in the window no longer list S1 on the sheet; reminder task 7 days before return in the today plan.Not run
2U-TEACH opens a sheet inside the pause window.S1 absent from the roster; counters exclude S1.Not run
3U-ACAD-A resumes S1 into C2 (a different class with a seat) on day 31.Status Đang học; new enrollment in C2; package expiry E + 30 (or E + actual paused days); balance still 5.Not run
4U-ACC opens the finance report deferred revenue.S1 unused sessions still counted; no revenue change.Not run
5U-BM-A checks the timesheet preview (P2) or session list for the pause window.Teacher sessions unaffected by the pause.Not run

Linked cases:

TS-FLW-04Withdrawal with refundP0Phase P1/P2Regression

Actors: U-ACAD-A, U-ACC, U-BM-A, G1

Preconditions: S1 active; 5 sessions unused on a paid package; admin fee 10%; refund threshold 5,000,000.

#ActionCheckpoint (expected, observable)Run 1
1U-ACAD-A withdraws S1, reason "chi phí".Status Đã nghỉ; enrollments ended today; dialog shows unused 5 and estimate 1,125,000 with link Tạo phiếu hoàn.Not run
2U-ACC follows the link and creates the credit note with the proposed amount (P2).Credit shown on the invoice; approval not required (< threshold).Not run
3U-ACC pays the refund in cash from CD-A to Trần Thị Hoa (P2).PC-Q1-... entry in cash book as payment out; S1 balance 0; package status refunded.Not run
4U-ACC runs Chốt quỹ ngày (P2).Expected cash reflects the refund; difference 0 when counted correctly.Not run
5U-OWNER opens the churn report / dashboard Nghỉ học.S1 listed with reason "chi phí" and refund amount; Nghỉ học tile +1.Not run
6G1 opens the portal (P2).Invoice shows the credit and the refund receipt.Not run

Linked cases:

TS-FLW-05Teacher substitutionP0Phase P1/P2Regression

Actors: U-ACAD-A, U-TEACH (T1), U-TEACH2 (T2), U-ACC

Preconditions: SES-TODAY planned with T1 main.

#ActionCheckpoint (expected, observable)Run 1
1U-ACAD-A assigns T2 as substitute.Session shows T1 + dạy thay T2; T2 sees it in /teach/today; T1 sees a substitute marker.Not run
2T2 opens the sheet and saves with one absence.Sheet marked_by T2; absence message sent to the guardian.Not run
3T1 opens the same sheet (stale) and tries to save.409 STALE_VERSION; banner "Buổi này đã được T2 điểm danh lúc HH:mm".Not run
4U-ACC generates the month timesheet (P2).T2 timesheet has the session; T1 timesheet excludes it (pay_main_when_substituted off).Not run

Linked cases:

TS-FLW-06Branch transfer of a student with package balanceP1Phase P1/P2Regression

Actors: U-OWNER, U-TEACH, G1

Preconditions: S1 at A in C1 with 5 sessions; C3 at B with a seat; G1 has S2 at B.

#ActionCheckpoint (expected, observable)Run 1
1U-OWNER transfers S1 to Thủ Đức effective Monday into C3.A record: enrollment ended, balance 0, Học phí entry "chuyển đi"; B record created with balance 5 and "chuyển đến"; guardians shared (G1 now has 3 links).Not run
2U-TEACH opens the next C3 sheet at B.S1 on the roster; marking present consumes from the transferred package (4 left).Not run
3U-OWNER opens the finance report for A and B.A revenue unchanged; B shows deferred revenue for the package with an inter-branch note.Not run
4U-BM-A (branch A) opens /students.S1 A record visible with status Đã chuyển/Đã nghỉ marker; the B record is not visible (404 by URL).Not run
5G1 opens the portal (P2).Both S1 histories (A and B) visible under the child.Not run

Linked cases:

TS-FLW-07Multi-branch user dayP1Phase P1Regression

Actors: U-OWNER, U-TEACH

Preconditions: BIG tenant; T1 teaches C1 (A) and C3 (B).

#ActionCheckpoint (expected, observable)Run 1
1U-OWNER at 1440 px opens /dashboard with Tất cả chi nhánh, then switches to Thủ Đức.Tiles refresh; Theo chi nhánh table has 3 rows; after switch only B numbers; the choice persists to /students.Not run
2U-OWNER opens /timetable by teacher.T1 column shows both C1 and C3 blocks across branches (teacher view is cross-branch).Not run
3U-TEACH on a 390 px phone opens /teach/today.Both today sessions listed with branch labels; the bottom tab bar present.Not run
4U-TEACH marks C3 at B then C1 at A within the same day.Both sheets saved; each notifies guardians with the correct {chi_nhanh} and branch phone.Not run
5U-TEACH opens /students.Only C1 and C3 students; branch filter limited to A and B.Not run

Linked cases:

TS-FLW-08Role escalation attemptsP0Phase P1Regression

Actors: U-TEACH, U-ADM, U-VIEWER, G1 (parent), a foreign-tenant id list

Preconditions: BIG tenant; second tenant with known ids.

#ActionCheckpoint (expected, observable)Run 1
1U-TEACH opens /settings/users and /settings/roles by URL.403 page with code; nothing rendered from the pages.Not run
2U-TEACH calls PUT /v3/crm/roles/{teacher role}/permissions granting all.403; role unchanged (verify as owner).Not run
3U-TEACH calls PUT /v3/crm/sale-profiles/{self}/branches adding branch C.403; branch switcher unchanged after reload.Not run
4U-ADM calls POST /v3/school/students directly.403 (create only via convert).Not run
5U-VIEWER attempts drag on Kanban and POST /tuitions/{id}/pay.Drag refused; 403.Not run
6G1 (portal token) calls GET /v3/school/students.401/403; portal tokens cannot reach staff endpoints.Not run
7U-OWNER of BIG requests 10 foreign-tenant ids across modules.404 for all.Not run
8U-OWNER changes U-TEACH role to branch_manager, then back.Two audit entries; U-TEACH receives in-app notification each time; effective on next request.Not run

Linked cases:

TS-FLW-09Month closeP1Phase P1/P2Regression

Actors: U-ACC, U-BM-A, U-OWNER, SePay stub

Preconditions: C3 monthly students; overdue invoices; two branches with cash drawers.

#ActionCheckpoint (expected, observable)Run 1
1U-ACC runs Lập hoá đơn tháng for all monthly classes with proration preview.Preview per student with prorated amounts; commit creates one GroupInvoice per run and Tuition per enrollment; notifications sent per channel.Not run
2U-ACC bulk-sends reminders from Công nợ for buckets > 7 days.Per-channel outcomes; Nhắc gần nhất updated; skipped reasons for guardians without consent.Not run
3SePay stub delivers 3 transfers: 2 with codes, 1 without.2 auto-matched with receipts; 1 in Chưa đối soát; U-ACC matches it.Not run
4U-ACC records 2 cash payments at A and 1 at B, then Chốt quỹ at each branch (P2).Receipt numbers sequential per branch; cash close per branch with difference 0.Not run
5U-BM-A approves timesheets; U-ACC exports payroll (P2).xlsx exported; export logged.Not run
6U-OWNER opens the executive dashboard for the month.Thực thu = Σ cash book Thu across branches; Theo chi nhánh rows sum to the top tiles; Công nợ quá hạn equals /finance/debt total.Not run

Linked cases:

TS-FLW-10Class lifecycleP0Phase P1Regression

Actors: U-ACAD-A, U-BM-A, U-TEACH

Preconditions: Course Movers 2 with FP1; rooms P.201/P.202; tenant holidays include one date in range.

#ActionCheckpoint (expected, observable)Run 1
1U-ACAD-A creates a course "Flyers 1" and then a class from it with T3/T5 18:00, room P.202, T2, capacity 3, 10 sessions, one holiday in range.Preview 10 sessions skipping the holiday; created with "Tạo lớp và 10 buổi".Not run
2U-ACAD-A edits the class to room P.201 (conflict with C1).Conflict chip; no Vẫn lưu; U-BM-A can override and the audit shows session_conflict_overridden.Not run
3U-ACAD-A enrolls 3 students then a 4th.3/3 Đầy; 4th goes to the waiting list.Not run
4U-ACAD-A cancels a session 10 hours ahead with make-up appended.cancelled_late; make-up session appended; guardians notified; still 10 non-cancelled sessions.Not run
5U-TEACH marks sessions until the last one is held.Tiến độ 10/10.Not run
6U-ACAD-A closes the class.Đã kết thúc; students with no other enrollment Hoàn thành; class in tab Đã kết thúc.Not run

Linked cases:

TS-FLW-11Absence follow-up loopP1Phase P1Regression

Actors: U-ACAD-A, U-TEACH, G1, U-ADM (care owner)

Preconditions: S1 in C1; thresholds 2 consecutive.

#ActionCheckpoint (expected, observable)Run 1
1G1 informs the desk; U-ACAD-A adds an excuse for the next session with make-up offered.Sheet pre-marks Có phép; G1 confirmation message; make-up suggestion on the profile.Not run
2U-TEACH marks S1 absent on the following two sessions.Absent ZNS each time within 2 min; after the second, task "Liên hệ phụ huynh: Nguyễn An vắng 2 buổi" for the care owner; S1 in tab Cần quan tâm.Not run
3Care owner logs a call from the task.Task done; activity on the student timeline.Not run
4U-ACAD-A books a make-up for the excused absence into C2.Học bù chip on the C2 session; S1 absences table shows Đã đặt học bù.Not run
5U-TEACH of C2 marks S1 present on the make-up.Booking attended; no package consumed (policy); attendance rate excludes the excused session.Not run

Linked cases:

TS-FLW-12Onboarding an empty tenant to first attendanceP0Phase P1Regression

Actors: Owner of EMPTY, invited academic admin and teacher

Preconditions: Tenant EMPTY; fixture files for import steps 1–6.

#ActionCheckpoint (expected, observable)Run 1
1Owner completes branch details and connects the bank account (stub).Checklist ticks 2 of 7.Not run
2Owner invites an academic admin and a teacher; both accept.Users active with branch scope; checklist ticks "mời nhân sự".Not run
3Owner imports staff, courses/fee plans, rooms, classes, students, enrollments in order.Each job done with 0 errors; classes have generated sessions; students Đang học with balances from opening balances.Not run
4Teacher opens /teach/today on a phone and saves the first sheet.Sheet saved; absence messages skipped with reason where consent missing; checklist complete or shows remaining items.Not run
5Owner opens /dashboard.No demo data outside admissions; tiles show real counts equal to list counts.Not run

Linked cases:

TS-FLW-13Invoice and payment reversalsP0Phase P1Regression

Actors: U-ACC, U-BM-A, SePay stub

Preconditions: INV-1 unpaid; INV-4 paid in cash; sp-001 processed.

#ActionCheckpoint (expected, observable)Run 1
1U-ACC voids INV-1 with reason.Đã huỷ; excluded from Đã lập tile and debt.Not run
2U-ACC voids the cash payment on INV-4 with reason.Payment void, number kept; INV-4 back to Chưa thanh toán; cash book reversal; audit entries.Not run
3SePay stub re-sends sp-001.Deduped; no new payment.Not run
4U-ACC tries to void INV-2 (partial).Refused 409.Not run
5U-OWNER reads the dashboard.Thực thu reduced by the voided cash payment; aggregates recomputed for that day.Not run

Linked cases:

TS-FLW-14Parent portal journeyP1Phase P2Regression

Actors: G1, U-ACAD-A, SePay stub

Preconditions: Portal enabled (P2); G1 with S1 (A) and S2 (B); INV-1 unpaid.

#ActionCheckpoint (expected, observable)Run 1
1G1 opens the portal link from a Zalo message and logs in with OTP.Children switcher shows both; Lịch học shows next sessions per child.Not run
2G1 opens Học phí → INV-1 and pays by QR (stub webhook).Status updates to Đã thanh toán; receipt PDF link appears.Not run
3G1 submits Xin phép nghỉ for the next C1 session.Request open for the desk; U-ACAD-A accepts; sheet pre-marks Có phép; G1 confirmation in inbox.Not run
4G1 revokes Zalo consent and requests a birthday correction.Consent revoked with timestamp; task for academic admin; next absence message skips ZNS with reason.Not run
5G1 tries GET /v3/parent/learner/<S7>/attendance.404.Not run

Linked cases:

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