maestro improvise
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
# Client App — E2E: Session Persistence Across Relaunch
|
||||
# Purpose:
|
||||
# - Log in via sign_in.yaml
|
||||
# - Stop the app
|
||||
# - Relaunch and verify user is still logged in (bypass login screen)
|
||||
#
|
||||
# Run:
|
||||
# maestro test \
|
||||
# apps/mobile/apps/client/maestro/auth/sign_in.yaml \
|
||||
# apps/mobile/apps/client/maestro/auth/session_persistence.yaml \
|
||||
# -e TEST_CLIENT_EMAIL=... \
|
||||
# -e TEST_CLIENT_PASSWORD=...
|
||||
|
||||
appId: com.krowwithus.client
|
||||
---
|
||||
# We rely on sign_in.yaml being run before this to establish a session.
|
||||
- launchApp
|
||||
|
||||
# If we are logged in, Home/Orders content should be visible directly.
|
||||
- extendedWaitUntil:
|
||||
visible: "(?i).*(Home|Orders|Welcome).*"
|
||||
timeout: 15000
|
||||
|
||||
# Perform a full stop to clear memory (not just backgrounding)
|
||||
- stopApp
|
||||
|
||||
# Relaunch - should NOT show the login screen
|
||||
- launchApp
|
||||
- extendedWaitUntil:
|
||||
visible: "(?i).*(Home|Orders|Welcome).*"
|
||||
timeout: 15000
|
||||
|
||||
# Verification: Log out to ensure clean state for next test
|
||||
# Open Settings via header gear icon (top-right)
|
||||
- tapOn:
|
||||
point: "92%,10%"
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "(?i).*Logout.*"
|
||||
timeout: 10000
|
||||
|
||||
- tapOn: "(?i).*Logout.*"
|
||||
|
||||
# Confirm Log Out
|
||||
- tapOn:
|
||||
text: "(?i).*(Yes|Confirm).*(Logout|Log Out).*"
|
||||
optional: true
|
||||
|
||||
# Should return to the sign in landing page
|
||||
- extendedWaitUntil:
|
||||
visible: "(?i)Sign In"
|
||||
timeout: 10000
|
||||
- assertVisible: "(?i)Sign In"
|
||||
|
||||
|
||||
|
||||
@@ -1,22 +1,51 @@
|
||||
# Client App — Sign In flow
|
||||
# Credentials via env: TEST_CLIENT_EMAIL, TEST_CLIENT_PASSWORD
|
||||
# Run: maestro test apps/mobile/apps/client/maestro/auth/sign_in.yaml -e TEST_CLIENT_EMAIL=... -e TEST_CLIENT_PASSWORD=...
|
||||
# Or: export MAESTRO_TEST_CLIENT_EMAIL / MAESTRO_TEST_CLIENT_PASSWORD (Maestro auto-reads MAESTRO_*)
|
||||
|
||||
appId: com.krowwithus.client
|
||||
env:
|
||||
EMAIL: ${TEST_CLIENT_EMAIL}
|
||||
PASSWORD: ${TEST_CLIENT_PASSWORD}
|
||||
---
|
||||
- launchApp
|
||||
- assertVisible: "Sign In"
|
||||
- tapOn: "Sign In"
|
||||
- assertVisible: "Email"
|
||||
- launchApp:
|
||||
clearState: true
|
||||
- extendedWaitUntil:
|
||||
visible:
|
||||
text: "(?i).*(Sign In|Log In|Welcome).*"
|
||||
timeout: 45000
|
||||
|
||||
# Try tap by both ID and Text for maximum reliability
|
||||
- tapOn:
|
||||
id: sign_in_email
|
||||
id: "client_landing_sign_in"
|
||||
optional: true
|
||||
- tapOn:
|
||||
text: "(?i)Sign In"
|
||||
optional: true
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "(?i)Email"
|
||||
timeout: 20000
|
||||
|
||||
- tapOn:
|
||||
id: "sign_in_email"
|
||||
- inputText: ${EMAIL}
|
||||
|
||||
- tapOn:
|
||||
id: sign_in_password
|
||||
id: "sign_in_password"
|
||||
- inputText: ${PASSWORD}
|
||||
- tapOn: "Sign In"
|
||||
- assertVisible: "Home"
|
||||
|
||||
# In the form, just tap Sign In text
|
||||
- tapOn:
|
||||
text: "(?i)Sign In"
|
||||
|
||||
- hideKeyboard
|
||||
|
||||
- extendedWaitUntil:
|
||||
visible: "(?i).*(Home|Orders|Welcome).*"
|
||||
timeout: 45000
|
||||
|
||||
# Final check: ensure the bottom nav is rendered before finishing
|
||||
- extendedWaitUntil:
|
||||
visible:
|
||||
id: "client_nav_home"
|
||||
timeout: 15000
|
||||
optional: true
|
||||
|
||||
- assertVisible: "(?i).*(Home|Orders|Welcome).*"
|
||||
|
||||
@@ -21,3 +21,6 @@ env:
|
||||
visible: "Invalid"
|
||||
timeout: 5000
|
||||
- assertVisible: "Sign In"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,3 +20,6 @@ appId: com.krowwithus.client
|
||||
- extendedWaitUntil:
|
||||
visible: "Create Account"
|
||||
timeout: 20000
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -33,3 +33,6 @@ env:
|
||||
- inputText: ${PASSWORD}
|
||||
- tapOn: "Create Account"
|
||||
- assertVisible: "Home"
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user