freshyo/tests/e2e/full-suite/subflows/login-user.yaml
2026-10-05 20:43:25 +05:30

50 lines
1.3 KiB
YAML

appId: ${USER_APP_ID || "com.freshyotrial.app"}
env:
USER_APP_ID: ${USER_APP_ID || "com.freshyotrial.app"}
USER_MOBILE: ${USER_MOBILE || ""}
USER_PASSWORD: ${USER_PASSWORD || ""}
tags:
- region
- login
---
# Reusable user login via the password path (no OTP).
# Mobile screen -> 'other ways to login' goes DIRECTLY to the password step
# (identifier prefilled from the mobile field). Do NOT submit the mobile
# form first — that sends an OTP instead.
- tapOn:
id: user-login-mobile
- eraseText
- setClipboard: ${USER_MOBILE}
- pasteText
- pressKey: Enter
- tapOn:
id: user-login-other-ways
- extendedWaitUntil:
visible:
id: user-login-password
timeout: 10000
- tapOn:
id: user-login-password
- eraseText
- setClipboard: ${USER_PASSWORD}
- pasteText
- pressKey: Enter
- tapOn:
id: user-login-submit
# Login returns to the entry context (home, or cart when logging in from
# checkout) — accept either landing.
- extendedWaitUntil:
visible:
id: 'home-region-bar|checkout-button|go-to-cart'
timeout: 10000
optional: true
- runFlow:
when:
notVisible:
id: 'home-region-bar|checkout-button|go-to-cart'
commands:
- extendedWaitUntil:
visible:
text: 'Delivery Slot'
timeout: 20000