From 859d9b80db710bf77685140444e88db3c85ab459 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Mon, 26 Oct 2026 07:24:24 -0700 Subject: [PATCH] Align SectionList Maestro scroll with full-visibility threshold (#59490) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: The iOS Maestro `sectionlist-viewability` flow is repeatedly failing on main when it waits for `Cheesecake` in `output`, for example https://github.com/react/react-native/actions/runs/40321872438. The test currently stops scrolling once 50% of the item is visible, while the RNTester example sets `viewAreaCoveragePercentThreshold: 100`. Require full item visibility before asserting that the example reported it. Remove the redundant centering requirement so the scroll can stop at the visibility condition. This is a targeted test-stability hypothesis; the draft PR CI must confirm it on the iOS simulator. If the 100% condition cannot be reached reliably, the PR should not be merged as-is. ## Changelog: [INTERNAL] [FIXED] - Align the SectionList viewability flow with the example visibility threshold. Pull Request resolved: https://github.com/react/react-native/pull/59490 Test Plan: - `yarn prettier --check packages/rn-tester/.maestro/sectionlist-viewability.yml` — passed. - `git diff --check` — passed. - iOS Maestro Cloud could not be run locally; verify on draft PR CI. Reviewed By: christophpurrer Differential Revision: D127579075 Pulled By: cortinico fbshipit-source-id: 40ab0d6827e18c8161b08820e8f547d4f2994e6f --- packages/rn-tester/.maestro/sectionlist-viewability.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/rn-tester/.maestro/sectionlist-viewability.yml b/packages/rn-tester/.maestro/sectionlist-viewability.yml index 95412407efb..f676165500f 100644 --- a/packages/rn-tester/.maestro/sectionlist-viewability.yml +++ b/packages/rn-tester/.maestro/sectionlist-viewability.yml @@ -28,15 +28,14 @@ appId: ${APP_ID} # iOS: com.meta.RNTester.localDevelopment | Android: com.facebo visible: id: 'section-list-viewability-horizontal-wait' timeout: 30000 -# Target the second-to-last item: the last one can never reach the center, so -# `centerElement` would burn extra swipes at the end of the list. +# The example requires 100% item visibility before reporting viewability. +# Target Cheesecake, the item asserted in the output below. - scrollUntilVisible: element: id: 'Cheesecake' direction: RIGHT speed: 60 - visibilityPercentage: 50 - centerElement: true + visibilityPercentage: 100 timeout: 120000 - extendedWaitUntil: visible: