Skip to content

feat(e2e): wait for the UI to settle before gesturing - #1240

Draft
krozniata wants to merge 3 commits into
mainfrom
fix/ios-e2e-flakes
Draft

krozniata wants to merge 3 commits into
mainfrom
fix/ios-e2e-flakes

Conversation

@krozniata

Copy link
Copy Markdown
Member

Summary

Test Plan

What's required for testing (prerequisites)?

What are the steps to reproduce (after prerequisites)?

Compatibility

OS Implemented
iOS ✅❌
Android ✅❌

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I updated the typed files (TS and Flow)

Copilot AI lite review requested due to automatic review settings November 12, 2026 10:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Two critical end-to-end test issues remain: the home-list locator cannot resolve because its testID is not rendered, and the navigation wait uses an unsupported detached state.

2 open issues
What changed in this PR

This pull request improves mobile E2E reliability by waiting for navigation, scrolling, tab transitions, and alert dismissal to settle before subsequent gestures, while limiting the Issue #1050 back-gesture checks to supported iOS versions.

Changes:

  • Adds an iOS-version hint and skips unsupported back-gesture cases.
  • Adds retry and settlement handling for example navigation and tab selection.
  • Waits for native alert dismissal before continuing page-selection assertions.
File Description
example/​src/​gh-issues/​Issue1050BackGestureRepro.tsx Displays whether the iOS 26 content-pop behavior is available.
e2e/​tests/​tab-view-inside-scroll-view.e2e.ts Retries the first-tab tap if scrolling has not settled.
e2e/​tests/​support/​app.ts Attempts to wait for the home screen transition to finish before continuing after navigation.
e2e/​tests/​on-page-selected.e2e.ts Waits for the native alert to disappear after dismissal.
e2e/​tests/​issues/​issue-1050-back-gesture.e2e.ts Skips mid-screen back-gesture cases on iOS versions that do not support the required behavior.

Review effort: Lite

Comment thread e2e/tests/support/app.ts Resolved
Comment thread e2e/tests/support/app.ts Resolved
krozniata and others added 2 commits November 12, 2026 11:52
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

🟢 e2e: 58 passed

All 58 tests in 22 files
Test Time
🟢 tests/basic-pager.e2e.ts · 3 passed 1m 20s
🟢 basic pager › in LTR › pages horizontally 27.7s
🟢 basic pager › in LTR › pages vertically 17.4s
🟢 basic pager › in RTL › pages horizontally with the reversed gesture 35.1s
🟢 tests/issues/issue-1083-modal-set-page.e2e.ts · 1 passed 15.8s
🟢 setPage called behind a native-stack modal lands on the requested page 15.8s
🟢 tests/issues/issue-1098-nested-pager.e2e.ts · 1 passed 13.4s
🟢 outer pager stays responsive after its page count changes around a nested pager 13.4s
🟢 tests/issues/issue-1154-page-change-focus.e2e.ts · 7 passed 1m 30s
🟢 leaving a page with setPage blurs its input 13.1s
🟢 setPage with an input focused lands on the target page 12.9s
🟢 leaving a page with a swipe blurs its input 10.7s
🟢 an input focused on the new page keeps focus 13.7s
🟢 an input focused on the new page keeps focus going back 14.8s
🟢 a swipe keeps the focus the new page takes from onPageSelected 12.9s
🟢 setPage keeps the focus the new page takes from onPageSelected 11.9s
🟢 tests/issues/issue-1156-nested-horizontal-scroll.e2e.ts · 3 passed 33.9s
🟢 a horizontal ScrollView in a page scrolls instead of the pager 10.9s
🟢 the pager takes the swipe once the ScrollView is at its edge 12.4s
🟢 a swipe outside the ScrollView changes the page 10.7s
🟢 tests/issues/issue-1196-set-page-after-add.e2e.ts · 6 passed 1m 15s
🟢 setPageWithoutAnimation selects a page added in the same commit 10.6s
🟢 setPage animates to a page added in the same commit 11.2s
🟢 setPage from useEffect animates to a page added in the same commit 11.8s
🟢 setPageWithoutAnimation selects a page added to an empty pager in the same commit 12.6s
🟢 an index that is not there yet is ignored, not applied later 14.0s
🟢 pages that come back report the page the pager lands on once 14.9s
🟢 tests/issues/issue-1199-scroll-state.e2e.ts · 2 passed 21.3s
🟢 setPage reports settling, then idle once the page has stopped 10.8s
🟢 a swipe reports settling when the finger lifts, then idle once the page has stopped 10.5s
🟢 tests/issues/issue-1205-diagonal-swipe.e2e.ts · 2 passed 23.7s
🟢 a slanted, mostly vertical drag scrolls the list 11.7s
🟢 a slanted, mostly horizontal drag changes the page 11.9s
🟢 tests/issues/issue-1229-text-input-cursor.e2e.ts · 5 passed 1m 6s
🟢 a tap that moves places the cursor in the input above the pager 13.1s
🟢 a tap that moves places the cursor in a single-line input on a page 13.0s
🟢 a tap that moves places the cursor in a single-line input on a page with scrolling disabled 14.2s
🟢 a tap that moves places the cursor in a multiline input on a page 12.8s
🟢 a tap that moves places the cursor in a multiline input on a page with scrolling disabled 13.4s
🟢 tests/issues/issue-219-empty-pager.e2e.ts · 3 passed 41.4s
🟢 a pager that mounts empty shows its first page when pages arrive 12.7s
🟢 a pager that loses all its pages shows them again when they come back 15.2s
🟢 setPage works as soon as pages arrive in a pager that mounted empty 13.5s
🟢 tests/issues/issue-424-swipe-cancels-press.e2e.ts · 3 passed 40.4s
🟢 a tap on a button in a page presses it 12.0s
🟢 a swipe that starts on a button in a page cancels its touch 12.1s
🟢 a swipe while the JS thread is busy does not press the button 16.3s
🟢 tests/issues/issue-965-pages-before-current.e2e.ts · 6 passed 1m 20s
🟢 inserting a page before the current one keeps it visible 13.2s
🟢 inserting a page at the current index keeps the current page 13.2s
🟢 removing a page before the current one keeps it visible 12.6s
🟢 removing pages up to the current index keeps it visible 13.4s
🟢 moving the current page keeps it visible 12.4s
🟢 moving a page next to the current one keeps it rendered 14.6s
🟢 tests/issues/pr-1194-remount-initial-page.e2e.ts · 1 passed 15.3s
🟢 a pager remounted after its screen was covered starts on its own initialPage 15.3s
🟢 tests/keyboard-dismiss-mode.e2e.ts · 3 passed 26.9s
🟢 on-drag: dragging the pager blurs the input 9.1s
🟢 on-drag: setPage keeps the input focused 9.2s
🟢 none: dragging the pager keeps the input focused 8.6s
🟢 tests/material-top-bar.e2e.ts · 1 passed 12.1s
🟢 material top tabs survive a native-stack push and pop 12.1s
🟢 tests/native-driver-events.e2e.ts · 2 passed 13.5s
🟢 native driver events › setPage through the Animated ref drives the native value 7.1s
🟢 native driver events › a swipe drives the native value 6.4s
🟢 tests/nested-pager-view.e2e.ts · 1 passed 11.4s
🟢 nested horizontal and vertical pagers scroll independently 11.4s
🟢 tests/on-page-selected.e2e.ts · 1 passed 15.7s
🟢 onPageSelected fires an alert for every page change 15.7s
🟢 tests/scrollable-pager-view.e2e.ts · 1 passed 16.6s
🟢 pager inside a ScrollView keeps its page across vertical scrolls 16.6s
🟢 tests/set-page-animation.e2e.ts · 4 passed 47.9s
🟢 ltr › direct setPage selects only the target page (ltr) 8.4s
🟢 rtl › direct setPage selects only the target page (rtl) 22.7s
🟢 the page next to the target is selectable after a direct setPage 8.3s
🟢 scroll setPage passes the pages in between, direct setPage does not 8.6s
🟢 tests/smoke.e2e.ts · 1 passed 7.8s
🟢 horizontal pager pages with the panel buttons 7.8s
🟢 tests/tab-view-inside-scroll-view.e2e.ts · 1 passed 13.3s
🟢 TabView inside a ScrollView swipes tabs and scrolls the page 13.3s

e2e 0.21.3 · 12m 43s · android · run artifacts

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🟢 e2e: 2 flaky, 43 passed

⚠️ 2 flaky tests passed on a retry

⚠️ leaving a page with setPage blurs its input
tests/support/app.ts:34

ACTION_FAILED at step 5 of 5: locator.tap getByTestId("Issue #1154 Page Change Focus Repro"), after 35.4s

tap timed out before the device answered; its input may have been dispatched: getByTestId("Issue #1154 Page Change Focus Repro")

⚠️ a setPage redirected once the focus has landed blurs it
tests/issues/issue-1154-page-change-focus.e2e.ts:30

ASSERTION_FAILED at step 10 of 10: expect.toHaveText getByTestId("issue-1154-status"), after 10.1s

  • Expected: text /^Selected: 2 \| Focused: none \| Keyboard: hidden/
  • Observed: text "Selected: 1 | Focused: none | Keyboard: hidden" (1 match)
  • Screen: com.pagerviewexample / Issue #1154 Page Change Focus Repro

Evidence: screenshot, log

All 45 tests in 18 files
Test Time
⚠️ tests/issues/issue-1154-page-change-focus.e2e.ts · 2 flaky, 11 passed 4m 56s
⚠️ leaving a page with setPage blurs its input (1 failed attempt first) 36.4s
🟢 setPage with an input focused lands on the target page 20.6s
🟢 a setPage two pages away lands on the far page 23.7s
🟢 a setPage repeated during the slide changes nothing 18.7s
🟢 leaving a page with a swipe blurs its input 22.3s
🟢 an input focused on the new page keeps focus 17.5s
🟢 a swipe keeps the focus the new page takes from onPageSelected 18.5s
🟢 a setPage that interrupts another lands on the page asked for last 17.7s
🟢 a setPage that interrupts another still lands on the later page 17.4s
⚠️ a setPage redirected once the focus has landed blurs it (1 failed attempt first) 22.6s
🟢 two setPage calls that cancel out land on the first page 23.4s
🟢 right to left › leaving a page with a swipe blurs its input 37.9s
🟢 a page that grows with the keyboard still lands on the target page 19.9s
🟢 tests/basic-pager.e2e.ts · 3 passed 1m 42s
🟢 basic pager › in LTR › pages horizontally 35.6s
🟢 basic pager › in LTR › pages vertically 22.3s
🟢 basic pager › in RTL › pages horizontally with the reversed gesture 44.0s
🟢 tests/issues/issue-1050-back-gesture.e2e.ts · 8 passed 2m 50s
🟢 back gesture over the pager › in LTR › a back swipe on the first page pops the screen 10.4s
🟢 back gesture over the pager › in LTR › a back swipe on a later page goes to the previous page 11.0s
🟢 back gesture over the pager › in LTR › a forward swipe on the first page still goes to the next page 14.3s
🟢 back gesture over the pager › in RTL › a back swipe on the first page pops the screen 34.1s
🟢 back gesture over the pager › in RTL › a back swipe on a later page goes to the previous page 53.6s
🟢 back gesture over the pager › in RTL › a forward swipe on the first page still goes to the next page 23.1s
🟢 back gesture over a pager in a nested stack › a back swipe on the first page pops the outer stack 10.4s
🟢 back gesture over a pager in a nested stack › a forward swipe on the first page still goes to the next page 13.1s
🟢 tests/issues/issue-1083-modal-set-page.e2e.ts · 1 passed 19.9s
🟢 setPage called behind a native-stack modal lands on the requested page 19.9s
🟢 tests/issues/issue-1096-keyboard-shrink.e2e.ts · 1 passed 26.2s
🟢 keyboard avoidance does not shrink the page under the keyboard 26.2s
🟢 tests/issues/issue-1098-nested-pager.e2e.ts · 1 passed 16.4s
🟢 outer pager stays responsive after its page count changes around a nested pager 16.4s
🟢 tests/issues/issue-1142-search-bar-inset.e2e.ts · 1 passed 20.6s
🟢 FlatList inside the pager gets the search bar safe-area insets 20.6s
🟢 tests/issues/issue-1230-pager-between-pages.e2e.ts · 1 passed 16.0s
🟢 a pager scrolled to a focused field still lands on the page asked for 16.0s
🟢 tests/issues/pr-1194-remount-initial-page.e2e.ts · 1 passed 18.0s
🟢 a pager remounted after its screen was covered starts on its own initialPage 18.0s
🟢 tests/keyboard-dismiss-mode.e2e.ts · 3 passed 41.8s
🟢 on-drag: dragging the pager blurs the input 13.3s
🟢 on-drag: setPage keeps the input focused 13.6s
🟢 none: dragging the pager keeps the input focused 14.8s
🟢 tests/material-top-bar.e2e.ts · 1 passed 21.2s
🟢 material top tabs survive a native-stack push and pop 21.2s
🟢 tests/native-driver-events.e2e.ts · 2 passed 21.7s
🟢 native driver events › setPage through the Animated ref drives the native value 11.7s
🟢 native driver events › a swipe drives the native value 10.0s
🟢 tests/nested-pager-view.e2e.ts · 1 passed 18.4s
🟢 nested horizontal and vertical pagers scroll independently 18.4s
🟢 tests/on-page-selected.e2e.ts · 1 passed 19.9s
🟢 onPageSelected fires an alert for every page change 19.9s
🟢 tests/scrollable-pager-view.e2e.ts · 1 passed 24.1s
🟢 pager inside a ScrollView keeps its page across vertical scrolls 24.1s
🟢 tests/set-page-animation.e2e.ts · 4 passed 58.4s
🟢 ltr › direct setPage selects only the target page (ltr) 9.4s
🟢 rtl › direct setPage selects only the target page (rtl) 30.7s
🟢 the page next to the target is selectable after a direct setPage 9.6s
🟢 scroll setPage passes the pages in between, direct setPage does not 8.7s
🟢 tests/smoke.e2e.ts · 1 passed 10.3s
🟢 horizontal pager pages with the panel buttons 10.3s
🟢 tests/tab-view-inside-scroll-view.e2e.ts · 1 passed 21.1s
🟢 TabView inside a ScrollView swipes tabs and scrolls the page 21.1s

e2e 0.21.3 · 17m 40s · ios · run artifacts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants