freshyo/docs/test-cases/notifications.md
2026-10-18 18:19:15 +05:30

35 lines
3.7 KiB
Markdown

# Push notifications, broadcasts and event messages
Scope: customer/staff push-token registration, admin targeted sends, order/cancel/complaint messages, deep links and queue integrations. **Only approved isolated recipients; no real customer broadcasts.**
> **STATUS: EXCLUDED from the automated regression run (2026-10-18).**
> Push/notification cases are **skipped by owner instruction for this run** and must not be
> executed automatically: they require real push delivery to devices/recipients, which is
> out of scope for the current automated harness. The cases below are **retained unchanged**
> (nothing removed) and are marked `SKIPPED` rather than `PASS`/`FAIL`/`NOT RUN`.
> Treat them like the OTP checklist: verify manually in an isolated provider sandbox when a
> notification run is explicitly authorised.
| ID | Priority | Action / input | Expected result |
|---|---|---|---|
| PUSH-01 | P1 | Register anonymous device token, login and register again. | Token correctly associated/moved; no duplicate anonymous-plus-user recipient. |
| PUSH-02 | P1 | Same token repeated or refreshed token/new device. | Defined upsert/multi-device behavior without duplicated sends. |
| PUSH-03 | P0 | Logout U1, login U2 on same device. | Subsequent private U1 messages not exposed to U2 under approved token policy. |
| PUSH-04 | P1 | Register staff token, trigger authorized test order notification. | Intended active regional staff receives correct order/region content. |
| PUSH-05 | P0 | Send targeted message to approved U1 fixture. | Only intended user/devices receive it; no U2/broadcast leak. |
| PUSH-06 | P0 | B staff submits A/private target IDs or customer calls send API. | Recipient selection/privilege scope enforced. |
| PUSH-07 | P1 | Missing/invalid/expired token and empty title/body. | Clear validation/provider handling; no failed-recipient crash for whole batch. |
| PUSH-08 | P1 | Duplicate user/token IDs, many supported recipients. | No duplicate intended messages; bounded batching/retry behavior. |
| PUSH-09 | P0 | Notification with private order/complaint link clicked by wrong account. | Destination still enforces ownership; payload not authority. |
| PUSH-10 | P1 | Cold/background/foreground tap on supported deep link. | Correct destination, auth return and region context. |
| PUSH-11 | P1 | Invalid/deleted target route or unsupported link scheme. | Safe fallback, no script/external privilege route. |
| PUSH-12 | P1 | Order/cancel/complaint queue event retried. | Approved deduplication; no duplicate customer-facing side effects. |
| PUSH-13 | P1 | Provider timeout/token invalidation. | Retry/logging bounded; successful targets not falsely marked failed. |
| PUSH-14 | P1 | Notifications denied/OS token unavailable. | Ordering unaffected; permission recovery UX appropriate. |
| PUSH-15 | P2 | Physical-device receipt vs emulator queue acceptance. | Separate evidence; queue acceptance alone not PASS for actual receipt. |
| PUSH-16 | P0 | Sensitive payloads/logs, admin/internal notes. | Only intended content/recipient; no secrets/internal staff notes in customer push. |
| PUSH-17 | P1 | Staff deleted/reassigned after token registration. | No private old-region operational messages to stale identity. |
| PUSH-18 | P1 | Scheduled/event send delayed past cancellation/deletion. | Safe stale-context behavior; no misleading upcoming-order claim. |
| PUSH-19 | P0 | Superadmin sends “Admin Notifs”; repeat with a staff token and a customer token. | The dedicated superadmin sender succeeds and queues the notification; staff/customer callers are denied and no queue write occurs on denial. |
Provider-specific delivery guarantees and deduplication are policy/integration checkpoints. Telegram/event logs must be redacted in reports.