detox 20.18.2-smoke.0 → 20.18.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3-javadoc.jar +0 -0
  2. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3-javadoc.jar.md5 +1 -0
  3. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3-javadoc.jar.sha1 +1 -0
  4. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3-javadoc.jar.sha256 +1 -0
  5. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3-javadoc.jar.sha512 +1 -0
  6. package/Detox-android/com/wix/detox/{20.18.2-smoke.0/detox-20.18.2-smoke.0-sources.jar → 20.18.3/detox-20.18.3-sources.jar} +0 -0
  7. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3-sources.jar.md5 +1 -0
  8. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3-sources.jar.sha1 +1 -0
  9. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3-sources.jar.sha256 +1 -0
  10. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3-sources.jar.sha512 +1 -0
  11. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3.aar +0 -0
  12. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3.aar.md5 +1 -0
  13. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3.aar.sha1 +1 -0
  14. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3.aar.sha256 +1 -0
  15. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3.aar.sha512 +1 -0
  16. package/Detox-android/com/wix/detox/{20.18.2-smoke.0/detox-20.18.2-smoke.0.pom → 20.18.3/detox-20.18.3.pom} +1 -1
  17. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3.pom.md5 +1 -0
  18. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3.pom.sha1 +1 -0
  19. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3.pom.sha256 +1 -0
  20. package/Detox-android/com/wix/detox/20.18.3/detox-20.18.3.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/build.gradle +4 -4
  29. package/android/detox/build.gradle +3 -23
  30. package/android/detox/proguard-rules-app.pro +0 -4
  31. package/android/detox/proguard-rules.pro +0 -3
  32. package/android/detox/publishing.gradle +3 -8
  33. package/android/detox/src/full/java/com/wix/detox/espresso/DetoxAction.java +1 -1
  34. package/android/detox/src/full/java/com/wix/detox/espresso/action/AdjustSliderToPositionAction.kt +1 -1
  35. package/android/detox/src/full/java/com/wix/detox/espresso/common/ReactSliderHelper.kt +6 -6
  36. package/android/detox/src/testFull/java/com/wix/detox/adapters/server/QueryStatusActionHandlerSpec.kt +10 -12
  37. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  38. package/android/gradle/wrapper/gradle-wrapper.properties +3 -3
  39. package/android/gradlew +9 -24
  40. package/android/gradlew.bat +90 -92
  41. package/android/rninfo.gradle +0 -1
  42. package/package.json +5 -5
  43. package/scripts/postinstall.js +0 -3
  44. package/src/android/espressoapi/DetoxAction.js +2 -1
  45. package/src/client/Client.js +6 -1
  46. package/src/devices/allocation/drivers/android/genycloud/exec/GenyCloudExec.js +0 -4
  47. package/src/devices/validation/android/GenycloudEnvValidator.js +1 -12
  48. package/src/devices/validation/factories/index.js +1 -4
  49. package/Detox-android/com/wix/detox/20.18.2-smoke.0/detox-20.18.2-smoke.0-sources.jar.md5 +0 -1
  50. package/Detox-android/com/wix/detox/20.18.2-smoke.0/detox-20.18.2-smoke.0-sources.jar.sha1 +0 -1
  51. package/Detox-android/com/wix/detox/20.18.2-smoke.0/detox-20.18.2-smoke.0-sources.jar.sha256 +0 -1
  52. package/Detox-android/com/wix/detox/20.18.2-smoke.0/detox-20.18.2-smoke.0-sources.jar.sha512 +0 -1
  53. package/Detox-android/com/wix/detox/20.18.2-smoke.0/detox-20.18.2-smoke.0.aar +0 -0
  54. package/Detox-android/com/wix/detox/20.18.2-smoke.0/detox-20.18.2-smoke.0.aar.md5 +0 -1
  55. package/Detox-android/com/wix/detox/20.18.2-smoke.0/detox-20.18.2-smoke.0.aar.sha1 +0 -1
  56. package/Detox-android/com/wix/detox/20.18.2-smoke.0/detox-20.18.2-smoke.0.aar.sha256 +0 -1
  57. package/Detox-android/com/wix/detox/20.18.2-smoke.0/detox-20.18.2-smoke.0.aar.sha512 +0 -1
  58. package/Detox-android/com/wix/detox/20.18.2-smoke.0/detox-20.18.2-smoke.0.pom.md5 +0 -1
  59. package/Detox-android/com/wix/detox/20.18.2-smoke.0/detox-20.18.2-smoke.0.pom.sha1 +0 -1
  60. package/Detox-android/com/wix/detox/20.18.2-smoke.0/detox-20.18.2-smoke.0.pom.sha256 +0 -1
  61. package/Detox-android/com/wix/detox/20.18.2-smoke.0/detox-20.18.2-smoke.0.pom.sha512 +0 -1
  62. package/scripts/updateGradle.js +0 -47
  63. package/src/devices/allocation/drivers/android/genycloud/services/GenyAuthService.js +0 -12
  64. package/src/utils/rn-consts/rn-consts.js +0 -15
@@ -0,0 +1 @@
1
+ 2340fc2a370bd0e84e1e8b0d2c5a3869
@@ -0,0 +1 @@
1
+ a45e4af278d3c66ea8f3694ab57b01ddba2c9d9f
@@ -0,0 +1 @@
1
+ 1164220ec536aaa0e0260d3cfdfa950b6548543f350dbbd9aee97a6d03437ea5
@@ -0,0 +1 @@
1
+ d28ee53861718cd3370c218638773e487671165ea566f90ee110450de50d51b32a523757f8b5a3f75951063f606a44255bb1c127f90b24f4e472884acc52ebe9
@@ -0,0 +1 @@
1
+ fd012b01da73476be13bc45266bd9895
@@ -0,0 +1 @@
1
+ e3b508054b51a30046b9c3ea45284193f329d53e
@@ -0,0 +1 @@
1
+ ece92865ed08d9bc5ecd4f6766d1b158b5b5bfeae4178012718a97d079fa9607
@@ -0,0 +1 @@
1
+ c0fb8a4a7ade30e74bf8b552d4b1c1b9bb47f4343a28e5e2eff82521ad55ff31b36c230e9a0ab9247e54afe014cdeca2a4029c87f9003034f5b9271ec3d0bdc6
@@ -0,0 +1 @@
1
+ 5189a7f74b7302ce8ade78313f99ad47
@@ -0,0 +1 @@
1
+ 9a22d7c4dc49f66daa19658b66f748c94e0d26fe
@@ -0,0 +1 @@
1
+ c0635d01a3e13c0c93853465b5649fb017c2d6f12faf10d5e3020f526535f6ba
@@ -0,0 +1 @@
1
+ a684ad5165eb6d0ba717fa353ecdec5624393acbec3b2a5cb193a6fcdf5b6a2d34512d7812ec73347b15e1ec70118ec994a381c3df9609c6aa46b5c4cfd4a186
@@ -3,7 +3,7 @@
3
3
  <modelVersion>4.0.0</modelVersion>
4
4
  <groupId>com.wix</groupId>
5
5
  <artifactId>detox</artifactId>
6
- <version>20.18.2-smoke.0</version>
6
+ <version>20.18.3</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
+ 67e87161eb4c645a7f65ed936e86f560
@@ -0,0 +1 @@
1
+ 3fa21796e4c9f7c6d0a2eea0bd3a9a99844a7f72
@@ -0,0 +1 @@
1
+ 90f20f3a8102dcfaf5b80ff08c73e035d4f21d46d3cbb2f009d331c404c865b3
@@ -0,0 +1 @@
1
+ f2b284d6a1aa516196ea4df0b8050386db782c9cd7a2b0d72d23802326d13857ecb4332dd8a85e20e824ae2f67d673551399dfea805a0b7cc236554495d52a19
@@ -3,11 +3,11 @@
3
3
  <groupId>com.wix</groupId>
4
4
  <artifactId>detox</artifactId>
5
5
  <versioning>
6
- <latest>20.18.2-smoke.0</latest>
7
- <release>20.18.2-smoke.0</release>
6
+ <latest>20.18.3</latest>
7
+ <release>20.18.3</release>
8
8
  <versions>
9
- <version>20.18.2-smoke.0</version>
9
+ <version>20.18.3</version>
10
10
  </versions>
11
- <lastUpdated>20240221143248</lastUpdated>
11
+ <lastUpdated>20240225150903</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- a4f7e4379ed85a631499e628ade1b56b
1
+ 847476498061b00527a0b7e12147f22f
@@ -1 +1 @@
1
- 6f2af30435adb35ca5bfd892162c4ee5c1fc9d50
1
+ 63b1313818175278ae77985e31393a449b14c7a4
@@ -1 +1 @@
1
- 4c97d73f7913c9e3397ffc2d1aaa8df9c938e64959a5648993089f4a3c7bc25f
1
+ 976c622e9844162f58c56416a9c0ab741f6fa5d055942effba9e66885ba65db4
@@ -1 +1 @@
1
- a98e13d7c753885ce74a44b74826d7091fe4b3cd45dcb3e6bec61c66e5de5d37012be8b237e31d11566cf98496f42514ff1e4747310388902a0d97211e27600e
1
+ aa2cbd7a1cf88f626c137ca94c72336ad02d20387fd2e3de69f8a4693f23dec7ca97fa6325bd46a4302ddd765e790695376f5a5c880153a06f2d1e40c09224b6
package/Detox-ios-src.tbz CHANGED
Binary file
package/Detox-ios.tbz CHANGED
Binary file
@@ -3,11 +3,11 @@ buildscript {
3
3
 
4
4
  ext {
5
5
  isOfficialDetoxLib = true
6
- kotlinVersion = '1.8.0'
6
+ kotlinVersion = '1.6.21'
7
7
  dokkaVersion = '1.9.10'
8
- buildToolsVersion = '34.0.0'
9
- compileSdkVersion = 34
10
- targetSdkVersion = 34
8
+ buildToolsVersion = '33.0.0'
9
+ compileSdkVersion = 33
10
+ targetSdkVersion = 33
11
11
  minSdkVersion = 21
12
12
  }
13
13
  ext.detoxKotlinVersion = ext.kotlinVersion
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply from: '../rninfo.gradle'
4
4
 
5
5
  def _kotlinMinVersion = '1.2.0'
6
- def _materialMinVersion = '1.11.0'
6
+ def _materialMinVersion = '1.2.1'
7
7
 
8
8
  def _ext = rootProject.ext
9
9
  def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 31
@@ -65,7 +65,7 @@ android {
65
65
  def repeatLength = output.length()
66
66
  println '\n' + ('-' * repeatLength) + '\n' + output + '\n' + ('-' * repeatLength) + '\n'
67
67
 
68
- println "see report at file://${t.reports.html.outputLocation}/index.html"
68
+ println "see report at file://${t.reports.html.destination}/index.html"
69
69
  }
70
70
  }
71
71
  }
@@ -82,26 +82,6 @@ android {
82
82
  lintOptions {
83
83
  abortOnError false
84
84
  }
85
-
86
- if (rnInfo.isRN72OrHigher) {
87
- compileOptions {
88
- sourceCompatibility JavaVersion.VERSION_17
89
- targetCompatibility JavaVersion.VERSION_17
90
- }
91
-
92
- kotlinOptions {
93
- jvmTarget = '17'
94
- }
95
- } else {
96
- compileOptions {
97
- sourceCompatibility JavaVersion.VERSION_11
98
- targetCompatibility JavaVersion.VERSION_11
99
- }
100
-
101
- kotlinOptions {
102
- jvmTarget = '11'
103
- }
104
- }
105
85
  }
106
86
 
107
87
  // In a nutshell:
@@ -171,7 +151,7 @@ dependencies {
171
151
  testImplementation 'org.assertj:assertj-core:3.16.1'
172
152
  testImplementation "org.jetbrains.kotlin:kotlin-test:$_kotlinVersion"
173
153
  testImplementation 'org.apache.commons:commons-io:1.3.2'
174
- testImplementation 'org.mockito.kotlin:mockito-kotlin:5.2.1'
154
+ testImplementation 'org.mockito.kotlin:mockito-kotlin:4.0.0'
175
155
  testImplementation 'org.robolectric:robolectric:4.11.1'
176
156
 
177
157
  testImplementation("com.google.android.material:material:$_materialMinVersion") {
@@ -21,7 +21,3 @@
21
21
  -keep class okhttp3.** { *; }
22
22
 
23
23
  -keep class androidx.concurrent.futures.** { *; }
24
-
25
- -dontwarn androidx.appcompat.**
26
- -dontwarn javax.lang.model.element.**
27
-
@@ -20,6 +20,3 @@
20
20
 
21
21
  -keep class com.wix.detoxprofiler.** { *; }
22
22
  -dontnote com.wix.detox.instruments.reflected.**
23
-
24
- -dontwarn androidx.appcompat.**
25
- -dontwarn javax.lang.model.element.**
@@ -3,7 +3,6 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'org.jetbrains.dokka'
4
4
  apply plugin: 'signing'
5
5
  apply from: './publish-pom.gradle'
6
- apply from: '../rninfo.gradle'
7
6
 
8
7
  String TARGET_LOCAL_DIR = "$buildDir/../../../Detox-android"
9
8
  String TARGET_MAVEN_CENTRAL_URL = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
@@ -181,11 +180,7 @@ publishing {
181
180
 
182
181
  "maven${variantNameCapitalized}Aar"(MavenPublication) {
183
182
  groupId 'com.wix'
184
- if (rnInfo.isRN72OrHigher) {
185
- artifactId 'detox'
186
- } else {
187
- artifactId 'detox-legacy'
188
- }
183
+ artifactId 'detox'
189
184
  version "$_versionName"
190
185
 
191
186
  // Register built .aar as published artifact (as a file, explicitly)
@@ -198,11 +193,11 @@ publishing {
198
193
 
199
194
  // Register sources, javadoc as published artifacts (via equivalent tasks' output)
200
195
  artifact sourcesJar
201
- //artifact dokkaDocJar // waiting for dokka to fix https://github.com/Kotlin/dokka/issues/3153
196
+ artifact dokkaDocJar
202
197
 
203
198
  // Also register source, javadoc as archive-artifacts, for signing
204
199
  declareArchive sourcesJar
205
- //declareArchive dokkaDocJar // waiting for dokka to fix https://github.com/Kotlin/dokka/issues/3153
200
+ declareArchive dokkaDocJar
206
201
 
207
202
  // Add detox package metadata to the .pom
208
203
  pom {
@@ -178,7 +178,7 @@ public class DetoxAction {
178
178
  return PickerActions.setDate(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH));
179
179
  }
180
180
 
181
- public static ViewAction adjustSliderToPosition(final Float newPosition) {
181
+ public static ViewAction adjustSliderToPosition(final double newPosition) {
182
182
  return new AdjustSliderToPositionAction(newPosition);
183
183
  }
184
184
 
@@ -10,7 +10,7 @@ import com.wix.detox.espresso.common.ReactSliderHelper
10
10
  import org.hamcrest.Matcher
11
11
  import org.hamcrest.Matchers
12
12
 
13
- class AdjustSliderToPositionAction(private val targetPositionPct: Float) : ViewAction {
13
+ class AdjustSliderToPositionAction(private val targetPositionPct: Double) : ViewAction {
14
14
  override fun getDescription() = "adjustSliderToPosition"
15
15
  override fun getConstraints(): Matcher<View?>? =
16
16
  Matchers.allOf( isDisplayed(), isAssignableFrom(AppCompatSeekBar::class.java) )
@@ -21,13 +21,13 @@ abstract class ReactSliderHelper(protected val slider: AppCompatSeekBar) {
21
21
  }
22
22
 
23
23
  // TODO Make this more testable (e.g. by delegating the set action away)
24
- fun setProgressPct(valuePct: Float) {
24
+ fun setProgressPct(valuePct: Double) {
25
25
  val maxJSProgress = calcMaxJSProgress()
26
26
  val valueJS = valuePct * maxJSProgress
27
- setProgressJS(valueJS.toFloat())
27
+ setProgressJS(valueJS)
28
28
  }
29
29
 
30
- protected abstract fun setProgressJS(valueJS: Float)
30
+ protected abstract fun setProgressJS(valueJS: Double)
31
31
 
32
32
  private fun calcMaxJSProgress(): Double {
33
33
  val nativeProgress = slider.progress.toDouble()
@@ -60,16 +60,16 @@ abstract class ReactSliderHelper(protected val slider: AppCompatSeekBar) {
60
60
  }
61
61
 
62
62
  private class LegacySliderHelper(slider: AppCompatSeekBar): ReactSliderHelper(slider) {
63
- override fun setProgressJS(valueJS: Float) {
63
+ override fun setProgressJS(valueJS: Double) {
64
64
  val reactSliderManager = Class.forName(CLASS_REACT_SLIDER_LEGACY_MANAGER).newInstance()
65
- Reflect.on(reactSliderManager).call("updateProperties", slider, buildStyles("value", valueJS.toDouble()))
65
+ Reflect.on(reactSliderManager).call("updateProperties", slider, buildStyles("value", valueJS))
66
66
  }
67
67
 
68
68
  private fun buildStyles(vararg keysAndValues: Any) = ReactStylesDiffMap(JavaOnlyMap.of(*keysAndValues))
69
69
  }
70
70
 
71
71
  private class CommunitySliderHelper(slider: AppCompatSeekBar): ReactSliderHelper(slider) {
72
- override fun setProgressJS(valueJS: Float) {
72
+ override fun setProgressJS(valueJS: Double) {
73
73
  val reactSliderManager = Class.forName(CLASS_REACT_SLIDER_COMMUNITY_MANAGER).newInstance()
74
74
  Reflect.on(reactSliderManager).call("setValue", slider, valueJS)
75
75
  }
@@ -3,7 +3,6 @@ package com.wix.detox.adapters.server
3
3
  import com.wix.detox.TestEngineFacade
4
4
  import com.wix.detox.inquiry.DetoxBusyResource
5
5
  import com.wix.detox.inquiry.DetoxBusyResourceDescription
6
- import org.mockito.kotlin.doReturn
7
6
  import org.mockito.kotlin.eq
8
7
  import org.mockito.kotlin.mock
9
8
  import org.mockito.kotlin.verify
@@ -43,17 +42,16 @@ object QueryStatusActionHandlerSpec : Spek({
43
42
  }
44
43
 
45
44
  describe("given a busy app") {
46
-
45
+ fun aBusyResourceDescription(description: Map<String, Any>): DetoxBusyResourceDescription =
46
+ mock {
47
+ on { json() }.thenReturn(description)
48
+ }
47
49
 
48
50
  fun aBusyResource(identifier: String): DetoxBusyResource {
49
-
50
- return mock<DetoxBusyResource.BusyIdlingResource> {
51
- on { getDescription() } doReturn DetoxBusyResourceDescription.Builder()
52
- .name("mock")
53
- .addDescription("mock", identifier)
54
- .build()
51
+ val mockedDescription = aBusyResourceDescription(mapOf("mock" to identifier))
52
+ return mock {
53
+ on { getDescription() }.thenReturn(mockedDescription)
55
54
  }
56
-
57
55
  }
58
56
 
59
57
  it("should send a descriptive busy-status indication") {
@@ -62,8 +60,8 @@ object QueryStatusActionHandlerSpec : Spek({
62
60
  val expectedData = mapOf<String, Any>("status" to mapOf(
63
61
  "app_status" to "busy",
64
62
  "busy_resources" to listOf(
65
- mapOf("name" to "mock", "description" to mapOf("mock" to "some-resource")),
66
- mapOf("name" to "mock", "description" to mapOf("mock" to "yet-another-resource"))
63
+ mapOf("mock" to "some-resource"),
64
+ mapOf("mock" to "yet-another-resource"),
67
65
  )
68
66
  ))
69
67
  whenever(testEngineFacade.getAllBusyResources()).thenReturn(listOf(busyResource, busyResource2))
@@ -73,4 +71,4 @@ object QueryStatusActionHandlerSpec : Spek({
73
71
  }
74
72
  }
75
73
  }
76
- })
74
+ })
@@ -1,7 +1,7 @@
1
+ #Sun Sep 15 22:36:02 IDT 2019
1
2
  distributionBase=GRADLE_USER_HOME
2
3
  distributionPath=wrapper/dists
3
- distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
4
- networkTimeout=10000
5
- validateDistributionUrl=true
6
4
  zipStoreBase=GRADLE_USER_HOME
7
5
  zipStorePath=wrapper/dists
6
+ distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
7
+
package/android/gradlew CHANGED
@@ -1,4 +1,4 @@
1
- #!/bin/sh
1
+ #!/usr/bin/env bash
2
2
 
3
3
  #
4
4
  # Copyright © 2015-2021 the original authors.
@@ -55,7 +55,7 @@
55
55
  # Darwin, MinGW, and NonStop.
56
56
  #
57
57
  # (3) This script is generated from the Groovy template
58
- # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58
+ # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59
59
  # within the Gradle project.
60
60
  #
61
61
  # You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,11 +80,13 @@ do
80
80
  esac
81
81
  done
82
82
 
83
- # This is normally unused
84
- # shellcheck disable=SC2034
83
+ APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84
+
85
+ APP_NAME="Gradle"
85
86
  APP_BASE_NAME=${0##*/}
86
- # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87
- APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
87
+
88
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89
+ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
88
90
 
89
91
  # Use the maximum available, or set MAX_FD != -1 to use that value.
90
92
  MAX_FD=maximum
@@ -131,29 +133,22 @@ location of your Java installation."
131
133
  fi
132
134
  else
133
135
  JAVACMD=java
134
- if ! command -v java >/dev/null 2>&1
135
- then
136
- die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
136
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137
137
 
138
138
  Please set the JAVA_HOME variable in your environment to match the
139
139
  location of your Java installation."
140
- fi
141
140
  fi
142
141
 
143
142
  # Increase the maximum file descriptors if we can.
144
143
  if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145
144
  case $MAX_FD in #(
146
145
  max*)
147
- # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148
- # shellcheck disable=SC3045
149
146
  MAX_FD=$( ulimit -H -n ) ||
150
147
  warn "Could not query maximum file descriptor limit"
151
148
  esac
152
149
  case $MAX_FD in #(
153
150
  '' | soft) :;; #(
154
151
  *)
155
- # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156
- # shellcheck disable=SC3045
157
152
  ulimit -n "$MAX_FD" ||
158
153
  warn "Could not set maximum file descriptor limit to $MAX_FD"
159
154
  esac
@@ -198,10 +193,6 @@ if "$cygwin" || "$msys" ; then
198
193
  done
199
194
  fi
200
195
 
201
-
202
- # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203
- DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204
-
205
196
  # Collect all arguments for the java command;
206
197
  # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
207
198
  # shell script including quotes and variable substitutions, so put them in
@@ -214,12 +205,6 @@ set -- \
214
205
  org.gradle.wrapper.GradleWrapperMain \
215
206
  "$@"
216
207
 
217
- # Stop when "xargs" is not available.
218
- if ! command -v xargs >/dev/null 2>&1
219
- then
220
- die "xargs is not available"
221
- fi
222
-
223
208
  # Use "xargs" to parse quoted args.
224
209
  #
225
210
  # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
@@ -1,92 +1,90 @@
1
- @rem
2
- @rem Copyright 2015 the original author or authors.
3
- @rem
4
- @rem Licensed under the Apache License, Version 2.0 (the "License");
5
- @rem you may not use this file except in compliance with the License.
6
- @rem You may obtain a copy of the License at
7
- @rem
8
- @rem https://www.apache.org/licenses/LICENSE-2.0
9
- @rem
10
- @rem Unless required by applicable law or agreed to in writing, software
11
- @rem distributed under the License is distributed on an "AS IS" BASIS,
12
- @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- @rem See the License for the specific language governing permissions and
14
- @rem limitations under the License.
15
- @rem
16
-
17
- @if "%DEBUG%"=="" @echo off
18
- @rem ##########################################################################
19
- @rem
20
- @rem Gradle startup script for Windows
21
- @rem
22
- @rem ##########################################################################
23
-
24
- @rem Set local scope for the variables with windows NT shell
25
- if "%OS%"=="Windows_NT" setlocal
26
-
27
- set DIRNAME=%~dp0
28
- if "%DIRNAME%"=="" set DIRNAME=.
29
- @rem This is normally unused
30
- set APP_BASE_NAME=%~n0
31
- set APP_HOME=%DIRNAME%
32
-
33
- @rem Resolve any "." and ".." in APP_HOME to make it shorter.
34
- for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35
-
36
- @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37
- set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38
-
39
- @rem Find java.exe
40
- if defined JAVA_HOME goto findJavaFromJavaHome
41
-
42
- set JAVA_EXE=java.exe
43
- %JAVA_EXE% -version >NUL 2>&1
44
- if %ERRORLEVEL% equ 0 goto execute
45
-
46
- echo.
47
- echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48
- echo.
49
- echo Please set the JAVA_HOME variable in your environment to match the
50
- echo location of your Java installation.
51
-
52
- goto fail
53
-
54
- :findJavaFromJavaHome
55
- set JAVA_HOME=%JAVA_HOME:"=%
56
- set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57
-
58
- if exist "%JAVA_EXE%" goto execute
59
-
60
- echo.
61
- echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62
- echo.
63
- echo Please set the JAVA_HOME variable in your environment to match the
64
- echo location of your Java installation.
65
-
66
- goto fail
67
-
68
- :execute
69
- @rem Setup the command line
70
-
71
- set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72
-
73
-
74
- @rem Execute Gradle
75
- "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
76
-
77
- :end
78
- @rem End local scope for the variables with windows NT shell
79
- if %ERRORLEVEL% equ 0 goto mainEnd
80
-
81
- :fail
82
- rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83
- rem the _cmd.exe /c_ return code!
84
- set EXIT_CODE=%ERRORLEVEL%
85
- if %EXIT_CODE% equ 0 set EXIT_CODE=1
86
- if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87
- exit /b %EXIT_CODE%
88
-
89
- :mainEnd
90
- if "%OS%"=="Windows_NT" endlocal
91
-
92
- :omega
1
+ @if "%DEBUG%" == "" @echo off
2
+ @rem ##########################################################################
3
+ @rem
4
+ @rem Gradle startup script for Windows
5
+ @rem
6
+ @rem ##########################################################################
7
+
8
+ @rem Set local scope for the variables with windows NT shell
9
+ if "%OS%"=="Windows_NT" setlocal
10
+
11
+ @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12
+ set DEFAULT_JVM_OPTS=
13
+
14
+ set DIRNAME=%~dp0
15
+ if "%DIRNAME%" == "" set DIRNAME=.
16
+ set APP_BASE_NAME=%~n0
17
+ set APP_HOME=%DIRNAME%
18
+
19
+ @rem Find java.exe
20
+ if defined JAVA_HOME goto findJavaFromJavaHome
21
+
22
+ set JAVA_EXE=java.exe
23
+ %JAVA_EXE% -version >NUL 2>&1
24
+ if "%ERRORLEVEL%" == "0" goto init
25
+
26
+ echo.
27
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28
+ echo.
29
+ echo Please set the JAVA_HOME variable in your environment to match the
30
+ echo location of your Java installation.
31
+
32
+ goto fail
33
+
34
+ :findJavaFromJavaHome
35
+ set JAVA_HOME=%JAVA_HOME:"=%
36
+ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37
+
38
+ if exist "%JAVA_EXE%" goto init
39
+
40
+ echo.
41
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42
+ echo.
43
+ echo Please set the JAVA_HOME variable in your environment to match the
44
+ echo location of your Java installation.
45
+
46
+ goto fail
47
+
48
+ :init
49
+ @rem Get command-line arguments, handling Windowz variants
50
+
51
+ if not "%OS%" == "Windows_NT" goto win9xME_args
52
+ if "%@eval[2+2]" == "4" goto 4NT_args
53
+
54
+ :win9xME_args
55
+ @rem Slurp the command line arguments.
56
+ set CMD_LINE_ARGS=
57
+ set _SKIP=2
58
+
59
+ :win9xME_args_slurp
60
+ if "x%~1" == "x" goto execute
61
+
62
+ set CMD_LINE_ARGS=%*
63
+ goto execute
64
+
65
+ :4NT_args
66
+ @rem Get arguments from the 4NT Shell from JP Software
67
+ set CMD_LINE_ARGS=%$
68
+
69
+ :execute
70
+ @rem Setup the command line
71
+
72
+ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73
+
74
+ @rem Execute Gradle
75
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76
+
77
+ :end
78
+ @rem End local scope for the variables with windows NT shell
79
+ if "%ERRORLEVEL%"=="0" goto mainEnd
80
+
81
+ :fail
82
+ rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83
+ rem the _cmd.exe /c_ return code!
84
+ if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85
+ exit /b 1
86
+
87
+ :mainEnd
88
+ if "%OS%"=="Windows_NT" endlocal
89
+
90
+ :omega
@@ -33,6 +33,5 @@ if (hasProperty('project')) {
33
33
  isRN70OrHigher: rnMajorVer >= 70,
34
34
  isRN71OrHigher: rnMajorVer >= 71,
35
35
  isRN72OrHigher: rnMajorVer >= 72,
36
- isRN73OrHigher: rnMajorVer >= 73,
37
36
  ]
38
37
  }
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": "20.18.2-smoke.0",
4
+ "version": "20.18.3",
5
5
  "bin": {
6
6
  "detox": "local-cli/cli.js"
7
7
  },
@@ -59,7 +59,7 @@
59
59
  "jest-allure2-reporter": "^2.0.0-beta.9",
60
60
  "metro-react-native-babel-preset": "0.76.8",
61
61
  "prettier": "^3.1.1",
62
- "react-native": "0.73.2",
62
+ "react-native": "0.72.8",
63
63
  "react-native-codegen": "^0.0.8",
64
64
  "typescript": "^5.3.3",
65
65
  "wtfnode": "^0.9.1"
@@ -110,10 +110,10 @@
110
110
  }
111
111
  },
112
112
  "engines": {
113
- "node": ">=18"
113
+ "node": ">=16"
114
114
  },
115
115
  "browserslist": [
116
- "node 18"
116
+ "node 16"
117
117
  ],
118
- "gitHead": "59d7d9d3539c2b19e37611e4af455c7a79a7b3f5"
118
+ "gitHead": "4c7caa5aff9474f875d5b2d3a71ba8d8d869bb81"
119
119
  }
@@ -1,8 +1,5 @@
1
- const { setGradleVersionByRNVersion } = require('./updateGradle');
2
1
  if (process.platform === 'darwin' && !process.env.DETOX_DISABLE_POSTINSTALL) {
3
2
  require('child_process').execFileSync(`${__dirname}/build_framework.ios.sh`, {
4
3
  stdio: 'inherit'
5
4
  });
6
-
7
5
  }
8
- setGradleVersionByRNVersion();
@@ -216,6 +216,7 @@ class DetoxAction {
216
216
  }
217
217
 
218
218
  static adjustSliderToPosition(newPosition) {
219
+ if (typeof newPosition !== "number") throw new Error("newPosition should be a number, but got " + (newPosition + (" (" + (typeof newPosition + ")"))));
219
220
  return {
220
221
  target: {
221
222
  type: "Class",
@@ -223,7 +224,7 @@ class DetoxAction {
223
224
  },
224
225
  method: "adjustSliderToPosition",
225
226
  args: [{
226
- type: "Float",
227
+ type: "Double",
227
228
  value: newPosition
228
229
  }]
229
230
  };
@@ -137,6 +137,10 @@ class Client {
137
137
  }
138
138
 
139
139
  async sendAction(action) {
140
+ if (this._pendingAppCrash) {
141
+ throw this._pendingAppCrash;
142
+ }
143
+
140
144
  const { shouldQueryStatus, ...options } = this._inferSendOptions(action);
141
145
 
142
146
  return await (shouldQueryStatus
@@ -302,6 +306,8 @@ class Client {
302
306
  }
303
307
 
304
308
  _onAppConnected() {
309
+ this._pendingAppCrash = null;
310
+
305
311
  if (this._whenAppIsConnected.isPending()) {
306
312
  this._whenAppIsConnected.resolve();
307
313
  } else {
@@ -352,7 +358,6 @@ class Client {
352
358
  if (this._pendingAppCrash) {
353
359
  this._whenAppDisconnected.reject(this._pendingAppCrash);
354
360
  this._asyncWebSocket.rejectAll(this._pendingAppCrash);
355
- this._pendingAppCrash = null;
356
361
  } else if (this._asyncWebSocket.hasPendingActions()) {
357
362
  const error = new DetoxRuntimeError('The app has unexpectedly disconnected from Detox server.');
358
363
  this._asyncWebSocket.rejectAll(error);
@@ -11,10 +11,6 @@ class GenyCloudExec {
11
11
  return this._exec('--version');
12
12
  }
13
13
 
14
- whoAmI() {
15
- return this._exec('auth whoami');
16
- }
17
-
18
14
  getRecipe(name) {
19
15
  return this._exec(`recipes list --name "${name}"`);
20
16
  }
@@ -12,15 +12,13 @@ class GenycloudEnvValidator extends EnvironmentValidatorBase {
12
12
  * @param authService { GenyAuthService }
13
13
  * @param exec { GenyCloudExec }
14
14
  */
15
- constructor({ authService, exec }) {
15
+ constructor({ exec }) {
16
16
  super();
17
- this._authService = authService;
18
17
  this._exec = exec;
19
18
  }
20
19
 
21
20
  async validate() {
22
21
  await this._validateGmsaasVersion();
23
- await this._validateGmsaasAuth();
24
22
  }
25
23
 
26
24
  async _validateGmsaasVersion() {
@@ -32,15 +30,6 @@ class GenycloudEnvValidator extends EnvironmentValidatorBase {
32
30
  });
33
31
  }
34
32
  }
35
-
36
- async _validateGmsaasAuth() {
37
- if (!await this._authService.getLoginEmail()) {
38
- throw new DetoxRuntimeError({
39
- message: `Cannot run tests using 'android.genycloud' type devices, because Genymotion was not logged-in to!`,
40
- hint: `Log-in to Genymotion-cloud by running this command (and following instructions):\n${environment.getGmsaasPath()} auth login --help`,
41
- });
42
- }
43
- }
44
33
  }
45
34
 
46
35
  module.exports = GenycloudEnvValidator;
@@ -7,11 +7,8 @@ class Genycloud extends EnvValidatorFactory {
7
7
  const serviceLocator = require('../../servicelocator/android');
8
8
  const exec = serviceLocator.genycloud.exec;
9
9
 
10
- const GenyAuthService = require('../../allocation/drivers/android/genycloud/services/GenyAuthService');
11
- const authService = new GenyAuthService(exec);
12
-
13
10
  const GenycloudEnvValidator = require('../android/GenycloudEnvValidator');
14
- return new GenycloudEnvValidator({ authService, exec });
11
+ return new GenycloudEnvValidator({ exec });
15
12
  }
16
13
  }
17
14
 
@@ -1 +0,0 @@
1
- ed9091bdd458b28d0c54ab52be64e938
@@ -1 +0,0 @@
1
- a2e6ab930523e919a47577b15896add4d7a3d321
@@ -1 +0,0 @@
1
- 3624446c9ee779a5d35f27c42d736c98a809d845d7aaf03abf171052ee9711dc
@@ -1 +0,0 @@
1
- ed3c5730b4ada9ff214cde7411db70868ba08c2984c8799e321da340528f32bcf7eaf7087d62ec890c82f8c8b4b240124e12280ee381af15d05947bc788258d7
@@ -1 +0,0 @@
1
- 221afe495c4ff28f344cff35e41e566a
@@ -1 +0,0 @@
1
- 9657a291e6e1725adb2a3e333248ad4a05892015
@@ -1 +0,0 @@
1
- 23a9f6a86b0fb26b426f6188be04dc98eed5edeaa7f77c6e682bae9b80906312
@@ -1 +0,0 @@
1
- a43c0a36b2b519a777662f087ba88e2bf781613ec86633434499ba70483fe072ebbbff6507f3ec3cb1cff7bfd5326af172d6fe7dcdc7990790796fe97d9c1519
@@ -1 +0,0 @@
1
- 2d5263c2c14fbebec206dc6f79af777a
@@ -1 +0,0 @@
1
- c88656e95bb5dc1adc7989dd7924064a7890567f
@@ -1 +0,0 @@
1
- 8dd60afca354e7851ae68c8293a47166f23d505eb6172b988bf3411a9e1744fe
@@ -1 +0,0 @@
1
- 12499a308f711025b42a78d65dcf5a3ae16b6d31f2f36fb3cd0e1f3a8b7deb0f0203a14e32df60bf839376d07631cfa4cbaa0b5ce491ad5dea67d7df4538692f
@@ -1,47 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- const rnMinor = require('../src/utils/rn-consts/rn-consts').rnVersion.minor;
5
-
6
- function getGradleVersionByRNVersion() {
7
- switch (rnMinor) {
8
- default:
9
- return '8.3';
10
- case '72':
11
- return '8.0';
12
- case '71':
13
- return '7.6.1';
14
- }
15
- }
16
-
17
- /**
18
- * Update the Gradle wrapper to the version that matches the React Native version.
19
- */
20
- function setGradleVersionByRNVersion() {
21
- const gradleVersion = getGradleVersionByRNVersion();
22
- updateGradleWrapperSync(gradleVersion);
23
- }
24
-
25
- /**
26
- * Update the Gradle wrapper to the specified version.
27
- *
28
- * @param {string} newVersion - the new Gradle wrapper version
29
- */
30
- function updateGradleWrapperSync(newVersion) {
31
- const gradleWrapperPath = path.join(process.cwd(), 'android', 'gradle', 'wrapper', 'gradle-wrapper.properties');
32
- console.log(`Updating Gradle wrapper to version${newVersion}. File: ${gradleWrapperPath}`);
33
-
34
- try {
35
- let data = fs.readFileSync(gradleWrapperPath, 'utf8');
36
- let updatedData = data.replace(/distributionUrl=.+\n/, `distributionUrl=https\\://services.gradle.org/distributions/gradle-${newVersion}-bin.zip\n`);
37
-
38
- fs.writeFileSync(gradleWrapperPath, updatedData, 'utf8');
39
- console.log(`Gradle wrapper updated successfully to version ${newVersion}.`);
40
- } catch (err) {
41
- console.error('Error:', err);
42
- }
43
- }
44
-
45
- module.exports = {
46
- setGradleVersionByRNVersion
47
- };
@@ -1,12 +0,0 @@
1
- class GenyAuthService {
2
- constructor(genyCloudExec) {
3
- this.genyCloudExec = genyCloudExec;
4
- }
5
-
6
- async getLoginEmail() {
7
- const whoAmI = await this.genyCloudExec.whoAmI();
8
- return whoAmI.auth.email;
9
- }
10
- }
11
-
12
- module.exports = GenyAuthService;
@@ -1,15 +0,0 @@
1
- const rnVersion = (function parseRNVersion() {
2
- const packageJson = require('react-native/package.json');
3
- const raw = packageJson.version;
4
- const [major, minor, patch] = raw.split('.');
5
- return {
6
- major,
7
- minor,
8
- patch,
9
- raw,
10
- };
11
- })();
12
-
13
- module.exports = {
14
- rnVersion,
15
- };