From ba57eaba77dd362a58f5ddd2f2f10e0e03175cff Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Thu, 1 Oct 2026 07:16:10 -0700 Subject: [PATCH] Fix flaky ScrollView Maestro navigation with deep links (#58794) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: The Android Maestro run for `5954b12400d` failed in `scrollview-threshold-maintainvisible`: `scrollUntilVisible` could not find the RNTester example in the Components list, before the flow reached any ScrollView assertions. See the [failed job](https://github.com/react/react-native/actions/runs/36841367720/job/110306957110). The same flow passed on the next main commit, suggesting intermittent list-navigation failure. Open the ScrollView maintain-visible-content-position module with RNTester deep links in both the threshold and min-index Maestro flows, and wait for the example control before proceeding. This bypasses scrolling through the RNTester catalog; the ScrollView checks themselves are unchanged. ## Changelog: [INTERNAL] - Use deep links to avoid flaky RNTester list navigation in ScrollView Maestro tests. Pull Request resolved: https://github.com/react/react-native/pull/58794 Test Plan: - `yarn prettier --check packages/rn-tester/.maestro/scrollview-threshold-maintainvisible.yml packages/rn-tester/.maestro/scrollview-minindex-maintainvisible.yml` — passed. - `git diff --check` — passed. - `node -e 'const fs=require("fs"),yaml=require("yaml"); for(const f of process.argv.slice(1)){const docs=yaml.parseAllDocuments(fs.readFileSync(f,"utf8")); if(docs.length!==2||docs.some(d=>d.errors.length))throw Error(f+": invalid Maestro YAML"); const commands=docs[1].toJS(); if(!commands.some(c=>c.openLink==="rntester://example/ScrollViewMaintainVisibleContentPositionExample"))throw Error(f+": missing deep link"); console.log(f+": YAML valid, deep link present")}' packages/rn-tester/.maestro/scrollview-threshold-maintainvisible.yml packages/rn-tester/.maestro/scrollview-minindex-maintainvisible.yml` — passed. - Maestro end-to-end flows not run locally: no Android device was attached, and RNTester was not installed on the available iOS simulator. CI should exercise both flows. - No screenshots needed: test automation only; no user-interface changes. Reviewed By: Abbondanzo Differential Revision: D122778911 Pulled By: cortinico fbshipit-source-id: d02a09648336b850cb2ba1091d37f232deafeb54 --- .../scrollview-minindex-maintainvisible.yml | 18 +++++++----------- .../scrollview-threshold-maintainvisible.yml | 18 +++++++----------- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/packages/rn-tester/.maestro/scrollview-minindex-maintainvisible.yml b/packages/rn-tester/.maestro/scrollview-minindex-maintainvisible.yml index 0925eda988f..7c36f0f5ad7 100644 --- a/packages/rn-tester/.maestro/scrollview-minindex-maintainvisible.yml +++ b/packages/rn-tester/.maestro/scrollview-minindex-maintainvisible.yml @@ -3,21 +3,17 @@ appId: ${APP_ID} --- - launchApp +- stopApp +- openLink: rntester://example/ScrollViewMaintainVisibleContentPositionExample +- runFlow: ./helpers/confirm-open-link.yml # Change to portrait - setOrientation: portrait - waitForAnimationToEnd: timeout: 3000 -# Find test -- assertVisible: 'Components' -- scrollUntilVisible: - element: - id: 'ScrollViewMaintainVisibleContentPositionExample' - direction: DOWN - speed: 80 -- tapOn: - id: 'ScrollViewMaintainVisibleContentPositionExample' -- waitForAnimationToEnd: - timeout: 2000 +- extendedWaitUntil: + visible: + id: 'scroll-offset-display' + timeout: 120000 # Set minIndexForVisible to 0 - tapOn: text: 'minIndex: 0' diff --git a/packages/rn-tester/.maestro/scrollview-threshold-maintainvisible.yml b/packages/rn-tester/.maestro/scrollview-threshold-maintainvisible.yml index c865c3cb26e..f270261af94 100644 --- a/packages/rn-tester/.maestro/scrollview-threshold-maintainvisible.yml +++ b/packages/rn-tester/.maestro/scrollview-threshold-maintainvisible.yml @@ -3,21 +3,17 @@ appId: ${APP_ID} --- - launchApp +- stopApp +- openLink: rntester://example/ScrollViewMaintainVisibleContentPositionExample +- runFlow: ./helpers/confirm-open-link.yml # Change to portrait - setOrientation: portrait - waitForAnimationToEnd: timeout: 3000 -# Find test -- assertVisible: 'Components' -- scrollUntilVisible: - element: - id: 'ScrollViewMaintainVisibleContentPositionExample' - direction: DOWN - speed: 80 -- tapOn: - id: 'ScrollViewMaintainVisibleContentPositionExample' -- waitForAnimationToEnd: - timeout: 2000 +- extendedWaitUntil: + visible: + id: 'scroll-offset-display' + timeout: 120000 # Disable threshold - tapOn: text: 'Threshold: OFF'