69 lines
1.7 KiB
YAML
69 lines
1.7 KiB
YAML
appId: ${APP_ID || "in.freshyo.adminui"}
|
|
env:
|
|
APP_ID: ${APP_ID || "in.freshyo.adminui"}
|
|
STAFF_NAME: ${STAFF_NAME || ""}
|
|
STAFF_PASSWORD: ${STAFF_PASSWORD || ""}
|
|
# Must be the exact name created by add-product.yaml.
|
|
PRODUCT_NAME: ${PRODUCT_NAME || "E2E Test Product"}
|
|
tags:
|
|
- slots
|
|
- smoke
|
|
---
|
|
# Restart the app so it returns to its initial route (dashboard when already
|
|
# logged in from add-product.yaml, login otherwise).
|
|
- launchApp
|
|
# Login only when the login screen is showing (already authenticated in-suite).
|
|
- runFlow:
|
|
when:
|
|
visible:
|
|
id: login-name-input
|
|
commands:
|
|
- runFlow: subflows/login.yaml
|
|
|
|
# --- Open the Slots list from the dashboard, then the create-slot screen ---
|
|
- scrollUntilVisible:
|
|
element:
|
|
id: delivery-slots-menu-item
|
|
direction: DOWN
|
|
- tapOn:
|
|
id: delivery-slots-menu-item
|
|
- assertVisible:
|
|
id: add-slot-fab
|
|
- tapOn:
|
|
id: add-slot-fab
|
|
- assertVisible:
|
|
id: delivery-date-picker
|
|
|
|
# --- Delivery (+60m) and Freeze (+50m) date/times ---
|
|
- runFlow: subflows/set-slot-times.yaml
|
|
|
|
# --- Add the product to the slot (search the exact name, select its SKUs) ---
|
|
- scrollUntilVisible:
|
|
element:
|
|
id: slot-products-selector
|
|
direction: DOWN
|
|
- tapOn:
|
|
id: slot-products-selector
|
|
- tapOn:
|
|
id: slot-products-selector-search
|
|
- inputText: ${PRODUCT_NAME}
|
|
- hideKeyboard
|
|
- tapOn:
|
|
id: 'slot-products-selector-option-.*'
|
|
index: 0
|
|
- tapOn:
|
|
id: 'slot-products-selector-option-.*'
|
|
index: 1
|
|
- tapOn:
|
|
id: slot-products-selector-done
|
|
|
|
# --- Submit ---
|
|
- scrollUntilVisible:
|
|
element:
|
|
id: create-slot-button
|
|
direction: DOWN
|
|
- tapOn:
|
|
id: create-slot-button
|
|
|
|
- assertVisible: 'Slot created successfully!'
|
|
- tapOn: 'OK'
|