Skip to content

Commit 98636d2

Browse files
committed
test(e2e): harden Maestro waits across common subflows
Bandaid pass to stop chasing single-flow timing flakes: - assert-signed-in: convert all assertVisible to extendedWaitUntil (20s for "Manage Profile", 5s for "Sign Out" and "Welcome") - assert-signed-out: extendedWaitUntil 20s for "Welcome!" instead of bare assertVisible - sign-out-via-button: extendedWaitUntil 20s for "Welcome!" + bump email-field wait 10s -> 25s (this is the consistently-slowest path) - sign-in-email-password: extendedWaitUntil 20s for "Welcome!" + bump email-field wait 10s -> 25s, take a debug screenshot before the wait so future failures here are diagnosable assertVisible has no retry; extendedWaitUntil retries until timeout, which is what we want everywhere in CI where renders are slow.
1 parent 82b3e0f commit 98636d2

4 files changed

Lines changed: 29 additions & 17 deletions

File tree

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# Subflow: assert the user is on the signed-in home screen.
2+
# Use extendedWaitUntil throughout so we tolerate slow CI renders after
3+
# sign-in. assertVisible has no retry; extendedWaitUntil retries until
4+
# the timeout elapses.
25
appId: com.clerk.clerkexpoquickstart
36
---
4-
- assertVisible:
5-
text: "Welcome"
6-
- assertVisible:
7-
text: "Manage Profile"
8-
- assertVisible:
9-
text: "Sign Out"
7+
- extendedWaitUntil:
8+
visible: "Manage Profile"
9+
timeout: 20000
10+
- extendedWaitUntil:
11+
visible: "Sign Out"
12+
timeout: 5000
13+
- extendedWaitUntil:
14+
visible: "Welcome"
15+
timeout: 5000
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Subflow: assert the user is on the signed-out screen with the AuthView visible.
22
appId: com.clerk.clerkexpoquickstart
33
---
4-
- assertVisible:
5-
text: 'Welcome! Sign in to continue\.?'
4+
- extendedWaitUntil:
5+
visible: 'Welcome! Sign in to continue\.?'
6+
timeout: 20000

integration/mobile/flows/common/sign-in-email-password.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
# Requires CLERK_TEST_EMAIL and CLERK_TEST_PASSWORD env vars.
33
appId: com.clerk.clerkexpoquickstart
44
---
5-
- assertVisible:
6-
text: 'Welcome! Sign in to continue\.?'
5+
- extendedWaitUntil:
6+
visible: 'Welcome! Sign in to continue\.?'
7+
timeout: 20000
78
# On Android the AuthView sometimes renders its welcome text a beat before
89
# the email field. Don't tap until the field is actually present so we
9-
# don't race the form's second render pass. If this times out, the failure
10-
# mode is a clear timeout that points at a real render-timing bug.
10+
# don't race the form's second render pass. Bumped from 10s to 25s
11+
# because the AuthView mount-after-signOut path is consistently slow on
12+
# CI and this was the most common cause of flakes.
13+
- takeScreenshot: debug-00-pre-email-wait
1114
- extendedWaitUntil:
1215
visible: "Enter your email or username"
13-
timeout: 10000
16+
timeout: 25000
1417
- takeScreenshot: debug-01-welcome
1518
# Tap the field, then long-press to bring up the selection menu and pick
1619
# "Select all" so we replace any pre-populated value (Clerk persists the

integration/mobile/flows/common/sign-out-via-button.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ appId: com.clerk.clerkexpoquickstart
55
text: "Sign Out"
66
- waitForAnimationToEnd:
77
timeout: 8000
8-
- assertVisible:
9-
text: 'Welcome! Sign in to continue\.?'
8+
- extendedWaitUntil:
9+
visible: 'Welcome! Sign in to continue\.?'
10+
timeout: 20000
1011
# After sign-out the AuthView sometimes renders its welcome text a beat
1112
# before the email field. Don't return from this subflow until the
1213
# field is actually present, so cycle flows don't race a half-rendered
13-
# AuthView. If this assertion times out the test surfaces a real bug.
14+
# AuthView. Bumped to 25s because the AuthView mount-after-signOut path
15+
# is consistently the slowest in this suite on CI.
1416
- extendedWaitUntil:
1517
visible: "Enter your email or username"
16-
timeout: 10000
18+
timeout: 25000

0 commit comments

Comments
 (0)