128 lines
6 KiB
YAML
128 lines
6 KiB
YAML
# orchestrator-slots: resume-from-slots run for apps/admin-ui.
|
|
# Skips stores/products/combo creation (assumed done by the full orchestrator
|
|
# up to the slot section - default names Heritage*/must match, or pass the
|
|
# same -e overrides used there). SLOT 1 is NOT re-created: it already exists
|
|
# in the data (both pickers committed at the same sim-clock minute) and is
|
|
# left as is. Runs slots 2..5, each with the standard pattern: deep-link to
|
|
# HOME (freshyoadmin://dashboard), confirm the iOS prompt, wait for the
|
|
# dashboard marker, then deep-link to Add Slot with dts/fts prefill params
|
|
# (exact times via the slots/add.tsx hook; freeze = delivery - exactly 10 min).
|
|
# Run: maestro test neo-tests/e2e/admin-ui/orchestrator-slots.yaml
|
|
# [-e PRODUCT_A_NAME=... -e A_Q1=... -e PRODUCT_B_NAME=... -e B_Q1=...
|
|
# -e COMBO_NAME=... -e COMBO_Q1=... -e STAFF_NAME=... ]
|
|
appId: in.freshyo.adminui
|
|
env:
|
|
STAFF_NAME: ${STAFF_NAME || "qusham"}
|
|
STAFF_PASSWORD: ${STAFF_PASSWORD || "qushaM123"}
|
|
PRODUCT_A_NAME: ${PRODUCT_A_NAME || "Heritage Chicken"}
|
|
A_Q1: ${A_Q1 || "500 g"}
|
|
A_Q2: ${A_Q2 || "1 kg"}
|
|
PRODUCT_B_NAME: ${PRODUCT_B_NAME || "Heritage Mutton"}
|
|
B_Q1: ${B_Q1 || "500 g"}
|
|
COMBO_NAME: ${COMBO_NAME || "Heritage Feast Combo"}
|
|
COMBO_Q1: ${COMBO_Q1 || "500 g"}
|
|
---
|
|
- launchApp
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: "login-name-input|add-product-menu-item"
|
|
timeout: 120000
|
|
- runFlow:
|
|
when:
|
|
visible:
|
|
id: login-name-input
|
|
commands:
|
|
- runFlow: subflows/login-admin.yaml
|
|
|
|
# ================== SLOT 2 (today, near-term, 2 SKUs) ====================
|
|
- openLink: freshyoadmin://dashboard
|
|
- runFlow: subflows/confirm-open.yaml
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: add-product-menu-item
|
|
timeout: 120000
|
|
- openLink: 'freshyoadmin://dashboard/slots/add?dts=${(function(){return new Date(Date.now()+60*60000).toISOString().split(":").join("%3A")})()}&fts=${(function(){return new Date(Date.now()+60*60000-600000).toISOString().split(":").join("%3A")})()}'
|
|
- runFlow: subflows/confirm-open.yaml
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: delivery-date-picker
|
|
timeout: 30000
|
|
- runFlow:
|
|
file: add-slot.yaml
|
|
env:
|
|
SLOT_DELIVERY_DATE: '${(function(){var d=new Date(Date.now()+60*60000);return d.getFullYear()+"-"+("0"+(d.getMonth()+1)).slice(-2)+"-"+("0"+d.getDate()).slice(-2)})()}'
|
|
SLOT_DELIVERY_TIME: "n/a"
|
|
SLOT_FREEZE_DATE: '${(function(){var d=new Date(Date.now()+60*60000);return d.getFullYear()+"-"+("0"+(d.getMonth()+1)).slice(-2)+"-"+("0"+d.getDate()).slice(-2)})()}'
|
|
SLOT_FREEZE_TIME: "n/a"
|
|
SLOT_PREFILL: "true"
|
|
PRODUCT_1: '${COMBO_NAME + " " + COMBO_Q1}'
|
|
PRODUCT_2: '${PRODUCT_A_NAME + " " + A_Q2}'
|
|
|
|
# ====================== SLOT FOR +2 HOURS LATER ==========================
|
|
- openLink: freshyoadmin://dashboard
|
|
- runFlow: subflows/confirm-open.yaml
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: add-product-menu-item
|
|
timeout: 120000
|
|
- openLink: 'freshyoadmin://dashboard/slots/add?dts=${(function(){return new Date(Date.now()+120*60000).toISOString().split(":").join("%3A")})()}&fts=${(function(){return new Date(Date.now()+120*60000-600000).toISOString().split(":").join("%3A")})()}'
|
|
- runFlow: subflows/confirm-open.yaml
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: delivery-date-picker
|
|
timeout: 30000
|
|
- runFlow:
|
|
file: add-slot.yaml
|
|
env:
|
|
SLOT_DELIVERY_DATE: '${(function(){var d=new Date(Date.now()+120*60000);return d.getFullYear()+"-"+("0"+(d.getMonth()+1)).slice(-2)+"-"+("0"+d.getDate()).slice(-2)})()}'
|
|
SLOT_DELIVERY_TIME: "n/a"
|
|
SLOT_FREEZE_DATE: '${(function(){var d=new Date(Date.now()+120*60000);return d.getFullYear()+"-"+("0"+(d.getMonth()+1)).slice(-2)+"-"+("0"+d.getDate()).slice(-2)})()}'
|
|
SLOT_FREEZE_TIME: "n/a"
|
|
SLOT_PREFILL: "true"
|
|
PRODUCT_1: '${PRODUCT_A_NAME + " " + A_Q1}'
|
|
|
|
# ====================== SLOT FOR +3 HOURS LATER ==========================
|
|
- openLink: freshyoadmin://dashboard
|
|
- runFlow: subflows/confirm-open.yaml
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: add-product-menu-item
|
|
timeout: 120000
|
|
- openLink: 'freshyoadmin://dashboard/slots/add?dts=${(function(){return new Date(Date.now()+180*60000).toISOString().split(":").join("%3A")})()}&fts=${(function(){return new Date(Date.now()+180*60000-600000).toISOString().split(":").join("%3A")})()}'
|
|
- runFlow: subflows/confirm-open.yaml
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: delivery-date-picker
|
|
timeout: 30000
|
|
- runFlow:
|
|
file: add-slot.yaml
|
|
env:
|
|
SLOT_DELIVERY_DATE: '${(function(){var d=new Date(Date.now()+180*60000);return d.getFullYear()+"-"+("0"+(d.getMonth()+1)).slice(-2)+"-"+("0"+d.getDate()).slice(-2)})()}'
|
|
SLOT_DELIVERY_TIME: "n/a"
|
|
SLOT_FREEZE_DATE: '${(function(){var d=new Date(Date.now()+180*60000);return d.getFullYear()+"-"+("0"+(d.getMonth()+1)).slice(-2)+"-"+("0"+d.getDate()).slice(-2)})()}'
|
|
SLOT_FREEZE_TIME: "n/a"
|
|
SLOT_PREFILL: "true"
|
|
PRODUCT_1: '${PRODUCT_A_NAME + " " + A_Q1}'
|
|
|
|
# ====================== SLOT FOR +4 HOURS LATER ==========================
|
|
- openLink: freshyoadmin://dashboard
|
|
- runFlow: subflows/confirm-open.yaml
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: add-product-menu-item
|
|
timeout: 120000
|
|
- openLink: 'freshyoadmin://dashboard/slots/add?dts=${(function(){return new Date(Date.now()+240*60000).toISOString().split(":").join("%3A")})()}&fts=${(function(){return new Date(Date.now()+240*60000-600000).toISOString().split(":").join("%3A")})()}'
|
|
- runFlow: subflows/confirm-open.yaml
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: delivery-date-picker
|
|
timeout: 30000
|
|
- runFlow:
|
|
file: add-slot.yaml
|
|
env:
|
|
SLOT_DELIVERY_DATE: '${(function(){var d=new Date(Date.now()+240*60000);return d.getFullYear()+"-"+("0"+(d.getMonth()+1)).slice(-2)+"-"+("0"+d.getDate()).slice(-2)})()}'
|
|
SLOT_DELIVERY_TIME: "n/a"
|
|
SLOT_FREEZE_DATE: '${(function(){var d=new Date(Date.now()+240*60000);return d.getFullYear()+"-"+("0"+(d.getMonth()+1)).slice(-2)+"-"+("0"+d.getDate()).slice(-2)})()}'
|
|
SLOT_FREEZE_TIME: "n/a"
|
|
SLOT_PREFILL: "true"
|
|
PRODUCT_1: '${PRODUCT_A_NAME + " " + A_Q1}'
|