Multi-Sequence Local Push Notifications, QA harness. Task: 86aenhrw2
Before you start: notifications are suppressed while the app is in the foreground.
After pressing a schedule button, background the app or lock the device before the timer elapses.
All timers in the test config are 1 to 3 minutes. Every button call is logged in the panel at the bottom.
Timing is approximate. Alarms use Android's inexact AlarmManager, and locking the device
puts it into Doze mode, which can delay delivery well beyond the 1–3 minute timers (sometimes by many minutes,
and batched together). This is expected — do not log late deliveries as failures. If you need
tighter timing, keep the screen on but the app backgrounded, rather than locking the device.
1. Basic Scheduling and Delivery web
Verifies that a web-triggered sequence schedules and delivers notifications in order, with correct title, content, and timing. Uses sequence cart_alerts (3 notifications at 1, 2, and 3 minutes).
Press Schedule, then background the app.
Wait 3+ minutes without opening the app.
Expected: "Cart notification 1", then 2, then 3 arrive at ~1, ~2, and ~3 minutes after the trigger, in that order. Tapping each opens its own URL in the app.
2. Continuation and Reset web
Verifies the sequence remembers its position. Re-triggering continues from the next notification; cancelling resets to the beginning. Uses cart_alerts.
Schedule, background, receive notification 1. Reopen the app.
Press Cancel, then Schedule, background. Expected: notification 1 arrives again (reset).
Repeat step 1, then force-kill the app, reopen, schedule again. Expected: continuation still works (state persisted).
Expected: continuation after delivery, reset after cancel, position survives app restarts.
3. Native Trigger: App Opening native
Verifies the welcome_series sequence triggers automatically when the app opens. No buttons needed, the app itself is the trigger.
Fresh install (or clear app data), open the app.
Background the app and wait ~1 minute. Expected: "Welcome!" arrives.
Reopen the app before the timer fires on a second run: the alarm should be rescheduled, not duplicated.
After the welcome has been delivered once, reopening the app must never schedule it again (Max_Trigger_Count is 1).
Expected: one welcome notification per install, never delivered while the app is open, reopening does not create duplicates.
4. Random Order web
Verifies Send_In_Random_Order: true. Delivery times stay fixed (1, 2, 3 minutes) but the content (A, B, C) is shuffled across those slots. Uses sequence random_test.
Schedule, background, wait 3+ minutes, note the order of contents received.
Cancel (resets the run), schedule again, compare: order may differ between runs.
Expected: all 3 contents (A, B, C) delivered exactly once per run, at the fixed times, order shuffled. No duplicates, no omissions.
5. Rate Limiting web
Verifies the rolling delivery window. Sequence rate_limit_test has 3 notifications but Rate_Limit_Count: 2 over Rate_Limit_Days: 7.
Schedule, background, wait 3+ minutes.
Reopen and press Schedule again, background.
Expected: only notifications 1 and 2 are delivered. Notification 3 is blocked and the sequence pauses. Re-triggering within the window schedules nothing new.
6. Lifetime Trigger Limit web
Verifies Max_Trigger_Count. Sequence trigger_limit_test has 1 notification and Max_Trigger_Count: 2, so it can only ever be started twice on this install.
Schedule, background, receive the notification. (Run 1)
Press Cancel (resets), schedule again, receive it. (Run 2)
Press Cancel, schedule a third time.
Expected: runs 1 and 2 deliver. The third schedule attempt does nothing, permanently, until the app is reinstalled.
7. Language Matching web
Verifies Language_Regex filtering. Sequence language_test has a Spanish notification ("es.*") and a default one, both at 1 minute.
With device language English: schedule, background. Expected: the default ("Default language") notification arrives.
Switch device language to Spanish, cancel, schedule again, background. Expected: the Spanish ("Notificación en español") one arrives.
Expected: exactly one notification per run, matching the device language, falling back to default when no regex matches.
8. Edge Cases and Utilities utility
Negative and cleanup tests.
Unknown ID: scheduling a nonexistent sequence must do nothing and not crash.
Legacy call: calling scheduleLocalNotifications() with no sequence ID. Per the task spec this should NOT schedule anything (confirm intended behavior with dev, the implementation guide disagrees). Must not crash either way.
Rapid fire: pressing schedule 5 times quickly must not create duplicate notifications.
Cancel all: cancels every scheduled sequence at once. Use it to clean up between test cases.
Expected: no crashes, no duplicates, cancel-all leaves nothing scheduled (verify with the check buttons above).
App Configuration Required for This Page
Add this Notification_Sequence object to the test app's appConfig.json. It defines every sequence used by the buttons above. Timers are in minutes, measured from the trigger time (not gaps between notifications).