detox 19.8.3 → 19.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/Detox-android/com/wix/detox/{19.8.3/detox-19.8.3-javadoc.jar → 19.8.4/detox-19.8.4-javadoc.jar} +0 -0
  2. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4-javadoc.jar.md5 +1 -0
  3. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4-javadoc.jar.sha1 +1 -0
  4. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4-javadoc.jar.sha256 +1 -0
  5. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4-javadoc.jar.sha512 +1 -0
  6. package/Detox-android/com/wix/detox/{19.8.3/detox-19.8.3-sources.jar → 19.8.4/detox-19.8.4-sources.jar} +0 -0
  7. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4-sources.jar.md5 +1 -0
  8. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4-sources.jar.sha1 +1 -0
  9. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4-sources.jar.sha256 +1 -0
  10. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4-sources.jar.sha512 +1 -0
  11. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4.aar +0 -0
  12. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4.aar.md5 +1 -0
  13. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4.aar.sha1 +1 -0
  14. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4.aar.sha256 +1 -0
  15. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4.aar.sha512 +1 -0
  16. package/Detox-android/com/wix/detox/{19.8.3/detox-19.8.3.pom → 19.8.4/detox-19.8.4.pom} +1 -1
  17. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4.pom.md5 +1 -0
  18. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4.pom.sha1 +1 -0
  19. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4.pom.sha256 +1 -0
  20. package/Detox-android/com/wix/detox/19.8.4/detox-19.8.4.pom.sha512 +1 -0
  21. package/Detox-android/com/wix/detox/maven-metadata.xml +4 -4
  22. package/Detox-android/com/wix/detox/maven-metadata.xml.md5 +1 -1
  23. package/Detox-android/com/wix/detox/maven-metadata.xml.sha1 +1 -1
  24. package/Detox-android/com/wix/detox/maven-metadata.xml.sha256 +1 -1
  25. package/Detox-android/com/wix/detox/maven-metadata.xml.sha512 +1 -1
  26. package/Detox-ios-src.tbz +0 -0
  27. package/Detox-ios.tbz +0 -0
  28. package/android/detox/src/full/java/com/wix/detox/espresso/UiAutomatorHelper.java +1 -1
  29. package/android/detox/src/full/java/com/wix/detox/reactnative/ReactNativeLoadingMonitor.kt +53 -8
  30. package/android/detox/src/main/java/com/wix/detox/espresso/UiControllerSpy.kt +2 -1
  31. package/android/detox/src/main/java/com/wix/detox/espresso/action/common/utils/UiControllerUtils.kt +1 -1
  32. package/package.json +2 -2
  33. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3-javadoc.jar.md5 +0 -1
  34. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3-javadoc.jar.sha1 +0 -1
  35. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3-javadoc.jar.sha256 +0 -1
  36. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3-javadoc.jar.sha512 +0 -1
  37. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3-sources.jar.md5 +0 -1
  38. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3-sources.jar.sha1 +0 -1
  39. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3-sources.jar.sha256 +0 -1
  40. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3-sources.jar.sha512 +0 -1
  41. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3.aar +0 -0
  42. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3.aar.md5 +0 -1
  43. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3.aar.sha1 +0 -1
  44. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3.aar.sha256 +0 -1
  45. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3.aar.sha512 +0 -1
  46. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3.pom.md5 +0 -1
  47. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3.pom.sha1 +0 -1
  48. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3.pom.sha256 +0 -1
  49. package/Detox-android/com/wix/detox/19.8.3/detox-19.8.3.pom.sha512 +0 -1
  50. package/android/detox/src/full/java/com/facebook/react/ReactInstanceEventListener.java +0 -23
@@ -0,0 +1 @@
1
+ f1eff49df29549c4f094b94f820d8659
@@ -0,0 +1 @@
1
+ 00703d0219b1e8ad51dfe52206f2ff795956136d
@@ -0,0 +1 @@
1
+ c40e8c0d55385f0ee35aec198dcf9ae2a63c4279786603aa9294436384fb3dcd
@@ -0,0 +1 @@
1
+ 00742f6f56f5314f0a1ffa99e4e831615a926fe8e9e32d94725903e23ee6ed8067682d0bedd19350f092aebbe2a90c705e050a20967103e6599ae237a0882baf
@@ -0,0 +1 @@
1
+ 7070b5efa82ce7926d40972ca14ec8fd
@@ -0,0 +1 @@
1
+ f6c4c5b5f2eb5d89f6605df7b09f7b2689bd132d
@@ -0,0 +1 @@
1
+ 558d13035ea21c4f584b8463cfd923bbcfcfd0ef904ec4e9d45b17bff8aa5cea
@@ -0,0 +1 @@
1
+ 631b37c92c17dd5158e8b72b305ba18adc69b71a7a72449c00fd9cffa36d7627a341f6825d1c809a77c9dfecd5ffe3a795d23f3f48be3081f2a6cce4a5bd2d8e
@@ -0,0 +1 @@
1
+ 6d3f9250a50b2297577f126aa0253833
@@ -0,0 +1 @@
1
+ e8a6d8b30ca550020ddcc21a061ea5cb360515d8
@@ -0,0 +1 @@
1
+ bc528b332ad97156496b6d44e60005884f2d9ffe79808319e4a844b65cad9810
@@ -0,0 +1 @@
1
+ d3b944c0bedc48769416f46594853b759776b04befafc96314f2023f01f94607b43a22f2ebffe2ccd2c1c9144357d8e8888b600bfed1c8550263ff1c63d1f22f
@@ -3,7 +3,7 @@
3
3
  <modelVersion>4.0.0</modelVersion>
4
4
  <groupId>com.wix</groupId>
5
5
  <artifactId>detox</artifactId>
6
- <version>19.8.3</version>
6
+ <version>19.8.4</version>
7
7
  <packaging>aar</packaging>
8
8
  <name>Detox</name>
9
9
  <description>Gray box end-to-end testing and automation library for mobile apps</description>
@@ -0,0 +1 @@
1
+ 73a0b8c6ccc7b6f6eb6b3cc381eafba5
@@ -0,0 +1 @@
1
+ 9212f8d378d2bb72115181b5e2c4d086eaa7ba2f
@@ -0,0 +1 @@
1
+ 4a350adbac62859765229611809d3cd99eec3c0d3d46c8dcf49916c9cb53fe34
@@ -0,0 +1 @@
1
+ 3fd69cb6ccc763c9bae624716a6e76bcafafd0946c9562505ab5c3592c27ab6873f1f2adaa6d30fc89549f3b50ca451e902559ef290596b903beb696ac883d4e
@@ -3,11 +3,11 @@
3
3
  <groupId>com.wix</groupId>
4
4
  <artifactId>detox</artifactId>
5
5
  <versioning>
6
- <latest>19.8.3</latest>
7
- <release>19.8.3</release>
6
+ <latest>19.8.4</latest>
7
+ <release>19.8.4</release>
8
8
  <versions>
9
- <version>19.8.3</version>
9
+ <version>19.8.4</version>
10
10
  </versions>
11
- <lastUpdated>20220726183854</lastUpdated>
11
+ <lastUpdated>20220727140215</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- f296d4d6db465012bf6b6fda36bee0b8
1
+ c501ff858a7bb71d219fa1e0504ac399
@@ -1 +1 @@
1
- 0a7f0f15f4289475ec771c68e74ed515f2c2703e
1
+ 418f60ae638bc1cf710675ae55dfedfb4a5705a2
@@ -1 +1 @@
1
- 8e88e5bf712442297b5c7d3d0f04c6b1e003638d5798f9d07d53682113298ab3
1
+ 4be1847db0453c931c85f1e489b98839b139e7a7f1cf0a261735d2ba594a0830
@@ -1 +1 @@
1
- 440c24012d969a7747fd3b41e3eb55d49d827a6228d73ebd33fd520878035dd9280db40574a93e21946c2a321ab57f9953ad3616ac051e58d93bf217cb3f2e6a
1
+ b5ed6a0e3a4116823cd62582a4bfd638beffbf4400bb5338f882da0ef102ed9c3892df6bc8e963ba94b559d384c25533da0d4e053068aadeee81fa124d94df4e
package/Detox-ios-src.tbz CHANGED
Binary file
package/Detox-ios.tbz CHANGED
Binary file
@@ -5,7 +5,7 @@ import android.util.Log;
5
5
  import android.view.Choreographer;
6
6
 
7
7
  import com.wix.detox.common.UIThread;
8
- import com.wix.detox.espresso.common.utils.UiControllerUtils;
8
+ import com.wix.detox.espresso.action.common.utils.UiControllerUtils;
9
9
 
10
10
  import org.joor.Reflect;
11
11
  import org.joor.ReflectException;
@@ -8,17 +8,21 @@ import com.facebook.react.bridge.ReactContext
8
8
  import com.wix.detox.common.DetoxErrors
9
9
  import com.wix.detox.config.DetoxConfig
10
10
  import org.joor.Reflect
11
+ import java.lang.reflect.Proxy
11
12
  import java.util.concurrent.CountDownLatch
12
13
  import java.util.concurrent.TimeUnit
13
14
 
14
15
  private const val LOG_TAG = "DetoxRNLoading"
15
16
 
17
+ private const val REACT_INSTANCE_EVENT_LISTENER_CLASS = "com.facebook.react.ReactInstanceEventListener"
18
+ private const val REACT_INSTANCE_EVENT_LISTENER_CLASS_COMPAT = "com.facebook.react.ReactInstanceManager\$ReactInstanceEventListener"
19
+
16
20
  open class ReactNativeLoadingMonitor(
17
21
  private val instrumentation: Instrumentation,
18
22
  private val rnApplication: ReactApplication,
19
23
  private val previousReactContext: ReactContext?,
20
24
  private val config: DetoxConfig = DetoxConfig.CONFIG) {
21
- val countDownLatch = CountDownLatch(1)
25
+ private val countDownLatch = CountDownLatch(1)
22
26
 
23
27
  fun getNewContext(): ReactContext? {
24
28
  subscribeToNewRNContextUpdates()
@@ -36,13 +40,9 @@ open class ReactNativeLoadingMonitor(
36
40
  return@Runnable
37
41
  }
38
42
 
39
- rnInstanceManager.addReactInstanceEventListener(object: ReactInstanceManager.ReactInstanceEventListener {
40
- override fun onReactContextInitialized(context: ReactContext?) {
41
- Log.i(LOG_TAG, "Got new RN-context async'ly through listener")
42
- rnInstanceManager.removeReactInstanceEventListener(this)
43
- countDownLatch.countDown()
44
- }
45
- })
43
+ subscribeAsyncRNContextHandler(rnInstanceManager) {
44
+ countDownLatch.countDown()
45
+ }
46
46
  })
47
47
  }
48
48
 
@@ -82,3 +82,48 @@ open class ReactNativeLoadingMonitor(
82
82
  return rnInstanceManager.currentReactContext
83
83
  }
84
84
  }
85
+
86
+ private interface DummyListenerIdentifier
87
+
88
+ /**
89
+ * This baby bridges over RN's breaking change introduced in version 0.68:
90
+ * `ReactInstanceManager$ReactInstanceEventListener` was extracted onto a separate interface, having
91
+ * `ReactInstanceManager.{add|remove}ReactInstanceEventLister()` changing their signature to use it, accordingly.
92
+ *
93
+ * This made us resort to a solution based on dynamic proxies, because - depending on RN's version (at runtime), we
94
+ * need to dynamically decide what interface we "extend" (or actually shadow) via the proxy.
95
+ *
96
+ * @see RNDiff https://github.com/facebook/react-native/compare/v0.67.4..v0.68.0#diff-2f01f0cd7ff8c9ea58f12ef0eff5fa8250cad144dd5490598d80d8e9e743458aR1009
97
+ * @see DynamicProxies https://docs.oracle.com/javase/8/docs/technotes/guides/reflection/proxy.html
98
+ */
99
+ private fun subscribeAsyncRNContextHandler(rnInstanceManager: ReactInstanceManager, onReactContextInitialized: () -> Any) {
100
+ val listenerClass = resolveListenerClass()
101
+ val proxyInterfaces = arrayOf(
102
+ listenerClass,
103
+ DummyListenerIdentifier::class.java // In order to be able to implement equals()
104
+ )
105
+ val listener = Proxy.newProxyInstance(listenerClass.classLoader, proxyInterfaces) { listener, method, args ->
106
+ Log.d(LOG_TAG, "Listener-proxy method called: ${method.name}")
107
+
108
+ val result = when (method.name) {
109
+ "onReactContextInitialized" -> {
110
+ Log.i(LOG_TAG, "Got new RN-context async'ly through listener")
111
+ Reflect.on(rnInstanceManager).call("removeReactInstanceEventListener", listener)
112
+ onReactContextInitialized()
113
+ }
114
+ "equals" -> {
115
+ val candidate = args[0]
116
+ candidate is DummyListenerIdentifier
117
+ }
118
+ else -> Any()
119
+ }
120
+
121
+ result
122
+ }
123
+ Reflect.on(rnInstanceManager).call("addReactInstanceEventListener", listener)
124
+ }
125
+
126
+ private fun resolveListenerClass(): Class<*> {
127
+ val className = if (ReactNativeInfo.rnVersion().minor >= 68) REACT_INSTANCE_EVENT_LISTENER_CLASS else REACT_INSTANCE_EVENT_LISTENER_CLASS_COMPAT
128
+ return Class.forName(className)
129
+ }
@@ -1,10 +1,11 @@
1
+
1
2
  package com.wix.detox.espresso
2
3
 
3
4
  import androidx.test.espresso.UiController
4
5
  import com.wix.detox.common.proxy.CallInfo
5
6
  import com.wix.detox.common.proxy.SpyingInvocationHandler
6
7
  import com.wix.detox.common.proxy.MethodsSpy
7
- import com.wix.detox.espresso.common.utils.getUiController
8
+ import com.wix.detox.espresso.action.common.utils.getUiController
8
9
  import org.joor.Reflect
9
10
 
10
11
  class UiControllerSpy: MethodsSpy("uiController") {
@@ -1,6 +1,6 @@
1
1
  @file:JvmName("UiControllerUtils")
2
2
 
3
- package com.wix.detox.espresso.common.utils
3
+ package com.wix.detox.espresso.action.common.utils
4
4
 
5
5
  import androidx.test.espresso.Espresso
6
6
  import androidx.test.espresso.UiController
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "detox",
3
3
  "description": "E2E tests and automation for mobile",
4
- "version": "19.8.3",
4
+ "version": "19.8.4",
5
5
  "bin": {
6
6
  "detox": "local-cli/cli.js"
7
7
  },
@@ -177,5 +177,5 @@
177
177
  }
178
178
  }
179
179
  },
180
- "gitHead": "fa050f9dd0e795f0f8a2c7a28d2de37405aa43fd"
180
+ "gitHead": "9229e64ec8f95574aab5beeeb4fa6bcc84844f69"
181
181
  }
@@ -1 +0,0 @@
1
- 491c0540b5eeec249c10e313c10c415f
@@ -1 +0,0 @@
1
- c37eb6d77734ba511864bdb8992264458be64359
@@ -1 +0,0 @@
1
- 9b22ec357c6ff137cdee7edcbebc1d1c9596e229022918b5802e3e18b0e8d008
@@ -1 +0,0 @@
1
- a53439704478bac559e90ef1239c3e99668482b7102ba24444a599a339f491fb8f8d6d6bc4a3937d621f721b621f87dacc980af3b71358095c35b8c657e08c3e
@@ -1 +0,0 @@
1
- 76adba682ba0b8564fbacf3462737837
@@ -1 +0,0 @@
1
- 38c3fc67553837c057639d5a9b99efceb40c7016
@@ -1 +0,0 @@
1
- 51a3f0da146fb893c5cffd086120531761067f3957a085343784d7cb42793427
@@ -1 +0,0 @@
1
- 494a93d2639bed4e273b68c50d01fa7b2b16ea521faa0f3400aed5b37743dcce253f042e81294519cab3783a32804df51f31ead980037160fd8dbd521d5baf6f
@@ -1 +0,0 @@
1
- 5ad9e1d1f8ed33895a5c7ce1b3db0d23
@@ -1 +0,0 @@
1
- 70a984e1aaa630d9f48109cd28a11abe0b4a8d50
@@ -1 +0,0 @@
1
- 1b5a1bfcdfff551052e1efb718b30a32f73555da8a1eaef159860f6c0fd31bea
@@ -1 +0,0 @@
1
- b1414f135a2022ea1e6eb84078b9ea44cb71f0edfd64537976544d13abf5f17eb2ecfba63df8f45599c46aae71cc7118877cbd9e266744b18ab5afa3c0e1e240
@@ -1 +0,0 @@
1
- 9ea01a972c456b0fc757040ceccbef1e
@@ -1 +0,0 @@
1
- cdae804d9d483c5cd07191e0401b625d877316b7
@@ -1 +0,0 @@
1
- bacd93086980683d104576559173918a687f28689bd0c35c541f9dbecc381a2f
@@ -1 +0,0 @@
1
- fd2066edcd5d78cebe11a545f6b858290cabe3bacc537090bb285925ea2bbafd0696bd3fa8f432219f9ac90798dd061e21cef533c706ed12d7e591f0d46a7b32
@@ -1,23 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- package com.facebook.react;
9
-
10
- import com.facebook.react.bridge.ReactContext;
11
-
12
- /**
13
- * New Listener interface for react instance events. {@Link
14
- * ReactInstanceManager.ReactInstanceEventListener will be deprecated.}
15
- */
16
- public interface ReactInstanceEventListener {
17
-
18
- /**
19
- * Called when the react context is initialized (all modules registered). Always called on the UI
20
- * thread.
21
- */
22
- void onReactContextInitialized(ReactContext context);
23
- }