Skip to content

Commit ba57eab

Browse files
cortinicometa-codesync[bot]
authored andcommitted
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: #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
1 parent 56c48ac commit ba57eab

2 files changed

Lines changed: 14 additions & 22 deletions

File tree

‎packages/rn-tester/.maestro/scrollview-minindex-maintainvisible.yml‎

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@
33
appId: ${APP_ID}
44
---
55
- launchApp
6+
- stopApp
7+
- openLink: rntester://example/ScrollViewMaintainVisibleContentPositionExample
8+
- runFlow: ./helpers/confirm-open-link.yml
69
# Change to portrait
710
- setOrientation: portrait
811
- waitForAnimationToEnd:
912
timeout: 3000
10-
# Find test
11-
- assertVisible: 'Components'
12-
- scrollUntilVisible:
13-
element:
14-
id: 'ScrollViewMaintainVisibleContentPositionExample'
15-
direction: DOWN
16-
speed: 80
17-
- tapOn:
18-
id: 'ScrollViewMaintainVisibleContentPositionExample'
19-
- waitForAnimationToEnd:
20-
timeout: 2000
13+
- extendedWaitUntil:
14+
visible:
15+
id: 'scroll-offset-display'
16+
timeout: 120000
2117
# Set minIndexForVisible to 0
2218
- tapOn:
2319
text: 'minIndex: 0'

‎packages/rn-tester/.maestro/scrollview-threshold-maintainvisible.yml‎

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@
33
appId: ${APP_ID}
44
---
55
- launchApp
6+
- stopApp
7+
- openLink: rntester://example/ScrollViewMaintainVisibleContentPositionExample
8+
- runFlow: ./helpers/confirm-open-link.yml
69
# Change to portrait
710
- setOrientation: portrait
811
- waitForAnimationToEnd:
912
timeout: 3000
10-
# Find test
11-
- assertVisible: 'Components'
12-
- scrollUntilVisible:
13-
element:
14-
id: 'ScrollViewMaintainVisibleContentPositionExample'
15-
direction: DOWN
16-
speed: 80
17-
- tapOn:
18-
id: 'ScrollViewMaintainVisibleContentPositionExample'
19-
- waitForAnimationToEnd:
20-
timeout: 2000
13+
- extendedWaitUntil:
14+
visible:
15+
id: 'scroll-offset-display'
16+
timeout: 120000
2117
# Disable threshold
2218
- tapOn:
2319
text: 'Threshold: OFF'

0 commit comments

Comments
 (0)