FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: retry dropped navigation taps, and accept near-max slider drag i… · pythonnative/pythonnative@92122ef · GitHub

Repository navigation

Commit 92122ef

Browse files
committed
fix: retry dropped navigation taps, and accept near-max slider drag in iOS E2E
1 parent b8ec0e2 commit 92122ef

2 files changed

Lines changed: 51 additions & 24 deletions

File tree

‎tests/e2e/flows/components/slider.yaml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
# which the buttons bypass. The demo starts the slider at 0.5 so the
55
# thumb sits at the control's center; element-anchored swipes start
66
# from the element center, and iOS's UISlider only drags when the
7-
# gesture starts on the thumb. A right swipe rails the value to max.
7+
# gesture starts on the thumb. A right swipe drags the value to (or
8+
# near) max: iOS 26's redesigned UISlider insets the draggable track
9+
# at both ends, so the drag lands around 0.97 rather than railing to
10+
# exactly 1.00. The assertion accepts any near-max value; the snap
11+
# buttons below still verify exact values.
812
#
913
# Demo screen: examples/e2e-suite/app/screens/components/slider.py
1014
# Source under test: src/pythonnative/components.py :: Slider
@@ -21,7 +25,7 @@ appId: ${APP_ID}
2125
from:
2226
text: "Demo slider"
2327
direction: RIGHT
24-
- assertVisible: "Value: 1.00"
28+
- assertVisible: "Value: (0\\.9\\d|1\\.00)"
2529
# Programmatic path: snap buttons set exact values.
2630
- tapOn: "Set 0.0"
2731
- assertVisible: "Value: 0.00"

‎tests/e2e/helpers/open_demo.yaml‎

Lines changed: 45 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -60,24 +60,37 @@ appId: ${APP_ID}
6060
# The title is at the top of the scroll content and ``close_demo``
6161
# always scrolls back to it before exiting, so it's visible on both
6262
# platforms when the next flow's ``open_demo`` runs.
63+
#
64+
# The tap is wrapped in a retry because Maestro's iOS driver can drop
65+
# a tap on a slow CI simulator (the tap "lands" but the app never
66+
# navigates); the inner gate re-taps only if we're still on a
67+
# category screen, so a flaked home assertion alone doesn't re-tap.
6368
- runFlow:
6469
when:
6570
visible:
6671
text: "Demos in .*"
6772
notVisible: "Demos in ${CATEGORY}"
6873
commands:
69-
- scrollUntilVisible:
70-
element:
71-
text: "Back to home"
72-
direction: DOWN
73-
timeout: 45000
74-
- tapOn: "Back to home"
75-
- scrollUntilVisible:
76-
element:
77-
text: "E2E Suite home"
78-
direction: UP
79-
timeout: 15000
80-
- assertVisible: "E2E Suite home"
74+
- retry:
75+
maxRetries: 2
76+
commands:
77+
- runFlow:
78+
when:
79+
visible:
80+
text: "Demos in .*"
81+
commands:
82+
- scrollUntilVisible:
83+
element:
84+
text: "Back to home"
85+
direction: DOWN
86+
timeout: 45000
87+
- tapOn: "Back to home"
88+
- scrollUntilVisible:
89+
element:
90+
text: "E2E Suite home"
91+
direction: UP
92+
timeout: 15000
93+
- assertVisible: "E2E Suite home"
8194

8295
# 3. If neither the right category nor the home screen is visible, the
8396
# app is either not running yet (first flow of the suite) or the driver
@@ -95,21 +108,31 @@ appId: ${APP_ID}
95108
visible: "E2E Suite home"
96109
timeout: 60000
97110

98-
# 4. From the home screen, navigate into the right category.
111+
# 4. From the home screen, navigate into the right category. Retried
112+
# for the same dropped-tap reason as step 2: the inner gate re-taps
113+
# only while we're still on the home screen.
99114
- runFlow:
100115
when:
101116
visible: "E2E Suite home"
102117
notVisible: "Demos in ${CATEGORY}"
103118
commands:
104-
- scrollUntilVisible:
105-
element:
106-
text: "Open ${CATEGORY}"
107-
direction: DOWN
108-
timeout: 45000
109-
- tapOn: "Open ${CATEGORY}"
110-
- extendedWaitUntil:
111-
visible: "Demos in ${CATEGORY}"
112-
timeout: 15000
119+
- retry:
120+
maxRetries: 2
121+
commands:
122+
- runFlow:
123+
when:
124+
visible: "E2E Suite home"
125+
notVisible: "Demos in ${CATEGORY}"
126+
commands:
127+
- scrollUntilVisible:
128+
element:
129+
text: "Open ${CATEGORY}"
130+
direction: DOWN
131+
timeout: 45000
132+
- tapOn: "Open ${CATEGORY}"
133+
- extendedWaitUntil:
134+
visible: "Demos in ${CATEGORY}"
135+
timeout: 15000
113136

114137
# 5. We're now guaranteed to be on the right category list. Open the
115138
# requested demo. The Components category has ~28 rows, so reaching the

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL