Trường Số QA/07 Parent communication
Trường Số · QA test suite · Phase 1 · 10/09/2026
07 · Parent communication
Test cases for PRD 07. 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
5
P1
19
P2
11
P3
0
| Type | functional | ui-ux | edge | negative | regression | flow | a11y | perf | security | i18n |
|---|---|---|---|---|---|---|---|---|---|---|
| Count | 19 | 1 | 2 | 3 | 0 | 1 | 0 | 0 | 7 | 2 |
2Test cases
| ID | Title | Type | Priority | Phase | Preconditions | Steps | Expected result | PRD trace | Data needed | Run 1 |
|---|---|---|---|---|---|---|---|---|---|---|
| TS-COM-001 | Zalo OA connection card and template registry | functional | P0 | P1 | As U-OWNER on /settings/integrations (ZALO stub). |
| Card shows Đã kết nối with OA name and avatar; registry lists attendance_absent, attendance_late, invoice_created, receipt, fee_reminder, schedule_change, credentials, welcome with Zalo template id, status chips (Đã duyệt / Chờ duyệt / Từ chối) and parameter list; schedule_change shows Chờ duyệt. | COM-01 | Fixtures below | Not run |
| TS-COM-002 | Secrets masked after save | security | P0 | P1 | Zalo connected. |
| Secret and tokens displayed as "••••" + last 4 chars; API response contains no full secret. | 12 §3 secrets | Fixtures below | Not run |
| TS-COM-003 | Non-owner cannot see or edit Zalo integration | security | P1 | P1 | As U-BM-A and U-ACC. |
| Zalo card hidden for both; U-ACC sees SePay and e-invoice only; API 403 for POST /integrations/zalo. | 07 §9 integrations.zalo | Fixtures below | Not run |
| TS-COM-004 | Template gap: unapproved template falls back and settings shows the gap | functional | P1 | P1 | schedule_change template Chờ duyệt. |
| Message delivered via push/email fallback with log reason "Mẫu ZNS chưa duyệt"; settings page shows a warning row for schedule_change. | 07 §6 rule 3 | Fixtures below | Not run |
| TS-COM-005 | Transactional message per event, per guardian flag | functional | P0 | P1 | S1 with G1 primary contact and G3 payer (different people). |
| Absence message goes to G1 only; receipt goes to G3 only; each visible on the source record (sheet / payment) and in /communication tab Tin đã gửi. | COM-02, 07 §6 rule 1 | Fixtures below | Not run |
| TS-COM-006 | Message status lifecycle and retries | functional | P1 | P1 | Stub set to fail twice then succeed. |
| Status queued → failed (attempt 1) → failed (2) → sent (3) within 15 min stub time; attempts = 3 in the log. | COM-02 retries | Fixtures below | Not run |
| TS-COM-007 | Every message is written to the portal inbox regardless of channel | functional | P1 | P2 | G2 (no Zalo consent). |
| Portal inbox for G2 has the message; external channel shows skipped/email as per consent. | 07 §3 portal inbox always | Fixtures below | Not run |
| TS-COM-008 | Message log columns, filters and empty state | functional | P1 | P1 | As U-ACAD-A on /communication tab Tin đã gửi. |
| Columns Thời gian, Loại chip, Học viên · Phụ huynh links, Kênh, Trạng thái chips Đã gửi/Đã nhận (green) · Thất bại (red) · Bỏ qua: lý do (grey) · Chờ (yellow), Nội dung preview, Thao tác Gửi lại · Xem; filters work; empty text exactly "Chưa có tin nào được gửi." | 07 §5 message log | Fixtures below | Not run |
| TS-COM-009 | Resend a failed message | functional | P1 | P1 | A failed message. |
| POST /messages/{id}/resend; new attempt logged; status updates. | 07 §8 resend | Fixtures below | Not run |
| TS-COM-010 | KPI tiles on Sổ liên lạc | functional | P2 | P1 | /communication. |
| Sent today, failed today, unreachable guardians, ZNS spend this month (VND) with cost from the log. | 07 §5 KPI tiles | Fixtures below | Not run |
| TS-COM-011 | Rendered content stored and personal data masked in logs | security | P1 | P1 | A sent message. |
| Rendered body visible in the message log; application logs contain masked phone (e.g. 0901***567) and no full name. | 07 §6 rule 9, 12 §10 | Fixtures below | Not run |
| TS-COM-012 | Placeholder with missing data renders cleanly | edge | P2 | P1 | Session without a room. |
| Body has no dangling "tại phòng " text; uses the fallback wording with branch. | 07 §11 placeholder missing | Fixtures below | Not run |
| TS-COM-013 | Quiet hours hold non-urgent messages | functional | P1 | P1 | Clock 22:00. |
| Message status Chờ with scheduled 07:00; sent after the clock passes 07:00. | 07 §3 quiet hours | Fixtures below | Not run |
| TS-COM-014 | ZNS monthly cap pauses ZNS and falls back | functional | P2 | P1 | Cap set to 1,000 VND; spend already 900. |
| First ZNS sent; second falls back to push/email with reason "Vượt hạn mức ZNS"; settings shows the cap reached. | 07 §6 rule 4 | Fixtures below | Not run |
| TS-COM-015 | Consent revoked mid-month stops ZNS | functional | P1 | P1 | G1 revokes Zalo consent (staff action on the guardian card). |
| ZNS skipped with reason; portal inbox continues; guardian card shows "Chỉ liên hệ qua điện thoại". | 07 §11 revoke | Fixtures below | Not run |
| TS-COM-016 | Teacher class note to parents via OA/push only | functional | P1 | P1 | As U-TEACH after saving SES-TODAY. |
| POST /messages/send type custom to guardians of present and absent students with each student's status line; channel OA or push, never ZNS; log rows visible; teacher cannot choose a ZNS template. | COM-04 | Fixtures below | Not run |
| TS-COM-017 | Teacher cannot send to other classes | security | P1 | P1 | As U-TEACH. |
| 403 or the C2 students are rejected in the response. | 07 §9 communication.view_log own classes | Fixtures below | Not run |
| TS-COM-018 | Announcement composer with audience preview and unreachable list | functional | P1 | P2 | As U-ACAD-A. |
| Preview shows counts per channel and lists unreachable guardians (G2); the message renders with the student name substituted; after send, delivered/read counts update; announcement appears in the class page and the portal. | COM-03 | Fixtures below | Not run |
| TS-COM-019 | Announcement validation | negative | P2 | P2 | Composer. |
| Each rejected inline; the last shows a warning with the unreachable list and blocks send. | 07 §5 composer | Fixtures below | Not run |
| TS-COM-020 | Bulk announcement over 500 recipients requires announce_bulk | security | P2 | P2 | As U-ACAD-A; audience whole branch (> 500). |
| 403 / "Cần quyền gửi hàng loạt"; U-OWNER succeeds. | 07 §6 rule 5 | Fixtures below | Not run |
| TS-COM-021 | Scheduled announcement resolves audience at send time | edge | P2 | P2 | Schedule for +10 min; then enroll S3 into C1. |
| S3's guardian receives it. | 07 §11 | Fixtures below | Not run |
| TS-COM-022 | Progress report batch: draft, comment, publish, PDF | functional | P1 | P2 | As U-ACAD-A; C1; period last month. |
| One draft per student with attendance rate, assignments, accuracy, study time, balance; teacher comments saved inline; publish sends report_published message with portal link and PDF; published reports immutable (edit creates version 2). | COM-05 | Fixtures below | Not run |
| TS-COM-023 | Publish without teacher comment blocked unless override | negative | P2 | P2 | A draft with empty comment. |
| Blocked "Thiếu nhận xét giáo viên" with an admin override option that is audited. | 07 §6 rule 7 | Fixtures below | Not run |
| TS-COM-024 | Parent OTP login and children switcher | functional | P0 | P2 | G1 phone; portal at /parent/login (390 px). |
| Lands on /parent with child chips Nguyễn An and Nguyễn Bình (both branches); tabs Lịch học, Điểm danh, Học phí, Kết quả, Thông báo, Hồ sơ; session persists 30 days (cookie expiry). | COM-06 | Fixtures below | Not run |
| TS-COM-025 | Portal login error states and rate limits | negative | P1 | P2 | Unknown phone; known phone. |
| Text "Số điện thoại chưa được đăng ký với trung tâm. Vui lòng liên hệ ..." ; 11th OTP request refused (10/hour); after 5 wrong attempts the code is invalid and a new one is required; resend cooldown 60 s visible. | 07 §5 login, 12 §3 rate limits | Fixtures below | Not run |
| TS-COM-026 | Portal invoice with QR and post-payment update | flow | P1 | P2 | G1; INV-1 unpaid. |
| Lines, total, due date, QR with payment code shown; after the webhook the status becomes Đã thanh toán and a receipt PDF link appears. | COM-07 | Fixtures below | Not run |
| TS-COM-027 | Portal excuse and make-up requests | functional | P1 | P2 | G1. |
| Two parent_request rows (excuse, makeup) open; staff sees them under Điểm danh → Yêu cầu and the today plan; G1 gets confirmation. | COM-08 | Fixtures below | Not run |
| TS-COM-028 | Portal consent management and correction request | functional | P1 | P2 | G1 /parent/profile. |
| Consent record revoked_at set with channel portal; a task for academic admin created; the birthday itself unchanged until staff edits it (audited). | COM-09, 12 §4 | Fixtures below | Not run |
| TS-COM-029 | Portal shows only linked children | security | P0 | P2 | G1. |
| 404. | 12 §3 parents see only linked learners | Fixtures below | Not run |
| TS-COM-030 | Portal works inside Zalo in-app browser UA | ui-ux | P2 | P2 | Playwright with Zalo UA string, 390 px. |
| Renders with bottom tab bar, 16 px base font, no sidebar; no horizontal scroll. | 07 §5 design | Fixtures below | Not run |
| TS-COM-031 | Portal session revocation by staff | security | P2 | P2 | G1 logged in. |
| Next portal request redirects to login. | 07 §6 rule 8 | Fixtures below | Not run |
| TS-COM-032 | Templates page and test send | functional | P1 | P1 | As U-OWNER /settings/templates. |
| Chips {ten_hoc_vien}, {lop}, {ngay}, {gio}, {so_tien}, {ma_thanh_toan}, {link}; test send logs a message to the owner's phone via the stub. | 07 §5 templates | Fixtures below | Not run |
| TS-COM-033 | Notification policy table per type | functional | P1 | P1 | /settings/notifications. |
| Rows per message type × channels checkboxes with quiet-hours toggle; receipt no longer attempts email. | 07 §7 notification_policy | Fixtures below | Not run |
| TS-COM-034 | Communication pages in en locale | i18n | P2 | P1 | en. |
| Tabs Announcements · Sent messages · Progress reports · Parent requests · Templates; status chips translated. | 12 §8 | Fixtures below | Not run |
| TS-COM-035 | Message copy uses the formal register | i18n | P2 | P1 | Default templates. |
| Address "Quý phụ huynh", "học viên", "giáo viên"; no "bạn", "bé" as the address form, no emoji. | 12 §8 formal register | Fixtures below | Not run |
Trường Số (truongso.net) · FLYER internal