108 lines
2.7 KiB
YAML
108 lines
2.7 KiB
YAML
# add-region.yaml: create a region with 1..N bounds.
|
|
# Args:
|
|
# REGION_NAME, REGION_DESCRIPTION
|
|
# BOUND_COUNT (default "1")
|
|
# BOUND_0_NAME, BOUND_0_DESCRIPTION, BOUND_0_GEOJSON
|
|
# BOUND_1_NAME, BOUND_1_DESCRIPTION, BOUND_1_GEOJSON (used when BOUND_COUNT > 1)
|
|
# TG_TOKEN, TG_CHAT (inherited from the caller)
|
|
# Bounds are added by the reusable add-bound.yaml subflow. The form is long, so
|
|
# every target is scrolled to before interacting; submit uses the
|
|
# create-region-submit button id.
|
|
url: http://localhost:4175/regions/new
|
|
env:
|
|
REGION_NAME: ${REGION_NAME || ""}
|
|
REGION_DESCRIPTION: ${REGION_DESCRIPTION || ""}
|
|
BOUND_COUNT: ${BOUND_COUNT || "1"}
|
|
BOUND_0_NAME: ${BOUND_0_NAME || ""}
|
|
BOUND_0_DESCRIPTION: ${BOUND_0_DESCRIPTION || ""}
|
|
BOUND_0_GEOJSON: ${BOUND_0_GEOJSON || ""}
|
|
BOUND_1_NAME: ${BOUND_1_NAME || ""}
|
|
BOUND_1_DESCRIPTION: ${BOUND_1_DESCRIPTION || ""}
|
|
BOUND_1_GEOJSON: ${BOUND_1_GEOJSON || ""}
|
|
---
|
|
- openLink: http://localhost:4175/regions/new
|
|
- extendedWaitUntil:
|
|
visible: Bounds (GeoJSON)
|
|
timeout: 30000
|
|
|
|
- scrollUntilVisible:
|
|
element:
|
|
id: region-name
|
|
direction: DOWN
|
|
timeout: 10000
|
|
speed: 50
|
|
visibilityPercentage: 60
|
|
centerElement: true
|
|
- tapOn:
|
|
id: region-name
|
|
- inputText: ${REGION_NAME}
|
|
|
|
- scrollUntilVisible:
|
|
element:
|
|
id: region-description
|
|
direction: DOWN
|
|
timeout: 10000
|
|
speed: 50
|
|
visibilityPercentage: 60
|
|
centerElement: true
|
|
- tapOn:
|
|
id: region-description
|
|
- inputText: ${REGION_DESCRIPTION}
|
|
|
|
- runFlow:
|
|
file: add-bound.yaml
|
|
env:
|
|
BOUND_INDEX: "0"
|
|
BOUND_NAME: ${BOUND_0_NAME}
|
|
BOUND_DESCRIPTION: ${BOUND_0_DESCRIPTION}
|
|
BOUND_GEOJSON: ${BOUND_0_GEOJSON}
|
|
|
|
- runFlow:
|
|
when:
|
|
true: ${Number(BOUND_COUNT) > 1}
|
|
commands:
|
|
- runFlow:
|
|
file: add-bound.yaml
|
|
env:
|
|
BOUND_INDEX: "1"
|
|
BOUND_NAME: ${BOUND_1_NAME}
|
|
BOUND_DESCRIPTION: ${BOUND_1_DESCRIPTION}
|
|
BOUND_GEOJSON: ${BOUND_1_GEOJSON}
|
|
|
|
- scrollUntilVisible:
|
|
element:
|
|
id: cred-0-bot-token
|
|
direction: DOWN
|
|
timeout: 10000
|
|
speed: 50
|
|
visibilityPercentage: 60
|
|
centerElement: true
|
|
- tapOn:
|
|
id: cred-0-bot-token
|
|
- inputText: ${TG_TOKEN}
|
|
|
|
- scrollUntilVisible:
|
|
element:
|
|
id: cred-0-chat-id
|
|
direction: DOWN
|
|
timeout: 10000
|
|
speed: 50
|
|
visibilityPercentage: 60
|
|
centerElement: true
|
|
- tapOn:
|
|
id: cred-0-chat-id
|
|
- inputText: ${TG_CHAT}
|
|
|
|
- scrollUntilVisible:
|
|
element:
|
|
id: create-region-submit
|
|
direction: DOWN
|
|
timeout: 10000
|
|
speed: 50
|
|
visibilityPercentage: 60
|
|
centerElement: true
|
|
- tapOn:
|
|
id: create-region-submit
|
|
- extendedWaitUntil:
|
|
visible: ${REGION_NAME}
|
|
timeout: 60000
|