detox 19.13.0 → 20.0.0

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 (236) hide show
  1. package/Detox-android/com/wix/detox/{19.13.0/detox-19.13.0-javadoc.jar → 20.0.0/detox-20.0.0-javadoc.jar} +0 -0
  2. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-javadoc.jar.md5 +1 -0
  3. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-javadoc.jar.sha1 +1 -0
  4. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-javadoc.jar.sha256 +1 -0
  5. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-javadoc.jar.sha512 +1 -0
  6. package/Detox-android/com/wix/detox/{19.13.0/detox-19.13.0-sources.jar → 20.0.0/detox-20.0.0-sources.jar} +0 -0
  7. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-sources.jar.md5 +1 -0
  8. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-sources.jar.sha1 +1 -0
  9. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-sources.jar.sha256 +1 -0
  10. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0-sources.jar.sha512 +1 -0
  11. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.aar +0 -0
  12. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.aar.md5 +1 -0
  13. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.aar.sha1 +1 -0
  14. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.aar.sha256 +1 -0
  15. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.aar.sha512 +1 -0
  16. package/Detox-android/com/wix/detox/{19.13.0/detox-19.13.0.pom → 20.0.0/detox-20.0.0.pom} +1 -1
  17. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.pom.md5 +1 -0
  18. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.pom.sha1 +1 -0
  19. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.pom.sha256 +1 -0
  20. package/Detox-android/com/wix/detox/20.0.0/detox-20.0.0.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/README.md +1 -1
  29. package/android/detox/src/full/java/com/wix/detox/Detox.java +2 -59
  30. package/android/detox/src/full/java/com/wix/detox/NotificationDataParser.kt +3 -3
  31. package/index.d.ts +354 -191
  32. package/index.js +1 -0
  33. package/internals.d.ts +298 -0
  34. package/internals.js +4 -0
  35. package/local-cli/build-framework-cache.js +2 -2
  36. package/local-cli/build.js +7 -8
  37. package/local-cli/build.test.js +46 -40
  38. package/local-cli/clean-framework-cache.js +3 -3
  39. package/local-cli/cli.js +8 -7
  40. package/local-cli/init.js +73 -68
  41. package/local-cli/rebuild-framework-cache.js +1 -1
  42. package/local-cli/reset-lock-file.js +16 -0
  43. package/local-cli/templates/jest.js +14 -36
  44. package/local-cli/test.js +24 -282
  45. package/local-cli/test.test.js +394 -648
  46. package/local-cli/testCommand/TestRunnerCommand.js +163 -0
  47. package/local-cli/{utils/testCommandArgs.js → testCommand/builder.js} +10 -36
  48. package/local-cli/testCommand/middlewares.js +66 -0
  49. package/local-cli/{utils → testCommand}/warnings.js +0 -13
  50. package/local-cli/utils/jestInternals.js +13 -2
  51. package/local-cli/utils/yargsUtils.js +67 -0
  52. package/package.json +32 -19
  53. package/runners/deprecation.js +45 -0
  54. package/runners/jest/JestCircusEnvironment.js +3 -38
  55. package/runners/jest/adapter.d.ts +4 -10
  56. package/runners/jest/adapter.js +3 -6
  57. package/runners/jest/assignReporter.d.ts +4 -1
  58. package/runners/jest/assignReporter.js +3 -6
  59. package/runners/jest/globalSetup.js +1 -0
  60. package/runners/jest/globalTeardown.js +1 -0
  61. package/runners/jest/index.d.ts +60 -0
  62. package/runners/jest/index.js +16 -0
  63. package/runners/jest/index.test.js +13 -0
  64. package/runners/jest/reporter.js +1 -0
  65. package/runners/jest/reporters/DetoxReporter.js +36 -0
  66. package/runners/jest/specReporter.d.ts +4 -9
  67. package/runners/jest/specReporter.js +3 -10
  68. package/runners/jest/streamlineReporter.js +3 -22
  69. package/runners/jest/testEnvironment/index.js +205 -0
  70. package/runners/jest/testEnvironment/listeners/DetoxCoreListener.js +166 -0
  71. package/runners/{jest-circus → jest/testEnvironment}/listeners/DetoxInitErrorListener.js +1 -1
  72. package/runners/jest/testEnvironment/listeners/DetoxPlatformFilterListener.js +27 -0
  73. package/runners/jest/{SpecReporterImpl.js → testEnvironment/listeners/SpecReporter.js} +61 -9
  74. package/runners/jest/testEnvironment/listeners/WorkerAssignReporter.js +30 -0
  75. package/runners/jest/testEnvironment/listeners/index.js +13 -0
  76. package/runners/{jest-circus → jest/testEnvironment}/utils/assertExistingContext.js +2 -2
  77. package/runners/jest/testEnvironment/utils/assertJestCircus27.js +70 -0
  78. package/runners/jest/testEnvironment/utils/assertJestCircus27.test.js +22 -0
  79. package/runners/jest/{utils → testEnvironment/utils}/getFullTestName.js +0 -0
  80. package/runners/jest/{utils → testEnvironment/utils}/hasTimedOut.js +0 -0
  81. package/runners/jest/{utils → testEnvironment/utils}/index.js +0 -0
  82. package/runners/jest/{utils → testEnvironment/utils}/stdout.js +0 -0
  83. package/runners/jest-circus/environment/index.js +6 -0
  84. package/runners/jest-circus/index.js +1 -10
  85. package/runners/jest-circus/reporter.js +1 -0
  86. package/runners/migration.js +37 -0
  87. package/runners/mocha/DetoxMochaAdapter.js +3 -35
  88. package/runners/mocha/adapter.d.ts +4 -7
  89. package/runners/mocha/adapter.js +3 -5
  90. package/src/DetoxWorker.js +327 -0
  91. package/src/android/interactions/native.js +2 -1
  92. package/src/artifacts/ArtifactsManager.js +51 -35
  93. package/src/artifacts/instruments/ios/SimulatorInstrumentsRecording.js +3 -3
  94. package/src/artifacts/log/ios/SimulatorLogRecording.js +1 -1
  95. package/src/artifacts/providers/index.js +0 -4
  96. package/src/artifacts/screenshot/SimulatorScreenshotPlugin.js +1 -1
  97. package/src/artifacts/templates/artifact/Artifact.js +1 -1
  98. package/src/artifacts/templates/plugin/ArtifactPlugin.js +1 -1
  99. package/src/artifacts/utils/buildDefaultArtifactsRootDirpath.js +2 -4
  100. package/src/artifacts/utils/temporaryPath.js +18 -5
  101. package/src/artifacts/video/SimulatorRecordVideoPlugin.js +1 -1
  102. package/src/client/AsyncWebSocket.js +8 -17
  103. package/src/client/Client.js +1 -1
  104. package/src/client/actions/actions.js +2 -2
  105. package/src/configuration/collectCliConfig.js +3 -16
  106. package/src/configuration/composeAppsConfig.js +12 -66
  107. package/src/configuration/composeArtifactsConfig.js +6 -32
  108. package/src/configuration/composeBehaviorConfig.js +3 -13
  109. package/src/configuration/composeDeviceConfig.js +38 -63
  110. package/src/configuration/composeLoggerConfig.js +59 -0
  111. package/src/configuration/composeRunnerConfig.js +127 -14
  112. package/src/configuration/composeSessionConfig.js +1 -3
  113. package/src/configuration/index.js +36 -30
  114. package/src/configuration/loadExternalConfig.js +1 -1
  115. package/src/configuration/utils/deviceAppTypes.js +0 -1
  116. package/src/devices/allocation/DeviceAllocator.js +4 -2
  117. package/src/devices/allocation/drivers/android/emulator/AVDValidator.js +1 -1
  118. package/src/devices/allocation/drivers/android/emulator/EmulatorAllocDriver.js +5 -3
  119. package/src/devices/allocation/drivers/android/emulator/EmulatorAllocationHelper.js +1 -1
  120. package/src/devices/allocation/drivers/android/emulator/EmulatorLauncher.js +3 -5
  121. package/src/devices/allocation/drivers/android/emulator/EmulatorVersionResolver.js +4 -6
  122. package/src/devices/allocation/drivers/android/emulator/launchEmulatorProcess.js +1 -1
  123. package/src/devices/allocation/drivers/android/genycloud/GenyInstanceAllocationHelper.js +1 -1
  124. package/src/devices/allocation/drivers/ios/SimulatorAllocDriver.js +1 -1
  125. package/src/devices/allocation/drivers/ios/SimulatorLauncher.js +3 -3
  126. package/src/devices/allocation/factories/index.js +0 -1
  127. package/src/devices/common/drivers/DeviceLauncher.js +2 -2
  128. package/src/devices/common/drivers/android/emulator/exec/EmulatorExec.js +1 -1
  129. package/src/devices/common/drivers/android/genycloud/services/GenyInstanceNaming.js +4 -9
  130. package/src/devices/common/drivers/android/genycloud/services/GenyRecipesService.js +1 -1
  131. package/src/devices/common/drivers/android/tools/EmulatorTelnet.js +1 -1
  132. package/src/devices/common/drivers/android/tools/FreeDeviceFinder.js +1 -1
  133. package/src/devices/common/drivers/ios/tools/AppleSimUtils.js +35 -10
  134. package/src/devices/lifecycle/GenyGlobalLifecycleHandler.js +13 -15
  135. package/src/devices/runtime/RuntimeDevice.js +85 -86
  136. package/src/devices/runtime/drivers/DeviceDriverBase.js +1 -1
  137. package/src/devices/runtime/drivers/android/AndroidDriver.js +3 -3
  138. package/src/devices/runtime/drivers/index.js +0 -1
  139. package/src/devices/runtime/drivers/ios/SimulatorDriver.js +4 -3
  140. package/src/devices/runtime/factories/ios.js +1 -8
  141. package/src/devices/runtime/utils/LaunchArgsEditor.js +4 -59
  142. package/src/devices/runtime/utils/Storage.js +4 -0
  143. package/src/environmentFactory.js +0 -8
  144. package/src/errors/DetoxConfigErrorComposer.js +92 -30
  145. package/src/errors/DetoxError.js +4 -0
  146. package/src/errors/DetoxRuntimeError.js +5 -5
  147. package/src/errors/index.js +2 -0
  148. package/src/ios/expectTwo.js +2 -1
  149. package/src/ipc/IPCClient.js +117 -0
  150. package/src/ipc/IPCServer.js +98 -0
  151. package/src/ipc/SessionState.js +62 -0
  152. package/src/logger/DetoxLogger.js +348 -0
  153. package/src/logger/index.js +5 -0
  154. package/src/logger/utils/BunyanLogger.js +76 -0
  155. package/src/logger/utils/CategoryThreadDispatcher.js +36 -0
  156. package/src/logger/utils/DetoxLogFinalizer.js +140 -0
  157. package/src/logger/utils/MessageStack.js +24 -0
  158. package/src/logger/utils/ThreadDispatcher.js +61 -0
  159. package/src/{utils → logger/utils}/customConsoleLogger.js +5 -4
  160. package/src/logger/utils/sanitizeBunyanContext.js +30 -0
  161. package/src/logger/utils/streamUtils.js +248 -0
  162. package/src/logger/utils/tracerLegacy.js +37 -0
  163. package/src/realms/DetoxConstants.js +13 -0
  164. package/src/realms/DetoxContext.js +183 -0
  165. package/src/realms/DetoxInternalsFacade.js +31 -0
  166. package/src/realms/DetoxPrimaryContext.js +261 -0
  167. package/src/realms/DetoxSecondaryContext.js +91 -0
  168. package/src/realms/index.js +10 -0
  169. package/src/realms/primary.js +3 -0
  170. package/src/realms/secondary.js +3 -0
  171. package/src/server/DetoxConnection.js +18 -23
  172. package/src/server/DetoxServer.js +7 -10
  173. package/src/server/DetoxSession.js +6 -6
  174. package/src/server/DetoxSessionManager.js +1 -1
  175. package/src/server/handlers/RegisteredConnectionHandler.js +1 -2
  176. package/src/symbols.js +50 -0
  177. package/src/utils/Timer.js +58 -33
  178. package/src/utils/argparse.js +11 -0
  179. package/src/utils/childProcess/exec.js +1 -1
  180. package/src/utils/childProcess/spawn.js +1 -1
  181. package/{local-cli/utils/misc.js → src/utils/envUtils.js} +0 -9
  182. package/src/utils/errorUtils.js +20 -0
  183. package/src/utils/logger.js +2 -162
  184. package/src/utils/shellUtils.js +18 -0
  185. package/src/utils/traceInvocationCall.js +21 -0
  186. package/src/utils/traceMethods.js +15 -0
  187. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-javadoc.jar.md5 +0 -1
  188. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-javadoc.jar.sha1 +0 -1
  189. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-javadoc.jar.sha256 +0 -1
  190. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-javadoc.jar.sha512 +0 -1
  191. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-sources.jar.md5 +0 -1
  192. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-sources.jar.sha1 +0 -1
  193. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-sources.jar.sha256 +0 -1
  194. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0-sources.jar.sha512 +0 -1
  195. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.aar +0 -0
  196. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.aar.md5 +0 -1
  197. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.aar.sha1 +0 -1
  198. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.aar.sha256 +0 -1
  199. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.aar.sha512 +0 -1
  200. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.pom.md5 +0 -1
  201. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.pom.sha1 +0 -1
  202. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.pom.sha256 +0 -1
  203. package/Detox-android/com/wix/detox/19.13.0/detox-19.13.0.pom.sha512 +0 -1
  204. package/local-cli/templates/mocha.js +0 -32
  205. package/local-cli/utils/splitArgv.js +0 -107
  206. package/runners/integration.js +0 -16
  207. package/runners/jest/DetoxAdapterCircus.js +0 -60
  208. package/runners/jest/DetoxAdapterImpl.js +0 -81
  209. package/runners/jest/DetoxAdapterJasmine.js +0 -67
  210. package/runners/jest/DetoxStreamlineJestReporter.js +0 -98
  211. package/runners/jest/FailingTestsReporter.js +0 -16
  212. package/runners/jest/SpecReporterCircus.js +0 -51
  213. package/runners/jest/SpecReporterJasmine.js +0 -39
  214. package/runners/jest/WorkerAssignReporterCircus.js +0 -17
  215. package/runners/jest/WorkerAssignReporterImpl.js +0 -21
  216. package/runners/jest/WorkerAssignReporterJasmine.js +0 -15
  217. package/runners/jest/runnerInfo.js +0 -9
  218. package/runners/jest-circus/environment.js +0 -206
  219. package/runners/jest-circus/listeners/DetoxCoreListener.js +0 -113
  220. package/runners/jest-circus/utils/assertJestCircus26.js +0 -39
  221. package/runners/jest-circus/utils/wrapErrorWithNoopLifecycle.js +0 -14
  222. package/src/Detox.js +0 -317
  223. package/src/DetoxConstants.js +0 -13
  224. package/src/DetoxExportWrapper.js +0 -140
  225. package/src/artifacts/timeline/TimelineArtifactPlugin.js +0 -92
  226. package/src/configuration/utils/warnings.js +0 -12
  227. package/src/devices/allocation/drivers/NoneAllocDriver.js +0 -10
  228. package/src/devices/allocation/factories/none.js +0 -11
  229. package/src/index.js +0 -6
  230. package/src/utils/ChromeTracingExporter.js +0 -54
  231. package/src/utils/MissingDetox.js +0 -78
  232. package/src/utils/fakeTimestampsProvider.js +0 -9
  233. package/src/utils/getWorkerId.js +0 -5
  234. package/src/utils/lastFailedTests.js +0 -38
  235. package/src/utils/sh.js +0 -18
  236. package/src/utils/trace.js +0 -96
@@ -0,0 +1 @@
1
+ 1ea8e085ad2927f2802e2a80a1f74212
@@ -0,0 +1 @@
1
+ d9951fa46e203d7c6ba85d696efe583409a20ddd
@@ -0,0 +1 @@
1
+ 7160a7f118631e4211a0967f3481e65b4d4792eeb9fd4826e39e3c6986888ab4
@@ -0,0 +1 @@
1
+ 319382faac98faa9ca85eb2d766c509f34581ef2667d3218b1eda7db8409c1fd06322157cb088ff469b7310386b0c364201d453741ec7c28f48bc47caaac4209
@@ -0,0 +1 @@
1
+ 8fdc200eb9b33208998c90508c592aa9
@@ -0,0 +1 @@
1
+ eda4c6da4c996a51bf89213ab37f77cdb16ebf15
@@ -0,0 +1 @@
1
+ df271aeed9256e2438c9662b580cffc7adcc0a5c89ec05dfbc2936eec2ffb709
@@ -0,0 +1 @@
1
+ 9917c4b2f553c07f8be531335aed637a8461bd37e0aba7d294b9664c2444e9597f6e8ed1cda7e4f8908e2b70bd543253222a73726ad9fafac22c13ea264300da
@@ -0,0 +1 @@
1
+ 3bdd1b42fa0f182255a47fcdda8f544c
@@ -0,0 +1 @@
1
+ 457ae10d202b196ea92bade4a33ce2dbc2f8bb3f
@@ -0,0 +1 @@
1
+ 52342d1b0d1fae681b2ea1e6f9ac6f6278299ed70d7867fd60b95d63eb7a9ec3
@@ -0,0 +1 @@
1
+ 5dfa73d84d647fd870a2e915d9943c9502c967abfd89a834ef7dee50a2a77d5a8b0be7b13407a34a6b97cbc10e9ed6f5e608fe7366d5a3041e462e3322d5b10d
@@ -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.13.0</version>
6
+ <version>20.0.0</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
+ 8c1ad3cbaa689c86d077d621e63c9c15
@@ -0,0 +1 @@
1
+ 513d5656e068ef46cedb53c60e4a2a06c308e69f
@@ -0,0 +1 @@
1
+ 01bdb63d3a4c85a313b66a5f44896cffc4ea6e6bb7a9e1664c3c07fa53902c3b
@@ -0,0 +1 @@
1
+ 1dbdc2557991bc8ced1e6ca50225a29da3459bd115b39eadc1be598ca28db57f0914d775921d47336e0af5d219c1c5db67069afd5a16ec51c8dbe0e10d690963
@@ -3,11 +3,11 @@
3
3
  <groupId>com.wix</groupId>
4
4
  <artifactId>detox</artifactId>
5
5
  <versioning>
6
- <latest>19.13.0</latest>
7
- <release>19.13.0</release>
6
+ <latest>20.0.0</latest>
7
+ <release>20.0.0</release>
8
8
  <versions>
9
- <version>19.13.0</version>
9
+ <version>20.0.0</version>
10
10
  </versions>
11
- <lastUpdated>20221107192424</lastUpdated>
11
+ <lastUpdated>20221110185852</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 54e4da68796e40878654ce66a44f1545
1
+ 92d4bb195d57ff4f2ac27d501f95a1ce
@@ -1 +1 @@
1
- 39c91935394c11df92c23670c500b9d2524e2e80
1
+ e648e1e844e18e28412fa2e429c61712193b036c
@@ -1 +1 @@
1
- edb218172d878cab14fe4d1cec7a69b7d2a65ffe54c44c8dfc046d607e6e17ad
1
+ 402d4d9057a480e0cbbd2c1cce049071d9d5f282c164dd051ab7afed6b8f1fc0
@@ -1 +1 @@
1
- 1829db1ce1cc544d9dc17f5a1d2ba9598e82e9d142b80ddd9a9c0051d9fb34fb64cf4fe71a79afa7da725a399d416c18423dd3db0c56918d5a8b97bdf6f91f2b
1
+ df71178b84026b8e1970ddee3d1347a840c567a626ce4a1b81f37ea7667fa6b5b474b9ac32f16c25de4009abbe7a5b89341a49a3a9f44f5dbee78913e37f4fb4
package/Detox-ios-src.tbz CHANGED
Binary file
package/Detox-ios.tbz CHANGED
Binary file
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## Detox
1
+ # Detox
2
2
 
3
3
  Graybox End-to-End Tests and Automation Library for Mobile
4
4
 
@@ -9,10 +9,7 @@ import android.os.Bundle;
9
9
  import com.wix.detox.config.DetoxConfig;
10
10
  import com.wix.detox.espresso.UiControllerSpy;
11
11
 
12
- import java.util.concurrent.TimeUnit;
13
-
14
12
  import androidx.annotation.NonNull;
15
- import androidx.test.espresso.IdlingPolicies;
16
13
  import androidx.test.platform.app.InstrumentationRegistry;
17
14
  import androidx.test.rule.ActivityTestRule;
18
15
 
@@ -77,28 +74,6 @@ public final class Detox {
77
74
  private static final LaunchIntentsFactory sIntentsFactory = new LaunchIntentsFactory();
78
75
  private static ActivityTestRule sActivityTestRule;
79
76
 
80
- /**
81
- * Specification of values to use for Espresso's {@link IdlingPolicies} timeouts.
82
- * <br/>Overrides Espresso's defaults as they tend to be too short (e.g. when running a heavy-load app
83
- * on suboptimal CI machines).
84
- *
85
- * @deprecated Use {@link com.wix.detox.config.DetoxConfig}.
86
- */
87
- @Deprecated
88
- public static class DetoxIdlePolicyConfig {
89
- /** Directly binds to {@link IdlingPolicies#setMasterPolicyTimeout(long, TimeUnit)}. Applied in seconds. */
90
- public Integer masterTimeoutSec = 120;
91
- /** Directly binds to {@link IdlingPolicies#setIdlingResourceTimeout(long, TimeUnit)}. Applied in seconds. */
92
- public Integer idleResourceTimeoutSec = 60;
93
-
94
- private com.wix.detox.config.DetoxIdlePolicyConfig toNewConfig() {
95
- com.wix.detox.config.DetoxIdlePolicyConfig newConfig = new com.wix.detox.config.DetoxIdlePolicyConfig();
96
- newConfig.masterTimeoutSec = masterTimeoutSec;
97
- newConfig.idleResourceTimeoutSec = idleResourceTimeoutSec;
98
- return newConfig;
99
- }
100
- }
101
-
102
77
  private Detox() {
103
78
  }
104
79
 
@@ -128,20 +103,6 @@ public final class Detox {
128
103
  runTests(activityTestRule, getAppContext(), detoxConfig);
129
104
  }
130
105
 
131
- /**
132
- * Same as the default {@link #runTests(ActivityTestRule)} method, but allows for the explicit specification of
133
- * a custom idle-policy configuration. Note: review {@link DetoxIdlePolicyConfig} for defaults.
134
- *
135
- * @param idlePolicyConfig The custom idle-policy configuration to pass in; Will be applied into Espresso via
136
- * the {@link IdlingPolicies} API.
137
- *
138
- * @deprecated Use {@link #runTests(ActivityTestRule, DetoxConfig)}
139
- */
140
- @Deprecated
141
- public static void runTests(ActivityTestRule activityTestRule, DetoxIdlePolicyConfig idlePolicyConfig) {
142
- runTests(activityTestRule, getAppContext(), idlePolicyConfig);
143
- }
144
-
145
106
  /**
146
107
  * <p>
147
108
  * Use this method only if you have a React Native application and it
@@ -161,24 +122,6 @@ public final class Detox {
161
122
  runTests(activityTestRule, context, new DetoxConfig());
162
123
  }
163
124
 
164
- /**
165
- * Same as {@link #runTests(ActivityTestRule, Context)}, but allows for the explicit specification of
166
- * a custom idle-policy configuration. Note: review {@link DetoxIdlePolicyConfig} for defaults.
167
- *
168
- *
169
- * @param idlePolicyConfig The custom idle-policy configuration to pass in; Will be applied into Espresso via
170
- * the {@link IdlingPolicies} API.
171
- *
172
- * @deprecated Use {@link #runTests(ActivityTestRule, Context, DetoxConfig)}
173
- */
174
- @Deprecated
175
- public static void runTests(ActivityTestRule activityTestRule, @NonNull final Context context, DetoxIdlePolicyConfig idlePolicyConfig) {
176
- DetoxConfig config = new DetoxConfig();
177
- config.idlePolicyConfig = idlePolicyConfig.toNewConfig();
178
-
179
- runTests(activityTestRule, context, config);
180
- }
181
-
182
125
  /**
183
126
  * Same as {@link #runTests(ActivityTestRule, Context)}, but allows for the explicit specification of
184
127
  * various configurations. Note: review {@link DetoxConfig} for defaults.
@@ -214,7 +157,7 @@ public final class Detox {
214
157
  }
215
158
 
216
159
  public static void startActivityFromNotification(String dataFilePath) {
217
- Bundle notificationData = new NotificationDataParser(dataFilePath).parseNotificationData();
160
+ Bundle notificationData = new NotificationDataParser(dataFilePath).toBundle();
218
161
  Intent intent = sIntentsFactory.intentWithNotificationData(getAppContext(), notificationData, false);
219
162
  launchActivitySync(intent);
220
163
  }
@@ -225,7 +168,7 @@ public final class Detox {
225
168
  if (sLaunchArgs.hasUrlOverride()) {
226
169
  intent = sIntentsFactory.intentWithUrl(sLaunchArgs.getUrlOverride(), true);
227
170
  } else if (sLaunchArgs.hasNotificationPath()) {
228
- Bundle notificationData = new NotificationDataParser(sLaunchArgs.getNotificationPath()).parseNotificationData();
171
+ Bundle notificationData = new NotificationDataParser(sLaunchArgs.getNotificationPath()).toBundle();
229
172
  intent = sIntentsFactory.intentWithNotificationData(getAppContext(), notificationData, true);
230
173
  } else {
231
174
  intent = sIntentsFactory.cleanIntent();
@@ -6,13 +6,13 @@ import com.wix.detox.common.TextFileReader
6
6
  import org.json.JSONObject
7
7
 
8
8
  internal class NotificationDataParser(private val notificationPath: String) {
9
- fun parseNotificationData(): Bundle {
10
- val rawData = readNotificationData()
9
+ fun toBundle(): Bundle {
10
+ val rawData = readNotificationFromFile()
11
11
  val json = JSONObject(rawData)
12
12
  val payload = json.getJSONObject("payload")
13
13
  return JsonConverter(payload).toBundle()
14
14
  }
15
15
 
16
- private fun readNotificationData()
16
+ private fun readNotificationFromFile()
17
17
  = TextFileReader(notificationPath).read()
18
18
  }