detox 19.3.0 → 19.5.0-alpha.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 (168) hide show
  1. package/.eslintignore +4 -0
  2. package/.eslintrc.js +134 -0
  3. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0-javadoc.jar +0 -0
  4. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0-javadoc.jar.md5 +1 -0
  5. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0-javadoc.jar.sha1 +1 -0
  6. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0-javadoc.jar.sha256 +1 -0
  7. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0-javadoc.jar.sha512 +1 -0
  8. package/Detox-android/com/wix/detox/{19.3.0/detox-19.3.0-sources.jar → 19.5.0-alpha.0/detox-19.5.0-alpha.0-sources.jar} +0 -0
  9. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0-sources.jar.md5 +1 -0
  10. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0-sources.jar.sha1 +1 -0
  11. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0-sources.jar.sha256 +1 -0
  12. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0-sources.jar.sha512 +1 -0
  13. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0.aar +0 -0
  14. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0.aar.md5 +1 -0
  15. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0.aar.sha1 +1 -0
  16. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0.aar.sha256 +1 -0
  17. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0.aar.sha512 +1 -0
  18. package/Detox-android/com/wix/detox/{19.3.0/detox-19.3.0.pom → 19.5.0-alpha.0/detox-19.5.0-alpha.0.pom} +5 -11
  19. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0.pom.md5 +1 -0
  20. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0.pom.sha1 +1 -0
  21. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0.pom.sha256 +1 -0
  22. package/Detox-android/com/wix/detox/19.5.0-alpha.0/detox-19.5.0-alpha.0.pom.sha512 +1 -0
  23. package/Detox-android/com/wix/detox/maven-metadata.xml +4 -4
  24. package/Detox-android/com/wix/detox/maven-metadata.xml.md5 +1 -1
  25. package/Detox-android/com/wix/detox/maven-metadata.xml.sha1 +1 -1
  26. package/Detox-android/com/wix/detox/maven-metadata.xml.sha256 +1 -1
  27. package/Detox-android/com/wix/detox/maven-metadata.xml.sha512 +1 -1
  28. package/Detox-ios-src.tbz +0 -0
  29. package/Detox-ios.tbz +0 -0
  30. package/android/build.gradle +5 -5
  31. package/android/detox/build.gradle +23 -13
  32. package/android/detox/proguard-rules-app.pro +1 -0
  33. package/android/detox/publishing.gradle +17 -27
  34. package/android/detox/src/full/java/com/wix/detox/adapters/server/DetoxActionHandlers.kt +0 -34
  35. package/android/detox/src/full/java/com/wix/detox/adapters/server/QueryStatusActionHandler.kt +96 -0
  36. package/android/detox/src/full/java/com/wix/detox/reactnative/ReactNativeIdlingResources.kt +1 -0
  37. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/AnimatedModuleIdlingResource.java +5 -2
  38. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/AsyncStorageIdlingResource.kt +5 -1
  39. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/BridgeIdlingResource.java +4 -2
  40. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/DescriptiveIdlingResource.kt +4 -1
  41. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/IdlingResourceDescription.kt +20 -0
  42. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/NetworkIdlingResource.java +7 -12
  43. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/timers/TimersIdlingResource.kt +6 -1
  44. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/uimodule/DispatchCommandOperationReflected.kt +36 -0
  45. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/uimodule/NativeHierarchyManagerReflected.kt +28 -0
  46. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/uimodule/RN66Workaround.kt +59 -0
  47. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/uimodule/UIManagerModuleReflected.kt +70 -0
  48. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/uimodule/UIModuleIdlingResource.kt +83 -0
  49. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/uimodule/ViewCommandOpsQueueReflected.kt +27 -0
  50. package/android/detox/src/testFull/java/com/wix/detox/adapters/server/QueryStatusActionHandlerSpec.kt +131 -0
  51. package/android/detox/src/testFull/java/com/wix/detox/reactnative/idlingresources/AsyncStorageIdlingResourceSpec.kt +6 -0
  52. package/android/detox/src/testFull/java/com/wix/detox/reactnative/idlingresources/IdlingResourceDescriptionSpec.kt +46 -0
  53. package/android/detox/src/testFull/java/com/wix/detox/reactnative/idlingresources/timers/DefaultIdleInterrogationStrategySpec.kt +2 -0
  54. package/android/detox/src/testFull/java/com/wix/detox/reactnative/idlingresources/timers/TimersIdlingResourceSpec.kt +6 -0
  55. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  56. package/local-cli/build.js +1 -0
  57. package/local-cli/build.test.js +1 -0
  58. package/local-cli/run-server.test.js +1 -0
  59. package/local-cli/test.js +1 -0
  60. package/local-cli/test.test.js +1 -0
  61. package/local-cli/utils/jestInternals.js +1 -0
  62. package/package.json +12 -7
  63. package/runners/jest/DetoxStreamlineJestReporter.js +1 -0
  64. package/runners/jest/runnerInfo.js +1 -0
  65. package/runners/jest/streamlineReporter.js +1 -0
  66. package/runners/jest-circus/environment.js +1 -0
  67. package/runners/jest-circus/listeners/DetoxCoreListener.js +1 -0
  68. package/runners/jest-circus/utils/assertExistingContext.js +1 -0
  69. package/src/Detox.js +1 -0
  70. package/src/DetoxExportWrapper.js +1 -0
  71. package/src/android/AndroidExpect.js +1 -0
  72. package/src/artifacts/factories/index.js +1 -0
  73. package/src/artifacts/instruments/InstrumentsArtifactPlugin.js +1 -0
  74. package/src/artifacts/instruments/android/AndroidInstrumentsPlugin.js +1 -0
  75. package/src/artifacts/instruments/android/AndroidInstrumentsRecording.js +1 -0
  76. package/src/artifacts/instruments/ios/SimulatorInstrumentsPlugin.js +1 -0
  77. package/src/artifacts/instruments/ios/SimulatorInstrumentsRecording.js +1 -0
  78. package/src/artifacts/log/LogArtifactPlugin.js +1 -0
  79. package/src/artifacts/log/android/ADBLogcatPlugin.js +1 -0
  80. package/src/artifacts/log/ios/SimulatorLogPlugin.js +1 -0
  81. package/src/artifacts/log/ios/SimulatorLogRecording.js +1 -0
  82. package/src/artifacts/screenshot/ScreenshotArtifactPlugin.js +1 -0
  83. package/src/artifacts/templates/artifact/Artifact.js +1 -0
  84. package/src/artifacts/templates/artifact/FileArtifact.js +1 -0
  85. package/src/artifacts/templates/plugin/ArtifactPlugin.js +1 -0
  86. package/src/artifacts/templates/plugin/StartupAndTestRecorderPlugin.js +1 -0
  87. package/src/artifacts/templates/plugin/TwoSnapshotsPerTestPlugin.js +1 -0
  88. package/src/artifacts/templates/plugin/WholeTestRecorderPlugin.js +1 -0
  89. package/src/artifacts/uiHierarchy/IosUIHierarchyPlugin.js +1 -0
  90. package/src/client/AsyncWebSocket.js +4 -0
  91. package/src/client/Client.js +6 -1
  92. package/src/client/actions/SyncStatusSchema.json +11 -0
  93. package/src/client/actions/actions.js +3 -1
  94. package/src/client/actions/formatters/SyncStatusFormatter.js +2 -0
  95. package/src/configuration/composeAppsConfig.js +1 -0
  96. package/src/configuration/composeArtifactsConfig.js +1 -0
  97. package/src/configuration/composeBehaviorConfig.js +1 -0
  98. package/src/configuration/composeDeviceConfig.js +1 -0
  99. package/src/configuration/composeRunnerConfig.js +1 -0
  100. package/src/configuration/composeSessionConfig.js +1 -0
  101. package/src/configuration/index.js +1 -0
  102. package/src/configuration/loadExternalConfig.js +1 -0
  103. package/src/configuration/selectConfiguration.js +1 -0
  104. package/src/devices/DeviceRegistry.js +1 -0
  105. package/src/devices/allocation/DeviceAllocator.js +1 -0
  106. package/src/devices/allocation/drivers/AllocationDriverBase.js +1 -0
  107. package/src/devices/allocation/drivers/android/attached/AttachedAndroidAllocDriver.js +1 -0
  108. package/src/devices/allocation/drivers/android/emulator/EmulatorAllocDriver.js +1 -0
  109. package/src/devices/allocation/drivers/android/emulator/EmulatorLauncher.js +1 -0
  110. package/src/devices/allocation/drivers/android/genycloud/GenyAllocDriver.js +1 -0
  111. package/src/devices/allocation/drivers/android/genycloud/GenyInstanceAllocationHelper.js +1 -0
  112. package/src/devices/allocation/drivers/android/genycloud/GenyInstanceLauncher.js +1 -0
  113. package/src/devices/allocation/drivers/ios/SimulatorAllocDriver.js +1 -0
  114. package/src/devices/allocation/factories/android.js +1 -0
  115. package/src/devices/allocation/factories/base.js +1 -0
  116. package/src/devices/allocation/factories/external.js +1 -0
  117. package/src/devices/allocation/factories/ios.js +1 -0
  118. package/src/devices/allocation/factories/none.js +1 -0
  119. package/src/devices/common/drivers/android/exec/AAPT.js +1 -0
  120. package/src/devices/common/drivers/android/exec/ADB.js +1 -0
  121. package/src/devices/common/drivers/android/exec/BinaryExec.js +1 -0
  122. package/src/devices/common/drivers/android/genycloud/exec/GenyCloudExec.js +1 -0
  123. package/src/devices/common/drivers/android/tools/EmulatorTelnet.js +1 -0
  124. package/src/devices/common/drivers/android/tools/MonitoredInstrumentation.js +1 -0
  125. package/src/devices/common/drivers/android/tools/TempFileXfer.js +1 -0
  126. package/src/devices/common/drivers/ios/tools/AppleSimUtils.js +2 -1
  127. package/src/devices/cookies/GenycloudEmulatorCookie.js +1 -0
  128. package/src/devices/runtime/drivers/DeviceDriverBase.js +1 -0
  129. package/src/devices/runtime/drivers/android/AndroidDriver.js +1 -0
  130. package/src/devices/runtime/drivers/android/emulator/EmulatorDriver.js +1 -0
  131. package/src/devices/runtime/drivers/android/genycloud/GenyCloudDriver.js +1 -0
  132. package/src/devices/runtime/drivers/ios/IosDriver.js +1 -0
  133. package/src/devices/runtime/drivers/ios/SimulatorDriver.js +1 -0
  134. package/src/devices/runtime/factories/external.js +2 -2
  135. package/src/environmentFactory.js +1 -0
  136. package/src/ios/expectTwo.js +1 -0
  137. package/src/server/DetoxConnection.js +1 -0
  138. package/src/server/DetoxServer.js +1 -0
  139. package/src/server/DetoxSession.js +1 -0
  140. package/src/server/DetoxSessionManager.js +1 -0
  141. package/src/server/handlers/AnonymousConnectionHandler.js +1 -0
  142. package/src/server/handlers/RegisteredConnectionHandler.js +1 -0
  143. package/src/utils/Timer.js +1 -0
  144. package/src/utils/environment.js +2 -2
  145. package/src/utils/exec.js +1 -0
  146. package/src/utils/logger.js +1 -0
  147. package/src/utils/sh.js +1 -0
  148. package/src/validation/android/GenycloudEnvValidator.js +1 -0
  149. package/tsconfig.json +27 -0
  150. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0-javadoc.jar +0 -0
  151. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0-javadoc.jar.md5 +0 -1
  152. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0-javadoc.jar.sha1 +0 -1
  153. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0-javadoc.jar.sha256 +0 -1
  154. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0-javadoc.jar.sha512 +0 -1
  155. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0-sources.jar.md5 +0 -1
  156. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0-sources.jar.sha1 +0 -1
  157. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0-sources.jar.sha256 +0 -1
  158. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0-sources.jar.sha512 +0 -1
  159. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0.aar +0 -0
  160. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0.aar.md5 +0 -1
  161. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0.aar.sha1 +0 -1
  162. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0.aar.sha256 +0 -1
  163. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0.aar.sha512 +0 -1
  164. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0.pom.md5 +0 -1
  165. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0.pom.sha1 +0 -1
  166. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0.pom.sha256 +0 -1
  167. package/Detox-android/com/wix/detox/19.3.0/detox-19.3.0.pom.sha512 +0 -1
  168. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/UIModuleIdlingResource.java +0 -142
package/.eslintignore CHANGED
@@ -1 +1,5 @@
1
1
  src/android/espressoapi/**/*.js
2
+ coverage
3
+ ios
4
+ android
5
+ test
package/.eslintrc.js ADDED
@@ -0,0 +1,134 @@
1
+ module.exports = {
2
+ root: true,
3
+ extends: [
4
+ 'eslint:recommended',
5
+ 'plugin:import/recommended',
6
+ 'plugin:node/recommended',
7
+ 'plugin:unicorn/recommended'
8
+ ],
9
+ parser: '@typescript-eslint/parser',
10
+ plugins: [
11
+ 'unicorn',
12
+ 'import',
13
+ 'node',
14
+ '@typescript-eslint/eslint-plugin',
15
+ ],
16
+ env: {
17
+ node: true
18
+ },
19
+ globals: {
20
+ 'callCli': true,
21
+ 'fail': true
22
+ },
23
+ rules: {
24
+ '@typescript-eslint/no-unused-vars': [
25
+ 'warn',
26
+ { argsIgnorePattern: '^_' },
27
+ ],
28
+ 'array-bracket-spacing': [
29
+ 'error',
30
+ 'never'
31
+ ],
32
+ 'computed-property-spacing': [
33
+ 'error',
34
+ 'never'
35
+ ],
36
+ 'import/order': [
37
+ 'error',
38
+ {
39
+ 'alphabetize': {
40
+ 'order': 'asc'
41
+ },
42
+ 'newlines-between': 'always'
43
+ }
44
+ ],
45
+ 'no-case-declarations': 'off',
46
+ 'no-debugger': 'error',
47
+ 'no-empty': 'off',
48
+ 'no-mixed-spaces-and-tabs': 'error',
49
+ 'no-multiple-empty-lines': [
50
+ 'error',
51
+ {
52
+ 'max': 2,
53
+ 'maxBOF': 1
54
+ }
55
+ ],
56
+ 'no-prototype-builtins': 'off',
57
+ 'no-unused-vars': [
58
+ 'error',
59
+ {
60
+ 'argsIgnorePattern': '^_'
61
+ }
62
+ ],
63
+ 'node/no-unpublished-require': 'warn',
64
+ 'object-curly-spacing': [
65
+ 'error',
66
+ 'always'
67
+ ],
68
+ 'semi': [
69
+ 'error',
70
+ 'always'
71
+ ],
72
+ 'quotes': ['error', 'single', {
73
+ 'avoidEscape': true,
74
+ 'allowTemplateLiterals': true
75
+ }],
76
+ 'unicorn/expiring-todo-comments': ['warn',
77
+ {
78
+ allowWarningComments: false,
79
+ }
80
+ ],
81
+ // TODO: enable some of unicorn rules
82
+ 'unicorn/better-regex': 'off',
83
+ 'unicorn/catch-error-name': 'off',
84
+ 'unicorn/consistent-destructuring': 'off',
85
+ 'unicorn/consistent-function-scoping': 'off',
86
+ 'unicorn/empty-brace-spaces': 'off',
87
+ 'unicorn/error-message': 'off',
88
+ 'unicorn/explicit-length-check': 'off',
89
+ 'unicorn/filename-case': 'off',
90
+ 'unicorn/import-style': 'off',
91
+ 'unicorn/new-for-builtins': 'off',
92
+ 'unicorn/no-abusive-eslint-disable': 'off',
93
+ 'unicorn/no-array-callback-reference': 'off',
94
+ 'unicorn/no-array-for-each': 'off',
95
+ 'unicorn/no-array-reduce': 'off',
96
+ 'unicorn/no-await-expression-member': 'off',
97
+ 'unicorn/no-lonely-if': 'off',
98
+ 'unicorn/no-nested-ternary': 'off',
99
+ 'unicorn/no-new-array': 'off',
100
+ 'unicorn/no-null': 'off',
101
+ 'unicorn/no-object-as-default-parameter': 'off',
102
+ 'unicorn/no-useless-undefined': 'off',
103
+ 'unicorn/number-literal-case': 'off',
104
+ 'unicorn/numeric-separators-style': 'off',
105
+ 'unicorn/prefer-add-event-listener': 'off',
106
+ 'unicorn/prefer-array-some': 'off',
107
+ 'unicorn/prefer-includes': 'off',
108
+ 'unicorn/prefer-module': 'off',
109
+ 'unicorn/prefer-number-properties': 'off',
110
+ 'unicorn/prefer-optional-catch-binding': 'off',
111
+ 'unicorn/prefer-regexp-test': 'off',
112
+ 'unicorn/prefer-spread': 'off',
113
+ 'unicorn/prefer-string-slice': 'off',
114
+ 'unicorn/prefer-string-starts-ends-with': 'off',
115
+ 'unicorn/prefer-string-trim-start-end': 'off',
116
+ 'unicorn/prefer-ternary': 'off',
117
+ 'unicorn/prevent-abbreviations': 'off',
118
+ },
119
+
120
+ overrides: [
121
+ {
122
+ files: ['*.test.{js,ts}', '**/{__mocks__,__tests__}/*.{js, ts}'],
123
+ plugins: [
124
+ 'no-only-tests',
125
+ ],
126
+ env: {
127
+ jest: true
128
+ },
129
+ rules: {
130
+ 'no-only-tests/no-only-tests': 'error',
131
+ }
132
+ }
133
+ ]
134
+ };
@@ -0,0 +1 @@
1
+ 4fc2e8e691bdbd622eccc35d6b06f212
@@ -0,0 +1 @@
1
+ 3c5f76a40aa78251394e892d8267ef98ec1519d1
@@ -0,0 +1 @@
1
+ 87287954ad06049b5109833bc3f428aa7ead8d084e656bc2e642c0a9e657d2cd
@@ -0,0 +1 @@
1
+ 4a5c4a44c0014989f16e92cda58f9f8d9af12299772b15ba672bf09b1d44f5c1becc6f34e67c0b073b3ade49d15a8876f7e0c874702daacec9be3d8818fe80ac
@@ -0,0 +1 @@
1
+ 66433ee10d1e4ff8129d9bd6d0978293
@@ -0,0 +1 @@
1
+ bd2f72526be7b92727f187d8437e681b93ddfef0
@@ -0,0 +1 @@
1
+ 752b4bca079bf26a4d003e06b4e03e3fbbe4cff85286760b86e51dff5b3e0a3e
@@ -0,0 +1 @@
1
+ db8d6e93df92648e8a7f6ee58dc28cc1736b8128e20807631b67c9b5ac0c8679c2430356aedb00983419962a10924657c6e0b6e7e26996628b5f44c081a5e206
@@ -0,0 +1 @@
1
+ db5438a69056782c6b65faf53f746bfe
@@ -0,0 +1 @@
1
+ 818e8057a07f4ea8145d6c0490906340ebad700d
@@ -0,0 +1 @@
1
+ 082dac5e9d4dba9ac093cb3f25b8bde915469055fe1c986a401ea65fb5f10d65
@@ -0,0 +1 @@
1
+ 878279c9e3df36b86a64f71f577138fbb7ebc9f8956e77d61c811c55d5f1f6d8cfa06750a29c2089905e1458fa0cac61c108fdacdfa89a05882c1e0dea54e077
@@ -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.3.0</version>
6
+ <version>19.5.0-alpha.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>
@@ -33,31 +33,25 @@
33
33
  <dependency>
34
34
  <groupId>androidx.test.espresso</groupId>
35
35
  <artifactId>espresso-core</artifactId>
36
- <version>3.3.0</version>
36
+ <version>3.4.0</version>
37
37
  <scope>compile</scope>
38
- <exclusions>
39
- <exclusion>
40
- <groupId>com.google.code.findbugs</groupId>
41
- <artifactId>jsr305</artifactId>
42
- </exclusion>
43
- </exclusions>
44
38
  </dependency>
45
39
  <dependency>
46
40
  <groupId>androidx.test.espresso</groupId>
47
41
  <artifactId>espresso-web</artifactId>
48
- <version>3.3.0</version>
42
+ <version>3.4.0</version>
49
43
  <scope>compile</scope>
50
44
  </dependency>
51
45
  <dependency>
52
46
  <groupId>androidx.test</groupId>
53
47
  <artifactId>rules</artifactId>
54
- <version>1.2.0</version>
48
+ <version>1.4.0</version>
55
49
  <scope>compile</scope>
56
50
  </dependency>
57
51
  <dependency>
58
52
  <groupId>androidx.test.ext</groupId>
59
53
  <artifactId>junit</artifactId>
60
- <version>1.1.1</version>
54
+ <version>1.1.3</version>
61
55
  <scope>compile</scope>
62
56
  </dependency>
63
57
  <dependency>
@@ -0,0 +1 @@
1
+ 70b498d99f7d26615b0b3027fb3535b6
@@ -0,0 +1 @@
1
+ 2055bbc1649b28ea27444d6cad328f2546fc416d
@@ -0,0 +1 @@
1
+ 971a756727c0d72db277b2bf46af756aa967227490230d9d9f60e3009bd0447f
@@ -0,0 +1 @@
1
+ d56f1d5f919cbeac728d4c7666165eee80a10b67759ae377074dab371b34d7207a682b38be275b0e90490bf22e9cae585578094e4a5902c8590646ebafe48405
@@ -3,11 +3,11 @@
3
3
  <groupId>com.wix</groupId>
4
4
  <artifactId>detox</artifactId>
5
5
  <versioning>
6
- <latest>19.3.0</latest>
7
- <release>19.3.0</release>
6
+ <latest>19.5.0-alpha.0</latest>
7
+ <release>19.5.0-alpha.0</release>
8
8
  <versions>
9
- <version>19.3.0</version>
9
+ <version>19.5.0-alpha.0</version>
10
10
  </versions>
11
- <lastUpdated>20211206165152</lastUpdated>
11
+ <lastUpdated>20211225233810</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 84221a4a04e90451e71509a7dbe6ff16
1
+ fc2eb1e9a7587ea4e1778953cd923ec2
@@ -1 +1 @@
1
- 93646e96676f5c63194ac7fbb7902b2b7fe0b1dd
1
+ be9ed72935da5b09263d250eb161eb74aaf4c69f
@@ -1 +1 @@
1
- 1d70c96ab43da06fc4b86924ae1eb4035c4443eebb3d36138537e2ae598fbd5a
1
+ 615c25045c0aa404766fbdfdd949754f2d7ded79eb9f99f24911cc5890389a00
@@ -1 +1 @@
1
- 85a5235aad97fc0780472e2d4ab92190b2e6b9c3697853c60f0eb6d580830fcb6ccec5f07f9f314f9e049b938bf9069b2a6b8a319a2d4bfab6e156a4ca861a73
1
+ 1cc202c51d2cac1c60298ce466563c88b076f11add6fe9d8ce2c5ecfed8720f6d5c243627645a69ea2fcc449b292c7fa75180043dfdfacc4cf694e72168fb274
package/Detox-ios-src.tbz CHANGED
Binary file
package/Detox-ios.tbz CHANGED
Binary file
@@ -2,10 +2,10 @@ buildscript {
2
2
  ext {
3
3
  isOfficialDetoxLib = true
4
4
  kotlinVersion = '1.2.0'
5
- dokkaVersion = '0.9.18'
6
- buildToolsVersion = '29.0.3'
7
- compileSdkVersion = 29
8
- targetSdkVersion = 29
5
+ dokkaVersion = '1.6.0'
6
+ buildToolsVersion = '30.0.2'
7
+ compileSdkVersion = 31
8
+ targetSdkVersion = 31
9
9
  minSdkVersion = 21
10
10
  }
11
11
  ext.detoxKotlinVersion = ext.kotlinVersion
@@ -15,7 +15,7 @@ buildscript {
15
15
  google()
16
16
  }
17
17
  dependencies {
18
- classpath 'com.android.tools.build:gradle:4.1.0'
18
+ classpath 'com.android.tools.build:gradle:4.2.2'
19
19
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
20
20
  classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion"
21
21
 
@@ -3,9 +3,9 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'kotlin-android-extensions'
4
4
 
5
5
  def _ext = rootProject.ext
6
- def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 29
7
- def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 29
8
- def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '29.0.3'
6
+ def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 31
7
+ def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 31
8
+ def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '30.0.2'
9
9
  def _minSdkVersion = _ext.has('minSdkVersion') ? _ext.minSdkVersion : 18
10
10
  def _kotlinVersion = _ext.has('detoxKotlinVersion') ? _ext.detoxKotlinVersion : '1.2.0'
11
11
  def _kotlinStdlib = _ext.has('detoxKotlinStdlib') ? _ext.detoxKotlinStdlib : 'kotlin-stdlib-jdk8'
@@ -80,22 +80,30 @@ dependencies {
80
80
  }
81
81
 
82
82
  // androidx.test deps.
83
- // All are aligned with this release: https://developer.android.com/jetpack/androidx/releases/test#1.2.0
83
+ // All are aligned with this release: https://developer.android.com/jetpack/androidx/releases/test#1.4.0
84
84
  dependencies {
85
85
 
86
- // Versions are in-sync with the 'androidx-test-1.2.0' release/tag of the android-test github repo,
87
- // used by the Detox generator. See https://github.com/android/android-test/releases/tag/androidx-test-1.2.0
86
+ // Versions are in-sync with the 'androidx-test-1.4.0' release/tag of the android-test github repo,
87
+ // used by the Detox generator. See https://github.com/android/android-test/releases/tag/androidx-test-1.4.0
88
88
  // Important: Should remain so when generator tag is replaced!
89
- api('androidx.test.espresso:espresso-core:3.3.0') { // Needed all across Detox but also makes Espresso seamlessly provided to Detox users with hybrid apps/E2E-tests.
90
- exclude group: 'com.google.code.findbugs', module: 'jsr305'
89
+ api('androidx.test.espresso:espresso-core:3.4.0') {
90
+ because 'Needed all across Detox but also makes Espresso seamlessly provided to Detox users with hybrid apps/E2E-tests.'
91
+ }
92
+ api('androidx.test.espresso:espresso-web:3.4.0') {
93
+ because 'Web-View testing'
94
+ }
95
+ api('androidx.test:rules:1.4.0') {
96
+ because 'of ActivityTestRule. Needed by users *and* internally used by Detox.'
97
+ }
98
+ api('androidx.test.ext:junit:1.1.3') {
99
+ because 'Needed so as to seamlessly provide AndroidJUnit4 to Detox users. Depends on junit core.'
91
100
  }
92
- api 'androidx.test.espresso:espresso-web:3.3.0' // Web-View testing
93
- api 'androidx.test:rules:1.2.0' // Needed because of ActivityTestRule. Needed by users *and* internally used by Detox.
94
- api 'androidx.test.ext:junit:1.1.1' // Needed so as to seamlessly provide AndroidJUnit4 to Detox users. Depends on junit core.
95
101
 
96
102
  // Version is the latest; Cannot sync with the Github repo (e.g. android/android-test) because the androidx
97
103
  // packaging version of associated classes is simply not there...
98
- api 'androidx.test.uiautomator:uiautomator:2.2.0' // Needed by Detox but also makes UIAutomator seamlessly provided to Detox users with hybrid apps/E2E-tests.
104
+ api('androidx.test.uiautomator:uiautomator:2.2.0') {
105
+ because 'Needed by Detox but also makes UIAutomator seamlessly provided to Detox users with hybrid apps/E2E-tests.'
106
+ }
99
107
  }
100
108
 
101
109
  // Third-party/extension deps.
@@ -103,7 +111,9 @@ dependencies {
103
111
  implementation('com.google.android.material:material:1.2.1') {
104
112
  because 'Material components are mentioned explicitly (e.g. Slider in get-attributes handler)'
105
113
  }
106
- implementation 'org.apache.commons:commons-lang3:3.7' // Needed by invoke. Warning: Upgrading to newer versions is not seamless.
114
+ implementation('org.apache.commons:commons-lang3:3.7') {
115
+ because 'Needed by invoke. Warning: Upgrading to newer versions is not seamless.'
116
+ }
107
117
  implementation 'com.github.anrwatchdog:anrwatchdog:1.4.0'
108
118
 
109
119
  implementation fileTree(dir: '../libs', includes: ['*.jar']) // Includes: Genymotion SDK
@@ -12,3 +12,4 @@
12
12
  -keep class kotlin.collections.** { *; }
13
13
  -keep class kotlin.text.** { *; }
14
14
  -keep class kotlin.io.** { *; }
15
+ -keep class okhttp3.** { *; }
@@ -85,41 +85,31 @@ initPublishing()
85
85
  * Dokka is the official javadoc equivalent that supports kotlin KDoc (see https://github.com/Kotlin/dokka)
86
86
  */
87
87
 
88
- dokka {
89
- // Note: this only remains valid as long as we don't move kotlin code to src/main/kotlin instead of src/main/java.
90
- // Will have to keep this up to date if we decided to do so.
91
- sourceDirs = files(android.sourceSets.main.java.srcDirs)
92
-
93
- // Nothing to add to what kotlinTasks() resolves on its own
94
- // classpath = []
95
- // classpath += files(android.bootClasspath)
96
- // classpath += files(project.configurations.getByName('compile').asList())
97
- // classpath += files(android.libraryVariants.collect { variant ->
98
- // variant.javaCompile.classpath.files
99
- // }.flatten())
100
-
101
- reportUndocumented = false
102
- skipEmptyPackages = true
103
-
104
- outputFormat = 'javadoc' // https://github.com/Kotlin/dokka#output-formats
105
- outputDirectory = "$buildDir/dokkaDoc" // Temp 'exploded' dir for .jar creation (i.e. by dokkaDocJar task)
106
-
107
- def suppressedPackages = ["android_libs", "com.wix.detox.espresso.common.annot"]
108
- for (String packagePrefix: suppressedPackages) {
109
- packageOptions {
110
- prefix = packagePrefix
111
- suppress = true
88
+ tasks.named("dokkaJavadoc") {
89
+ File dokkaDoc = new File("$buildDir/dokkaDoc");
90
+ outputDirectory.set(dokkaDoc)
91
+ dokkaSourceSets {
92
+ named("main") {
93
+ sourceRoots.from(android.sourceSets.main.java.srcDirs)
94
+ reportUndocumented.set(false)
95
+ skipEmptyPackages.set(true)
96
+ def suppressedPackages = ["android_libs", "com.wix.detox.espresso.common.annot"]
97
+ for (String packagePrefix : suppressedPackages) {
98
+ packageOptions {
99
+ prefix = packagePrefix
100
+ suppress = true
101
+ }
102
+ }
112
103
  }
113
104
  }
114
-
105
+ }
115
106
  // Side note / TODO:
116
107
  // Dokka outputs R and BuildConfig; currently, there's nothing to do about it, as issues such as
117
108
  // this on - https://github.com/Kotlin/dokka/issues/419 are still open :-/
118
109
  // We might want to revisit this in the future -- see if they've decided to export a custom classes
119
110
  // suppression config var or something.
120
- }
121
111
 
122
- task dokkaDocJar(type: Jar, dependsOn: dokka) {
112
+ task dokkaDocJar(type: Jar, dependsOn: dokkaJavadoc) {
123
113
  from "$buildDir/dokkaDoc"
124
114
  classifier = 'javadoc'
125
115
  }
@@ -2,12 +2,10 @@ package com.wix.detox.adapters.server
2
2
 
3
3
  import android.content.Context
4
4
  import android.util.Log
5
- import androidx.test.espresso.IdlingResource
6
5
  import com.wix.detox.TestEngineFacade
7
6
  import com.wix.detox.common.extractRootCause
8
7
  import com.wix.detox.instruments.DetoxInstrumentsException
9
8
  import com.wix.detox.instruments.DetoxInstrumentsManager
10
- import com.wix.detox.reactnative.idlingresources.DescriptiveIdlingResource
11
9
  import com.wix.invoke.MethodInvocation
12
10
  import org.json.JSONObject
13
11
  import java.lang.reflect.InvocationTargetException
@@ -94,38 +92,6 @@ class CleanupActionHandler(
94
92
  }
95
93
  }
96
94
 
97
- class QueryStatusActionHandler(
98
- private val outboundServerAdapter: OutboundServerAdapter,
99
- private val testEngineFacade: TestEngineFacade)
100
- : DetoxActionHandler {
101
-
102
- override fun handle(params: String, messageId: Long) {
103
- val data = mutableMapOf<String, Any>()
104
- val busyResources = testEngineFacade.getBusyIdlingResources()
105
-
106
- data["status"] = "App synchronization debug: " +
107
- if (busyResources.isEmpty()) {
108
- "The app appears to be idle!"
109
- } else {
110
- val summary = busyResources.joinToString("\n") { "\t - ${formatResource(it)}" }
111
-
112
- "\nThe app is busy, due to: \n$summary"
113
- }
114
- outboundServerAdapter.sendMessage("currentStatusResult", data, messageId)
115
- }
116
-
117
- private fun formatResource(resource: IdlingResource): String =
118
- if (resource is DescriptiveIdlingResource) {
119
- resource.getDescription()
120
- } else if (resource.javaClass.name.contains("LooperIdlingResource") && resource.name.contains("mqt_js")) {
121
- "Javascript code execution"
122
- } else if (resource.javaClass.name.contains("LooperIdlingResource") && resource.name.contains("mqt_native")) {
123
- "Javascript code execution (native)"
124
- } else {
125
- "Resource ${resource.name} being busy"
126
- }
127
- }
128
-
129
95
  class InstrumentsRecordingStateActionHandler(
130
96
  private val instrumentsManager: DetoxInstrumentsManager,
131
97
  private val outboundServerAdapter: OutboundServerAdapter
@@ -0,0 +1,96 @@
1
+ package com.wix.detox.adapters.server
2
+
3
+ import androidx.test.espresso.IdlingResource
4
+ import com.wix.detox.TestEngineFacade
5
+ import com.wix.detox.reactnative.idlingresources.DescriptiveIdlingResource
6
+
7
+ class QueryStatusActionHandler(
8
+ private val outboundServerAdapter: OutboundServerAdapter,
9
+ private val testEngineFacade: TestEngineFacade
10
+ )
11
+ : DetoxActionHandler {
12
+
13
+ override fun handle(params: String, messageId: Long) {
14
+ val data = mutableMapOf<String, Any?>()
15
+ data["status"] = formatStatus(testEngineFacade.getBusyIdlingResources())
16
+
17
+ outboundServerAdapter.sendMessage("currentStatusResult", data, messageId)
18
+ }
19
+
20
+ private fun formatStatus(busyResources: List<IdlingResource>): Map<String, Any> {
21
+ if (busyResources.isEmpty()) {
22
+ return mapOf("app_status" to "idle")
23
+ }
24
+
25
+ val status = mutableMapOf<String, Any>()
26
+ status["app_status"] = "busy"
27
+ status["busy_resources"] = busyResources.map{ formatResource(it) }
28
+
29
+ return status
30
+ }
31
+
32
+ private fun formatResource(resource: IdlingResource): Map<String, Any> {
33
+ if (resource is DescriptiveIdlingResource) {
34
+ return resource.getDescription().json()
35
+ }
36
+
37
+ if (resource.javaClass.name.contains("LooperIdlingResource")) {
38
+ return formatLooperResourceFromName(resource.name)
39
+ }
40
+
41
+ return mapOf<String, Any>(
42
+ "name" to "unknown",
43
+ "description" to mapOf<String, Any>(
44
+ "identifier" to resource.name
45
+ )
46
+ )
47
+ }
48
+
49
+ private fun formatLooperResourceFromName(resourceName: String): Map<String, Any> {
50
+ return when {
51
+ isJSCodeExecution(resourceName) -> {
52
+ formatLooperResource(
53
+ "\"${resourceName}\" (JS Thread)",
54
+ "JavaScript code"
55
+ )
56
+ }
57
+ isNativeCodeExecution(resourceName) -> {
58
+ formatLooperResource(
59
+ "\"${resourceName}\" (Native Modules Thread)",
60
+ "native module calls"
61
+ )
62
+ }
63
+ else -> {
64
+ formatLooperResource(
65
+ "\"${resourceName}\""
66
+ )
67
+ }
68
+ }
69
+ }
70
+
71
+ /**
72
+ * @see URL https://reactnative.dev/docs/profiling
73
+ */
74
+ private fun isJSCodeExecution(looperName: String): Boolean {
75
+ return looperName.contains("mqt_js")
76
+ }
77
+
78
+ private fun formatLooperResource(thread: String, executionType: String? = null): Map<String, Any> {
79
+ return mapOf<String, Any>(
80
+ "name" to "looper",
81
+ "description" to
82
+ mutableMapOf<String, Any>(
83
+ "thread" to thread
84
+ ).apply {
85
+ if (executionType != null) put("execution_type", executionType)
86
+ }
87
+ )
88
+ }
89
+
90
+ /**
91
+ * @see URL https://reactnative.dev/docs/profiling
92
+ */
93
+ private fun isNativeCodeExecution(looperName: String): Boolean {
94
+ return looperName.contains("mqt_native")
95
+ }
96
+ }
@@ -9,6 +9,7 @@ import com.wix.detox.LaunchArgs
9
9
  import com.wix.detox.reactnative.idlingresources.*
10
10
  import com.wix.detox.reactnative.idlingresources.timers.TimersIdlingResource
11
11
  import com.wix.detox.reactnative.idlingresources.timers.getInterrogationStrategy
12
+ import com.wix.detox.reactnative.idlingresources.uimodule.UIModuleIdlingResource
12
13
  import org.joor.Reflect
13
14
  import org.joor.ReflectException
14
15
  import java.util.Set
@@ -65,8 +65,11 @@ public class AnimatedModuleIdlingResource implements DescriptiveIdlingResource,
65
65
 
66
66
  @NotNull
67
67
  @Override
68
- public String getDescription() {
69
- return "Animations running on screen";
68
+ public IdlingResourceDescription getDescription() {
69
+ return new IdlingResourceDescription.Builder()
70
+ .name("ui")
71
+ .addDescription("reason", "Animations running on screen")
72
+ .build();
70
73
  }
71
74
 
72
75
  @Override
@@ -50,7 +50,11 @@ open class AsyncStorageIdlingResource
50
50
  }
51
51
 
52
52
  override fun getName(): String = javaClass.name
53
- override fun getDescription() = "Disk I/O activity"
53
+
54
+ override fun getDescription(): IdlingResourceDescription {
55
+ return IdlingResourceDescription.Builder().name("io").build()
56
+ }
57
+
54
58
  override fun isIdleNow(): Boolean =
55
59
  checkIdle().also { idle ->
56
60
  if (!idle) {
@@ -7,6 +7,8 @@ import com.facebook.react.bridge.ReactContext;
7
7
 
8
8
  import org.jetbrains.annotations.NotNull;
9
9
 
10
+ import java.util.HashMap;
11
+ import java.util.Map;
10
12
  import java.util.concurrent.atomic.AtomicBoolean;
11
13
 
12
14
  /**
@@ -42,8 +44,8 @@ public class BridgeIdlingResource extends DetoxBaseIdlingResource implements Not
42
44
 
43
45
  @NotNull
44
46
  @Override
45
- public String getDescription() {
46
- return "Activity on the React-Native bridge";
47
+ public IdlingResourceDescription getDescription() {
48
+ return new IdlingResourceDescription.Builder().name("bridge").build();
47
49
  }
48
50
 
49
51
  @Override