From 6cd99b0566b6b074b0c1ae3b9ac597d374b45654 Mon Sep 17 00:00:00 2001 From: Peter Abbondanzo Date: Mon, 29 Jun 2026 07:00:41 -0700 Subject: [PATCH] Stabilize RNTester Maestro flows against app cold-start race (#57343) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: 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 --- packages/rn-tester/.maestro/button.yml | 6 +++++- packages/rn-tester/.maestro/flatlist.yml | 6 +++++- .../rn-tester/.maestro/helpers/launch-app-and-search.yml | 6 +++++- packages/rn-tester/.maestro/legacy-native-module.yml | 8 ++++++-- packages/rn-tester/.maestro/modal.yml | 6 +++++- 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/packages/rn-tester/.maestro/button.yml b/packages/rn-tester/.maestro/button.yml index 7c0caa0b846e..865b2c345118 100644 --- a/packages/rn-tester/.maestro/button.yml +++ b/packages/rn-tester/.maestro/button.yml @@ -1,7 +1,11 @@ appId: ${APP_ID} # iOS: com.meta.RNTester.localDevelopment | Android: com.facebook.react.uiapp --- - launchApp -- assertVisible: 'Components' +# Wait for the JS bundle to render the landing screen instead of asserting +# immediately, which races app cold start on CI. +- extendedWaitUntil: + visible: 'Components' + timeout: 30000 - scrollUntilVisible: element: id: 'Button' diff --git a/packages/rn-tester/.maestro/flatlist.yml b/packages/rn-tester/.maestro/flatlist.yml index ec75f6ccfb10..0915de4f6c00 100644 --- a/packages/rn-tester/.maestro/flatlist.yml +++ b/packages/rn-tester/.maestro/flatlist.yml @@ -1,7 +1,11 @@ appId: ${APP_ID} # iOS: com.meta.RNTester.localDevelopment | Android: com.facebook.react.uiapp --- - launchApp -- assertVisible: 'Components' +# Wait for the JS bundle to render the landing screen instead of asserting +# immediately, which races app cold start on CI. +- extendedWaitUntil: + visible: 'Components' + timeout: 30000 - scrollUntilVisible: element: id: 'Flatlist' diff --git a/packages/rn-tester/.maestro/helpers/launch-app-and-search.yml b/packages/rn-tester/.maestro/helpers/launch-app-and-search.yml index b6fca0b4990b..d9463c0908ab 100644 --- a/packages/rn-tester/.maestro/helpers/launch-app-and-search.yml +++ b/packages/rn-tester/.maestro/helpers/launch-app-and-search.yml @@ -1,5 +1,9 @@ appId: ${APP_ID} # iOS: com.meta.RNTester.localDevelopment | Android: com.facebook.react.uiapp --- - launchApp -- assertVisible: 'Components' +# Wait for the JS bundle to render the landing screen instead of asserting +# immediately, which races app cold start on CI. +- extendedWaitUntil: + visible: 'Components' + timeout: 30000 - runFlow: ./search.yml diff --git a/packages/rn-tester/.maestro/legacy-native-module.yml b/packages/rn-tester/.maestro/legacy-native-module.yml index 1d81fd734c83..e68fbaa30edd 100644 --- a/packages/rn-tester/.maestro/legacy-native-module.yml +++ b/packages/rn-tester/.maestro/legacy-native-module.yml @@ -1,8 +1,12 @@ appId: ${APP_ID} # iOS: com.meta.RNTester.localDevelopment | Android: com.facebook.react.uiapp --- - launchApp -- assertVisible: - text: 'APIs' +# Wait for the JS bundle to render the landing screen instead of asserting +# immediately, which races app cold start on CI. +- extendedWaitUntil: + visible: + text: 'APIs' + timeout: 30000 - tapOn: id: 'apis-tab' - runFlow: ./helpers/search.yml diff --git a/packages/rn-tester/.maestro/modal.yml b/packages/rn-tester/.maestro/modal.yml index e0e2de4ef3c2..e3b7bef53886 100644 --- a/packages/rn-tester/.maestro/modal.yml +++ b/packages/rn-tester/.maestro/modal.yml @@ -1,7 +1,11 @@ appId: ${APP_ID} # iOS: com.meta.RNTester.localDevelopment | Android: com.facebook.react.uiapp --- - launchApp -- assertVisible: 'Components' +# Wait for the JS bundle to render the landing screen instead of asserting +# immediately, which races app cold start on CI. +- extendedWaitUntil: + visible: 'Components' + timeout: 30000 - scrollUntilVisible: element: id: 'Modal'