94 lines
4.1 KiB
YAML
94 lines
4.1 KiB
YAML
# ensure-init-regions: guarantee the two init regions + their admins exist.
|
|
# Orchestration only - all creation lives in argument-driven subflows.
|
|
# Idempotent: each create block is guarded by a notVisible check on the list.
|
|
# Run via Maestro MCP run tool, device_id chromium, env:
|
|
# SUPERADMIN_NAME, SUPERADMIN_PASSWORD (required)
|
|
# TG_TOKEN, TG_CHAT (required only when a region must be created)
|
|
url: http://localhost:4175/login
|
|
env:
|
|
SUPERADMIN_NAME: ${SUPERADMIN_NAME || ""}
|
|
SUPERADMIN_PASSWORD: ${SUPERADMIN_PASSWORD || ""}
|
|
TG_TOKEN: ${TG_TOKEN || ""}
|
|
TG_CHAT: ${TG_CHAT || ""}
|
|
---
|
|
- launchApp
|
|
- runFlow: subflows/login.yaml
|
|
|
|
# ---- Mahabubnagar (Mbnr-1 p1 + Mbnr-2 p2) ----
|
|
- openLink: http://localhost:4175/regions
|
|
- extendedWaitUntil:
|
|
visible: "Group delivery areas.*"
|
|
timeout: 30000
|
|
- waitForAnimationToEnd
|
|
- runFlow:
|
|
when:
|
|
notVisible: Mahabubnagar
|
|
commands:
|
|
- runFlow:
|
|
file: subflows/add-region.yaml
|
|
env:
|
|
REGION_NAME: Mahabubnagar
|
|
REGION_DESCRIPTION: Mahabubnagar town and surrounding areas
|
|
BOUND_COUNT: "2"
|
|
BOUND_0_NAME: Mbnr-1
|
|
BOUND_0_DESCRIPTION: Town core coverage area
|
|
BOUND_0_GEOJSON: '{"type":"Polygon","coordinates":[[[77.9802307,16.7224827],[77.9832452,16.7186281],[77.9885003,16.7191643],[78.0027771,16.7184524],[78.0167635,16.717821],[78.0176657,16.7225884],[78.0245685,16.7301059],[78.0346065,16.7366045],[78.0483126,16.7469324],[78.0558892,16.7506815],[78.0533183,16.7547082],[78.0497798,16.7596596],[78.0456892,16.7640471],[78.0383339,16.7641426],[78.0343234,16.758687],[78.021375,16.7570244],[78.0163704,16.758279],[78.0128516,16.7590231],[78.0120219,16.7648881],[78.0095524,16.7664414],[77.99363,16.7660548],[77.9720422,16.7596124],[77.9679337,16.7449906],[77.9802307,16.7224827]]]}'
|
|
BOUND_1_NAME: Mbnr-2
|
|
BOUND_1_DESCRIPTION: Extended coverage area
|
|
BOUND_1_GEOJSON: '{"type":"Polygon","coordinates":[[[77.9773739,16.7127921],[77.9950359,16.7080928],[78.0187929,16.70999],[78.0289444,16.7211582],[78.0570875,16.7502883],[78.0662922,16.7519867],[78.0652719,16.7684088],[78.0204341,16.7689639],[78.0023161,16.770186],[77.9984809,16.7850848],[77.983305,16.782843],[77.971574,16.7646028],[77.9686551,16.7454905],[77.9773739,16.7127921]]]}'
|
|
|
|
# ---- Jadcherla (single bound) ----
|
|
- openLink: http://localhost:4175/regions
|
|
- extendedWaitUntil:
|
|
visible: "Group delivery areas.*"
|
|
timeout: 30000
|
|
- waitForAnimationToEnd
|
|
- runFlow:
|
|
when:
|
|
notVisible: Jadcherla
|
|
commands:
|
|
- runFlow:
|
|
file: subflows/add-region.yaml
|
|
env:
|
|
REGION_NAME: Jadcherla
|
|
REGION_DESCRIPTION: Jadcherla town
|
|
BOUND_COUNT: "1"
|
|
BOUND_0_NAME: Jadcherla
|
|
BOUND_0_DESCRIPTION: Jadcherla town coverage area
|
|
BOUND_0_GEOJSON: '{"type":"Polygon","coordinates":[[[78.1403916,16.744066],[78.1548681,16.7415277],[78.1593669,16.7523755],[78.1621315,16.7630654],[78.1620705,16.7692272],[78.1564687,16.7758419],[78.1513873,16.7783785],[78.1455877,16.7796921],[78.1326433,16.781202],[78.123043,16.7805196],[78.118775,16.7757046],[78.1173809,16.7685992],[78.1205895,16.7633171],[78.1403916,16.744066]]]}'
|
|
|
|
# ---- mbnradmin (admin role, Mahabubnagar) ----
|
|
- openLink: http://localhost:4175/admins
|
|
- extendedWaitUntil:
|
|
visible: "Staff users and the region each one manages.*"
|
|
timeout: 30000
|
|
- waitForAnimationToEnd
|
|
- runFlow:
|
|
when:
|
|
notVisible: mbnradmin
|
|
commands:
|
|
- runFlow:
|
|
file: subflows/add-admin.yaml
|
|
env:
|
|
ADMIN_NAME: mbnradmin
|
|
ADMIN_PASSWORD: mbnradmiN123
|
|
ADMIN_ROLE: admin
|
|
ADMIN_REGION: Mahabubnagar
|
|
|
|
# ---- jcladmin (admin role, Jadcherla) ----
|
|
- openLink: http://localhost:4175/admins
|
|
- extendedWaitUntil:
|
|
visible: "Staff users and the region each one manages.*"
|
|
timeout: 30000
|
|
- waitForAnimationToEnd
|
|
- runFlow:
|
|
when:
|
|
notVisible: jcladmin
|
|
commands:
|
|
- runFlow:
|
|
file: subflows/add-admin.yaml
|
|
env:
|
|
ADMIN_NAME: jcladmin
|
|
ADMIN_PASSWORD: jcladmiN123
|
|
ADMIN_ROLE: admin
|
|
ADMIN_REGION: Jadcherla
|