MOB-15 — Mobile test automation & hardening
Integration tests for the ordering and visit flows, golden tests for the design-system widgets, crash-free and cold-start checks in CI.
| Field | Details |
|---|---|
| Task code | MOB-15 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Tue 22 Dec 2026 |
| Due | Thu 24 Dec 2026 |
| Responsible | Imad — Mobile developer (Flutter) |
| Co-responsible | — |
| Effort | 2 person-day(s) planned · 6 from scratch · size M |
| Area · app | Mobile quality · mobile |
| Depends on | MOB-14 |
| Unblocks | MOB-17 |
| Milestones | — |
Summary
Integration tests for the ordering and visit flows, golden tests for the design-system widgets, crash-free and cold-start checks in CI.
Description
Before the pilot the critical flows must be protected by automated tests so later fixes do not silently break ordering or offline visits (NFR-09, NFR-01). Scope: integration tests for the reseller ordering flow (guest browse → sign-in → filters → product → cart → checkout → live status) and the delegate visit flow (start tour → offline visit → sync → close), golden tests for every hoco_ui component, a device matrix on Firebase Test Lab, crash-free and cold-start checks in CI, release hardening (obfuscation with symbols uploaded to Sentry, R8 rules) and coverage gates on hoco_core and hoco_offline. It needs a stable Prism contract and a staging test tenant with resettable data from Anis. MOB-16 and MOB-17 build on this safety net.
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | Patrol (or integration_test + UiAutomator) setup to handle native dialogs: location, camera, notifications | Imad |
| 2 | Reseller ordering suite: guest catalog without prices → sign-in → facet filters → product → add → checkout with Idempotency-Key retry → order detail status update | Imad |
| 3 | Delegate visit suite: sign-in → start tour → airplane-mode visit with photo and report → reconnect → sync → closing with blocking items | Imad |
| 4 | Golden coverage for all hoco_ui components and key screens (home, catalog, product, cart, tour programme, visit) in fr LTR and ar RTL | Imad |
| 5 | Firebase Test Lab matrix (3 mid-range Android models, API 29, 33, 34) running both suites on release-candidate builds | Imad |
| 6 | CI performance check: cold start measured in profile mode on Test Lab, build fails on a > 20 % regression from the baseline | Imad |
| 7 | Coverage gates: ≥ 80 % for hoco_offline and hoco_core, ≥ 60 % per app (proposal) | Imad |
| 8 | Release hardening: --obfuscate --split-debug-info, Dart symbols and Android mapping uploaded to Sentry, R8 keep rules for drift, Firebase and Maps | Imad |
| 9 | Resettable staging test tenant and seed script for nightly suite runs | Anis |
Deliverables
- apps/reseller/integration_test/ and apps/delegate/integration_test/ suites
- .github/workflows/nightly.yml (staging suites, Test Lab matrix, performance check)
- Golden baselines in packages/hoco_ui/test/goldens and app golden folders
- Sentry symbol upload in the release workflow
Acceptance criteria
- Both suites pass on every PR against Prism and nightly against staging (NFR-09)
- A deliberately broken checkout or sync change makes CI fail
- Every hoco_ui component has goldens in LTR and RTL
- Release crashes in Sentry are symbolicated (readable Dart stack traces)
- Cold-start time is tracked per build and regressions above 20 % block the release (NFR-01)
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| NFR-09 | Maintainability: automated tests, CI gates, typed contracts, documentation | V1 |
| NFR-01 | Performance: app opens and search/filter results in under 3 s on a normal mobile connection; API p95 targets | V1 |
Test measures
- Mutation check: introduce known bugs (skip Idempotency-Key, break outbox ordering) and confirm the suites catch them
- Test Lab run on the release candidate with video and logcat review
- Coverage report published as a CI artifact
Risks
- Flaky device tests erode trust — retry once in CI, quarantine flaky tests with an issue, keep staging data resettable
KPI
- Delivered by Thu 24 Dec 2026 within 2 person-day(s).
- Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
- Zero open critical defects, permission gaps or data-integrity regressions at sign-off.
Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.
MOB-14 — Store readiness — Play Console tracks, data safety, location declaration
Play Console apps, internal and closed tracks, data-safety form, background/foreground location declaration and video, privacy policy URL, release signing.
MOB-17 — Design QA fixes & accessibility pass (both apps)
Apply Akram's design-QA findings, check contrast, touch targets, text scaling and screen-reader labels, verify RTL readiness on key screens.