rastrillo / aviso Public

Clone
git clone https://amadan.net/rastrillo/aviso

Plain git — no account needed to clone.

Download

Download this file

1# iOS smoke test
2
3The one check no automated test in this repository can make. The
4browser drive proves the module, the worker import and the handlers
5agree in Chromium with a subscription double; Chromium's own push
6subscription cannot be pointed at a test service, and iOS cannot be
7driven at all. So this is a person, a phone, and ten minutes, run
8before a release that touches the JS halves or the handlers.
9
10**Last run:** not yet. Record the date, iOS version and outcome at
11the bottom when it is.
12
13## Setup
14
151. Deploy the example (or any app wired per `SKILL.md`) at an https
16 origin the phone can reach. `http://localhost` is a secure context
17 on the machine itself, not across a network; use a real origin or
18 a tunnel that terminates TLS.
192. Provision the key once and keep it across restarts:
20 `EXAMPLE_VAPID_PRIVATE_KEY="$(cat .vapid-key)"`.
213. iPhone or iPad on iOS/iPadOS 16.4 or later, in Safari.
22
23## Steps and expected outcomes
24
251. **Open the origin in Safari.** The page loads; the coaching
26 paragraph about the Home Screen is visible; the buttons are
27 disabled (Safari-in-browser reports `push: false` on iOS, so the
28 log says the browser cannot do push).
292. **Share → Add to Home Screen. Open the installed copy.** The
30 coaching paragraph is hidden (`standalone` true); after the worker
31 activates, the buttons are enabled; the log shows `subscribed:
32 false`.
333. **Tap Enable.** iOS shows its permission prompt (it must come from
34 the tap — if no prompt appears, the gesture was lost). Allow. The
35 log shows `enabled: https://web.push.apple.com/…`. On the server,
36 one row for `dev`.
374. **Tap Notify me.** A notification appears in the system tray with
38 the title "Hello from aviso" while the app is in the foreground and
39 again after backgrounding the app and tapping Notify from another
40 device or a curl to `/notify`.
415. **Tap the notification.** The installed app comes to the front at
42 `/` (the payload's `url`).
436. **Tap Disable.** The log shows `disabled`; the server has zero
44 rows. Close the app fully and reopen it: the log shows `subscribed:
45 false` and the server still has zero rows — reconcile must not
46 re-enrol after an opt-out.
477. **Tap Enable again, then rotate the key on the server** (new
48 `EXAMPLE_VAPID_PRIVATE_KEY`, restart). Reopen the app: reconcile
49 re-subscribes under the new key without a prompt, and Notify
50 delivers again.
518. **Remove the app from the Home Screen.** The next send reports 410
52 from Apple's push service and the row is pruned.
53
54## Recording a run
55
56| Date | iOS | Device | Steps passed | Notes |
57|------|-----|--------|--------------|-------|
58| | | | | |
59