detox 20.7.7-smoke.0 → 20.8.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.7.7-smoke.0/detox-20.7.7-smoke.0-javadoc.jar → 20.8.0/detox-20.8.0-javadoc.jar} +0 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0-javadoc.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0-javadoc.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0-javadoc.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0-javadoc.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{20.7.7-smoke.0/detox-20.7.7-smoke.0-sources.jar → 20.8.0/detox-20.8.0-sources.jar} +0 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0-sources.jar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0-sources.jar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0-sources.jar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0-sources.jar.sha512 +1 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0.aar +0 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0.aar.md5 +1 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0.aar.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0.aar.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0.aar.sha512 +1 -0
- package/Detox-android/com/wix/detox/{20.7.7-smoke.0/detox-20.7.7-smoke.0.pom → 20.8.0/detox-20.8.0.pom} +1 -1
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0.pom.md5 +1 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0.pom.sha1 +1 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.0.pom.sha256 +1 -0
- package/Detox-android/com/wix/detox/20.8.0/detox-20.8.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/detox/src/full/java/com/wix/detox/espresso/DetoxAction.java +5 -0
- package/android/detox/src/full/java/com/wix/detox/espresso/action/RNDetoxAccessibilityAction.kt +46 -0
- package/index.d.ts +7 -0
- package/package.json +2 -2
- package/src/android/actions/native.js +8 -0
- package/src/android/core/NativeElement.js +5 -0
- package/src/android/espressoapi/DetoxAction.js +12 -0
- package/src/ios/expectTwo.js +13 -0
- package/src/utils/invocationTraceDescriptions.js +1 -0
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0-javadoc.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0-javadoc.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0-javadoc.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0-javadoc.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0-sources.jar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0-sources.jar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0-sources.jar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0-sources.jar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0.aar +0 -0
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0.aar.md5 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0.aar.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0.aar.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0.aar.sha512 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0.pom.md5 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0.pom.sha1 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0.pom.sha256 +0 -1
- package/Detox-android/com/wix/detox/20.7.7-smoke.0/detox-20.7.7-smoke.0.pom.sha512 +0 -1
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
792ec48d40b137aee8326498f06802ba
|
@@ -0,0 +1 @@
|
|
1
|
+
947c68556282679ffedda563e4151f6376616c51
|
@@ -0,0 +1 @@
|
|
1
|
+
7da803e7363959eb9069793f5ac82521662e1cb709b2656ffde6c8fe5540d27d
|
@@ -0,0 +1 @@
|
|
1
|
+
07d59319717591997b56a679bd0650ab67d40ce9deda8399cce6b4c3f0f4ed24147a27cada9ac020c854722fb9317150676cd8693fed579874a28c3868f31644
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
a03f44fd50ca8a15e86dae9198a9c716
|
@@ -0,0 +1 @@
|
|
1
|
+
5def9152aed0ad30bcf2e1374c1110933687ea0a
|
@@ -0,0 +1 @@
|
|
1
|
+
747dca51b905c864fab661e7aa21608cb31b38352c67d2b127f8dedd56bac402
|
@@ -0,0 +1 @@
|
|
1
|
+
37bc3ee03bcbf4fe754b4591722a5877424662fc988c7afabf170640be1c7814ee82979bd80e00d3bea1d5ac847f1379b7f0443b08938fc6d1f9d68eb7d4e0f7
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
001128eb4136e2b6dfd5ae42e49fa792
|
@@ -0,0 +1 @@
|
|
1
|
+
7538b1401396940dea0af5be16ea173f2595eb4c
|
@@ -0,0 +1 @@
|
|
1
|
+
b15fa80eba92332ea0a70dadda71bdad0a682cf34e1fc78f7e4164189ef10600
|
@@ -0,0 +1 @@
|
|
1
|
+
5f28a6696e87294fb442399987dcd37f78ccd2ddb4fb4aeeb6f53899afb9239e3d731d285a9c72cfb0d667b959637b8a6333db714f0734b4bfa08bf14833afa9
|
@@ -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.8.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
|
+
0803846df1d9260c09a90b1c6467378d
|
@@ -0,0 +1 @@
|
|
1
|
+
00737aae2409c83bddc6aec2891f985280305bc0
|
@@ -0,0 +1 @@
|
|
1
|
+
c6cb0623d8a76007cc12fd67205344a9034c2313051c1b54119ad3cd5cdafb77
|
@@ -0,0 +1 @@
|
|
1
|
+
962dc6a37a4b0c7456f1dbd199d3b994860fb54741f9eca239d06073fea3512538fe67b3ec66cb4548b57b2779b9614d98d4369fe025d1ff0e3bd910fae34f49
|
@@ -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.8.0</latest>
|
7
|
+
<release>20.8.0</release>
|
8
8
|
<versions>
|
9
|
-
<version>20.
|
9
|
+
<version>20.8.0</version>
|
10
10
|
</versions>
|
11
|
-
<lastUpdated>
|
11
|
+
<lastUpdated>20230507161556</lastUpdated>
|
12
12
|
</versioning>
|
13
13
|
</metadata>
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2786fb3cd2426eb001460b298d9c766c
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
5512aa69e65841e973d53310bdfd44d3c70648c3
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
fed10b1eed606b777b4bc403440240f7c15893f53b1d0110393384c9348bfdf4
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2dce9a7ddef81ad4eda0057868c2dd6712a33cacf878b6f35ed1d9fe8dceedcacd6aad9923bdf15dc207f26885ed79f33acb5c4b81d5c9e0acfa639c43c1ba88
|
package/Detox-ios-src.tbz
CHANGED
Binary file
|
package/Detox-ios.tbz
CHANGED
Binary file
|
@@ -5,6 +5,7 @@ import android.os.Build;
|
|
5
5
|
|
6
6
|
import com.wix.detox.common.DetoxErrors.DetoxRuntimeException;
|
7
7
|
import com.wix.detox.common.DetoxErrors.StaleActionException;
|
8
|
+
import com.wix.detox.espresso.action.RNDetoxAccessibilityAction;
|
8
9
|
import com.wix.detox.espresso.action.AdjustSliderToPositionAction;
|
9
10
|
import com.wix.detox.espresso.action.DetoxMultiTap;
|
10
11
|
import com.wix.detox.espresso.action.RNClickAction;
|
@@ -203,6 +204,10 @@ public class DetoxAction {
|
|
203
204
|
};
|
204
205
|
}
|
205
206
|
|
207
|
+
public static ViewAction accessibilityAction(final String actionName) {
|
208
|
+
return new RNDetoxAccessibilityAction(actionName);
|
209
|
+
}
|
210
|
+
|
206
211
|
private static Date parseDateISO8601(String dateString) throws ParseException {
|
207
212
|
try {
|
208
213
|
return new SimpleDateFormat(ISO8601_FORMAT).parse(dateString);
|
package/android/detox/src/full/java/com/wix/detox/espresso/action/RNDetoxAccessibilityAction.kt
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
package com.wix.detox.espresso.action
|
2
|
+
|
3
|
+
import android.view.View
|
4
|
+
import androidx.test.espresso.UiController
|
5
|
+
import androidx.test.espresso.ViewAction
|
6
|
+
import com.facebook.react.bridge.Arguments
|
7
|
+
import com.facebook.react.bridge.ReactContext
|
8
|
+
import com.facebook.react.bridge.WritableMap
|
9
|
+
import com.facebook.react.uimanager.UIManagerHelper
|
10
|
+
import com.facebook.react.uimanager.events.Event
|
11
|
+
import com.wix.detox.espresso.DetoxMatcher
|
12
|
+
import org.hamcrest.Matcher
|
13
|
+
|
14
|
+
class RNDetoxAccessibilityAction(private val mActionName: String) : ViewAction {
|
15
|
+
|
16
|
+
override fun getConstraints(): Matcher<View?>? = DetoxMatcher.matcherForNotNull()
|
17
|
+
|
18
|
+
override fun getDescription(): String = "Dispatch an Accessibility Action"
|
19
|
+
|
20
|
+
override fun perform(uiController: UiController?, view: View?) {
|
21
|
+
val reactContext = view?.context as? ReactContext ?: return
|
22
|
+
val reactTag = view.id
|
23
|
+
|
24
|
+
UIManagerHelper.getEventDispatcherForReactTag(reactContext, reactTag)
|
25
|
+
?.dispatchEvent(
|
26
|
+
TopAccessibilityEvent(
|
27
|
+
surfaceId = UIManagerHelper.getSurfaceId(reactContext),
|
28
|
+
viewId = reactTag,
|
29
|
+
actionName = mActionName,
|
30
|
+
)
|
31
|
+
)
|
32
|
+
|
33
|
+
val waitTimeMS = 100
|
34
|
+
uiController!!.loopMainThreadForAtLeast(waitTimeMS.toLong())
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
class TopAccessibilityEvent(surfaceId: Int, viewId: Int, private val actionName: String) :
|
39
|
+
Event<TopAccessibilityEvent>(surfaceId, viewId) {
|
40
|
+
|
41
|
+
override fun getEventName(): String = "topAccessibilityAction"
|
42
|
+
|
43
|
+
override fun getEventData(): WritableMap? {
|
44
|
+
return Arguments.createMap().apply { putString("actionName", actionName) }
|
45
|
+
}
|
46
|
+
}
|
package/index.d.ts
CHANGED
@@ -1380,6 +1380,13 @@ declare global {
|
|
1380
1380
|
*/
|
1381
1381
|
setDatePickerDate(dateString: string, dateFormat: string): Promise<void>;
|
1382
1382
|
|
1383
|
+
/**
|
1384
|
+
* Triggers a given [accessibility action]{@link https://reactnative.dev/docs/accessibility#accessibility-actions}.
|
1385
|
+
* @param actionName - name of the accessibility action
|
1386
|
+
* @example await element(by.id('view')).performAccessibilityAction('activate');
|
1387
|
+
*/
|
1388
|
+
performAccessibilityAction(actionName: string): Promise<void>
|
1389
|
+
|
1383
1390
|
/**
|
1384
1391
|
* Pinches in the given direction with speed and angle. (iOS only)
|
1385
1392
|
* @param angle value in radiant, default is `0`
|
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.8.0",
|
5
5
|
"bin": {
|
6
6
|
"detox": "local-cli/cli.js"
|
7
7
|
},
|
@@ -200,5 +200,5 @@
|
|
200
200
|
}
|
201
201
|
}
|
202
202
|
},
|
203
|
-
"gitHead": "
|
203
|
+
"gitHead": "5a568946b47dc03ffe24150ebbfa0a94a1126de0"
|
204
204
|
}
|
@@ -145,6 +145,13 @@ class TakeElementScreenshot extends Action {
|
|
145
145
|
}
|
146
146
|
}
|
147
147
|
|
148
|
+
class AccessibilityActionAction extends Action {
|
149
|
+
constructor(actionName) {
|
150
|
+
super();
|
151
|
+
this._call = invoke.callDirectly(DetoxActionApi.accessibilityAction(actionName));
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
148
155
|
module.exports = {
|
149
156
|
Action,
|
150
157
|
TapAction,
|
@@ -164,4 +171,5 @@ module.exports = {
|
|
164
171
|
ScrollToIndex,
|
165
172
|
SetDatePickerDateAction,
|
166
173
|
AdjustSliderToPosition,
|
174
|
+
AccessibilityActionAction
|
167
175
|
};
|
@@ -169,6 +169,11 @@ class NativeElement {
|
|
169
169
|
const traceDescription = actionDescription.adjustSliderToPosition(newPosition);
|
170
170
|
return await new ActionInteraction(this._invocationManager, this, action, traceDescription).execute();
|
171
171
|
}
|
172
|
+
|
173
|
+
async performAccessibilityAction(actionName) {
|
174
|
+
const traceDescription = actionDescription.performAccessibilityAction(actionName);
|
175
|
+
return await new ActionInteraction(this._invocationManager, this, new actions.AccessibilityActionAction(actionName), traceDescription).execute();
|
176
|
+
}
|
172
177
|
}
|
173
178
|
|
174
179
|
module.exports = {
|
@@ -233,6 +233,18 @@ class DetoxAction {
|
|
233
233
|
};
|
234
234
|
}
|
235
235
|
|
236
|
+
static accessibilityAction(actionName) {
|
237
|
+
if (typeof actionName !== "string") throw new Error("actionName should be a string, but got " + (actionName + (" (" + (typeof actionName + ")"))));
|
238
|
+
return {
|
239
|
+
target: {
|
240
|
+
type: "Class",
|
241
|
+
value: "com.wix.detox.espresso.DetoxAction"
|
242
|
+
},
|
243
|
+
method: "accessibilityAction",
|
244
|
+
args: [actionName]
|
245
|
+
};
|
246
|
+
}
|
247
|
+
|
236
248
|
static parseDateISO8601(dateString) {
|
237
249
|
if (typeof dateString !== "string") throw new Error("dateString should be a string, but got " + (dateString + (" (" + (typeof dateString + ")"))));
|
238
250
|
return {
|
package/src/ios/expectTwo.js
CHANGED
@@ -229,6 +229,13 @@ class Element {
|
|
229
229
|
return this.withAction('clearText', traceDescription);
|
230
230
|
}
|
231
231
|
|
232
|
+
performAccessibilityAction(actionName) {
|
233
|
+
if (typeof actionName !== 'string') throw new Error('actionName should be a string, but got ' + (actionName + (' (' + (typeof actionName + ')'))));
|
234
|
+
|
235
|
+
const traceDescription = actionDescription.performAccessibilityAction(actionName);
|
236
|
+
return this.withAction('accessibilityAction', traceDescription, actionName);
|
237
|
+
}
|
238
|
+
|
232
239
|
scroll(pixels, direction = 'down', startPositionX = NaN, startPositionY = NaN) {
|
233
240
|
if (!['left', 'right', 'up', 'down'].some(option => option === direction)) throw new Error('direction should be one of [left, right, up, down], but got ' + direction);
|
234
241
|
if (typeof pixels !== 'number') throw new Error('amount of pixels should be a number, but got ' + (pixels + (' (' + (typeof pixels + ')'))));
|
@@ -660,6 +667,12 @@ class WaitFor {
|
|
660
667
|
return this.waitForWithAction(traceDescription);
|
661
668
|
}
|
662
669
|
|
670
|
+
performAccessibilityAction(actionName) {
|
671
|
+
this.action = this.actionableElement.performAccessibilityAction(actionName);
|
672
|
+
const traceDescription = actionDescription.performAccessibilityAction(actionName);
|
673
|
+
return this.waitForWithAction(traceDescription);
|
674
|
+
}
|
675
|
+
|
663
676
|
pinch(scale, speed, angle) {
|
664
677
|
this.action = this.actionableElement.pinch(scale, speed, angle);
|
665
678
|
const traceDescription = actionDescription.pinch(scale, speed, angle);
|
@@ -7,6 +7,7 @@ module.exports = {
|
|
7
7
|
longPressAndDrag: (duration, startX, startY, targetElement, endX, endY, speed, holdDuration) =>
|
8
8
|
`long press and drag from ${startX}, ${startY} to ${endX}, ${endY} with speed ${speed} and hold duration ${holdDuration}`,
|
9
9
|
multiTap: (times) => `tap ${times} times`,
|
10
|
+
performAccessibilityAction: (actionName) => `perform ${actionName} accessibilityAction`,
|
10
11
|
pinch: (scale, speed, angle) => `pinch with scale ${scale}, speed ${speed}, and angle ${angle}`,
|
11
12
|
pinchWithAngle: (direction, speed, angle) => `pinch with direction ${direction}, speed ${speed}, and angle ${angle}`,
|
12
13
|
replaceText: (value) => `replace input text: "${value}"`,
|
@@ -1 +0,0 @@
|
|
1
|
-
bcb601288c42c464ea0ecc31530a12e2
|
@@ -1 +0,0 @@
|
|
1
|
-
bc349d7a7962325cd2144ced1c56ce133bee139d
|
@@ -1 +0,0 @@
|
|
1
|
-
dc3343fb6d3cd10bd5f4e0598c02b6b45668608c9975995ba0fb9e7da50762fc
|
@@ -1 +0,0 @@
|
|
1
|
-
405f40938d5fddac35c1f117c854f0e4e3cfb694a51d208a96c5684967af0e3b704055971207165da3dffe452b673033bc1fc22c3a022cdc278324c62ba9a64f
|
@@ -1 +0,0 @@
|
|
1
|
-
4b93f40057df636c3ddbb6129f104436
|
@@ -1 +0,0 @@
|
|
1
|
-
f06adee221023eee7704f88b1ca9012f0b48815b
|
@@ -1 +0,0 @@
|
|
1
|
-
d0e7ff5aee0496c642ac6e7547e5bdf0222068986f395d2616bf8b41ed284270
|
@@ -1 +0,0 @@
|
|
1
|
-
3123f0cd6b33117ed4f060b2dd8be108cebb6a71a0e1713d4a9977da967bab79b4d4a485ad1ec6f0dc9c28624b8f2ce5b0c787a6c275fb9c8bb0a2526d3bd454
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
f62ab63d03ba71b4776965696f3d4a88
|
@@ -1 +0,0 @@
|
|
1
|
-
1a38f931edf9925af1d131a0e0a0822bd880dcc8
|
@@ -1 +0,0 @@
|
|
1
|
-
4145b5a8078b613e10205937ffb3da254d006fe78fbb169d8b2cedb3d02c021c
|
@@ -1 +0,0 @@
|
|
1
|
-
ab25979faccc1aa8200a637ea866a5fc59e35bf340170673a01253ae8ce479fb5b7af87167dbde2d43d5b536f3fb350b34b478bbf75f5e87d5276940283a8ab6
|
@@ -1 +0,0 @@
|
|
1
|
-
0f34dff60d46963f6a120857eb6900fa
|
@@ -1 +0,0 @@
|
|
1
|
-
c81aa21c24f7a13a8d81ea26f741133174302635
|
@@ -1 +0,0 @@
|
|
1
|
-
2a161ee847ccd252489157501f04d65f0d6a9c1860f4919fc61b45c3ae9fee82
|
@@ -1 +0,0 @@
|
|
1
|
-
ee62e034c06a7df4b3b3740f955ac7ec7406a04f461d572be2af57be1660972e1f5b97192319b6321bda4a709953b259d6da0d54ff5eb2426de8615f1ca66753
|