Skip to content

Commit

Permalink
test: patch detox terminateApp to expand acceptable errors
Browse files Browse the repository at this point in the history
iOS 17 emits a slightly different error when there is nothing to terminate

attempting to terminate an app when it is already terminated is not an error,
so it is important for detox to recognize the new string iOS17 uses
or detox startup fails completely
  • Loading branch information
mikehardy committed Sep 20, 2023
1 parent 7e08f89 commit b7e0766
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/patches/detox+19.12.6.patch
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,16 @@ index fb4b820..d2dc87d 100644
notifyIdle()
return true
}
diff --git a/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js b/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js
index 585c99b..46e4b83 100644
--- a/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js
+++ b/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js
@@ -272,7 +272,7 @@ class AppleSimUtils {
// want to make sure it isn't now.
if (err.code === 3 &&
(err.stderr.includes(`the app is not currently running`) ||
- err.stderr.includes(`The operation couldn’t be completed. found nothing to terminate`))) {
+ err.stderr.includes(`found nothing to terminate`))) {
return;
}

0 comments on commit b7e0766

Please sign in to comment.