@rnw-community/wdio 0.29.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/add-wdio-commands.js +9 -66
- package/dist/add-wdio-commands.js.map +1 -1
- package/dist/capability/is-android.capability.js +1 -1
- package/dist/capability/is-android.capability.js.map +1 -1
- package/dist/capability/is-browser.capability.js +1 -3
- package/dist/capability/is-browser.capability.js.map +1 -1
- package/dist/capability/is-ios.capability.js +3 -3
- package/dist/capability/is-ios.capability.js.map +1 -1
- package/dist/command/clear-input.command.js +7 -62
- package/dist/command/clear-input.command.js.map +1 -1
- package/dist/command/mobile/open-deep-link.command.js +21 -90
- package/dist/command/mobile/open-deep-link.command.js.map +1 -1
- package/dist/command/mobile/relative-click.command.js +7 -55
- package/dist/command/mobile/relative-click.command.js.map +1 -1
- package/dist/command/slow-input.command.js +12 -95
- package/dist/command/slow-input.command.js.map +1 -1
- package/dist/command/swipe.command.js +40 -113
- package/dist/command/swipe.command.js.map +1 -1
- package/dist/command/test-id-index.command.js +7 -53
- package/dist/command/test-id-index.command.js.map +1 -1
- package/dist/command/test-id.command.js +2 -46
- package/dist/command/test-id.command.js.map +1 -1
- package/dist/command/test-ids.command.js +2 -46
- package/dist/command/test-ids.command.js.map +1 -1
- package/dist/component/component/component.js +44 -234
- package/dist/component/component/component.js.map +1 -1
- package/dist/component/create-component/create-component.js +2 -4
- package/dist/component/create-component/create-component.js.map +1 -1
- package/dist/component/create-rooted-component/create-rooted-component.js +2 -2
- package/dist/component/create-rooted-component/create-rooted-component.js.map +1 -1
- package/dist/component/get-component/get-component.js +18 -36
- package/dist/component/get-component/get-component.js.map +1 -1
- package/dist/component/get-rooted-component/get-rooted-component.js +22 -41
- package/dist/component/get-rooted-component/get-rooted-component.js.map +1 -1
- package/dist/component/rooted-component/rooted-component.js +42 -212
- package/dist/component/rooted-component/rooted-component.js.map +1 -1
- package/dist/component/util/find-enum-root-selector.util.js +4 -4
- package/dist/component/util/find-enum-root-selector.util.js.map +1 -1
- package/dist/component/util/proxy-call.util.js +17 -62
- package/dist/component/util/proxy-call.util.js.map +1 -1
- package/dist/selector/android-testid.selector.js +1 -1
- package/dist/selector/android-testid.selector.js.map +1 -1
- package/dist/selector/ios-testid.selector.js +1 -1
- package/dist/selector/ios-testid.selector.js.map +1 -1
- package/dist/selector/mobile-testid.selector.js +4 -6
- package/dist/selector/mobile-testid.selector.js.map +1 -1
- package/dist/selector/test-id.selector.js +4 -6
- package/dist/selector/test-id.selector.js.map +1 -1
- package/dist/selector/web-testid.selector.js +2 -2
- package/dist/selector/web-testid.selector.js.map +1 -1
- package/dist/util/get-platform.util.js +1 -1
- package/dist/util/get-platform.util.js.map +1 -1
- package/dist/util/get-test-id/get-test-id.js +5 -8
- package/dist/util/get-test-id/get-test-id.js.map +1 -1
- package/dist/util/set-prop-test-id/set-prop-test-id.js +3 -18
- package/dist/util/set-prop-test-id/set-prop-test-id.js.map +1 -1
- package/dist/util/set-test-id/set-test-id.js +7 -12
- package/dist/util/set-test-id/set-test-id.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,120 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
3
|
exports.swipeCommand = void 0;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
elSize
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
]];
|
|
84
|
-
case 'bottom':
|
|
85
|
-
return [2 /*return*/, [
|
|
86
|
-
{ x: elSize.width / 2 + offset.x, y: elPos.y + offset.y },
|
|
87
|
-
{ x: elSize.width / 2, y: elSize.height + ANDROID_SWIPE_OFFSET },
|
|
88
|
-
]];
|
|
89
|
-
default:
|
|
90
|
-
throw new Error('Invalid swipe direction');
|
|
91
|
-
}
|
|
92
|
-
return [2 /*return*/];
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
});
|
|
4
|
+
const getSwipePositionsByDirection = async (element, direction, offset = { x: 0, y: 0 }) => {
|
|
5
|
+
// eslint-disable-next-line no-magic-numbers
|
|
6
|
+
const ANDROID_SWIPE_OFFSET = browser.isAndroid ? -10 : 0;
|
|
7
|
+
const elSize = await element.getSize();
|
|
8
|
+
const elPos = await element.getLocation();
|
|
9
|
+
switch (direction) {
|
|
10
|
+
case 'left':
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
x: elPos.x + offset.x + elSize.width + ANDROID_SWIPE_OFFSET,
|
|
14
|
+
y: elPos.y + elSize.height / 2 + offset.y,
|
|
15
|
+
},
|
|
16
|
+
{ x: elPos.x, y: elPos.y + elSize.height / 2 + offset.y },
|
|
17
|
+
];
|
|
18
|
+
case 'right':
|
|
19
|
+
return [
|
|
20
|
+
{ x: elPos.x + offset.x, y: elPos.y + elSize.height / 2 + offset.y },
|
|
21
|
+
{ x: elPos.x + elSize.width + ANDROID_SWIPE_OFFSET, y: elPos.y + elSize.height / 2 + offset.y },
|
|
22
|
+
];
|
|
23
|
+
case 'top':
|
|
24
|
+
return [
|
|
25
|
+
{ x: elSize.width / 2 + offset.x, y: elPos.y + offset.y },
|
|
26
|
+
{ x: elSize.width / 2, y: 50 },
|
|
27
|
+
];
|
|
28
|
+
case 'bottom':
|
|
29
|
+
return [
|
|
30
|
+
{ x: elSize.width / 2 + offset.x, y: elPos.y + offset.y },
|
|
31
|
+
{ x: elSize.width / 2, y: elSize.height + ANDROID_SWIPE_OFFSET },
|
|
32
|
+
];
|
|
33
|
+
default:
|
|
34
|
+
throw new Error('Invalid swipe direction');
|
|
35
|
+
}
|
|
96
36
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
_a = _b.sent(), swipeStart = _a[0], swipeEnd = _a[1];
|
|
106
|
-
return [4 /*yield*/, browser.touchAction([
|
|
107
|
-
__assign({ action: 'press' }, swipeStart),
|
|
108
|
-
{ action: 'wait', ms: 500 },
|
|
109
|
-
__assign({ action: 'moveTo' }, swipeEnd),
|
|
110
|
-
'release',
|
|
111
|
-
])];
|
|
112
|
-
case 2:
|
|
113
|
-
_b.sent();
|
|
114
|
-
return [2 /*return*/];
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
});
|
|
37
|
+
const swipeCommand = async function swipeCommand(direction, offset = { x: 0, y: 0 }) {
|
|
38
|
+
const [swipeStart, swipeEnd] = await getSwipePositionsByDirection(this, direction, offset);
|
|
39
|
+
await browser.touchAction([
|
|
40
|
+
{ action: 'press', ...swipeStart },
|
|
41
|
+
{ action: 'wait', ms: 500 },
|
|
42
|
+
{ action: 'moveTo', ...swipeEnd },
|
|
43
|
+
'release',
|
|
44
|
+
]);
|
|
118
45
|
};
|
|
119
46
|
exports.swipeCommand = swipeCommand;
|
|
120
47
|
//# sourceMappingURL=swipe.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swipe.command.js","sourceRoot":"","sources":["../../src/command/swipe.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"swipe.command.js","sourceRoot":"","sources":["../../src/command/swipe.command.ts"],"names":[],"mappings":";;;AAOA,MAAM,4BAA4B,GAAG,KAAK,EACtC,OAA4B,EAC5B,SAA6B,EAC7B,SAAmB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EACQ,EAAE;IAC3C,4CAA4C;IAC5C,MAAM,oBAAoB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IACvC,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,WAAW,EAAE,CAAC;IAE1C,QAAQ,SAAS,EAAE;QACf,KAAK,MAAM;YACP,OAAO;gBACH;oBACI,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,GAAG,oBAAoB;oBAC3D,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;iBAC5C;gBACD,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE;aAC5D,CAAC;QAEN,KAAK,OAAO;YACR,OAAO;gBACH,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE;gBACpE,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,GAAG,oBAAoB,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE;aAClG,CAAC;QAEN,KAAK,KAAK;YACN,OAAO;gBACH,EAAE,CAAC,EAAE,MAAM,CAAC,KAAK,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE;gBACzD,EAAE,CAAC,EAAE,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE;aACjC,CAAC;QAEN,KAAK,QAAQ;YACT,OAAO;gBACH,EAAE,CAAC,EAAE,MAAM,CAAC,KAAK,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE;gBACzD,EAAE,CAAC,EAAE,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,oBAAoB,EAAE;aACnE,CAAC;QAEN;YACI,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAClD;AACL,CAAC,CAAC;AAEK,MAAM,YAAY,GAAG,KAAK,UAAU,YAAY,CAEnD,SAA6B,EAC7B,SAAmB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;IAEjC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,GAAG,MAAM,4BAA4B,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAE3F,MAAM,OAAO,CAAC,WAAW,CAAC;QACtB,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE;QAClC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE;QAC3B,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE;QACjC,SAAS;KACZ,CAAC,CAAC;AACP,CAAC,CAAC;AAbW,QAAA,YAAY,gBAavB"}
|
|
@@ -1,59 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
3
|
exports.testID$$Index = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
case 0: return [4 /*yield*/, (0, test_ids_command_1.testID$$)(testID, context)];
|
|
48
|
-
case 1:
|
|
49
|
-
elements = _a.sent();
|
|
50
|
-
if (index >= elements.length || index < 0) {
|
|
51
|
-
throw new Error("Cannot get item by testID \"".concat(testID, "\" with index \"").concat(index, "\""));
|
|
52
|
-
}
|
|
53
|
-
return [2 /*return*/, elements[index]];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
});
|
|
4
|
+
const test_ids_command_1 = require("./test-ids.command");
|
|
5
|
+
const testID$$Index = async (testID, index, context = browser) => {
|
|
6
|
+
const elements = await (0, test_ids_command_1.testID$$)(testID, context);
|
|
7
|
+
if (index >= elements.length || index < 0) {
|
|
8
|
+
throw new Error(`Cannot get item by testID "${testID}" with index "${index}"`);
|
|
9
|
+
}
|
|
10
|
+
return elements[index];
|
|
57
11
|
};
|
|
58
12
|
exports.testID$$Index = testID$$Index;
|
|
59
13
|
//# sourceMappingURL=test-id-index.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-id-index.command.js","sourceRoot":"","sources":["../../src/command/test-id-index.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-id-index.command.js","sourceRoot":"","sources":["../../src/command/test-id-index.command.ts"],"names":[],"mappings":";;;AAAA,yDAA8C;AAIvC,MAAM,aAAa,GAAG,KAAK,EAC9B,MAAc,EACd,KAAa,EACb,UAA+B,OAAO,EACV,EAAE;IAC9B,MAAM,QAAQ,GAAG,MAAM,IAAA,2BAAQ,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjD,IAAI,KAAK,IAAI,QAAQ,CAAC,MAAM,IAAI,KAAK,GAAG,CAAC,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,8BAA8B,MAAM,iBAAiB,KAAK,GAAG,CAAC,CAAC;KAClF;IAED,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC,CAAC;AAZW,QAAA,aAAa,iBAYxB"}
|
|
@@ -1,51 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
3
|
exports.testID$ = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (context === void 0) { context = browser; }
|
|
43
|
-
return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
44
|
-
switch (_a.label) {
|
|
45
|
-
case 0: return [4 /*yield*/, context.$((0, selector_1.testIDSelector)(testID))];
|
|
46
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
47
|
-
}
|
|
48
|
-
}); });
|
|
49
|
-
};
|
|
4
|
+
const selector_1 = require("../selector");
|
|
5
|
+
const testID$ = async (testID, context = browser) => await context.$((0, selector_1.testIDSelector)(testID));
|
|
50
6
|
exports.testID$ = testID$;
|
|
51
7
|
//# sourceMappingURL=test-id.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-id.command.js","sourceRoot":"","sources":["../../src/command/test-id.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-id.command.js","sourceRoot":"","sources":["../../src/command/test-id.command.ts"],"names":[],"mappings":";;;AAAA,0CAA6C;AAItC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAc,EAAE,UAA+B,OAAO,EAAgC,EAAE,CAClH,MAAM,OAAO,CAAC,CAAC,CAAC,IAAA,yBAAc,EAAC,MAAM,CAAC,CAAC,CAAC;AAD/B,QAAA,OAAO,WACwB"}
|
|
@@ -1,51 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
3
|
exports.testID$$ = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (context === void 0) { context = browser; }
|
|
43
|
-
return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
44
|
-
switch (_a.label) {
|
|
45
|
-
case 0: return [4 /*yield*/, context.$$((0, selector_1.testIDSelector)(testID))];
|
|
46
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
47
|
-
}
|
|
48
|
-
}); });
|
|
49
|
-
};
|
|
4
|
+
const selector_1 = require("../selector");
|
|
5
|
+
const testID$$ = async (testID, context = browser) => await context.$$((0, selector_1.testIDSelector)(testID));
|
|
50
6
|
exports.testID$$ = testID$$;
|
|
51
7
|
//# sourceMappingURL=test-ids.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-ids.command.js","sourceRoot":"","sources":["../../src/command/test-ids.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-ids.command.js","sourceRoot":"","sources":["../../src/command/test-ids.command.ts"],"names":[],"mappings":";;;AAAA,0CAA6C;AAItC,MAAM,QAAQ,GAAG,KAAK,EAAE,MAAc,EAAE,UAA+B,OAAO,EAAqC,EAAE,CACxH,MAAM,OAAO,CAAC,EAAE,CAAC,IAAA,yBAAc,EAAC,MAAM,CAAC,CAAC,CAAC;AADhC,QAAA,QAAQ,YACwB"}
|