Skip to content

Commit 324198b

Browse files
Abbondanzometa-codesync[bot]
authored andcommitted
Stabilize RNTester Maestro flows against app cold-start race (#57343)
Summary: Pull Request resolved: #57343 The iOS RNTester Maestro suite is flaky because several flows assert the landing screen immediately after `launchApp`, with no wait. On a CI simulator the JS bundle hasn't rendered yet when the assertion fires, so flows fail with `Assertion is false: "Components" is visible` (e.g. `text`, `modal`) or fail downstream after entering through the shared launch helper (e.g. `pressable`). It is a race, not a deterministic failure — `flatlist`/`button` use the same pattern and pass on faster runs. Replace the bare landing-screen `assertVisible` with `extendedWaitUntil` (30s) so the bundle has time to render: - `helpers/launch-app-and-search.yml` (`Components`) — the shared entry path for `text`, `pressable`, `image`, and the new image smoke-test flows. - `modal.yml`, `flatlist.yml`, `button.yml` (`Components`). - `legacy-native-module.yml` (`APIs`). `extendedWaitUntil` returns as soon as the element appears, so this adds no time on the happy path — only headroom on cold start. This is the actual fix for the red iOS E2E; the earlier `spawnSync ETIMEDOUT` was the suite failing + retrying + occasionally overrunning the 10-minute per-attempt cap, not a simulator/driver-startup problem. No harness/setup changes. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D109742688 fbshipit-source-id: 5c5c29e1fb0b8e8d0da2b2040d210eead61596c3
1 parent 610192e commit 324198b

5 files changed

Lines changed: 26 additions & 6 deletions

File tree

packages/rn-tester/.maestro/button.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
appId: ${APP_ID} # iOS: com.meta.RNTester.localDevelopment | Android: com.facebook.react.uiapp
22
---
33
- launchApp
4-
- assertVisible: 'Components'
4+
# Wait for the JS bundle to render the landing screen instead of asserting
5+
# immediately, which races app cold start on CI.
6+
- extendedWaitUntil:
7+
visible: 'Components'
8+
timeout: 30000
59
- scrollUntilVisible:
610
element:
711
id: 'Button'

packages/rn-tester/.maestro/flatlist.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
appId: ${APP_ID} # iOS: com.meta.RNTester.localDevelopment | Android: com.facebook.react.uiapp
22
---
33
- launchApp
4-
- assertVisible: 'Components'
4+
# Wait for the JS bundle to render the landing screen instead of asserting
5+
# immediately, which races app cold start on CI.
6+
- extendedWaitUntil:
7+
visible: 'Components'
8+
timeout: 30000
59
- scrollUntilVisible:
610
element:
711
id: 'Flatlist'
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
appId: ${APP_ID} # iOS: com.meta.RNTester.localDevelopment | Android: com.facebook.react.uiapp
22
---
33
- launchApp
4-
- assertVisible: 'Components'
4+
# Wait for the JS bundle to render the landing screen instead of asserting
5+
# immediately, which races app cold start on CI.
6+
- extendedWaitUntil:
7+
visible: 'Components'
8+
timeout: 30000
59
- runFlow: ./search.yml

packages/rn-tester/.maestro/legacy-native-module.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
appId: ${APP_ID} # iOS: com.meta.RNTester.localDevelopment | Android: com.facebook.react.uiapp
22
---
33
- launchApp
4-
- assertVisible:
5-
text: 'APIs'
4+
# Wait for the JS bundle to render the landing screen instead of asserting
5+
# immediately, which races app cold start on CI.
6+
- extendedWaitUntil:
7+
visible:
8+
text: 'APIs'
9+
timeout: 30000
610
- tapOn:
711
id: 'apis-tab'
812
- runFlow: ./helpers/search.yml

packages/rn-tester/.maestro/modal.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
appId: ${APP_ID} # iOS: com.meta.RNTester.localDevelopment | Android: com.facebook.react.uiapp
22
---
33
- launchApp
4-
- assertVisible: 'Components'
4+
# Wait for the JS bundle to render the landing screen instead of asserting
5+
# immediately, which races app cold start on CI.
6+
- extendedWaitUntil:
7+
visible: 'Components'
8+
timeout: 30000
59
- scrollUntilVisible:
610
element:
711
id: 'Modal'

0 commit comments

Comments
 (0)