@rnw-community/wdio 0.18.4 → 0.20.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/component/visible.component.d.ts +5 -2
- package/dist/component/visible.component.d.ts.map +1 -1
- package/dist/component/visible.component.js +85 -19
- package/dist/component/visible.component.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/type/index.d.ts +5 -2
- package/dist/type/index.d.ts.map +1 -1
- package/dist/type/index.js +0 -16
- package/dist/type/index.js.map +1 -1
- package/dist/type/selector-methods.type.d.ts +2 -0
- package/dist/type/selector-methods.type.d.ts.map +1 -0
- package/dist/type/selector-methods.type.js +3 -0
- package/dist/type/selector-methods.type.js.map +1 -0
- package/dist/type/visible-component-with-selectors-ctor.type.d.ts +3 -0
- package/dist/type/visible-component-with-selectors-ctor.type.d.ts.map +1 -0
- package/dist/type/visible-component-with-selectors-ctor.type.js +3 -0
- package/dist/type/visible-component-with-selectors-ctor.type.js.map +1 -0
- package/dist/type/visible-component-with-selectors.type.d.ts +23 -0
- package/dist/type/visible-component-with-selectors.type.d.ts.map +1 -0
- package/dist/type/visible-component-with-selectors.type.js +3 -0
- package/dist/type/visible-component-with-selectors.type.js.map +1 -0
- package/dist/util/create-visible-component/create-visible-component.d.ts +3 -0
- package/dist/util/create-visible-component/create-visible-component.d.ts.map +1 -0
- package/dist/util/create-visible-component/create-visible-component.js +9 -0
- package/dist/util/create-visible-component/create-visible-component.js.map +1 -0
- package/dist/util/get-visible-component/get-visible-component.d.ts +1 -18
- package/dist/util/get-visible-component/get-visible-component.d.ts.map +1 -1
- package/dist/util/get-visible-component/get-visible-component.js +24 -7
- package/dist/util/get-visible-component/get-visible-component.js.map +1 -1
- package/dist/util/index.d.ts +5 -4
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +11 -18
- package/dist/util/index.js.map +1 -1
- package/package.json +2 -2
- package/readme.md +4 -0
|
@@ -4,17 +4,20 @@ export declare class VisibleComponent {
|
|
|
4
4
|
private readonly constructorSelector;
|
|
5
5
|
constructor(selectorOrElement: WebdriverIO.Element | string);
|
|
6
6
|
get RootEl(): Promise<WebdriverIO.Element>;
|
|
7
|
-
/** @deprecated Use RootEl getter to follow semantic */
|
|
8
|
-
get rootEl(): Promise<WebdriverIO.Element>;
|
|
9
7
|
isExisting(): Promise<boolean>;
|
|
10
8
|
isNotExisting(): Promise<void>;
|
|
11
9
|
isReady(): Promise<void>;
|
|
12
10
|
isDisplayed(): Promise<boolean>;
|
|
11
|
+
click(): Promise<void>;
|
|
13
12
|
getChildEl(selector: string, root?: Promise<WebdriverIO.Element>): Promise<WebdriverIO.Element>;
|
|
14
13
|
getChildEls(selector: string, root?: Promise<WebdriverIO.Element>): Promise<WebdriverIO.ElementArray>;
|
|
14
|
+
getChildElByIdx(selector: string, idx: number, root?: Promise<WebdriverIO.Element>): Promise<WebdriverIO.Element>;
|
|
15
15
|
clickChildEl(selector: string, root?: Promise<WebdriverIO.Element>): Promise<void>;
|
|
16
|
+
clickByIdxChildEl(selector: string, idx: number, root?: Promise<WebdriverIO.Element>): Promise<void>;
|
|
16
17
|
isDisplayedChildEl(selector: string, root?: Promise<WebdriverIO.Element>): Promise<boolean>;
|
|
17
18
|
isExistingChildEl(selector: string, root?: Promise<WebdriverIO.Element>): Promise<boolean>;
|
|
18
19
|
getTextChildEl(selector: string, root?: Promise<WebdriverIO.Element>): Promise<string>;
|
|
20
|
+
waitForExistsChildEl(selector: string, root?: Promise<WebdriverIO.Element>): Promise<void>;
|
|
21
|
+
waitForDisplayedChildEl(selector: string, root?: Promise<WebdriverIO.Element>): Promise<void>;
|
|
19
22
|
}
|
|
20
23
|
//# sourceMappingURL=visible.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visible.component.d.ts","sourceRoot":"","sources":["../../src/component/visible.component.ts"],"names":[],"mappings":";AAIA,qBAAa,gBAAgB;IACzB,OAAO,CAAC,QAAQ,CAAC,aAAa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AC;IAInF,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,+BAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAI1E,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,+BAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAIzE,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,+BAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAIrE,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,+BAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzE,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,+BAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrF"}
|
|
@@ -56,19 +56,11 @@ var VisibleComponent = /** @class */ (function () {
|
|
|
56
56
|
enumerable: false,
|
|
57
57
|
configurable: true
|
|
58
58
|
});
|
|
59
|
-
Object.defineProperty(VisibleComponent.prototype, "rootEl", {
|
|
60
|
-
/** @deprecated Use RootEl getter to follow semantic */
|
|
61
|
-
get: function () {
|
|
62
|
-
return this.RootEl;
|
|
63
|
-
},
|
|
64
|
-
enumerable: false,
|
|
65
|
-
configurable: true
|
|
66
|
-
});
|
|
67
59
|
VisibleComponent.prototype.isExisting = function () {
|
|
68
60
|
return __awaiter(this, void 0, void 0, function () {
|
|
69
61
|
return __generator(this, function (_a) {
|
|
70
62
|
switch (_a.label) {
|
|
71
|
-
case 0: return [4 /*yield*/, this.
|
|
63
|
+
case 0: return [4 /*yield*/, this.RootEl];
|
|
72
64
|
case 1: return [4 /*yield*/, (_a.sent()).isExisting()];
|
|
73
65
|
case 2: return [2 /*return*/, _a.sent()];
|
|
74
66
|
}
|
|
@@ -79,7 +71,7 @@ var VisibleComponent = /** @class */ (function () {
|
|
|
79
71
|
return __awaiter(this, void 0, void 0, function () {
|
|
80
72
|
return __generator(this, function (_a) {
|
|
81
73
|
switch (_a.label) {
|
|
82
|
-
case 0: return [4 /*yield*/, this.
|
|
74
|
+
case 0: return [4 /*yield*/, this.RootEl];
|
|
83
75
|
case 1: return [4 /*yield*/, (_a.sent()).waitForDisplayed({ reverse: true })];
|
|
84
76
|
case 2:
|
|
85
77
|
_a.sent();
|
|
@@ -92,7 +84,7 @@ var VisibleComponent = /** @class */ (function () {
|
|
|
92
84
|
return __awaiter(this, void 0, void 0, function () {
|
|
93
85
|
return __generator(this, function (_a) {
|
|
94
86
|
switch (_a.label) {
|
|
95
|
-
case 0: return [4 /*yield*/, this.
|
|
87
|
+
case 0: return [4 /*yield*/, this.RootEl];
|
|
96
88
|
case 1: return [4 /*yield*/, (_a.sent()).waitForDisplayed()];
|
|
97
89
|
case 2:
|
|
98
90
|
_a.sent();
|
|
@@ -105,15 +97,28 @@ var VisibleComponent = /** @class */ (function () {
|
|
|
105
97
|
return __awaiter(this, void 0, void 0, function () {
|
|
106
98
|
return __generator(this, function (_a) {
|
|
107
99
|
switch (_a.label) {
|
|
108
|
-
case 0: return [4 /*yield*/, this.
|
|
100
|
+
case 0: return [4 /*yield*/, this.RootEl];
|
|
109
101
|
case 1: return [4 /*yield*/, (_a.sent()).isDisplayed()];
|
|
110
102
|
case 2: return [2 /*return*/, _a.sent()];
|
|
111
103
|
}
|
|
112
104
|
});
|
|
113
105
|
});
|
|
114
106
|
};
|
|
107
|
+
VisibleComponent.prototype.click = function () {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
109
|
+
return __generator(this, function (_a) {
|
|
110
|
+
switch (_a.label) {
|
|
111
|
+
case 0: return [4 /*yield*/, this.RootEl];
|
|
112
|
+
case 1: return [4 /*yield*/, (_a.sent()).click()];
|
|
113
|
+
case 2:
|
|
114
|
+
_a.sent();
|
|
115
|
+
return [2 /*return*/];
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
};
|
|
115
120
|
VisibleComponent.prototype.getChildEl = function (selector, root) {
|
|
116
|
-
if (root === void 0) { root = this.
|
|
121
|
+
if (root === void 0) { root = this.RootEl; }
|
|
117
122
|
return __awaiter(this, void 0, void 0, function () {
|
|
118
123
|
var _this = this;
|
|
119
124
|
return __generator(this, function (_a) {
|
|
@@ -130,7 +135,7 @@ var VisibleComponent = /** @class */ (function () {
|
|
|
130
135
|
});
|
|
131
136
|
};
|
|
132
137
|
VisibleComponent.prototype.getChildEls = function (selector, root) {
|
|
133
|
-
if (root === void 0) { root = this.
|
|
138
|
+
if (root === void 0) { root = this.RootEl; }
|
|
134
139
|
return __awaiter(this, void 0, void 0, function () {
|
|
135
140
|
var _this = this;
|
|
136
141
|
return __generator(this, function (_a) {
|
|
@@ -146,20 +151,53 @@ var VisibleComponent = /** @class */ (function () {
|
|
|
146
151
|
});
|
|
147
152
|
});
|
|
148
153
|
};
|
|
154
|
+
VisibleComponent.prototype.getChildElByIdx = function (selector, idx, root) {
|
|
155
|
+
if (root === void 0) { root = this.RootEl; }
|
|
156
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
157
|
+
var _this = this;
|
|
158
|
+
return __generator(this, function (_a) {
|
|
159
|
+
switch (_a.label) {
|
|
160
|
+
case 0: return [4 /*yield*/, root.then(function (rootEl) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
161
|
+
switch (_a.label) {
|
|
162
|
+
case 0: return [4 /*yield*/, rootEl.testID$$Index(selector, idx)];
|
|
163
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
164
|
+
}
|
|
165
|
+
}); }); })];
|
|
166
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
};
|
|
149
171
|
VisibleComponent.prototype.clickChildEl = function (selector, root) {
|
|
150
|
-
if (root === void 0) { root = this.
|
|
172
|
+
if (root === void 0) { root = this.RootEl; }
|
|
151
173
|
return __awaiter(this, void 0, void 0, function () {
|
|
152
174
|
return __generator(this, function (_a) {
|
|
153
175
|
switch (_a.label) {
|
|
154
176
|
case 0: return [4 /*yield*/, this.getChildEl(selector, root)];
|
|
155
177
|
case 1: return [4 /*yield*/, (_a.sent()).click()];
|
|
156
|
-
case 2:
|
|
178
|
+
case 2:
|
|
179
|
+
_a.sent();
|
|
180
|
+
return [2 /*return*/];
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
VisibleComponent.prototype.clickByIdxChildEl = function (selector, idx, root) {
|
|
186
|
+
if (root === void 0) { root = this.RootEl; }
|
|
187
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
188
|
+
return __generator(this, function (_a) {
|
|
189
|
+
switch (_a.label) {
|
|
190
|
+
case 0: return [4 /*yield*/, this.getChildElByIdx(selector, idx, root)];
|
|
191
|
+
case 1: return [4 /*yield*/, (_a.sent()).click()];
|
|
192
|
+
case 2:
|
|
193
|
+
_a.sent();
|
|
194
|
+
return [2 /*return*/];
|
|
157
195
|
}
|
|
158
196
|
});
|
|
159
197
|
});
|
|
160
198
|
};
|
|
161
199
|
VisibleComponent.prototype.isDisplayedChildEl = function (selector, root) {
|
|
162
|
-
if (root === void 0) { root = this.
|
|
200
|
+
if (root === void 0) { root = this.RootEl; }
|
|
163
201
|
return __awaiter(this, void 0, void 0, function () {
|
|
164
202
|
return __generator(this, function (_a) {
|
|
165
203
|
switch (_a.label) {
|
|
@@ -171,7 +209,7 @@ var VisibleComponent = /** @class */ (function () {
|
|
|
171
209
|
});
|
|
172
210
|
};
|
|
173
211
|
VisibleComponent.prototype.isExistingChildEl = function (selector, root) {
|
|
174
|
-
if (root === void 0) { root = this.
|
|
212
|
+
if (root === void 0) { root = this.RootEl; }
|
|
175
213
|
return __awaiter(this, void 0, void 0, function () {
|
|
176
214
|
return __generator(this, function (_a) {
|
|
177
215
|
switch (_a.label) {
|
|
@@ -183,7 +221,7 @@ var VisibleComponent = /** @class */ (function () {
|
|
|
183
221
|
});
|
|
184
222
|
};
|
|
185
223
|
VisibleComponent.prototype.getTextChildEl = function (selector, root) {
|
|
186
|
-
if (root === void 0) { root = this.
|
|
224
|
+
if (root === void 0) { root = this.RootEl; }
|
|
187
225
|
return __awaiter(this, void 0, void 0, function () {
|
|
188
226
|
return __generator(this, function (_a) {
|
|
189
227
|
switch (_a.label) {
|
|
@@ -194,6 +232,34 @@ var VisibleComponent = /** @class */ (function () {
|
|
|
194
232
|
});
|
|
195
233
|
});
|
|
196
234
|
};
|
|
235
|
+
VisibleComponent.prototype.waitForExistsChildEl = function (selector, root) {
|
|
236
|
+
if (root === void 0) { root = this.RootEl; }
|
|
237
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
238
|
+
return __generator(this, function (_a) {
|
|
239
|
+
switch (_a.label) {
|
|
240
|
+
case 0: return [4 /*yield*/, this.getChildEl(selector, root)];
|
|
241
|
+
case 1: return [4 /*yield*/, (_a.sent()).waitForExist()];
|
|
242
|
+
case 2:
|
|
243
|
+
_a.sent();
|
|
244
|
+
return [2 /*return*/];
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
};
|
|
249
|
+
VisibleComponent.prototype.waitForDisplayedChildEl = function (selector, root) {
|
|
250
|
+
if (root === void 0) { root = this.RootEl; }
|
|
251
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
252
|
+
return __generator(this, function (_a) {
|
|
253
|
+
switch (_a.label) {
|
|
254
|
+
case 0: return [4 /*yield*/, this.getChildEl(selector, root)];
|
|
255
|
+
case 1: return [4 /*yield*/, (_a.sent()).waitForDisplayed()];
|
|
256
|
+
case 2:
|
|
257
|
+
_a.sent();
|
|
258
|
+
return [2 /*return*/];
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
};
|
|
197
263
|
return VisibleComponent;
|
|
198
264
|
}());
|
|
199
265
|
exports.VisibleComponent = VisibleComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visible.component.js","sourceRoot":"","sources":["../../src/component/visible.component.ts"],"names":[],"mappings":";;;;;;;;;;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testID$: (testID: string) => Promise<Element>;
|
|
7
7
|
testID$$: (testID: string) => Promise<ElementArray>;
|
|
8
|
-
testID$$Index: (testID: string) => Promise<Element>;
|
|
8
|
+
testID$$Index: (testID: string, idx: number) => Promise<Element>;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
interface MultiRemoteBrowser {
|
|
12
12
|
openDeepLink: (url: string) => Promise<void>;
|
|
13
13
|
testID$: (testID: string) => Promise<Element>;
|
|
14
14
|
testID$$: (testID: string) => Promise<ElementArray>;
|
|
15
|
-
testID$$Index: (testID: string) => Promise<Element>;
|
|
15
|
+
testID$$Index: (testID: string, idx: number) => Promise<Element>;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
interface Element {
|
|
@@ -22,7 +22,7 @@ declare namespace WebdriverIO {
|
|
|
22
22
|
swipe: (direction: SwipeDirectionType, offset = { x: 0, y: 0 }) => Promise<void>;
|
|
23
23
|
testID$: (testID: string) => Promise<Element>;
|
|
24
24
|
testID$$: (testID: string) => Promise<ElementArray>;
|
|
25
|
-
testID$$Index: (testID: string) => Promise<Element>;
|
|
25
|
+
testID$$Index: (testID: string, idx: number) => Promise<Element>;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
package/dist/type/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type { SelectorContextType } from './selector-context.type';
|
|
2
|
+
export type { SwipeDirectionType } from './swipe-direction.type';
|
|
3
|
+
export type { SelectorMethods } from './selector-methods.type';
|
|
4
|
+
export type { VisibleComponentWithSelectors } from './visible-component-with-selectors.type';
|
|
5
|
+
export type { VisibleComponentWithSelectorsCtor } from './visible-component-with-selectors-ctor.type';
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/type/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/type/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/type/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AAC7F,YAAY,EAAE,iCAAiC,EAAE,MAAM,8CAA8C,CAAC"}
|
package/dist/type/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./selector-context.type"), exports);
|
|
18
|
-
__exportStar(require("./swipe-direction.type"), exports);
|
|
19
3
|
//# sourceMappingURL=index.js.map
|
package/dist/type/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/type/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/type/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selector-methods.type.d.ts","sourceRoot":"","sources":["../../src/type/selector-methods.type.ts"],"names":[],"mappings":"AAEA,oBAAY,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,MAAM,IAAI,MAAM,QAAQ,EAAE,GACzG,QAAQ,SAAS,MAAM,GACnB,KAAK,GACL,GAAG,QAAQ,GAAG,CAAC,EAAE,GACrB,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selector-methods.type.js","sourceRoot":"","sources":["../../src/type/selector-methods.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { VisibleComponentWithSelectors } from './visible-component-with-selectors.type';
|
|
2
|
+
export declare type VisibleComponentWithSelectorsCtor<T extends string> = new (selectorOrElement?: WebdriverIO.Element | string) => VisibleComponentWithSelectors<T>;
|
|
3
|
+
//# sourceMappingURL=visible-component-with-selectors-ctor.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visible-component-with-selectors-ctor.type.d.ts","sourceRoot":"","sources":["../../src/type/visible-component-with-selectors-ctor.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AAE7F,oBAAY,iCAAiC,CAAC,CAAC,SAAS,MAAM,IAAI,KAC9D,iBAAiB,CAAC,EAAE,WAAW,CAAC,OAAO,GAAG,MAAM,KAC/C,6BAA6B,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visible-component-with-selectors-ctor.type.js","sourceRoot":"","sources":["../../src/type/visible-component-with-selectors-ctor.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="webdriverio/async" />
|
|
2
|
+
import type { VisibleComponent } from '../component';
|
|
3
|
+
import type { SelectorMethods } from './selector-methods.type';
|
|
4
|
+
export declare type VisibleComponentWithSelectors<T extends string> = VisibleComponent & {
|
|
5
|
+
[TKey in SelectorMethods<T, 'ClickByIdx'>]: (idx: number) => Promise<void>;
|
|
6
|
+
} & {
|
|
7
|
+
[TKey in SelectorMethods<T, 'El'>]: Promise<WebdriverIO.Element>;
|
|
8
|
+
} & {
|
|
9
|
+
[TKey in SelectorMethods<T, 'Els'>]: Promise<WebdriverIO.ElementArray>;
|
|
10
|
+
} & {
|
|
11
|
+
[TKey in SelectorMethods<T, 'Exists'>]: Promise<boolean>;
|
|
12
|
+
} & {
|
|
13
|
+
[TKey in SelectorMethods<T, 'IsDisplayed'>]: Promise<boolean>;
|
|
14
|
+
} & {
|
|
15
|
+
[TKey in SelectorMethods<T, 'Text'>]: Promise<string>;
|
|
16
|
+
} & {
|
|
17
|
+
[TKey in SelectorMethods<T, 'WaitForDisplayed'>]: Promise<void>;
|
|
18
|
+
} & {
|
|
19
|
+
[TKey in SelectorMethods<T, 'WaitForExists'>]: Promise<void>;
|
|
20
|
+
} & {
|
|
21
|
+
[TKey in SelectorMethods<T, 'Click'>]: Promise<void>;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=visible-component-with-selectors.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visible-component-with-selectors.type.d.ts","sourceRoot":"","sources":["../../src/type/visible-component-with-selectors.type.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,oBAAY,6BAA6B,CAAC,CAAC,SAAS,MAAM,IAAI,gBAAgB,GAAG;KAC5E,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;CAC7E,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;CACnE,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC;CACzE,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;CAC3D,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,aAAa,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;CAChE,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;CACxD,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,kBAAkB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAClE,GAAG;KACC,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,eAAe,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAC/D,GAAG;KAAG,IAAI,IAAI,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visible-component-with-selectors.type.js","sourceRoot":"","sources":["../../src/type/visible-component-with-selectors.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-visible-component.d.ts","sourceRoot":"","sources":["../../../src/util/create-visible-component/create-visible-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAEhE,eAAO,MAAM,sBAAsB,yEACU,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createVisibleComponent = void 0;
|
|
4
|
+
var get_visible_component_1 = require("../get-visible-component/get-visible-component");
|
|
5
|
+
var createVisibleComponent = function (selectors) {
|
|
6
|
+
return new ((0, get_visible_component_1.getVisibleComponent)(selectors))();
|
|
7
|
+
};
|
|
8
|
+
exports.createVisibleComponent = createVisibleComponent;
|
|
9
|
+
//# sourceMappingURL=create-visible-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-visible-component.js","sourceRoot":"","sources":["../../../src/util/create-visible-component/create-visible-component.ts"],"names":[],"mappings":";;;AAAA,wFAAqF;AAI9E,IAAM,sBAAsB,GAAG,UAAsB,SAAY;IACpE,OAAA,IAAI,CAAC,IAAA,2CAAmB,EAAI,SAAS,CAAC,CAAC,EAAE;AAAzC,CAAyC,CAAC;AADjC,QAAA,sBAAsB,0BACW"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import { VisibleComponent } from '../../component';
|
|
3
|
-
declare type SelectorMethods<T extends string, S extends string> = T extends `${infer Prefix}.${infer Selector}` ? Selector extends `Root` ? never : `${Selector}${S}` : never;
|
|
4
|
-
declare type VisibleComponentWithSelectors<T extends string> = VisibleComponent & {
|
|
5
|
-
[TKey in SelectorMethods<T, 'El'>]: Promise<WebdriverIO.Element>;
|
|
6
|
-
} & {
|
|
7
|
-
[TKey in SelectorMethods<T, 'ElDisplayed'>]: Promise<boolean>;
|
|
8
|
-
} & {
|
|
9
|
-
[TKey in SelectorMethods<T, 'ElExists'>]: Promise<boolean>;
|
|
10
|
-
} & {
|
|
11
|
-
[TKey in SelectorMethods<T, 'Els'>]: Promise<WebdriverIO.ElementArray>;
|
|
12
|
-
} & {
|
|
13
|
-
[TKey in SelectorMethods<T, 'ElClick'>]: Promise<void>;
|
|
14
|
-
} & {
|
|
15
|
-
[TKey in SelectorMethods<T, 'ElText'>]: Promise<void>;
|
|
16
|
-
};
|
|
17
|
-
declare type VisibleComponentWithSelectorsCtor<T extends string> = new (selectorOrElement?: WebdriverIO.Element | string) => VisibleComponentWithSelectors<T>;
|
|
1
|
+
import type { VisibleComponentWithSelectorsCtor } from '../../type';
|
|
18
2
|
export declare const getVisibleComponent: <T extends string, E = unknown>(selectors: E) => VisibleComponentWithSelectorsCtor<T>;
|
|
19
|
-
export {};
|
|
20
3
|
//# sourceMappingURL=get-visible-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-visible-component.d.ts","sourceRoot":"","sources":["../../../src/util/get-visible-component/get-visible-component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-visible-component.d.ts","sourceRoot":"","sources":["../../../src/util/get-visible-component/get-visible-component.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,YAAY,CAAC;AAGpE,eAAO,MAAM,mBAAmB,uFAwE3B,CAAC"}
|
|
@@ -18,13 +18,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.getVisibleComponent = void 0;
|
|
19
19
|
var shared_1 = require("@rnw-community/shared");
|
|
20
20
|
var component_1 = require("../../component");
|
|
21
|
+
// TODO: Improve typings with Enum, improve ts errors?
|
|
21
22
|
var getVisibleComponent = function (selectors) {
|
|
22
23
|
// @ts-expect-error We use proxy for dynamic fields
|
|
23
24
|
return /** @class */ (function (_super) {
|
|
24
25
|
__extends(class_1, _super);
|
|
25
26
|
function class_1(selectorOrElement) {
|
|
26
27
|
var _this = this;
|
|
27
|
-
var selectorKeys = Object.keys(selectors)
|
|
28
|
+
var selectorKeys = Object.keys(selectors);
|
|
28
29
|
// @ts-expect-error We need better enum types
|
|
29
30
|
var selectorRootKey = selectors[selectorKeys.find(function (key) { return key === 'Root'; })];
|
|
30
31
|
var rootSelector = (0, shared_1.isDefined)(selectorOrElement) ? selectorOrElement : selectorRootKey;
|
|
@@ -34,6 +35,7 @@ var getVisibleComponent = function (selectors) {
|
|
|
34
35
|
_this = _super.call(this, rootSelector) || this;
|
|
35
36
|
// eslint-disable-next-line no-constructor-return
|
|
36
37
|
return new Proxy(_this, {
|
|
38
|
+
// eslint-disable-next-line max-statements
|
|
37
39
|
get: function (proxyClient, field, receiver) {
|
|
38
40
|
if (field in proxyClient) {
|
|
39
41
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
@@ -42,32 +44,47 @@ var getVisibleComponent = function (selectors) {
|
|
|
42
44
|
// TODO: This logic need improvement to avoid false positives
|
|
43
45
|
var selectorKey = selectorKeys.find(function (key) { return field.includes(key); });
|
|
44
46
|
if ((0, shared_1.isDefined)(selectorKey)) {
|
|
45
|
-
if (field.
|
|
47
|
+
if (field.endsWith('WaitForDisplayed')) {
|
|
48
|
+
// @ts-expect-error We need to fix types of the enum
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
50
|
+
return proxyClient.waitForDisplayedChildEl(selectors[selectorKey]);
|
|
51
|
+
}
|
|
52
|
+
else if (field.endsWith('WaitForExists')) {
|
|
53
|
+
// @ts-expect-error We need to fix types of the enum
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
55
|
+
return proxyClient.waitForExistsChildEl(selectors[selectorKey]);
|
|
56
|
+
}
|
|
57
|
+
else if (field.endsWith('ClickByIdx')) {
|
|
58
|
+
// @ts-expect-error We need to fix types of the enum
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
60
|
+
return function (idx) { return proxyClient.clickByIdxChildEl(selectors[selectorKey], idx); };
|
|
61
|
+
}
|
|
62
|
+
else if (field.endsWith('Click')) {
|
|
46
63
|
// @ts-expect-error We need to fix types of the enum
|
|
47
64
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
48
65
|
return proxyClient.clickChildEl(selectors[selectorKey]);
|
|
49
66
|
}
|
|
50
|
-
else if (field.
|
|
67
|
+
else if (field.endsWith('Text')) {
|
|
51
68
|
// @ts-expect-error We need to fix types of the enum
|
|
52
69
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
53
70
|
return proxyClient.getTextChildEl(selectors[selectorKey]);
|
|
54
71
|
}
|
|
55
|
-
else if (field.
|
|
72
|
+
else if (field.endsWith('IsDisplayed')) {
|
|
56
73
|
// @ts-expect-error We need to fix types of the enum
|
|
57
74
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
58
75
|
return proxyClient.isDisplayedChildEl(selectors[selectorKey]);
|
|
59
76
|
}
|
|
60
|
-
else if (field.
|
|
77
|
+
else if (field.endsWith('Exists')) {
|
|
61
78
|
// @ts-expect-error We need to fix types of the enum
|
|
62
79
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
63
80
|
return proxyClient.isExistingChildEl(selectors[selectorKey]);
|
|
64
81
|
}
|
|
65
|
-
else if (field.
|
|
82
|
+
else if (field.endsWith('Els')) {
|
|
66
83
|
// @ts-expect-error We need to fix types of the enum
|
|
67
84
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
68
85
|
return proxyClient.getChildEls(selectors[selectorKey]);
|
|
69
86
|
}
|
|
70
|
-
else if (field.
|
|
87
|
+
else if (field.endsWith('El')) {
|
|
71
88
|
// @ts-expect-error We need to fix types of the enum
|
|
72
89
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
73
90
|
return proxyClient.getChildEl(selectors[selectorKey]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-visible-component.js","sourceRoot":"","sources":["../../../src/util/get-visible-component/get-visible-component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,gDAAkD;AAElD,6CAAmD;
|
|
1
|
+
{"version":3,"file":"get-visible-component.js","sourceRoot":"","sources":["../../../src/util/get-visible-component/get-visible-component.ts"],"names":[],"mappings":";;;;;;;;;;;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OAAO,WAAW,CAAC,WAAW,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;yBAC1D;6BAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;4BAC7B,oDAAoD;4BACpD,iEAAiE;4BACjE,OAAO,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;yBACzD;qBACJ;oBAED,OAAO,SAAS,CAAC;gBACrB,CAAC;aACJ,CAAC,CAAC;QACP,CAAC;QACL,cAAC;IAAD,CAAC,AAtED,CAAc,4BAAgB;AAA9B,CAsEC,CAAC;AAxEO,QAAA,mBAAmB,uBAwE1B"}
|
package/dist/util/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export { setTestID } from './set-test-id';
|
|
2
|
+
export { getTestID } from './get-test-id';
|
|
3
|
+
export { setPropTestID } from './set-prop-test-id';
|
|
4
|
+
export { getVisibleComponent } from './get-visible-component/get-visible-component';
|
|
5
|
+
export { createVisibleComponent } from './create-visible-component/create-visible-component';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/util/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC"}
|
package/dist/util/index.js
CHANGED
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
3
|
+
exports.createVisibleComponent = exports.getVisibleComponent = exports.setPropTestID = exports.getTestID = exports.setTestID = void 0;
|
|
4
|
+
var set_test_id_1 = require("./set-test-id");
|
|
5
|
+
Object.defineProperty(exports, "setTestID", { enumerable: true, get: function () { return set_test_id_1.setTestID; } });
|
|
6
|
+
var get_test_id_1 = require("./get-test-id");
|
|
7
|
+
Object.defineProperty(exports, "getTestID", { enumerable: true, get: function () { return get_test_id_1.getTestID; } });
|
|
8
|
+
var set_prop_test_id_1 = require("./set-prop-test-id");
|
|
9
|
+
Object.defineProperty(exports, "setPropTestID", { enumerable: true, get: function () { return set_prop_test_id_1.setPropTestID; } });
|
|
10
|
+
var get_visible_component_1 = require("./get-visible-component/get-visible-component");
|
|
11
|
+
Object.defineProperty(exports, "getVisibleComponent", { enumerable: true, get: function () { return get_visible_component_1.getVisibleComponent; } });
|
|
12
|
+
var create_visible_component_1 = require("./create-visible-component/create-visible-component");
|
|
13
|
+
Object.defineProperty(exports, "createVisibleComponent", { enumerable: true, get: function () { return create_visible_component_1.createVisibleComponent; } });
|
|
21
14
|
//# sourceMappingURL=index.js.map
|
package/dist/util/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAAjC,wGAAA,SAAS,OAAA;AAClB,6CAA0C;AAAjC,wGAAA,SAAS,OAAA;AAClB,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;AACtB,uFAAoF;AAA3E,4HAAA,mBAAmB,OAAA;AAC5B,gGAA6F;AAApF,kIAAA,sBAAsB,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rnw-community/wdio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "WDIO commands, page objects and utils",
|
|
6
6
|
"keywords": [
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=14.0.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "52e420d20c680503f175210583fa539036fcbd53",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@rnw-community/shared": "^0.8.0"
|
|
41
41
|
},
|