3.6 KiB
3.6 KiB
Full-suite E2E (tests/e2e-suite.txt)
End-to-end coverage of tests/e2e-suite.txt: superadmin (Playwright, steps 1–3),
admin app (Maestro on iOS sim, steps 4–11 + 24), user app (Maestro, steps 12–23).
Why two runners
apps/superadmin-uiis a web app — Maestro's Chromium driver is broken in this env, so steps 1–3 run in Playwright (tests/web/specs/e2e-setup.spec.ts).- The admin/user apps are Expo dev builds on the iOS simulator, driven by Maestro CLI
(
maestro test --udid …). The Maestro MCP iOS bridge is currently wedged; CLI works.
Prerequisites
- Backend + superadmin-ui running (
BACKEND_URL, port 4175). - iOS simulator booted with both dev builds installed; Metro (
expo run:ios) up — the Store/Tag/combotestIDs load over JS, no native rebuild needed. cp .env.example .envand fill inUSER_MOBILE/USER_PASSWORDetc.
Run
npx playwright test --config tests/web/playwright.config.ts e2e-setup # steps 1-3, writes .env.e2e
bash tests/e2e/full-suite/run.sh # steps 4-24
bash tests/e2e/full-suite/run.sh user-journey.yaml # subset (reuses last readback)
How it works
- The Playwright setup spec reuses region 1 (Mahabubnagar), creates a fresh
timestamped region-1 admin, and writes
.env.e2e(STAMP/ADMIN_NAME/ADMIN_PASSWORD/REGION_ID). All suite entities are namedE2E<stamp> …so reruns never collide (backend rejects duplicate product names). run.shpins the sim inside Mbnr-1 viaxcrun simctl location <udid> set 16.7338,77.989(step 12), then runs flows inconfig.yamlorder, withscripts/readback.pyresolving real IDs between legs (staff → stores → slots) intogen/readback.env.- Step 10:
scripts/gen_slots.pygeneratesgen/admin-slots.yamlseconds before it runs — 8 slots 2h apart, freeze 15 min prior, all suite SKUs attached. iOS pickers open at now, so date nav (calendar +DatePicker.NextMonth), hour walks, and the relative 15-tap freeze-minute walk are computed from gen time.readback.py --slotsverifies spacing/freeze/SKUs afterwards and fails fast if an hour boundary rolled over mid-flow (rerun the suite in that case). - Step 9 (offers):
isOfferflags on 3 SKUs (P1-V1, P2-V0, P2-V2); the combo surfaces under the Offers tab → Combos section. - Step 24 matches the order by customer mobile on Manage Orders.
Layout
config.yaml # workspace + execution order
run.sh # orchestrator (env, geo-fix, readbacks, maestro invocations)
.env / .env.e2e # static config / generated per-run hand-off (gitignored)
admin-stores.yaml # step 5: 2 stores
admin-product-p1.yaml # step 6: 2-SKU product, store 1, region-only assert
admin-product-p2.yaml # step 7: 4-SKU product, store 2, images
admin-combo.yaml # step 8: combo with 2 included items
admin-tags.yaml # step 11: 2 dashboard tags, 1 product each
gen/admin-slots.yaml # step 10: GENERATED (see above)
user-journey.yaml # steps 13-23
admin-verify-order.yaml# step 24
subflows/ # login, login-user (password), fill-variant, pick-image-ios
scripts/ # gen_slots.py, readback.py
assets/test-product.png# seeded into the sim gallery per product flow
Gotchas
- Suite runtime ~15–25 min (the 8-slot flow is ~270 wheel taps).
- Sim clock is IST;
gen_slots.pyassumes Asia/Kolkata. - The iOS status bar and picker wheels share numeric text — all taps use full-match regex, which keeps them unambiguous (verified by spike).
user-journeyusesclearState: trueon the user app; admin flows keep state and log in conditionally.