Repository navigation
Fix flaky sectionlist-viewability E2E flow on iOS - #59395
Closed
cipolleschi wants to merge 1 commit into
Closed
cipolleschi wants to merge 1 commit into
cipolleschi wants to merge 1 commit into
Conversation
The horizontal waitForInteraction step scrolled until the last item (`Brownie`) was centered, with a 60s timeout. With `direction: RIGHT`, Maestro only considers an element centered once its center is left of 70% of the screen width, which the last item of the list can never reach. Maestro then needs 5 extra swipes before falling back to the plain visibility check. On CI each swipe moves the list by about one item and takes ~3-4s, so just reaching the end of the list takes ~58s, and the step times out during those extra swipes whenever the runner is slow. Target `Cheesecake` instead, like the FlatList viewability flow does: it does reach the center zone, and it's the item the next step asserts on. Also raise the timeout to 120s, to give the full traverse some headroom.
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D127135564. |
Collaborator
|
This pull request was successfully merged by @cipolleschi in ffd341a When will my fix make it into a release? | How to file a pick request? |
|
@cipolleschi merged this pull request in ffd341a. |
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:
test_e2e_ios_rntesteronmainkeeps failing onsectionlist-viewability.yml, withNo visible element found: id: Brownieon all 5 attempts. It isn't a recent regression: the same flow has failed this way regularly onmainsince at least Oct 8.Root cause. In the horizontal waitForInteraction step,
scrollUntilVisiblescrolls untilBrownieis centered, with a 60s timeout:direction: RIGHT, Maestro (2.6.1,UiElement.isElementNearScreenCenter) counts an element as centered only when its center is left ofcenterX + width/5, which is 70% of the screen width.Brownieis the last item of the list, so its center can never get that far left (it ends at about 85% of the width).maxRetryCenterCount(4+1) more swipes before falling back to the plainvisibilityPercentagecheck.Brownieis fully on screen.Whether it passes depends on runner speed, so the flow is flaky.
flatlist-viewability.ymlhas the same structure but targetsCheesecake, the second-to-last item, and it rarely fails.Fix.
Cheesecake, like the FlatList flow does. It reaches the center zone, and it's the item the next step asserts on (outputcontainsCheesecake).The Android-only vertical block is unchanged; it passes on Android.
Changelog:
[INTERNAL] [FIXED] - Fix flaky sectionlist-viewability E2E flow on iOS
Test Plan:
mainruns from Oct 8–22.sectionlist-viewabilityis by far the most common hard failure, in both Debug and Release, before and after Target the SectionList viewability item by test ID #58991 switched the selector from text to testID.e2e_ios_…_report_Release_NewArch) to confirm the timeline above. The last frame shows the list scrolled to the end, withCheesecakeandBrowniefully visible and the output showingCheesecake, Brownie.test_e2e_ios_rntesterjobs on this PR verify the change.