detox 20.0.6-breaking.new-global-lifecycle.0 → 20.0.9-prerelease.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.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0-javadoc.jar → 20.0.9-prerelease.0/detox-20.0.9-prerelease.0-javadoc.jar} +0 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-javadoc.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-javadoc.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-javadoc.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-javadoc.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0-sources.jar → 20.0.9-prerelease.0/detox-20.0.9-prerelease.0-sources.jar} +0 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-sources.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-sources.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-sources.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-sources.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0.aar +0 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0.aar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0.aar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0.aar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0.aar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0.pom → 20.0.9-prerelease.0/detox-20.0.9-prerelease.0.pom} +1 -7
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0.pom.md5 +1 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0.pom.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0.pom.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.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 +12 -6
- package/android/detox/build.gradle +13 -9
- package/android/detox/proguard-rules-app.pro +4 -0
- package/android/detox/publishing.gradle +27 -27
- package/android/detox/src/full/java/com/wix/detox/DetoxCrashHandler.kt +1 -1
- package/android/detox/src/full/java/com/wix/detox/LaunchArgs.java +9 -0
- package/android/detox/src/full/java/com/wix/detox/TestEngineFacade.kt +1 -1
- package/android/detox/src/full/java/com/wix/detox/reactnative/ReactNativeExtension.kt +15 -2
- package/android/detox/src/full/java/com/wix/detox/reactnative/ReactNativeIdlingResources.kt +43 -38
- package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/timers/DelegatedIdleInterrogationStrategy.kt +7 -27
- package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/timers/IdleInterrogationStrategy.kt +1 -11
- package/android/detox/src/main/java/com/wix/detox/common/TextFileReader.kt +1 -1
- package/android/detox/src/testFull/java/com/wix/detox/espresso/action/DetoxMultiTapSpec.kt +4 -3
- package/android/detox/src/testFull/java/com/wix/detox/reactnative/idlingresources/timers/DelegatedIdleInterrogationStrategySpec.kt +3 -11
- package/index.d.ts +21 -1
- package/internals.d.ts +11 -0
- package/local-cli/test.js +9 -4
- package/local-cli/testCommand/TestRunnerCommand.js +2 -3
- package/package.json +3 -3
- package/runners/jest/testEnvironment/index.js +3 -2
- package/src/DetoxWorker.js +0 -6
- package/src/android/core/NativeElement.js +56 -20
- package/src/android/core/NativeExpect.js +28 -9
- package/src/android/interactions/native.js +24 -18
- package/src/artifacts/timeline/TimelineContextTypes.js +7 -0
- package/src/client/Client.js +18 -1
- package/src/configuration/composeRunnerConfig.js +1 -0
- package/src/devices/common/drivers/android/tools/MonitoredInstrumentation.js +1 -1
- package/src/devices/common/drivers/ios/tools/AppleSimUtils.js +3 -1
- package/src/devices/runtime/RuntimeDevice.js +2 -4
- package/src/devices/runtime/drivers/android/AndroidDriver.js +9 -1
- package/src/ios/expectTwo.js +152 -67
- package/src/logger/DetoxLogger.js +5 -1
- package/src/{utils → logger/utils}/streamUtils.js +28 -1
- package/src/logger/utils/tracerLegacy.js +24 -1
- package/src/realms/DetoxContext.js +8 -0
- package/src/realms/DetoxInternalsFacade.js +1 -1
- package/src/realms/DetoxPrimaryContext.js +9 -10
- package/src/symbols.js +2 -0
- package/src/utils/errorUtils.js +4 -3
- package/src/utils/invocationTraceDescriptions.js +43 -0
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0-javadoc.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0-javadoc.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0-javadoc.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0-javadoc.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0-sources.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0-sources.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0-sources.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0-sources.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0.aar +0 -0
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0.aar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0.aar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0.aar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0.aar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0.pom.md5 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0.pom.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0.pom.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.0.6-breaking.new-global-lifecycle.0/detox-20.0.6-breaking.new-global-lifecycle.0.pom.sha512 +0 -1
- package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/timers/DefaultIdleInterrogationStrategy.kt +0 -84
- package/android/detox/src/testFull/java/com/wix/detox/reactnative/idlingresources/timers/DefaultIdleInterrogationStrategySpec.kt +0 -115
package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-javadoc.jar.md5
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
6906392775142d3c871c2e34dc893430
|
package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-javadoc.jar.sha1
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
479a8a437141b197d5f9cbfbd03bd5936db53c90
|
package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-javadoc.jar.sha256
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
d2faa54168f473cdd6a8722f3ec7c59712008702b1554274cc19305827cf7fe4
|
package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-javadoc.jar.sha512
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
a2bcad3ee3323b9f83008b71bcba34bf26e46d8dd212a2713b194c6849cd466dddb4779bafad829a34243c0b1c2d8b6c266dfedd586bb1dfa859e081eccd0945
|
package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-sources.jar.md5
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
24da53d693933a5abf0bdd87dd2600f4
|
package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-sources.jar.sha1
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0df7c293d7fae97a8babb9e837b77ad4fe6e3b10
|
package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-sources.jar.sha256
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
72d1d1c6c448733647d734e08cba3aa9c3aa8c3cf3c4f8d3d5991ef5862929d0
|
package/Detox-android/com/wix/detox/20.0.9-prerelease.0/detox-20.0.9-prerelease.0-sources.jar.sha512
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
d3e516eab1667f4225ab6274560001a7276cf83c857050e6d3dd18659991295336cc537a4641b5e9df69f4d0a6e0587351b54f4324a5b543a24c886be7809151
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
7a46662622c24f8677074374fd81b604
|
@@ -0,0 +1 @@
|
|
1
|
+
43bfd8fb25e7b0c24e0d1ed4b250f138b8f21537
|
@@ -0,0 +1 @@
|
|
1
|
+
0df8f8ebf03215da2f15fe8e6a093b65dd808d6870b69eabbb4ae8f680b18bdc
|
@@ -0,0 +1 @@
|
|
1
|
+
e0721afc0568f85c754e4741cc58a885a77c8f6f485b9eda322290d906eae9707473016ca97ea6cef6583c9f98e82622dd13343d0fa5a7f9d77daf62f97791df
|
@@ -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.0.
|
6
|
+
<version>20.0.9-prerelease.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>
|
@@ -60,12 +60,6 @@
|
|
60
60
|
<version>2.2.0</version>
|
61
61
|
<scope>compile</scope>
|
62
62
|
</dependency>
|
63
|
-
<dependency>
|
64
|
-
<groupId>org.jetbrains.kotlin</groupId>
|
65
|
-
<artifactId>kotlin-android-extensions-runtime</artifactId>
|
66
|
-
<version>1.3.72</version>
|
67
|
-
<scope>runtime</scope>
|
68
|
-
</dependency>
|
69
63
|
<dependency>
|
70
64
|
<groupId>org.jetbrains.kotlin</groupId>
|
71
65
|
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
@@ -0,0 +1 @@
|
|
1
|
+
77932be77cbd2ba95da1a87343bf21b5
|
@@ -0,0 +1 @@
|
|
1
|
+
5fc8d9a54e4caaa793e781e8399670e097f6720b
|
@@ -0,0 +1 @@
|
|
1
|
+
799f03c9e88873767c88547cb753f1c222f47a4b7b3d9e1983cc7c46d3fc8c24
|
@@ -0,0 +1 @@
|
|
1
|
+
9f39874f93ac8ddd1af9db2bb62fd17ff6b5af94d8e32c3474b029a604f53471d70247f46d496369262797e0ae230cd83d8d6d8fd91b72ec9b94689b9232a4f7
|
@@ -3,11 +3,11 @@
|
|
3
3
|
<groupId>com.wix</groupId>
|
4
4
|
<artifactId>detox</artifactId>
|
5
5
|
<versioning>
|
6
|
-
<latest>20.0.
|
7
|
-
<release>20.0.
|
6
|
+
<latest>20.0.9-prerelease.0</latest>
|
7
|
+
<release>20.0.9-prerelease.0</release>
|
8
8
|
<versions>
|
9
|
-
<version>20.0.
|
9
|
+
<version>20.0.9-prerelease.0</version>
|
10
10
|
</versions>
|
11
|
-
<lastUpdated>
|
11
|
+
<lastUpdated>20220908132030</lastUpdated>
|
12
12
|
</versioning>
|
13
13
|
</metadata>
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
a912933c6edc8a76b5b7fe0cf3bcfff5
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
ad34a193510b0fdadf237b9cfc974ddbb723cc2a
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
ce9234863e7d5b7481fea1ddebd7affac948f79e80fa95ba80ad48bed1783ce6
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
6d405dfa8baaef3382ef88476d38f42c43713091030713c2f66ee03e56726e34f57a23427a7f91fda0f95631bdc8506d4c04ed7db02fa5df48b03ead85920d20
|
package/Detox-ios-src.tbz
CHANGED
Binary file
|
package/Detox-ios.tbz
CHANGED
Binary file
|
package/android/build.gradle
CHANGED
@@ -1,12 +1,20 @@
|
|
1
1
|
buildscript {
|
2
2
|
ext {
|
3
3
|
isOfficialDetoxLib = true
|
4
|
-
kotlinVersion = '1.
|
4
|
+
kotlinVersion = '1.6.10' // Aligned with RN .69's version bump
|
5
5
|
dokkaVersion = '1.6.0'
|
6
6
|
buildToolsVersion = '31.0.0'
|
7
7
|
compileSdkVersion = 31
|
8
8
|
targetSdkVersion = 31
|
9
9
|
minSdkVersion = 21
|
10
|
+
|
11
|
+
if (System.properties['os.arch'] == "aarch64") {
|
12
|
+
// For M1 Users we need to use the NDK 24 which added support for aarch64
|
13
|
+
ndkVersion = "24.0.8215888"
|
14
|
+
} else {
|
15
|
+
// Otherwise we default to the side-by-side NDK version from AGP.
|
16
|
+
ndkVersion = "21.4.7075529"
|
17
|
+
}
|
10
18
|
}
|
11
19
|
ext.detoxKotlinVersion = ext.kotlinVersion
|
12
20
|
|
@@ -15,14 +23,12 @@ buildscript {
|
|
15
23
|
google()
|
16
24
|
}
|
17
25
|
dependencies {
|
18
|
-
classpath 'com.android.tools.build:gradle:7.
|
26
|
+
classpath 'com.android.tools.build:gradle:7.1.1'
|
19
27
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
20
28
|
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion"
|
21
29
|
|
22
|
-
|
23
|
-
|
24
|
-
classpath 'de.mannodermaus.gradle.plugins:android-junit5:1.7.1.1'
|
25
|
-
}
|
30
|
+
// Needed by Spek (https://spekframework.org/setup-android)
|
31
|
+
classpath 'de.mannodermaus.gradle.plugins:android-junit5:1.7.1.1'
|
26
32
|
}
|
27
33
|
}
|
28
34
|
|
@@ -1,13 +1,15 @@
|
|
1
1
|
apply plugin: 'com.android.library'
|
2
2
|
apply plugin: 'kotlin-android'
|
3
|
-
|
3
|
+
|
4
|
+
def _kotlinMinVersion = '1.2.0'
|
5
|
+
def _materialMinVersion = '1.2.1'
|
4
6
|
|
5
7
|
def _ext = rootProject.ext
|
6
8
|
def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 31
|
7
9
|
def _targetSdkVersion = _ext.has('targetSdkVersion') ? _ext.targetSdkVersion : 31
|
8
|
-
def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion :
|
10
|
+
def _buildToolsVersion = _ext.has('buildToolsVersion') ? _ext.buildToolsVersion : '31.0.0'
|
9
11
|
def _minSdkVersion = _ext.has('minSdkVersion') ? _ext.minSdkVersion : 21
|
10
|
-
def _kotlinVersion = _ext.has('detoxKotlinVersion') ? _ext.detoxKotlinVersion :
|
12
|
+
def _kotlinVersion = _ext.has('detoxKotlinVersion') ? _ext.detoxKotlinVersion : _kotlinMinVersion
|
11
13
|
def _kotlinStdlib = _ext.has('detoxKotlinStdlib') ? _ext.detoxKotlinStdlib : 'kotlin-stdlib-jdk8'
|
12
14
|
|
13
15
|
android {
|
@@ -75,7 +77,8 @@ android {
|
|
75
77
|
|
76
78
|
// Fundamental deps.
|
77
79
|
dependencies {
|
78
|
-
implementation "org.jetbrains.kotlin:$_kotlinStdlib:$
|
80
|
+
implementation "org.jetbrains.kotlin:$_kotlinStdlib:$_kotlinMinVersion"
|
81
|
+
//noinspection GradleDynamicVersion
|
79
82
|
compileOnly 'com.facebook.react:react-native:+'
|
80
83
|
}
|
81
84
|
|
@@ -108,7 +111,7 @@ dependencies {
|
|
108
111
|
|
109
112
|
// Third-party/extension deps.
|
110
113
|
dependencies {
|
111
|
-
implementation(
|
114
|
+
implementation("com.google.android.material:material:$_materialMinVersion") {
|
112
115
|
because 'Material components are mentioned explicitly (e.g. Slider in get-attributes handler)'
|
113
116
|
}
|
114
117
|
implementation('org.apache.commons:commons-lang3:3.7') {
|
@@ -121,11 +124,11 @@ dependencies {
|
|
121
124
|
|
122
125
|
// Unit-testing deps.
|
123
126
|
dependencies {
|
127
|
+
//noinspection GradleDynamicVersion
|
124
128
|
testImplementation 'com.facebook.react:react-native:+'
|
125
129
|
testImplementation 'org.json:json:20140107'
|
126
130
|
|
127
131
|
// https://github.com/spekframework/spek/issues/232#issuecomment-610732158
|
128
|
-
// testImplementation 'junit:junit:4.13.2'
|
129
132
|
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.6.0'
|
130
133
|
|
131
134
|
testImplementation 'org.assertj:assertj-core:3.16.1'
|
@@ -136,9 +139,9 @@ dependencies {
|
|
136
139
|
}
|
137
140
|
|
138
141
|
// Spek (https://spekframework.org/setup-android)
|
139
|
-
if (
|
140
|
-
|
141
|
-
|
142
|
+
if (rootProject.hasProperty('isOfficialDetoxLib') ||
|
143
|
+
rootProject.hasProperty('isOfficialDetoxApp')) {
|
144
|
+
|
142
145
|
apply plugin: 'de.mannodermaus.android-junit5'
|
143
146
|
|
144
147
|
android {
|
@@ -164,3 +167,4 @@ if (!rootProject.hasProperty('suppressUnitTests') &&
|
|
164
167
|
if (rootProject.hasProperty('isOfficialDetoxLib')) {
|
165
168
|
apply from: './publishing.gradle'
|
166
169
|
}
|
170
|
+
|
@@ -6,6 +6,10 @@
|
|
6
6
|
-keep class com.facebook.react.ReactNativeHost { *; }
|
7
7
|
-keep class com.facebook.react.ReactInstanceManager { *; }
|
8
8
|
-keep class com.facebook.react.ReactInstanceManager** { *; }
|
9
|
+
-keep class com.facebook.react.ReactInstanceEventListener { *; }
|
10
|
+
|
11
|
+
-keep class com.facebook.react.views.slider.ReactSlider { *; }
|
12
|
+
-keep class com.reactnativecommunity.slider.ReactSlider { *; }
|
9
13
|
-keep class com.reactnativecommunity.asyncstorage.** { *; }
|
10
14
|
|
11
15
|
-keep class kotlin.jvm.** { *; }
|
@@ -18,6 +18,7 @@ def DEVELOPERS = [
|
|
18
18
|
String _versionName = System.getProperty('version')
|
19
19
|
String _flavour = System.getProperty('buildFlavour', PUB_FLAVOUR_FULL_DETOX)
|
20
20
|
Boolean _forceLocal = System.getProperty('forceLocal', 'false').toBoolean()
|
21
|
+
Boolean _forceSign = System.getProperty('forceSign', 'false').toBoolean()
|
21
22
|
|
22
23
|
String _mavenRepoUrl
|
23
24
|
Map _mavenCredentials
|
@@ -28,7 +29,7 @@ def _selectedVariant
|
|
28
29
|
def initLocalPublishing = {
|
29
30
|
_mavenRepoUrl = TARGET_LOCAL_DIR
|
30
31
|
_mavenCredentials = null
|
31
|
-
_shouldSignArtifacts =
|
32
|
+
_shouldSignArtifacts = _forceSign
|
32
33
|
}
|
33
34
|
|
34
35
|
def initMavenPublishing = {
|
@@ -71,10 +72,8 @@ def shouldPublishVariant = {
|
|
71
72
|
}
|
72
73
|
|
73
74
|
def declareArchive = { target ->
|
74
|
-
|
75
|
-
|
76
|
-
archives target
|
77
|
-
}
|
75
|
+
project.artifacts {
|
76
|
+
archives target
|
78
77
|
}
|
79
78
|
}
|
80
79
|
|
@@ -103,12 +102,12 @@ tasks.named("dokkaJavadoc") {
|
|
103
102
|
}
|
104
103
|
}
|
105
104
|
}
|
106
|
-
// Side note / TODO:
|
107
|
-
// Dokka outputs R and BuildConfig; currently, there's nothing to do about it, as issues such as
|
108
|
-
// this on - https://github.com/Kotlin/dokka/issues/419 are still open :-/
|
109
|
-
// We might want to revisit this in the future -- see if they've decided to export a custom classes
|
110
|
-
// suppression config var or something.
|
111
105
|
|
106
|
+
// Side note / TODO (revisit because dokka's 419 issue has been resolved, since):
|
107
|
+
// Dokka outputs R and BuildConfig; currently, there's nothing to do about it, as issues such as
|
108
|
+
// this on - https://github.com/Kotlin/dokka/issues/419 are still open :-/
|
109
|
+
// We might want to revisit this in the future -- see if they've decided to export a custom classes
|
110
|
+
// suppression config var or something.
|
112
111
|
task dokkaDocJar(type: Jar, dependsOn: dokkaJavadoc) {
|
113
112
|
from "$buildDir/dokkaDoc"
|
114
113
|
classifier = 'javadoc'
|
@@ -143,7 +142,7 @@ project.afterEvaluate {
|
|
143
142
|
android {
|
144
143
|
libraryVariants.all { variant ->
|
145
144
|
String variantName = variant.name.capitalize()
|
146
|
-
if (task.name == "publishMaven${variantName}AarPublicationToMavenRepository") {
|
145
|
+
if (task.name == "publishMaven${variantName}AarPublicationToMavenRepository".toString()) {
|
147
146
|
task.dependsOn "assemble${variantName}"
|
148
147
|
task.dependsOn project.tasks.signArchives
|
149
148
|
task.doFirst {
|
@@ -245,22 +244,23 @@ publishing {
|
|
245
244
|
}
|
246
245
|
}
|
247
246
|
|
248
|
-
// Register all artifacts we've previously registered as archives (i.e. .jar.asc's, .aar.asc's) as
|
249
|
-
// Note: this relies on preregistering the equivalent generator-tasks as archive artifacts
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
247
|
+
// Register all artifacts we've previously registered as signed archives (i.e. .jar.asc's, .aar.asc's) as publish-artifacts.
|
248
|
+
// Note: this relies on preregistering the equivalent generator-tasks as archive artifacts inside a project.artifacts { ... } clause.
|
249
|
+
if (_shouldSignArtifacts) {
|
250
|
+
project.tasks.signArchives.signatureFiles.each {
|
251
|
+
artifact(it) {
|
252
|
+
def matcherSrcDocs = (it.file =~ /-(sources|javadoc)\.jar\.asc$/)
|
253
|
+
def matcherAAR = (it.file =~ /\.aar\.asc$/)
|
254
|
+
if (matcherSrcDocs.find()) {
|
255
|
+
classifier = matcherSrcDocs.group(1)
|
256
|
+
extension = 'jar.asc'
|
257
|
+
} else if (matcherAAR.find()) {
|
258
|
+
classifier = null
|
259
|
+
extension = 'aar.asc'
|
260
|
+
} else {
|
261
|
+
classifier = null
|
262
|
+
extension = null
|
263
|
+
}
|
264
264
|
}
|
265
265
|
}
|
266
266
|
}
|
@@ -6,7 +6,7 @@ import com.wix.detox.adapters.server.OutboundServerAdapter
|
|
6
6
|
class DetoxCrashHandler(private val outboundServerAdapter: OutboundServerAdapter) {
|
7
7
|
fun attach() {
|
8
8
|
Thread.setDefaultUncaughtExceptionHandler { thread, exception ->
|
9
|
-
Log.e(LOG_TAG, "Crash detected!!! thread=${thread.name} (${thread.id})")
|
9
|
+
Log.e(LOG_TAG, "Crash detected!!! thread=${thread.name} (${thread.id})", exception)
|
10
10
|
|
11
11
|
val crashInfo = mapOf("errorDetails" to "@Thread ${thread.name}(${thread.id}):\n${Log.getStackTraceString(exception)}\nCheck device logs for full details!")
|
12
12
|
outboundServerAdapter.sendMessage(ACTION_NAME, crashInfo, MESSAGE_ID)
|
@@ -14,6 +14,7 @@ public class LaunchArgs {
|
|
14
14
|
private static final String DETOX_NOTIFICATION_PATH_ARG = "detoxUserNotificationDataURL";
|
15
15
|
private static final String DETOX_BLACKLIST_URLS_ARG = "detoxURLBlacklistRegex";
|
16
16
|
private static final String DETOX_URL_OVERRIDE_ARG = "detoxURLOverride";
|
17
|
+
private static final String DETOX_ENABLE_SYNCHRONIZATION = "detoxEnableSynchronization";
|
17
18
|
private static final List<String> RESERVED_INSTRUMENTATION_ARGS = Arrays.asList("class", "package", "func", "unit", "size", "perf", "debug", "log", "emma", "coverageFile");
|
18
19
|
|
19
20
|
public boolean hasNotificationPath() {
|
@@ -36,6 +37,14 @@ public class LaunchArgs {
|
|
36
37
|
return InstrumentationRegistry.getArguments().containsKey(DETOX_BLACKLIST_URLS_ARG);
|
37
38
|
}
|
38
39
|
|
40
|
+
public String getEnableSynchronization() {
|
41
|
+
return InstrumentationRegistry.getArguments().getString(DETOX_ENABLE_SYNCHRONIZATION);
|
42
|
+
}
|
43
|
+
|
44
|
+
public boolean hasEnableSynchronization() {
|
45
|
+
return InstrumentationRegistry.getArguments().containsKey(DETOX_ENABLE_SYNCHRONIZATION);
|
46
|
+
}
|
47
|
+
|
39
48
|
public String getUrlOverride() {
|
40
49
|
return InstrumentationRegistry.getArguments().getString(DETOX_URL_OVERRIDE_ARG);
|
41
50
|
}
|
@@ -10,7 +10,7 @@ import com.wix.detox.reactnative.ReactNativeExtension
|
|
10
10
|
|
11
11
|
class TestEngineFacade {
|
12
12
|
fun awaitIdle(): Unit? = Espresso.onIdle() {
|
13
|
-
Log.i(LOG_TAG, "Wait is over:
|
13
|
+
Log.i(LOG_TAG, "Wait is over: App is now idle!")
|
14
14
|
null
|
15
15
|
}
|
16
16
|
fun syncIdle() = UiAutomatorHelper.espressoSync() // TODO Check whether this can be replaced with #awaitIdle()
|
@@ -39,7 +39,7 @@ object ReactNativeExtension {
|
|
39
39
|
reloadReactNativeInBackground(it)
|
40
40
|
val reactContext = awaitNewReactNativeContext(it, previousReactContext)
|
41
41
|
|
42
|
-
|
42
|
+
enableOrDisableSynchronization(reactContext, networkSyncEnabled)
|
43
43
|
hackRN50OrHigherWaitForReady()
|
44
44
|
}
|
45
45
|
}
|
@@ -58,7 +58,7 @@ object ReactNativeExtension {
|
|
58
58
|
(applicationContext as ReactApplication).let {
|
59
59
|
val reactContext = awaitNewReactNativeContext(it, null)
|
60
60
|
|
61
|
-
|
61
|
+
enableOrDisableSynchronization(reactContext)
|
62
62
|
hackRN50OrHigherWaitForReady()
|
63
63
|
}
|
64
64
|
}
|
@@ -124,6 +124,19 @@ object ReactNativeExtension {
|
|
124
124
|
return rnLoadingMonitor.getNewContext()!!
|
125
125
|
}
|
126
126
|
|
127
|
+
private fun enableOrDisableSynchronization(reactContext: ReactContext, networkSyncEnabled: Boolean = true) {
|
128
|
+
if (shouldDisableSynchronization()) {
|
129
|
+
clearAllSynchronization()
|
130
|
+
} else {
|
131
|
+
setupIdlingResources(reactContext, networkSyncEnabled)
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
private fun shouldDisableSynchronization(): Boolean {
|
136
|
+
val launchArgs = LaunchArgs()
|
137
|
+
return launchArgs.hasEnableSynchronization() && launchArgs.enableSynchronization.equals("0")
|
138
|
+
}
|
139
|
+
|
127
140
|
private fun setupIdlingResources(reactContext: ReactContext, networkSyncEnabled: Boolean = true) {
|
128
141
|
val launchArgs = LaunchArgs()
|
129
142
|
|
@@ -2,6 +2,7 @@ package com.wix.detox.reactnative
|
|
2
2
|
|
3
3
|
import android.os.Looper
|
4
4
|
import android.util.Log
|
5
|
+
import androidx.test.espresso.Espresso
|
5
6
|
import androidx.test.espresso.IdlingRegistry
|
6
7
|
import androidx.test.espresso.base.IdlingResourceRegistry
|
7
8
|
import com.facebook.react.bridge.ReactContext
|
@@ -12,7 +13,6 @@ import com.wix.detox.reactnative.idlingresources.timers.getInterrogationStrategy
|
|
12
13
|
import com.wix.detox.reactnative.idlingresources.uimodule.UIModuleIdlingResource
|
13
14
|
import org.joor.Reflect
|
14
15
|
import org.joor.ReflectException
|
15
|
-
import java.util.Set
|
16
16
|
|
17
17
|
private const val LOG_TAG = "DetoxRNIdleRes"
|
18
18
|
|
@@ -46,15 +46,11 @@ private class MQThreadReflected(private val queue: Any?, private val queueName:
|
|
46
46
|
}
|
47
47
|
|
48
48
|
class ReactNativeIdlingResources constructor(
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
{
|
55
|
-
|
49
|
+
private val reactContext: ReactContext,
|
50
|
+
private var launchArgs: LaunchArgs,
|
51
|
+
internal var networkSyncEnabled: Boolean = true
|
52
|
+
) {
|
56
53
|
companion object {
|
57
|
-
private const val FIELD_UI_BG_MSG_QUEUE = "mUiBackgroundMessageQueueThread"
|
58
54
|
private const val FIELD_NATIVE_MODULES_MSG_QUEUE = "mNativeModulesMessageQueueThread"
|
59
55
|
private const val FIELD_JS_MSG_QUEUE = "mJSMessageQueueThread"
|
60
56
|
}
|
@@ -69,17 +65,11 @@ class ReactNativeIdlingResources constructor(
|
|
69
65
|
|
70
66
|
fun registerAll() {
|
71
67
|
Log.i(LOG_TAG, "Setting up Espresso Idling Resources for React Native")
|
72
|
-
|
73
68
|
unregisterAll()
|
74
69
|
|
75
|
-
|
76
|
-
val blacklistUrls = launchArgs.getURLBlacklist()
|
77
|
-
setBlacklistUrls(blacklistUrls)
|
78
|
-
}
|
79
|
-
|
70
|
+
setupUrlBlacklist()
|
80
71
|
setupMQThreadsInterrogators()
|
81
72
|
syncIdlingResources()
|
82
|
-
|
83
73
|
setupCustomRNIdlingResources()
|
84
74
|
syncIdlingResources()
|
85
75
|
}
|
@@ -108,28 +98,42 @@ class ReactNativeIdlingResources constructor(
|
|
108
98
|
networkIdlingResource?.resume()
|
109
99
|
}
|
110
100
|
}
|
101
|
+
|
111
102
|
fun pauseRNTimersIdlingResource() = timersIdlingResource?.pause()
|
112
103
|
fun resumeRNTimersIdlingResource() = timersIdlingResource?.resume()
|
113
104
|
fun pauseUIIdlingResource() = uiModuleIdlingResource?.pause()
|
114
105
|
fun resumeUIIdlingResource() = uiModuleIdlingResource?.resume()
|
115
|
-
|
116
|
-
fun
|
106
|
+
|
107
|
+
fun setBlacklistUrls(urlList: String) {
|
108
|
+
setIldingResourceBlacklist(urlList)
|
109
|
+
}
|
110
|
+
|
111
|
+
private fun setIldingResourceBlacklist(urlList: String) {
|
112
|
+
val urlArray = toFormattedUrlArray(urlList)
|
113
|
+
NetworkIdlingResource.setURLBlacklist(urlArray)
|
114
|
+
}
|
117
115
|
|
118
116
|
private fun setupMQThreadsInterrogators() {
|
119
117
|
if (IdlingRegistry.getInstance().loopers.isEmpty()) {
|
120
118
|
val mqThreadsReflector = MQThreadsReflector(reactContext)
|
121
|
-
// val mqUIBackground = mqThreadsReflector.getQueue(FIELD_UI_BG_MSG_QUEUE)?.getLooper() TODO
|
122
119
|
val mqJS = mqThreadsReflector.getQueue(FIELD_JS_MSG_QUEUE)?.getLooper()
|
123
|
-
val mqNativeModules =
|
120
|
+
val mqNativeModules =
|
121
|
+
mqThreadsReflector.getQueue(FIELD_NATIVE_MODULES_MSG_QUEUE)?.getLooper()
|
124
122
|
|
125
123
|
IdlingRegistry.getInstance().apply {
|
126
|
-
// registerLooperAsIdlingResource(mqUIBackground)
|
127
124
|
registerLooperAsIdlingResource(mqJS)
|
128
125
|
registerLooperAsIdlingResource(mqNativeModules)
|
129
126
|
}
|
130
127
|
}
|
131
128
|
}
|
132
129
|
|
130
|
+
private fun setupUrlBlacklist() {
|
131
|
+
if (launchArgs.hasURLBlacklist()) {
|
132
|
+
val blacklistUrls = launchArgs.urlBlacklist
|
133
|
+
setIldingResourceBlacklist(blacklistUrls)
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
133
137
|
private fun setupCustomRNIdlingResources() {
|
134
138
|
rnBridgeIdlingResource = BridgeIdlingResource(reactContext)
|
135
139
|
timersIdlingResource = TimersIdlingResource(getInterrogationStrategy(reactContext)!!)
|
@@ -151,13 +155,16 @@ class ReactNativeIdlingResources constructor(
|
|
151
155
|
|
152
156
|
private fun syncIdlingResources() {
|
153
157
|
IdlingRegistry.getInstance().apply {
|
154
|
-
val irr: IdlingResourceRegistry =
|
158
|
+
val irr: IdlingResourceRegistry =
|
159
|
+
Reflect.on(Espresso::class.java).field("baseRegistry").get()
|
155
160
|
irr.sync(this.resources, this.loopers)
|
156
161
|
}
|
157
162
|
}
|
158
163
|
|
159
164
|
private fun unregisterMQThreadsInterrogators() {
|
160
|
-
|
165
|
+
val idlingResourceInstance = IdlingRegistry.getInstance()
|
166
|
+
val loopersField = Reflect.on(idlingResourceInstance).field("loopers")
|
167
|
+
loopersField.get<MutableSet<Any>>().clear()
|
161
168
|
}
|
162
169
|
|
163
170
|
private fun unregisterCustomRNIdlingResources() {
|
@@ -166,7 +173,8 @@ class ReactNativeIdlingResources constructor(
|
|
166
173
|
timersIdlingResource,
|
167
174
|
rnBridgeIdlingResource,
|
168
175
|
uiModuleIdlingResource,
|
169
|
-
animIdlingResource
|
176
|
+
animIdlingResource
|
177
|
+
)
|
170
178
|
rnBridgeIdlingResource?.onDetach()
|
171
179
|
|
172
180
|
removeNetworkIdlingResource()
|
@@ -174,13 +182,15 @@ class ReactNativeIdlingResources constructor(
|
|
174
182
|
}
|
175
183
|
|
176
184
|
private fun setupAsyncStorageIdlingResource() {
|
177
|
-
asyncStorageIdlingResource =
|
178
|
-
|
179
|
-
|
185
|
+
asyncStorageIdlingResource =
|
186
|
+
AsyncStorageIdlingResource.createIfNeeded(reactContext, false)?.also {
|
187
|
+
IdlingRegistry.getInstance().register(it)
|
188
|
+
}
|
180
189
|
|
181
|
-
legacyAsyncStorageIdlingResource =
|
182
|
-
|
183
|
-
|
190
|
+
legacyAsyncStorageIdlingResource =
|
191
|
+
AsyncStorageIdlingResource.createIfNeeded(reactContext, true)?.also {
|
192
|
+
IdlingRegistry.getInstance().register(it)
|
193
|
+
}
|
184
194
|
}
|
185
195
|
|
186
196
|
private fun removeAsyncStorageIdlingResource() {
|
@@ -212,13 +222,8 @@ class ReactNativeIdlingResources constructor(
|
|
212
222
|
|
213
223
|
private fun toFormattedUrlArray(urlList: String): List<String> {
|
214
224
|
var formattedUrls = urlList
|
215
|
-
formattedUrls = formattedUrls.replace(Regex("""[()"]"""), "")
|
216
|
-
formattedUrls = formattedUrls.trim()
|
217
|
-
return formattedUrls.split(',')
|
218
|
-
}
|
219
|
-
|
220
|
-
fun setBlacklistUrls(urlList: String) {
|
221
|
-
val urlArray = toFormattedUrlArray(urlList)
|
222
|
-
NetworkIdlingResource.setURLBlacklist(urlArray);
|
225
|
+
formattedUrls = formattedUrls.replace(Regex("""[()"]"""), "")
|
226
|
+
formattedUrls = formattedUrls.trim()
|
227
|
+
return formattedUrls.split(',')
|
223
228
|
}
|
224
229
|
}
|
@@ -1,43 +1,23 @@
|
|
1
|
+
|
1
2
|
package com.wix.detox.reactnative.idlingresources.timers
|
2
3
|
|
3
|
-
import com.facebook.react.bridge.NativeModule
|
4
4
|
import com.facebook.react.bridge.ReactContext
|
5
|
-
import com.
|
6
|
-
import com.wix.detox.reactnative.helpers.RNHelpers
|
7
|
-
import org.joor.Reflect
|
5
|
+
import com.facebook.react.modules.core.TimingModule
|
8
6
|
|
9
7
|
private const val BUSY_WINDOW_THRESHOLD = 1500L
|
10
8
|
|
11
|
-
private class RN62TimingModuleReflected(private val timingModule: NativeModule) {
|
12
|
-
fun hasActiveTimers(): Boolean = Reflect.on(timingModule).call("hasActiveTimersInRange", BUSY_WINDOW_THRESHOLD).get()
|
13
|
-
}
|
14
|
-
|
15
9
|
/**
|
16
10
|
* Delegates the interrogation to the native module itself, added
|
17
11
|
* [here](https://github.com/facebook/react-native/pull/27539) in the context
|
18
12
|
* of RN v0.62 (followed by a previous refactor and rename of the class).
|
19
13
|
*/
|
20
|
-
|
21
|
-
|
22
|
-
should) remove any usage of reflection here.
|
23
|
-
That includes the unit test's stub being used for that reason in particular.
|
24
|
-
""")
|
25
|
-
class DelegatedIdleInterrogationStrategy(timingModule: NativeModule): IdleInterrogationStrategy {
|
26
|
-
private val timingModuleReflected = RN62TimingModuleReflected(timingModule)
|
27
|
-
|
28
|
-
override fun isIdleNow(): Boolean = !timingModuleReflected.hasActiveTimers()
|
14
|
+
class DelegatedIdleInterrogationStrategy(private val timingModule: TimingModule): IdleInterrogationStrategy {
|
15
|
+
override fun isIdleNow(): Boolean = !timingModule.hasActiveTimersInRange(BUSY_WINDOW_THRESHOLD)
|
29
16
|
|
30
17
|
companion object {
|
31
|
-
fun
|
32
|
-
val
|
33
|
-
|
34
|
-
|
35
|
-
return try {
|
36
|
-
module.javaClass.getDeclaredMethod("hasActiveTimersInRange", Long::class.java)
|
37
|
-
DelegatedIdleInterrogationStrategy(module)
|
38
|
-
} catch (ex: Exception) {
|
39
|
-
null
|
40
|
-
}
|
18
|
+
fun create(reactContext: ReactContext): DelegatedIdleInterrogationStrategy {
|
19
|
+
val timingModule = reactContext.getNativeModule(TimingModule::class.java)!!
|
20
|
+
return DelegatedIdleInterrogationStrategy(timingModule)
|
41
21
|
}
|
42
22
|
}
|
43
23
|
}
|