From b63da4c6b9f44e6dca3450ee8af6eaf4114df31a Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 23 Oct 2026 12:14:52 +0100 Subject: [PATCH] Fix flaky sectionlist-viewability E2E flow on iOS 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. --- packages/rn-tester/.maestro/sectionlist-viewability.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/rn-tester/.maestro/sectionlist-viewability.yml b/packages/rn-tester/.maestro/sectionlist-viewability.yml index 61ba4347dbf5..95412407efba 100644 --- a/packages/rn-tester/.maestro/sectionlist-viewability.yml +++ b/packages/rn-tester/.maestro/sectionlist-viewability.yml @@ -28,14 +28,16 @@ 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. - scrollUntilVisible: element: - id: 'Brownie' + id: 'Cheesecake' direction: RIGHT speed: 60 visibilityPercentage: 50 centerElement: true - timeout: 60000 + timeout: 120000 - extendedWaitUntil: visible: id: 'output'