From 241be83a43bfbb9178945cf0230e9b86bc1190d9 Mon Sep 17 00:00:00 2001 From: Aliaksandr Babrykovich Date: Mon, 5 Oct 2026 00:18:29 +0200 Subject: [PATCH 1/2] fix(e2e): give the harness tests a timeout they can actually meet Each case waits up to 10s for the WebView to load and then sleeps another 10s before screenshotting, so it needs more than 20s. No testTimeout was configured anywhere, so Jest's 5s default applied and the first test was killed mid-sleep every run - the suite has been red on master since at least 2026-08-16. Co-Authored-By: Claude Opus 5 (1M context) --- __e2e__/jest.harness.config.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/__e2e__/jest.harness.config.mjs b/__e2e__/jest.harness.config.mjs index 031efa1..23ca625 100644 --- a/__e2e__/jest.harness.config.mjs +++ b/__e2e__/jest.harness.config.mjs @@ -1,4 +1,7 @@ export default { preset: 'react-native-harness', testMatch: ['/__e2e__/**/*.harness.{js,ts,tsx}'], + // Each case waits for the WebView to load (10s) and then settles for another 10s before + // screenshotting, so it needs well over Jest's 5s default or it is killed mid-test. + testTimeout: 60000, }; From f7124f572ad83db4fe23397938b8cd0221c5ff81 Mon Sep 17 00:00:00 2001 From: Aliaksandr Babrykovich Date: Mon, 5 Oct 2026 08:44:40 +0200 Subject: [PATCH 2/2] fix(e2e): set testTimeout where the harness actually reads it The previous commit put testTimeout in jest.harness.config.mjs, which has no effect. @react-native-harness/jest resolves it as session.config.testTimeout ?? projectConfig.testTimeout ?? globalConfig.testTimeout and session.config is the rn-harness config, whose schema declares testTimeout with .default(5000). Being a Zod default it is always populated, so the first branch always wins and the Jest value is never consulted - CI still timed out at exactly 5000ms. Move it to rn-harness.config.mjs next to bridgeTimeout. Co-Authored-By: Claude Opus 5 (1M context) --- __e2e__/jest.harness.config.mjs | 3 --- __e2e__/rn-harness.config.mjs | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/__e2e__/jest.harness.config.mjs b/__e2e__/jest.harness.config.mjs index 23ca625..031efa1 100644 --- a/__e2e__/jest.harness.config.mjs +++ b/__e2e__/jest.harness.config.mjs @@ -1,7 +1,4 @@ export default { preset: 'react-native-harness', testMatch: ['/__e2e__/**/*.harness.{js,ts,tsx}'], - // Each case waits for the WebView to load (10s) and then settles for another 10s before - // screenshotting, so it needs well over Jest's 5s default or it is killed mid-test. - testTimeout: 60000, }; diff --git a/__e2e__/rn-harness.config.mjs b/__e2e__/rn-harness.config.mjs index 048d317..cd16cd7 100644 --- a/__e2e__/rn-harness.config.mjs +++ b/__e2e__/rn-harness.config.mjs @@ -13,6 +13,11 @@ const config = { disableViewFlattening: true, bridgeTimeout: 120000, + // Each case waits up to 10s for the WebView and then settles another 10s before + // screenshotting, so it needs more than the 5s default. This has to live here rather than + // as Jest's `testTimeout`: the harness reads `session.config.testTimeout` first and the + // schema always populates it, so a value in jest.harness.config.mjs is never consulted. + testTimeout: 60000, forwardClientLogs: true, runners: [