@@ -1028,8 +1028,19 @@ declare global {
1028
1028
* @example
1029
1029
* await expect(element(by.id('PinchableScrollView'))).toBeVisible();
1030
1030
* await element(by.id('PinchableScrollView')).pinchWithAngle('outward', 'slow', 0);
1031
+ * @deprecated Should use pinch instead
1031
1032
*/
1032
- pinchWithAngle ( direction : Direction , speed : Speed , angle : number ) : Promise < void > ;
1033
+ pinchWithAngle ( direction : PinchDirection , speed : Speed , angle : number ) : Promise < void > ;
1034
+
1035
+ /**
1036
+ * Pinches with the given scale, speed, and angle. (iOS only)
1037
+ * @param angle value in radiant, default is `0`
1038
+ * @example
1039
+ * await element(by.id('PinchableScrollView')).pinch(1.1);
1040
+ * await element(by.id('PinchableScrollView')).pinch(2.0);
1041
+ * await element(by.id('PinchableScrollView')).pinch(0.001);
1042
+ */
1043
+ pinch ( scale : number , speed : Speed , angle : number ) : Promise < void > ;
1033
1044
}
1034
1045
1035
1046
interface WebExpect < R = Promise < void > > {
@@ -1138,6 +1149,8 @@ declare global {
1138
1149
1139
1150
type Direction = 'left' | 'right' | 'top' | 'bottom' | 'up' | 'down' ;
1140
1151
1152
+ type PinchDirection = 'outward' | 'inward'
1153
+
1141
1154
type Orientation = 'portrait' | 'landscape' ;
1142
1155
1143
1156
type Speed = 'fast' | 'slow' ;
@@ -1250,4 +1263,4 @@ declare global {
1250
1263
}
1251
1264
1252
1265
declare const detox : Detox . DetoxExportWrapper ;
1253
- export = detox ;
1266
+ export = detox ;
0 commit comments