SCOPE: everything in progressdocs/offline-test-plan.md · build 40bb41bdb460

DVIR offline: device test plan

Run this on a real iPad and a real Android tablet before showing a client. Simulators and desktop browsers hide storage eviction, background behavior and weak-signal timeouts. Each step names what you should see; if you see something else, note the step number and what appeared.

Production URL: https://scope-safety-poc.vercel.app/dvir

A. Install (once per device, with a connection)

# iPad (Safari) Android (Chrome) Expect
A1 Open the URL in Safari (not Chrome) Open the URL in Chrome Persona picker
A2 Tap Share → Add to Home Screen → Add Tap the blue Install button in the banner, or menu ⋮ → Install app Icon "SCOPE DVIR" on the home screen
A3 Close Safari. Open SCOPE DVIR from the home screen Same Full screen, no address bar. The install banner is gone
A4 Sign in as Daniel Sgalia Same Form loads. Status bar is green: "Connected. Nothing waiting to upload." (gray "Checking connection…" for a second first)

The sign-in inside the installed app is separate from any sign-in in the browser tab. Always sign in inside the installed app.

B. Offline capture

# Do Expect
B1 Turn on Airplane Mode (and turn Wi-Fi off) Status bar turns amber: "No connection…"
B2 Close the app fully (swipe away), reopen from the home screen Form opens, still signed in as Daniel, vehicle list present, bar amber. This is the key test.
B3 Pick a vehicle, enter an odometer above "last", tap Mark remaining OK, sign, Submit Amber screen "Saved on this device". No inspection number yet
B4 Tap Start another inspection, file a second one on a different vehicle Same. Bar says "2 inspections saved on this device"
B5 Tap Sign out Warning panel with the count. Tap Stay signed in
B6 Close the app fully. Wait a few minutes. Reopen Still signed in, bar still shows 2 waiting. iPad: the app icon shows a badge "2"
B7 Turn Airplane Mode off, keep the app open Within about a minute the bar goes "Uploading 2…" then green. If the confirmation screen is still up it turns green and shows the number

Then confirm both rows exist in the database (inspection numbers, inspector = PER-0597).

C. Draft resume

# Do Expect
C1 Pick a vehicle, type an odometer, mark ten items, do not submit
C2 Close the app fully, reopen Same vehicle, reading and ten items are back
C3 Sign out, sign in as Daniel again Draft is back (drafts belong to the login)

D. Long offline (the one that matters for the client)

# Do Expect
D1 With a connection, open the app and confirm it is green
D2 Airplane Mode on. File one inspection (amber "Saved on this device")
D3 Leave the tablet in Airplane Mode for more than 24 hours, ideally 3 days. Open the app once a day from the home screen Every open: still signed in, still shows 1 waiting, bar red after 4 hours: "Waiting to upload for N hours…"
D4 Airplane Mode off, open the app Uploads within a minute, goes green

If D3 ever shows the sign-in screen, that is the failure this design is meant to prevent. Note the day it happened and whether the app had been closed or was left open.

E. Shared tablet

# Do Expect
E1 Airplane Mode on. As Daniel, file an inspection (amber). Sign out → Sign out anyway Persona picker with an amber note: "1 inspection on this device is waiting to upload…"
E2 Airplane Mode off. Sign in as Kyle Fredette Kyle's form. Bar is green for Kyle but says "1 from another driver on this device wait for them to sign in"
E3 Sign out, sign in as Daniel Daniel's item uploads, green

F. Server rejection

# Do Expect
F1 With a connection, submit an inspection with an odometer lower than "last" Red error under Submit before it sends (the form catches it)
F2 Airplane Mode on. On tablet 1 file RUT-002 at reading 400,000. On tablet 2 (or the desktop) file RUT-002 at 400,500 with a connection. Then take tablet 1 online Tablet 1: red bar "1 inspection rejected by the server", a Needs attention box with the odometer message, Try again and Discard (discard asks twice)

What cannot be tested on a desktop

Storage purge, app badge, install flow, Airplane Mode and the token refresh after hours offline are all device-only. The desktop check that was done covered: the service worker caches the shell, an inspection submitted while the browser reports offline is queued to IndexedDB and later uploads with the right inspector and reading, the sign-out warning, and the draft persistence.

Back to top