detox 20.17.0 → 20.18.0
Sign up to get free protection for your applications and to get access to all the features.
- package/Detox-android/com/wix/detox/{20.17.0/detox-20.17.0-sources.jar → 20.18.0/detox-20.18.0-sources.jar} +0 -0
- package/Detox-android/com/wix/detox/20.18.0/detox-20.18.0-sources.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.18.0/detox-20.18.0-sources.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.18.0/detox-20.18.0-sources.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.18.0/detox-20.18.0-sources.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/20.18.0/detox-20.18.0.aar +0 -0
- package/Detox-android/com/wix/detox/20.18.0/detox-20.18.0.aar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.18.0/detox-20.18.0.aar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.18.0/detox-20.18.0.aar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.18.0/detox-20.18.0.aar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{20.17.0/detox-20.17.0.pom → 20.18.0/detox-20.18.0.pom} +1 -1
- package/Detox-android/com/wix/detox/20.18.0/detox-20.18.0.pom.md5 +1 -0
- package/Detox-android/com/wix/detox/20.18.0/detox-20.18.0.pom.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.18.0/detox-20.18.0.pom.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.18.0/detox-20.18.0.pom.sha512 +1 -0
- package/Detox-android/com/wix/detox/maven-metadata.xml +4 -4
- package/Detox-android/com/wix/detox/maven-metadata.xml.md5 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha1 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha256 +1 -1
- package/Detox-android/com/wix/detox/maven-metadata.xml.sha512 +1 -1
- package/Detox-ios-src.tbz +0 -0
- package/Detox-ios.tbz +0 -0
- package/android/build.gradle +4 -4
- package/android/detox/build.gradle +23 -3
- package/android/detox/proguard-rules-app.pro +4 -0
- package/android/detox/proguard-rules.pro +3 -0
- package/android/detox/publishing.gradle +2 -2
- package/android/detox/src/full/java/com/wix/detox/espresso/DetoxAction.java +1 -1
- package/android/detox/src/full/java/com/wix/detox/espresso/action/AdjustSliderToPositionAction.kt +1 -1
- package/android/detox/src/full/java/com/wix/detox/espresso/common/ReactSliderHelper.kt +6 -6
- package/android/detox/src/testFull/java/com/wix/detox/adapters/server/QueryStatusActionHandlerSpec.kt +12 -10
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +3 -3
- package/android/gradlew +24 -9
- package/android/gradlew.bat +92 -90
- package/android/rninfo.gradle +1 -0
- package/package.json +11 -9
- package/runners/jest/testEnvironment/index.js +2 -1
- package/scripts/postinstall.js +3 -0
- package/scripts/updateGradle.js +47 -0
- package/src/android/espressoapi/DetoxAction.js +1 -2
- package/src/configuration/loadExternalConfig.js +7 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0-javadoc.jar +0 -0
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0-javadoc.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0-javadoc.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0-javadoc.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0-javadoc.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0-sources.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0-sources.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0-sources.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0-sources.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0.aar +0 -0
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0.aar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0.aar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0.aar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0.aar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0.pom.md5 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0.pom.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0.pom.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.17.0/detox-20.17.0.pom.sha512 +0 -1
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
be3150f677382c83ca4c3b39e7eeee42
|
@@ -0,0 +1 @@
|
|
1
|
+
273211543833cb70452802c22e3f51e70c440fe4
|
@@ -0,0 +1 @@
|
|
1
|
+
0644ab1765ddc2c2017d6b818560b7cdf5966532fcfb1d993cd2023010747017
|
@@ -0,0 +1 @@
|
|
1
|
+
5f3548c95106ceb9d84975be71289e23396dff2ddb194fbd588d2d8b69589a30390013cbd7594068405843f677a4e71c6a472ebb6abaebb92bd66b0ac90258bc
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
221afe495c4ff28f344cff35e41e566a
|
@@ -0,0 +1 @@
|
|
1
|
+
9657a291e6e1725adb2a3e333248ad4a05892015
|
@@ -0,0 +1 @@
|
|
1
|
+
23a9f6a86b0fb26b426f6188be04dc98eed5edeaa7f77c6e682bae9b80906312
|
@@ -0,0 +1 @@
|
|
1
|
+
a43c0a36b2b519a777662f087ba88e2bf781613ec86633434499ba70483fe072ebbbff6507f3ec3cb1cff7bfd5326af172d6fe7dcdc7990790796fe97d9c1519
|
@@ -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.
|
6
|
+
<version>20.18.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
|
+
15fb573a4936ca91c03771b491a28928
|
@@ -0,0 +1 @@
|
|
1
|
+
c3a0001593b559b22d6ea3e8ff3190c1e8a75c11
|
@@ -0,0 +1 @@
|
|
1
|
+
6fc69b38d42efa7b874898442dfb703027f046714d5b9a5817f5ad944e290916
|
@@ -0,0 +1 @@
|
|
1
|
+
1752d843f096d6a1b51d7a312779a58d1f0378ade72115eb43ea5654a01b1e9152dbcf61c97d674d0216c859e1285743ef91a4a443a2e3c76b6df085823dfe07
|
@@ -3,11 +3,11 @@
|
|
3
3
|
<groupId>com.wix</groupId>
|
4
4
|
<artifactId>detox</artifactId>
|
5
5
|
<versioning>
|
6
|
-
<latest>20.
|
7
|
-
<release>20.
|
6
|
+
<latest>20.18.0</latest>
|
7
|
+
<release>20.18.0</release>
|
8
8
|
<versions>
|
9
|
-
<version>20.
|
9
|
+
<version>20.18.0</version>
|
10
10
|
</versions>
|
11
|
-
<lastUpdated>
|
11
|
+
<lastUpdated>20240211132143</lastUpdated>
|
12
12
|
</versioning>
|
13
13
|
</metadata>
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
36ec128aff594d99762c041cb3167ae7
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
0b9d451f33e9527b8fe57c452f151823c6426440
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
c53d5ded52937f68bc9b4c071f7febd1d4025f459fe4864ab54649260ce0f370
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
6cd6e25b3fac5d11be1c4ace5d65cad06db2c48f86e6fc2fa252a953504b4c2586d3ffe064dea28e4bf8e9d65c3ff1db7898bd230123a774e7797068318e79db
|
package/Detox-ios-src.tbz
CHANGED
Binary file
|
package/Detox-ios.tbz
CHANGED
Binary file
|
package/android/build.gradle
CHANGED
@@ -3,11 +3,11 @@ buildscript {
|
|
3
3
|
|
4
4
|
ext {
|
5
5
|
isOfficialDetoxLib = true
|
6
|
-
kotlinVersion = '1.
|
6
|
+
kotlinVersion = '1.8.0'
|
7
7
|
dokkaVersion = '1.9.10'
|
8
|
-
buildToolsVersion = '
|
9
|
-
compileSdkVersion =
|
10
|
-
targetSdkVersion =
|
8
|
+
buildToolsVersion = '34.0.0'
|
9
|
+
compileSdkVersion = 34
|
10
|
+
targetSdkVersion = 34
|
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.
|
6
|
+
def _materialMinVersion = '1.11.0'
|
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.
|
68
|
+
println "see report at file://${t.reports.html.outputLocation}/index.html"
|
69
69
|
}
|
70
70
|
}
|
71
71
|
}
|
@@ -82,6 +82,26 @@ 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
|
+
}
|
85
105
|
}
|
86
106
|
|
87
107
|
// In a nutshell:
|
@@ -151,7 +171,7 @@ dependencies {
|
|
151
171
|
testImplementation 'org.assertj:assertj-core:3.16.1'
|
152
172
|
testImplementation "org.jetbrains.kotlin:kotlin-test:$_kotlinVersion"
|
153
173
|
testImplementation 'org.apache.commons:commons-io:1.3.2'
|
154
|
-
testImplementation 'org.mockito.kotlin:mockito-kotlin:
|
174
|
+
testImplementation 'org.mockito.kotlin:mockito-kotlin:5.2.1'
|
155
175
|
testImplementation 'org.robolectric:robolectric:4.11.1'
|
156
176
|
|
157
177
|
testImplementation("com.google.android.material:material:$_materialMinVersion") {
|
@@ -193,11 +193,11 @@ publishing {
|
|
193
193
|
|
194
194
|
// Register sources, javadoc as published artifacts (via equivalent tasks' output)
|
195
195
|
artifact sourcesJar
|
196
|
-
artifact dokkaDocJar
|
196
|
+
//artifact dokkaDocJar // waiting for dokka to fix https://github.com/Kotlin/dokka/issues/3153
|
197
197
|
|
198
198
|
// Also register source, javadoc as archive-artifacts, for signing
|
199
199
|
declareArchive sourcesJar
|
200
|
-
declareArchive dokkaDocJar
|
200
|
+
//declareArchive dokkaDocJar // waiting for dokka to fix https://github.com/Kotlin/dokka/issues/3153
|
201
201
|
|
202
202
|
// Add detox package metadata to the .pom
|
203
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
|
181
|
+
public static ViewAction adjustSliderToPosition(final Float newPosition) {
|
182
182
|
return new AdjustSliderToPositionAction(newPosition);
|
183
183
|
}
|
184
184
|
|
package/android/detox/src/full/java/com/wix/detox/espresso/action/AdjustSliderToPositionAction.kt
CHANGED
@@ -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:
|
13
|
+
class AdjustSliderToPositionAction(private val targetPositionPct: Float) : 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:
|
24
|
+
fun setProgressPct(valuePct: Float) {
|
25
25
|
val maxJSProgress = calcMaxJSProgress()
|
26
26
|
val valueJS = valuePct * maxJSProgress
|
27
|
-
setProgressJS(valueJS)
|
27
|
+
setProgressJS(valueJS.toFloat())
|
28
28
|
}
|
29
29
|
|
30
|
-
protected abstract fun setProgressJS(valueJS:
|
30
|
+
protected abstract fun setProgressJS(valueJS: Float)
|
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:
|
63
|
+
override fun setProgressJS(valueJS: Float) {
|
64
64
|
val reactSliderManager = Class.forName(CLASS_REACT_SLIDER_LEGACY_MANAGER).newInstance()
|
65
|
-
Reflect.on(reactSliderManager).call("updateProperties", slider, buildStyles("value", valueJS))
|
65
|
+
Reflect.on(reactSliderManager).call("updateProperties", slider, buildStyles("value", valueJS.toDouble()))
|
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:
|
72
|
+
override fun setProgressJS(valueJS: Float) {
|
73
73
|
val reactSliderManager = Class.forName(CLASS_REACT_SLIDER_COMMUNITY_MANAGER).newInstance()
|
74
74
|
Reflect.on(reactSliderManager).call("setValue", slider, valueJS)
|
75
75
|
}
|
@@ -3,6 +3,7 @@ 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
|
6
7
|
import org.mockito.kotlin.eq
|
7
8
|
import org.mockito.kotlin.mock
|
8
9
|
import org.mockito.kotlin.verify
|
@@ -42,16 +43,17 @@ object QueryStatusActionHandlerSpec : Spek({
|
|
42
43
|
}
|
43
44
|
|
44
45
|
describe("given a busy app") {
|
45
|
-
|
46
|
-
mock {
|
47
|
-
on { json() }.thenReturn(description)
|
48
|
-
}
|
46
|
+
|
49
47
|
|
50
48
|
fun aBusyResource(identifier: String): DetoxBusyResource {
|
51
|
-
|
52
|
-
return mock {
|
53
|
-
on { getDescription() }.
|
49
|
+
|
50
|
+
return mock<DetoxBusyResource.BusyIdlingResource> {
|
51
|
+
on { getDescription() } doReturn DetoxBusyResourceDescription.Builder()
|
52
|
+
.name("mock")
|
53
|
+
.addDescription("mock", identifier)
|
54
|
+
.build()
|
54
55
|
}
|
56
|
+
|
55
57
|
}
|
56
58
|
|
57
59
|
it("should send a descriptive busy-status indication") {
|
@@ -60,8 +62,8 @@ object QueryStatusActionHandlerSpec : Spek({
|
|
60
62
|
val expectedData = mapOf<String, Any>("status" to mapOf(
|
61
63
|
"app_status" to "busy",
|
62
64
|
"busy_resources" to listOf(
|
63
|
-
mapOf("mock" to "some-resource"),
|
64
|
-
mapOf("mock" to "yet-another-resource")
|
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"))
|
65
67
|
)
|
66
68
|
))
|
67
69
|
whenever(testEngineFacade.getAllBusyResources()).thenReturn(listOf(busyResource, busyResource2))
|
@@ -71,4 +73,4 @@ object QueryStatusActionHandlerSpec : Spek({
|
|
71
73
|
}
|
72
74
|
}
|
73
75
|
}
|
74
|
-
})
|
76
|
+
})
|
Binary file
|
@@ -1,7 +1,7 @@
|
|
1
|
-
#Sun Sep 15 22:36:02 IDT 2019
|
2
1
|
distributionBase=GRADLE_USER_HOME
|
3
2
|
distributionPath=wrapper/dists
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
4
|
+
networkTimeout=10000
|
5
|
+
validateDistributionUrl=true
|
4
6
|
zipStoreBase=GRADLE_USER_HOME
|
5
7
|
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
|
-
#!/
|
1
|
+
#!/bin/sh
|
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/
|
58
|
+
# https://github.com/gradle/gradle/blob/HEAD/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,13 +80,11 @@ do
|
|
80
80
|
esac
|
81
81
|
done
|
82
82
|
|
83
|
-
|
84
|
-
|
85
|
-
APP_NAME="Gradle"
|
83
|
+
# This is normally unused
|
84
|
+
# shellcheck disable=SC2034
|
86
85
|
APP_BASE_NAME=${0##*/}
|
87
|
-
|
88
|
-
|
89
|
-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
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
|
90
88
|
|
91
89
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
92
90
|
MAX_FD=maximum
|
@@ -133,22 +131,29 @@ location of your Java installation."
|
|
133
131
|
fi
|
134
132
|
else
|
135
133
|
JAVACMD=java
|
136
|
-
|
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.
|
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
|
140
141
|
fi
|
141
142
|
|
142
143
|
# Increase the maximum file descriptors if we can.
|
143
144
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
144
145
|
case $MAX_FD in #(
|
145
146
|
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
|
146
149
|
MAX_FD=$( ulimit -H -n ) ||
|
147
150
|
warn "Could not query maximum file descriptor limit"
|
148
151
|
esac
|
149
152
|
case $MAX_FD in #(
|
150
153
|
'' | soft) :;; #(
|
151
154
|
*)
|
155
|
+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
156
|
+
# shellcheck disable=SC3045
|
152
157
|
ulimit -n "$MAX_FD" ||
|
153
158
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
154
159
|
esac
|
@@ -193,6 +198,10 @@ if "$cygwin" || "$msys" ; then
|
|
193
198
|
done
|
194
199
|
fi
|
195
200
|
|
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
|
+
|
196
205
|
# Collect all arguments for the java command;
|
197
206
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
198
207
|
# shell script including quotes and variable substitutions, so put them in
|
@@ -205,6 +214,12 @@ set -- \
|
|
205
214
|
org.gradle.wrapper.GradleWrapperMain \
|
206
215
|
"$@"
|
207
216
|
|
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
|
+
|
208
223
|
# Use "xargs" to parse quoted args.
|
209
224
|
#
|
210
225
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
package/android/gradlew.bat
CHANGED
@@ -1,90 +1,92 @@
|
|
1
|
-
@
|
2
|
-
@rem
|
3
|
-
@rem
|
4
|
-
@rem
|
5
|
-
@rem
|
6
|
-
@rem
|
7
|
-
|
8
|
-
@rem
|
9
|
-
|
10
|
-
|
11
|
-
@rem
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
@rem
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
:
|
55
|
-
|
56
|
-
set
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
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
|
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
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
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
|
package/android/rninfo.gradle
CHANGED
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.
|
4
|
+
"version": "20.18.0",
|
5
5
|
"bin": {
|
6
6
|
"detox": "local-cli/cli.js"
|
7
7
|
},
|
@@ -34,8 +34,10 @@
|
|
34
34
|
"postinstall": "node scripts/postinstall.js"
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
|
-
"@react-native/
|
38
|
-
"@react-native/
|
37
|
+
"@react-native/babel-preset": "0.73.19",
|
38
|
+
"@react-native/eslint-config": "^0.73.2",
|
39
|
+
"@react-native/metro-config": "^0.73.3",
|
40
|
+
"@react-native/typescript-config": "0.73.1",
|
39
41
|
"@tsconfig/react-native": "^3.0.0",
|
40
42
|
"@types/bunyan": "^1.8.8",
|
41
43
|
"@types/child-process-promise": "^2.2.1",
|
@@ -53,11 +55,11 @@
|
|
53
55
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
54
56
|
"eslint-plugin-node": "^11.1.0",
|
55
57
|
"eslint-plugin-unicorn": "^50.0.1",
|
56
|
-
"jest": "^29.
|
57
|
-
"jest-allure2-reporter": "^2.0.0-beta.
|
58
|
+
"jest": "^29.6.3",
|
59
|
+
"jest-allure2-reporter": "^2.0.0-beta.5",
|
58
60
|
"metro-react-native-babel-preset": "0.76.8",
|
59
61
|
"prettier": "^3.1.1",
|
60
|
-
"react-native": "0.
|
62
|
+
"react-native": "0.73.2",
|
61
63
|
"react-native-codegen": "^0.0.8",
|
62
64
|
"typescript": "^5.3.3",
|
63
65
|
"wtfnode": "^0.9.1"
|
@@ -108,10 +110,10 @@
|
|
108
110
|
}
|
109
111
|
},
|
110
112
|
"engines": {
|
111
|
-
"node": ">=
|
113
|
+
"node": ">=18"
|
112
114
|
},
|
113
115
|
"browserslist": [
|
114
|
-
"node
|
116
|
+
"node 18"
|
115
117
|
],
|
116
|
-
"gitHead": "
|
118
|
+
"gitHead": "cbb93004fba5235a50a9ed33a4e65d04d8e0c1e4"
|
117
119
|
}
|
@@ -64,7 +64,8 @@ class DetoxCircusEnvironment extends WithEmitter(NodeEnvironment) {
|
|
64
64
|
WorkerAssignReporter,
|
65
65
|
});
|
66
66
|
|
67
|
-
|
67
|
+
// Artifacts flushing should be delayed to avoid conflicts with third-party reporters
|
68
|
+
this.testEvents.on('*', this._onTestEvent.bind(this), 1e6);
|
68
69
|
}
|
69
70
|
|
70
71
|
/** @override */
|
package/scripts/postinstall.js
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
+
const { setGradleVersionByRNVersion } = require('./updateGradle');
|
1
2
|
if (process.platform === 'darwin' && !process.env.DETOX_DISABLE_POSTINSTALL) {
|
2
3
|
require('child_process').execFileSync(`${__dirname}/build_framework.ios.sh`, {
|
3
4
|
stdio: 'inherit'
|
4
5
|
});
|
6
|
+
|
5
7
|
}
|
8
|
+
setGradleVersionByRNVersion();
|
@@ -0,0 +1,47 @@
|
|
1
|
+
const fs = require('fs');
|
2
|
+
const path = require('path');
|
3
|
+
|
4
|
+
const rnMinor = require('../test/e2e/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
|
+
};
|
@@ -216,7 +216,6 @@ 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 + ")"))));
|
220
219
|
return {
|
221
220
|
target: {
|
222
221
|
type: "Class",
|
@@ -224,7 +223,7 @@ class DetoxAction {
|
|
224
223
|
},
|
225
224
|
method: "adjustSliderToPosition",
|
226
225
|
args: [{
|
227
|
-
type: "
|
226
|
+
type: "Float",
|
228
227
|
value: newPosition
|
229
228
|
}]
|
230
229
|
};
|
@@ -10,9 +10,11 @@ const log = require('../utils/logger').child({ cat: 'config' });
|
|
10
10
|
|
11
11
|
async function locateExternalConfig(cwd) {
|
12
12
|
return findUp([
|
13
|
+
'.detoxrc.cjs',
|
13
14
|
'.detoxrc.js',
|
14
15
|
'.detoxrc.json',
|
15
16
|
'.detoxrc',
|
17
|
+
'detox.config.cjs',
|
16
18
|
'detox.config.js',
|
17
19
|
'detox.config.json',
|
18
20
|
'package.json',
|
@@ -20,7 +22,7 @@ async function locateExternalConfig(cwd) {
|
|
20
22
|
}
|
21
23
|
|
22
24
|
async function loadConfig(configPath) {
|
23
|
-
let config = path.extname(configPath)
|
25
|
+
let config = isJS(path.extname(configPath))
|
24
26
|
? require(configPath)
|
25
27
|
: JSON.parse(await fs.readFile(configPath, 'utf8'));
|
26
28
|
|
@@ -34,6 +36,10 @@ async function loadConfig(configPath) {
|
|
34
36
|
};
|
35
37
|
}
|
36
38
|
|
39
|
+
function isJS(ext) {
|
40
|
+
return ext === '.js' || ext === '.cjs';
|
41
|
+
}
|
42
|
+
|
37
43
|
async function resolveConfigPath(configPath, cwd) {
|
38
44
|
if (!configPath) {
|
39
45
|
return locateExternalConfig(cwd);
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
a551dd71cb2866b9c3644d223a1e67f2
|
@@ -1 +0,0 @@
|
|
1
|
-
5e13ec2e09a4ec836d509e1f26b8830bccff57e1
|
@@ -1 +0,0 @@
|
|
1
|
-
28bc092a04a84decee6229368d49b9277c93e42d4951a14e0503f9f8764489c2
|
@@ -1 +0,0 @@
|
|
1
|
-
68a2fb22a2ef50c013b40277a9efcae2809a270f0cbaa3a5f39992408e18cae38d8272867745a7113d80ebf45a7671b6cb0f895b7e21ff67ef32dfcdd2592f1f
|
@@ -1 +0,0 @@
|
|
1
|
-
b1e2678b7d169507d6e2bbfb292ed8b7
|
@@ -1 +0,0 @@
|
|
1
|
-
b884d88d28d080b21f850b8a5e1d5d8d910ddf19
|
@@ -1 +0,0 @@
|
|
1
|
-
b448a08851a1c742b58f4742ecb9b0e6d0ae9ba3657b9e9c6d5756c2b280a30c
|
@@ -1 +0,0 @@
|
|
1
|
-
2e79a35a76feca4e6c8b545583145c67e5f9eae1e0b9281c5020eaa3ef58aafa8fe55dbc7fbc937a0be8213b19e3ac8cccf3486dbb7ae3ecc20279749a9b4b4c
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
cbf6fdff7b21720bd0d4233470855e61
|
@@ -1 +0,0 @@
|
|
1
|
-
b94fb7d24ad48c522b39356c2571f528c7558f6d
|
@@ -1 +0,0 @@
|
|
1
|
-
b287b96336bda839a223ecd80cecfcfd35c54169f1e5785d371ccf37f02a517d
|
@@ -1 +0,0 @@
|
|
1
|
-
f8aae72e64396f3e405b10639bfd56d6a189c56895056821194b0eea05e72e0ba5374853845e22a478429acd0e7dd446b18f3c5a58add3d758bd21490b87e7aa
|
@@ -1 +0,0 @@
|
|
1
|
-
d705ab1414499be68e22fe03b97a612c
|
@@ -1 +0,0 @@
|
|
1
|
-
ca3a8a0d6cd878c92ffbf1ecaab40455df038b26
|
@@ -1 +0,0 @@
|
|
1
|
-
df89b69cb3a307bfcff1d221e07a14c1d53afdd7c99b83010b8f505a973a2efe
|
@@ -1 +0,0 @@
|
|
1
|
-
c72717437ddcc1b0a78a66f322d205c3999a69516eebc8775d7ec41c9afd33766d7b04c18eda77484a559a36e5ba6161730ae4f81e87bf4ebb5baf5c9f1b3876
|