freshyo/tests/e2e/full-suite/subflows/login-user.yaml
2026-10-05 11:46:47 +05:30

64 lines
1.5 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).
# Assumes the app is past the region gate. Run conditionally from other flows:
# - runFlow:
# when:
# visible:
# id: user-login-mobile
# file: user-login-password.yaml
- tapOn:
id: user-login-mobile
- inputText: ${USER_MOBILE}
- tapOn:
id: user-login-submit
- extendedWaitUntil:
visible:
text: 'user-login-other-ways|Enter 4-digit OTP|Use Password'
timeout: 15000
# Mobile step -> "other ways to login" goes to the choice screen.
- runFlow:
when:
visible:
id: user-login-other-ways
commands:
- tapOn:
id: user-login-other-ways
# Choice screen -> password form (identifier is prefilled from the mobile step).
- extendedWaitUntil:
visible:
text: 'Use Password|user-login-password'
timeout: 10000
- runFlow:
when:
visible:
text: 'Use Password'
commands:
- tapOn: 'Use Password'
- extendedWaitUntil:
visible:
id: user-login-password
timeout: 10000
- tapOn:
id: user-login-password
- inputText: ${USER_PASSWORD}
- pressKey: Enter
- tapOn:
id: user-login-submit
# Login lands back on home (region bar visible).
- extendedWaitUntil:
visible:
id: home-region-bar
timeout: 20000