Skip to content

Commit 5903850

Browse files
jappeace-slothclaude
andcommitted
Fix iOS scroll test: poll for click event instead of fixed 15s sleep
The fixed 15s sleep after detecting setRoot wasn't always long enough for 'Click dispatched' to appear in the persistent log store. Replace with an active poll (up to 30s) for 'Click dispatched' in the stream log, followed by a 5s buffer before retrieving the persistent log. This matches how the buttons test already polls for its terminal event. Tokens: ~5k Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ace0182 commit 5903850

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎test/ios/scroll.sh‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ if [ $render_done -eq 0 ]; then
3737
wait_for_log "$STREAM_LOG" "setRoot" 60 || true
3838
fi
3939

40-
# Auto-tap fires 3s after render; wait for log flush
41-
sleep 15
40+
# Auto-tap fires 3s after render; poll stream log until click appears or 30s timeout
41+
wait_for_log "$STREAM_LOG" "Click dispatched" 30 || true
42+
# Extra buffer so the persistent log store catches up before log show
43+
sleep 5
4244

4345
kill "$LOG_STREAM_PID" 2>/dev/null || true
4446
sleep 1
4547

46-
# Retrieve full log; fall back to stream log if empty
48+
# Retrieve full log from persistent store; fall back to stream log if empty
4749
FULL_LOG="$WORK_DIR/scroll_full.txt"
4850
get_full_log "$SCROLL_START" "$FULL_LOG"
4951

0 commit comments

Comments
 (0)