Fix flaky ScrollView Maestro navigation with deep links (#58794)

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
This commit is contained in:
Nicola Corti authored and meta-codesync[bot] committed 2026-10-01 07:16:10 -07:00
1 parent 56c48ac0eb
commit ba57eaba77
2 files changed
+14 -22

No files matched your search

@@ -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'
@@ -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'