detox 20.21.0 → 20.21.1-smoke.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.21.0/detox-20.21.0-sources.jar → 20.21.1-smoke.0/detox-20.21.1-smoke.0-sources.jar} +0 -0
- package/Detox-android/com/wix/detox/20.21.1-smoke.0/detox-20.21.1-smoke.0-sources.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.21.1-smoke.0/detox-20.21.1-smoke.0-sources.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.21.1-smoke.0/detox-20.21.1-smoke.0-sources.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.21.1-smoke.0/detox-20.21.1-smoke.0-sources.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{20.21.0/detox-20.21.0.pom → 20.21.1-smoke.0/detox-20.21.1-smoke.0.pom} +1 -1
- package/Detox-android/com/wix/detox/20.21.1-smoke.0/detox-20.21.1-smoke.0.pom.md5 +1 -0
- package/Detox-android/com/wix/detox/20.21.1-smoke.0/detox-20.21.1-smoke.0.pom.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.21.1-smoke.0/detox-20.21.1-smoke.0.pom.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.21.1-smoke.0/detox-20.21.1-smoke.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-android/com/wix/detox-legacy/{20.21.0/detox-legacy-20.21.0-sources.jar → 20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0-sources.jar} +0 -0
- package/Detox-android/com/wix/detox-legacy/20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0-sources.jar.md5 +1 -0
- package/Detox-android/com/wix/detox-legacy/20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0-sources.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox-legacy/20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0-sources.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox-legacy/20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0-sources.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox-legacy/{20.21.0/detox-legacy-20.21.0.pom → 20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.pom} +1 -1
- package/Detox-android/com/wix/detox-legacy/20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.pom.md5 +1 -0
- package/Detox-android/com/wix/detox-legacy/20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.pom.sha1 +1 -0
- package/Detox-android/com/wix/detox-legacy/20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.pom.sha256 +1 -0
- package/Detox-android/com/wix/detox-legacy/20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.pom.sha512 +1 -0
- package/Detox-android/com/wix/detox-legacy/maven-metadata.xml +4 -4
- package/Detox-android/com/wix/detox-legacy/maven-metadata.xml.md5 +1 -1
- package/Detox-android/com/wix/detox-legacy/maven-metadata.xml.sha1 +1 -1
- package/Detox-android/com/wix/detox-legacy/maven-metadata.xml.sha256 +1 -1
- package/Detox-android/com/wix/detox-legacy/maven-metadata.xml.sha512 +1 -1
- package/Detox-ios-framework.tbz +0 -0
- package/Detox-ios-src.tbz +0 -0
- package/Detox-ios-xcuitest.tbz +0 -0
- package/detox.d.ts +78 -1
- package/globals.d.ts +2 -0
- package/local-cli/build-framework-cache.js +19 -11
- package/local-cli/clean-framework-cache.js +19 -14
- package/local-cli/rebuild-framework-cache.js +20 -16
- package/local-cli/utils/frameworkUtils.js +77 -0
- package/package.json +4 -4
- package/scripts/build_framework.ios.sh +26 -60
- package/scripts/build_local_framework.ios.sh +62 -0
- package/scripts/build_local_xcuitest.ios.sh +53 -0
- package/scripts/build_xcuitest.ios.sh +18 -0
- package/scripts/pack_ios.sh +18 -9
- package/scripts/postinstall.js +11 -4
- package/src/android/AndroidExpect.js +5 -0
- package/src/android/matchers/index.js +7 -0
- package/src/ios/XCUITestRunner.js +52 -0
- package/src/ios/expectTwo.js +49 -28
- package/src/ios/system.js +124 -0
- package/src/ios/web.js +3 -4
- package/src/matchers/factories/index.js +15 -8
- package/src/utils/assertArgument.js +11 -2
- package/src/utils/environment.js +34 -14
- package/src/utils/invocationTraceDescriptions.js +4 -0
- package/Detox-android/com/wix/detox/20.21.0/detox-20.21.0-sources.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.21.0/detox-20.21.0-sources.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.21.0/detox-20.21.0-sources.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.21.0/detox-20.21.0-sources.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.21.0/detox-20.21.0.pom.md5 +0 -1
- package/Detox-android/com/wix/detox/20.21.0/detox-20.21.0.pom.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.21.0/detox-20.21.0.pom.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.21.0/detox-20.21.0.pom.sha512 +0 -1
- package/Detox-android/com/wix/detox-legacy/20.21.0/detox-legacy-20.21.0-sources.jar.md5 +0 -1
- package/Detox-android/com/wix/detox-legacy/20.21.0/detox-legacy-20.21.0-sources.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox-legacy/20.21.0/detox-legacy-20.21.0-sources.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox-legacy/20.21.0/detox-legacy-20.21.0-sources.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox-legacy/20.21.0/detox-legacy-20.21.0.pom.md5 +0 -1
- package/Detox-android/com/wix/detox-legacy/20.21.0/detox-legacy-20.21.0.pom.sha1 +0 -1
- package/Detox-android/com/wix/detox-legacy/20.21.0/detox-legacy-20.21.0.pom.sha256 +0 -1
- package/Detox-android/com/wix/detox-legacy/20.21.0/detox-legacy-20.21.0.pom.sha512 +0 -1
- package/Detox-ios.tbz +0 -0
- package/scripts/build_universal_framework.sh +0 -14
- package/scripts/build_universal_framework_legacy.sh +0 -76
- package/scripts/build_universal_framework_modern.sh +0 -28
- /package/Detox-android/com/wix/detox/{20.21.0/detox-20.21.0.aar → 20.21.1-smoke.0/detox-20.21.1-smoke.0.aar} +0 -0
- /package/Detox-android/com/wix/detox/{20.21.0/detox-20.21.0.aar.md5 → 20.21.1-smoke.0/detox-20.21.1-smoke.0.aar.md5} +0 -0
- /package/Detox-android/com/wix/detox/{20.21.0/detox-20.21.0.aar.sha1 → 20.21.1-smoke.0/detox-20.21.1-smoke.0.aar.sha1} +0 -0
- /package/Detox-android/com/wix/detox/{20.21.0/detox-20.21.0.aar.sha256 → 20.21.1-smoke.0/detox-20.21.1-smoke.0.aar.sha256} +0 -0
- /package/Detox-android/com/wix/detox/{20.21.0/detox-20.21.0.aar.sha512 → 20.21.1-smoke.0/detox-20.21.1-smoke.0.aar.sha512} +0 -0
- /package/Detox-android/com/wix/detox-legacy/{20.21.0/detox-legacy-20.21.0.aar → 20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.aar} +0 -0
- /package/Detox-android/com/wix/detox-legacy/{20.21.0/detox-legacy-20.21.0.aar.md5 → 20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.aar.md5} +0 -0
- /package/Detox-android/com/wix/detox-legacy/{20.21.0/detox-legacy-20.21.0.aar.sha1 → 20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.aar.sha1} +0 -0
- /package/Detox-android/com/wix/detox-legacy/{20.21.0/detox-legacy-20.21.0.aar.sha256 → 20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.aar.sha256} +0 -0
- /package/Detox-android/com/wix/detox-legacy/{20.21.0/detox-legacy-20.21.0.aar.sha512 → 20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.aar.sha512} +0 -0
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
6df7b26cd8b5c7b89534b3582cca8e3f
|
@@ -0,0 +1 @@
|
|
1
|
+
5560ecdaadc404ee2b913ab4033f8be75f940d8e
|
@@ -0,0 +1 @@
|
|
1
|
+
cb38f320dd005ba902fac4939839ffdb9d8c0d71ea8254450c823f1c6c0bf53a
|
@@ -0,0 +1 @@
|
|
1
|
+
0ec818d2061eafc06a9893d09b4f02be4ccc5765861917c4ed55828359cffa23247258f8b11f2c98baa4969cedc6f06c43f42eb083cc40ff291a6561628ecaca
|
@@ -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.21.0</version>
|
6
|
+
<version>20.21.1-smoke.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
|
+
a11d2ac04236352bda52cc3066d8a3f2
|
@@ -0,0 +1 @@
|
|
1
|
+
ac43501a62236dd9ccfe962d4b5337f36bfa7813
|
@@ -0,0 +1 @@
|
|
1
|
+
602e4e768734e9796fabff9b9fecc54cde3f8b70b03b03db4101d2d4e6483a89
|
@@ -0,0 +1 @@
|
|
1
|
+
a1f8b89da20e10b599b219182701149d00ae32af7e676ddef4d5ab7ce6eff2860d134a00cea7b5fead6879a31163f28b1a6036968d3d677e6511e2193486ff12
|
@@ -3,11 +3,11 @@
|
|
3
3
|
<groupId>com.wix</groupId>
|
4
4
|
<artifactId>detox</artifactId>
|
5
5
|
<versioning>
|
6
|
-
<latest>20.21.0</latest>
|
7
|
-
<release>20.21.0</release>
|
6
|
+
<latest>20.21.1-smoke.0</latest>
|
7
|
+
<release>20.21.1-smoke.0</release>
|
8
8
|
<versions>
|
9
|
-
<version>20.21.0</version>
|
9
|
+
<version>20.21.1-smoke.0</version>
|
10
10
|
</versions>
|
11
|
-
<lastUpdated>
|
11
|
+
<lastUpdated>20240522123240</lastUpdated>
|
12
12
|
</versioning>
|
13
13
|
</metadata>
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
9cc7b6112315ff0042a6a717df5302b2
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
398b328a065b3ce60ed3d60087c6b24b0803a337
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3a00e690dfe3664de8ff2eef15853f74521c4295eaa191873565c7d2cef90386
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
cdf23a632a76a11b615fc234fcc5cf7bd81eb50b15e545f2b9d056dfae861bd39da7e274f93a443addcbab74a610a808efc32ea8e79d6c076312f2ef677fafca
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
07eba11f2058669eda30c0caa64eb0d6
|
@@ -0,0 +1 @@
|
|
1
|
+
29216bc04cc7764ca753169faa2d4670a71db755
|
@@ -0,0 +1 @@
|
|
1
|
+
b06226370d8b823eb9abc2853babd2bb776b212fac7d5364c9fc815126c2e1f5
|
@@ -0,0 +1 @@
|
|
1
|
+
05fbbd53b7f177e388587979c34df4fddcfea3cf29818fd21a743acabc20c640979210c52bde33c30456bce0cfcaf63edaeef10dc6ec9d279549b22fbcff4882
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<modelVersion>4.0.0</modelVersion>
|
4
4
|
<groupId>com.wix</groupId>
|
5
5
|
<artifactId>detox-legacy</artifactId>
|
6
|
-
<version>20.21.0</version>
|
6
|
+
<version>20.21.1-smoke.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>
|
package/Detox-android/com/wix/detox-legacy/20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.pom.md5
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
5ee2257f882cc8c6072165920425cfc6
|
package/Detox-android/com/wix/detox-legacy/20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.pom.sha1
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
7fb498447af26af5e5e75bde77364b99fe00101f
|
package/Detox-android/com/wix/detox-legacy/20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.pom.sha256
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
7ef122a81fd1fdeaba1ba03e9fe162600a48b82a550276594b62fc516dfabc20
|
package/Detox-android/com/wix/detox-legacy/20.21.1-smoke.0/detox-legacy-20.21.1-smoke.0.pom.sha512
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0676bc79ecc14d7975ac3309280579f1afa9cba50eb992d95c6a5da4ae80ff753d417195c06574d4dd7ae6be8e5b0204c39ae2f08d8878f75a474d7cf4edc874
|
@@ -3,11 +3,11 @@
|
|
3
3
|
<groupId>com.wix</groupId>
|
4
4
|
<artifactId>detox-legacy</artifactId>
|
5
5
|
<versioning>
|
6
|
-
<latest>20.21.0</latest>
|
7
|
-
<release>20.21.0</release>
|
6
|
+
<latest>20.21.1-smoke.0</latest>
|
7
|
+
<release>20.21.1-smoke.0</release>
|
8
8
|
<versions>
|
9
|
-
<version>20.21.0</version>
|
9
|
+
<version>20.21.1-smoke.0</version>
|
10
10
|
</versions>
|
11
|
-
<lastUpdated>
|
11
|
+
<lastUpdated>20240522123512</lastUpdated>
|
12
12
|
</versioning>
|
13
13
|
</metadata>
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
f9e793306af8a2c16e7dc17de50ff15e
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
ef1a7123ad841fb3b7200e4a478263b1db2edf02
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
be15d6b32cac463c99a82441d346e6f97ca83c641fce4e0867e87fffe321d095
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
b7ca898d3bcfe00803a42df57b52b48d623c8de89f308a9dfb4dfab96b2ac927b5fab8d56800e06bcbe911f97632235cb73b7011259594d024f1314e8068f657
|
Binary file
|
package/Detox-ios-src.tbz
CHANGED
Binary file
|
Binary file
|
package/detox.d.ts
CHANGED
@@ -431,6 +431,8 @@ declare global {
|
|
431
431
|
|
432
432
|
readonly web: WebFacade;
|
433
433
|
|
434
|
+
readonly system: SystemFacade;
|
435
|
+
|
434
436
|
readonly DetoxConstants: {
|
435
437
|
userNotificationTriggers: {
|
436
438
|
push: 'push';
|
@@ -1038,6 +1040,12 @@ declare global {
|
|
1038
1040
|
* Collection of web matchers
|
1039
1041
|
*/
|
1040
1042
|
readonly web: ByWebFacade;
|
1043
|
+
|
1044
|
+
/**
|
1045
|
+
* Collection of system-level matchers
|
1046
|
+
* @note System APIs are still in experimental phase and are subject to changes in the near future.
|
1047
|
+
*/
|
1048
|
+
readonly system: BySystemFacade;
|
1041
1049
|
}
|
1042
1050
|
|
1043
1051
|
interface ByWebFacade {
|
@@ -1106,6 +1114,24 @@ declare global {
|
|
1106
1114
|
tag(tagName: string): WebMatcher;
|
1107
1115
|
}
|
1108
1116
|
|
1117
|
+
interface BySystemFacade {
|
1118
|
+
/**
|
1119
|
+
* Find an element on the System-level by its label
|
1120
|
+
* @note System APIs are still in experimental phase and are subject to changes in the near future.
|
1121
|
+
* @example
|
1122
|
+
* system.element(by.system.text('Allow'))
|
1123
|
+
*/
|
1124
|
+
label(text: string): SystemMatcher;
|
1125
|
+
|
1126
|
+
/**
|
1127
|
+
* Find an element on the System-level by its type
|
1128
|
+
* @note System APIs are still in experimental phase and are subject to changes in the near future.
|
1129
|
+
* @example
|
1130
|
+
* system.element(by.system.type('button'))
|
1131
|
+
*/
|
1132
|
+
type(type: string): SystemMatcher;
|
1133
|
+
}
|
1134
|
+
|
1109
1135
|
interface NativeMatcher {
|
1110
1136
|
/**
|
1111
1137
|
* Find an element satisfying all the matchers
|
@@ -1127,13 +1153,19 @@ declare global {
|
|
1127
1153
|
}
|
1128
1154
|
|
1129
1155
|
interface WebMatcher {
|
1130
|
-
__web__: any; // prevent type
|
1156
|
+
__web__: any; // prevent type coercion
|
1157
|
+
}
|
1158
|
+
|
1159
|
+
interface SystemMatcher {
|
1160
|
+
__system__: any; // prevent type coercion
|
1131
1161
|
}
|
1132
1162
|
|
1133
1163
|
interface ExpectFacade {
|
1134
1164
|
(element: NativeElement): Expect;
|
1135
1165
|
|
1136
1166
|
(webElement: WebElement): WebExpect;
|
1167
|
+
|
1168
|
+
(systemElement: SystemElement): SystemExpect;
|
1137
1169
|
}
|
1138
1170
|
|
1139
1171
|
interface WebViewElement {
|
@@ -1164,6 +1196,35 @@ declare global {
|
|
1164
1196
|
(matcher?: NativeMatcher): WebViewElement;
|
1165
1197
|
}
|
1166
1198
|
|
1199
|
+
interface SystemFacade {
|
1200
|
+
/**
|
1201
|
+
* Find an element on the System-level using a system matcher.
|
1202
|
+
* @param systemMatcher a system matcher for the system element.
|
1203
|
+
* @note System APIs are still in experimental phase and are subject to changes in the near future.
|
1204
|
+
* @example
|
1205
|
+
* system.element(by.system.label('Allow'))
|
1206
|
+
*/
|
1207
|
+
element(systemMatcher: SystemMatcher): IndexableSystemElement;
|
1208
|
+
}
|
1209
|
+
|
1210
|
+
interface IndexableSystemElement extends SystemElement {
|
1211
|
+
/**
|
1212
|
+
* Choose from multiple elements matching the same matcher using index
|
1213
|
+
* @note System APIs are still in experimental phase and are subject to changes in the near future.
|
1214
|
+
* @example await system.element(by.system.type('button')).atIndex(1).tap();
|
1215
|
+
*/
|
1216
|
+
atIndex(index: number): SystemElement;
|
1217
|
+
}
|
1218
|
+
|
1219
|
+
interface SystemElement {
|
1220
|
+
/**
|
1221
|
+
* Simulate a tap on the element.
|
1222
|
+
* @note System APIs are still in experimental phase and are subject to changes in the near future.
|
1223
|
+
* @example await system.element(by.system.label('Allow')).tap();
|
1224
|
+
*/
|
1225
|
+
tap(): Promise<void>;
|
1226
|
+
}
|
1227
|
+
|
1167
1228
|
interface Expect<R = Promise<void>> {
|
1168
1229
|
|
1169
1230
|
/**
|
@@ -1531,6 +1592,22 @@ declare global {
|
|
1531
1592
|
toExist(): R;
|
1532
1593
|
}
|
1533
1594
|
|
1595
|
+
interface SystemExpect<R = Promise<void>> {
|
1596
|
+
/**
|
1597
|
+
* Negate the expectation.
|
1598
|
+
* @note System APIs are still in experimental phase and are subject to changes in the near future.
|
1599
|
+
* @example await expect(system.element(by.system.text('Allow'))).not.toExist();
|
1600
|
+
*/
|
1601
|
+
not: this;
|
1602
|
+
|
1603
|
+
/**
|
1604
|
+
* Expect the view to exist in the system-level.
|
1605
|
+
* @note System APIs are still in experimental phase and are subject to changes in the near future.
|
1606
|
+
* @example await expect(system.element(by.system.text('Allow'))).toExist();
|
1607
|
+
*/
|
1608
|
+
toExist(): R;
|
1609
|
+
}
|
1610
|
+
|
1534
1611
|
interface IndexableWebElement extends WebElement {
|
1535
1612
|
/**
|
1536
1613
|
* Choose from multiple elements matching the same matcher using index.
|
package/globals.d.ts
CHANGED
@@ -8,6 +8,7 @@ declare global {
|
|
8
8
|
const expect: Detox.DetoxExportWrapper['expect'];
|
9
9
|
const by: Detox.DetoxExportWrapper['by'];
|
10
10
|
const web: Detox.DetoxExportWrapper['web'];
|
11
|
+
const system: Detox.DetoxExportWrapper['system'];
|
11
12
|
|
12
13
|
namespace NodeJS {
|
13
14
|
interface Global {
|
@@ -18,6 +19,7 @@ declare global {
|
|
18
19
|
expect: Detox.DetoxExportWrapper['expect'];
|
19
20
|
by: Detox.DetoxExportWrapper['by'];
|
20
21
|
web: Detox.DetoxExportWrapper['web'];
|
22
|
+
system: Detox.DetoxExportWrapper['system'];
|
21
23
|
}
|
22
24
|
}
|
23
25
|
}
|
@@ -1,16 +1,24 @@
|
|
1
|
-
const
|
2
|
-
const os = require('os');
|
3
|
-
const path = require('path');
|
1
|
+
const { build } = require('./utils/frameworkUtils');
|
4
2
|
|
5
|
-
|
3
|
+
module.exports = {
|
4
|
+
command: 'build-framework-cache',
|
5
|
+
desc: 'Builds cached versions of the Detox framework and XCUITest-runner in ~/Library/Detox. ' +
|
6
|
+
'Use the `--detox` and `--xcuitest` flags to selectively build the framework components. ' +
|
7
|
+
'By default, both the injected Detox library and the XCUITest test runner are built. (MacOS only)',
|
6
8
|
|
7
|
-
|
8
|
-
|
9
|
+
builder: yargs => yargs
|
10
|
+
.option('detox', {
|
11
|
+
describe: 'Build only the injected Detox library',
|
12
|
+
type: 'boolean',
|
13
|
+
default: false
|
14
|
+
})
|
15
|
+
.option('xcuitest', {
|
16
|
+
describe: 'Build only the XCUITest test runner',
|
17
|
+
type: 'boolean',
|
18
|
+
default: false
|
19
|
+
}),
|
9
20
|
|
10
|
-
|
11
|
-
|
12
|
-
cp.execSync(path.join(__dirname, '../scripts/build_framework.ios.sh'), { stdio: 'inherit' });
|
13
|
-
} else {
|
14
|
-
detox.log.info(`The command is supported only on macOS, skipping the execution.`);
|
21
|
+
handler: async function(argv) {
|
22
|
+
await build(argv.detox, argv.xcuitest);
|
15
23
|
}
|
16
24
|
};
|
@@ -1,19 +1,24 @@
|
|
1
|
-
const
|
2
|
-
const path = require('path');
|
1
|
+
const { clean } = require('./utils/frameworkUtils');
|
3
2
|
|
4
|
-
|
3
|
+
module.exports = {
|
4
|
+
command: 'clean-framework-cache',
|
5
|
+
desc: 'Cleans cached versions of the Detox framework and XCUITest-runner in ~/Library/Detox. ' +
|
6
|
+
'Use the `--detox` and `--xcuitest` flags to selectively clean the framework components. ' +
|
7
|
+
'By default, both the injected Detox library and the XCUITest test runner are cleaned. (MacOS only)',
|
5
8
|
|
6
|
-
|
9
|
+
builder: yargs => yargs
|
10
|
+
.option('detox', {
|
11
|
+
describe: 'Clean only the injected Detox library',
|
12
|
+
type: 'boolean',
|
13
|
+
default: false
|
14
|
+
})
|
15
|
+
.option('xcuitest', {
|
16
|
+
describe: 'Clean only the XCUITest test runner',
|
17
|
+
type: 'boolean',
|
18
|
+
default: false
|
19
|
+
}),
|
7
20
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
module.exports.handler = async function cleanFrameworkCache() {
|
12
|
-
if (os.platform() === 'darwin') {
|
13
|
-
const frameworkPath = path.join(os.homedir(), '/Library/Detox');
|
14
|
-
detox.log.info(`Removing framework binaries from ${frameworkPath}`);
|
15
|
-
await fs.remove(frameworkPath);
|
16
|
-
} else {
|
17
|
-
detox.log.info(`The command is supported only on macOS, skipping the execution.`);
|
21
|
+
handler: async function(argv) {
|
22
|
+
await clean(argv.detox, argv.xcuitest);
|
18
23
|
}
|
19
24
|
};
|
@@ -1,21 +1,25 @@
|
|
1
|
-
const
|
2
|
-
const os = require('os');
|
3
|
-
const path = require('path');
|
1
|
+
const { build, clean } = require('./utils/frameworkUtils');
|
4
2
|
|
5
|
-
|
3
|
+
module.exports = {
|
4
|
+
command: 'rebuild-framework-cache',
|
5
|
+
desc: 'Rebuilds cached versions of the Detox framework and XCUITest-runner in ~/Library/Detox. ' +
|
6
|
+
'Use the `--detox` and `--xcuitest` flags to selectively rebuild the framework components. ' +
|
7
|
+
'By default, both the injected Detox library and the XCUITest test runner are rebuilt. (MacOS only)',
|
6
8
|
|
7
|
-
|
9
|
+
builder: yargs => yargs
|
10
|
+
.option('detox', {
|
11
|
+
describe: 'Rebuild only the injected Detox library',
|
12
|
+
type: 'boolean',
|
13
|
+
default: false
|
14
|
+
})
|
15
|
+
.option('xcuitest', {
|
16
|
+
describe: 'Rebuild only the XCUITest test runner',
|
17
|
+
type: 'boolean',
|
18
|
+
default: false
|
19
|
+
}),
|
8
20
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
module.exports.handler = async function buildFrameworkCache() {
|
13
|
-
if (os.platform() === 'darwin') {
|
14
|
-
const frameworkPath = path.join(os.homedir(), '/Library/Detox');
|
15
|
-
log.info(`Removing framework binaries from ${frameworkPath}`);
|
16
|
-
await fs.remove(frameworkPath);
|
17
|
-
cp.execSync(path.join(__dirname, '../scripts/build_framework.ios.sh'), { stdio: 'inherit' });
|
18
|
-
} else {
|
19
|
-
log.info(`The command is supported only on macOS, skipping the execution.`);
|
21
|
+
handler: async function(argv) {
|
22
|
+
await clean(argv.detox, argv.xcuitest);
|
23
|
+
await build(argv.detox, argv.xcuitest);
|
20
24
|
}
|
21
25
|
};
|
@@ -0,0 +1,77 @@
|
|
1
|
+
const os = require('os');
|
2
|
+
const path = require('path');
|
3
|
+
|
4
|
+
const { spawn } = require('child-process-promise');
|
5
|
+
const fs = require('fs-extra');
|
6
|
+
|
7
|
+
const detox = require('../../internals');
|
8
|
+
const { getFrameworkDirPath, getXCUITestRunnerDirPath } = require('../../src/utils/environment');
|
9
|
+
|
10
|
+
|
11
|
+
const frameworkBuildScript = '../../scripts/build_local_framework.ios.sh';
|
12
|
+
const xcuitestBuildScript = '../../scripts/build_local_xcuitest.ios.sh';
|
13
|
+
|
14
|
+
function shouldSkipExecution() {
|
15
|
+
if (os.platform() !== 'darwin') {
|
16
|
+
detox.log.info('The command is supported only on macOS, skipping the execution.');
|
17
|
+
return true;
|
18
|
+
}
|
19
|
+
|
20
|
+
return false;
|
21
|
+
}
|
22
|
+
|
23
|
+
async function execBuildScript(targetPath, scriptPath, descriptor) {
|
24
|
+
detox.log.info(`Building ${descriptor} cache at ${targetPath}..`);
|
25
|
+
|
26
|
+
const scriptFullPath = path.join(__dirname, scriptPath);
|
27
|
+
|
28
|
+
try {
|
29
|
+
await spawn(scriptFullPath, [], { stdio: 'inherit' });
|
30
|
+
} catch (error) {
|
31
|
+
detox.log.error(`Error while building ${descriptor}:\n${error}`);
|
32
|
+
throw error;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
async function removeTarget(targetPath, descriptor) {
|
37
|
+
detox.log.info(`Cleaning ${descriptor} cache at ${targetPath}..`);
|
38
|
+
await fs.remove(targetPath);
|
39
|
+
detox.log.info(`Done\n`);
|
40
|
+
}
|
41
|
+
|
42
|
+
async function build(framework, xcuitest) {
|
43
|
+
if (shouldSkipExecution()) {
|
44
|
+
return;
|
45
|
+
}
|
46
|
+
|
47
|
+
const shouldBuildBoth = !framework && !xcuitest;
|
48
|
+
|
49
|
+
if (framework || shouldBuildBoth) {
|
50
|
+
await execBuildScript(getFrameworkDirPath, frameworkBuildScript, 'Detox framework');
|
51
|
+
}
|
52
|
+
|
53
|
+
if (xcuitest || shouldBuildBoth) {
|
54
|
+
await execBuildScript(getXCUITestRunnerDirPath, xcuitestBuildScript, 'XCUITest runner');
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
async function clean(framework, xcuitest) {
|
59
|
+
if (shouldSkipExecution()) {
|
60
|
+
return;
|
61
|
+
}
|
62
|
+
|
63
|
+
const shouldCleanBoth = !framework && !xcuitest;
|
64
|
+
|
65
|
+
if (framework || shouldCleanBoth) {
|
66
|
+
await removeTarget(getXCUITestRunnerDirPath, 'Detox framework');
|
67
|
+
}
|
68
|
+
|
69
|
+
if (xcuitest || shouldCleanBoth) {
|
70
|
+
await removeTarget(getXCUITestRunnerDirPath, 'XCUITest runner');
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
module.exports = {
|
75
|
+
build,
|
76
|
+
clean
|
77
|
+
};
|
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.21.0",
|
4
|
+
"version": "20.21.1-smoke.0",
|
5
5
|
"bin": {
|
6
6
|
"detox": "local-cli/cli.js"
|
7
7
|
},
|
@@ -56,7 +56,7 @@
|
|
56
56
|
"eslint-plugin-node": "^11.1.0",
|
57
57
|
"eslint-plugin-unicorn": "^50.0.1",
|
58
58
|
"jest": "^29.6.3",
|
59
|
-
"jest-allure2-reporter": "^2.0.0-beta.
|
59
|
+
"jest-allure2-reporter": "^2.0.0-beta.18",
|
60
60
|
"metro-react-native-babel-preset": "0.76.8",
|
61
61
|
"prettier": "^3.1.1",
|
62
62
|
"react-native": "0.73.2",
|
@@ -77,7 +77,7 @@
|
|
77
77
|
"funpermaproxy": "^1.1.0",
|
78
78
|
"glob": "^8.0.3",
|
79
79
|
"ini": "^1.3.4",
|
80
|
-
"jest-environment-emit": "^1.0.
|
80
|
+
"jest-environment-emit": "^1.0.8",
|
81
81
|
"json-cycle": "^1.3.0",
|
82
82
|
"lodash": "^4.17.11",
|
83
83
|
"multi-sort-stream": "^1.0.3",
|
@@ -115,5 +115,5 @@
|
|
115
115
|
"browserslist": [
|
116
116
|
"node 14"
|
117
117
|
],
|
118
|
-
"gitHead": "
|
118
|
+
"gitHead": "db6034cadb9c5f14914f639faeb660eea893f4ea"
|
119
119
|
}
|
@@ -1,62 +1,28 @@
|
|
1
1
|
#!/bin/bash -e
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
}
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
}
|
29
|
-
|
30
|
-
function buildFramework () {
|
31
|
-
detoxSourcePath="${1}"
|
32
|
-
echo "Building Detox.framework from ${detoxSourcePath} into ${detoxFrameworkDirPath}"
|
33
|
-
mkdir -p "${detoxFrameworkDirPath}"
|
34
|
-
logPath="${detoxFrameworkDirPath}"/detox_ios.log
|
35
|
-
echo "Build log: ${logPath}"
|
36
|
-
echo -n "" > "${logPath}"
|
37
|
-
"${detoxRootPath}"/scripts/build_universal_framework.sh "${detoxSourcePath}"/Detox.xcodeproj "${detoxFrameworkDirPath}" &> "${logPath}" || {
|
38
|
-
echo -e "#################################\nError building Detox.framework:\n----------------------------------\n"
|
39
|
-
cat "${logPath}"
|
40
|
-
echo "#################################"
|
41
|
-
exit 1
|
42
|
-
}
|
43
|
-
}
|
44
|
-
|
45
|
-
function main () {
|
46
|
-
if [ -d "${detoxFrameworkDirPath}" ]; then
|
47
|
-
if [ ! -d "${detoxFrameworkPath}" ]; then
|
48
|
-
echo "${detoxFrameworkDirPath} was found, but could not find Detox.framework inside it. This means that the Detox framework build process was interrupted.
|
49
|
-
deleting ${detoxFrameworkDirPath} and trying to rebuild."
|
50
|
-
rm -rf "${detoxFrameworkDirPath}"
|
51
|
-
prepareAndBuildFramework
|
52
|
-
else
|
53
|
-
echo "Detox.framework exists, skipping..."
|
54
|
-
fi
|
55
|
-
else
|
56
|
-
prepareAndBuildFramework
|
57
|
-
fi
|
58
|
-
|
59
|
-
echo "Done"
|
60
|
-
}
|
61
|
-
|
62
|
-
main
|
3
|
+
PROJECT=$1
|
4
|
+
FRAMEWORK_OUTPUT_DIR=$2
|
5
|
+
CONFIGURATION=Release
|
6
|
+
PROJECT_NAME=Detox
|
7
|
+
|
8
|
+
# Make sure the output directory exists
|
9
|
+
|
10
|
+
rm -fr "${FRAMEWORK_OUTPUT_DIR}"
|
11
|
+
mkdir -p "${FRAMEWORK_OUTPUT_DIR}"
|
12
|
+
|
13
|
+
# Step 0. Xcode version
|
14
|
+
|
15
|
+
USE_NEW_BUILD_SYSTEM="YES"
|
16
|
+
echo "Using -UseNewBuildSystem=${USE_NEW_BUILD_SYSTEM}"
|
17
|
+
|
18
|
+
# Step 1. Build Device and Simulator versions
|
19
|
+
|
20
|
+
BUILD_SIM=`xcodebuild -project "${PROJECT}" -scheme "Detox" -UseNewBuildSystem=${USE_NEW_BUILD_SYSTEM} -configuration "${CONFIGURATION}" -sdk iphonesimulator -destination "generic/platform=iOS Simulator" build -showBuildSettings | awk -F= '/TARGET_BUILD_DIR/{x=$NF; gsub(/^[ \t]+|[ \t]+$/,"",x); print x}'`
|
21
|
+
|
22
|
+
echo ${BUILD_SIM}
|
23
|
+
|
24
|
+
xcodebuild -project "${PROJECT}" -scheme "Detox" -UseNewBuildSystem=${USE_NEW_BUILD_SYSTEM} -configuration "${CONFIGURATION}" -sdk iphonesimulator -destination "generic/platform=iOS Simulator" build -quiet
|
25
|
+
|
26
|
+
# Step 2. Copy the framework to output folder
|
27
|
+
|
28
|
+
cp -fR "${BUILD_SIM}/${PROJECT_NAME}.framework" "${FRAMEWORK_OUTPUT_DIR}"/
|