From b438c73f3c8199bbbf6a15b0d492f3463973a4a0 Mon Sep 17 00:00:00 2001 From: Matej Kriz Date: Tue, 19 Nov 2024 10:32:36 +0100 Subject: [PATCH] chore(suite-native, e2e): fix debug E2E tests by patching expo-updates - Use patch untill https://github.com/expo/expo/pull/32951 is merged and released. --- patches/README.md | 5 +++++ patches/expo-updates+0.26.6.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 patches/expo-updates+0.26.6.patch diff --git a/patches/README.md b/patches/README.md index 89cf58d3b22..4066ee9b145 100644 --- a/patches/README.md +++ b/patches/README.md @@ -3,3 +3,8 @@ ## ripple-lib allow passing custom agent to websocket constructor + +## expo-updates + +fix e2e tests in debug mode +upstream PR https://github.com/expo/expo/pull/32951 diff --git a/patches/expo-updates+0.26.6.patch b/patches/expo-updates+0.26.6.patch new file mode 100644 index 00000000000..33ed5d0f13f --- /dev/null +++ b/patches/expo-updates+0.26.6.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/expo-updates/android/src/main/java/expo/modules/updates/UpdatesPackage.kt b/node_modules/expo-updates/android/src/main/java/expo/modules/updates/UpdatesPackage.kt +index 6385d40..1f03038 100644 +--- a/node_modules/expo-updates/android/src/main/java/expo/modules/updates/UpdatesPackage.kt ++++ b/node_modules/expo-updates/android/src/main/java/expo/modules/updates/UpdatesPackage.kt +@@ -97,7 +97,7 @@ class UpdatesPackage : Package { + val handler = object : ApplicationLifecycleListener { + override fun onCreate(application: Application) { + super.onCreate(application) +- if (isRunningAndroidTest()) { ++ if (!BuildConfig.USE_DEV_CLIENT && isRunningAndroidTest()) { + // Preload updates to prevent Detox ANR + UpdatesController.initialize(context) + UpdatesController.instance.launchAssetFile \ No newline at end of file