Repository navigation
Target the SectionList viewability item by test ID - #58991
Closed
Abbondanzo wants to merge 1 commit into
Closed
Abbondanzo wants to merge 1 commit into
Abbondanzo wants to merge 1 commit into
Conversation
Summary: Locate `Brownie` by its existing `testID` in the horizontal SectionList viewability flow rather than its rendered text. Keep the scrolling parameters and viewability callback assertions unchanged. Changelog: [Internal] Differential Revision: D124664726
|
@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D124664726. |
|
This pull request has been merged in 85065b3. |
meta-codesync Bot
pushed a commit
that referenced
this pull request
Oct 23, 2026
Summary: `test_e2e_ios_rntester` on `main` keeps failing on `sectionlist-viewability.yml`, with `No visible element found: id: Brownie` on all 5 attempts. It isn't a recent regression: the same flow has failed this way regularly on `main` since at least Oct 8. **Root cause.** In the horizontal waitForInteraction step, `scrollUntilVisible` scrolls until `Brownie` is centered, with a 60s timeout: - With `direction: RIGHT`, Maestro (2.6.1, `UiElement.isElementNearScreenCenter`) counts an element as centered only when its center is left of `centerX + width/5`, which is 70% of the screen width. `Brownie` is the **last** item of the list, so its center can never get that far left (it ends at about 85% of the width). - When the element is visible but not centered, Maestro spends `maxRetryCenterCount` (4+1) more swipes before falling back to the plain `visibilityPercentage` check. - On CI each swipe moves the list by about one item and takes ~3–4s. In the recorded failure (Release, run 39903033948), scrolling starts at ~104s of the video and only reaches the end of the list at ~162s, about 58s into the 60s budget. The step then times out during the extra centering swipes, even though `Brownie` is fully on screen. Whether it passes depends on runner speed, so the flow is flaky. `flatlist-viewability.yml` has the same structure but targets `Cheesecake`, the second-to-last item, and it rarely fails. **Fix.** - Target `Cheesecake`, like the FlatList flow does. It reaches the center zone, and it's the item the next step asserts on (`output` contains `Cheesecake`). - Raise the step timeout to 120s, to give the full traverse some headroom. The Android-only vertical block is unchanged; it passes on Android. ## Changelog: [INTERNAL] [FIXED] - Fix flaky sectionlist-viewability E2E flow on iOS Pull Request resolved: #59395 Test Plan: - Looked through the iOS RNTester E2E jobs of ~225 `main` runs from Oct 8–22. `sectionlist-viewability` is by far the most common hard failure, in both Debug and Release, before and after #58991 switched the selector from text to testID. - Pulled frames from the failure recording (`e2e_ios_…_report_Release_NewArch`) to confirm the timeline above. The last frame shows the list scrolled to the end, with `Cheesecake` and `Brownie` fully visible and the output showing `Cheesecake, Brownie`. - I couldn't run Maestro locally because the network policy on my machine blocks Maestro's localhost connection to its XCTest driver. The `test_e2e_ios_rntester` jobs on this PR verify the change. Reviewed By: javache Differential Revision: D127135564 Pulled By: cipolleschi fbshipit-source-id: 675aba648bf343358aeea9cbdd359d8b5eb3b56f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Locate
Brownieby its existingtestIDin the horizontal SectionList viewability flow rather than its rendered text. Keep the scrolling parameters and viewability callback assertions unchanged.Changelog: [Internal]
Differential Revision: D124664726