@rnw-community/wdio 0.44.2 → 0.45.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/cjs/rooted-component/create$-rooted-component/create$-rooted-component.d.ts +1 -1
- package/dist/cjs/rooted-component/create$-rooted-component/create$-rooted-component.d.ts.map +1 -1
- package/dist/cjs/rooted-component/create$-rooted-component/create$-rooted-component.js.map +1 -1
- package/dist/cjs/rooted-component/create-rooted-component/create-rooted-component.d.ts +1 -1
- package/dist/cjs/rooted-component/create-rooted-component/create-rooted-component.d.ts.map +1 -1
- package/dist/cjs/rooted-component/create-rooted-component/create-rooted-component.js.map +1 -1
- package/dist/cjs/rooted-component/get-extended-rooted-component/get-extended-rooted-component.d.ts.map +1 -1
- package/dist/cjs/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js +1 -2
- package/dist/cjs/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js.map +1 -1
- package/dist/cjs/rooted-component/rooted-component.d.ts +1 -1
- package/dist/cjs/rooted-component/rooted-component.d.ts.map +1 -1
- package/dist/cjs/rooted-component/rooted-component.js +12 -3
- package/dist/cjs/rooted-component/rooted-component.js.map +1 -1
- package/dist/cjs/type/rooted-component-with-selectors.type.d.ts +1 -1
- package/dist/cjs/type/rooted-component-with-selectors.type.d.ts.map +1 -1
- package/dist/cjs/util/index.d.ts +0 -1
- package/dist/cjs/util/index.d.ts.map +1 -1
- package/dist/cjs/util/index.js +1 -3
- package/dist/cjs/util/index.js.map +1 -1
- package/dist/esm/rooted-component/create$-rooted-component/create$-rooted-component.d.ts +1 -1
- package/dist/esm/rooted-component/create$-rooted-component/create$-rooted-component.d.ts.map +1 -1
- package/dist/esm/rooted-component/create$-rooted-component/create$-rooted-component.js.map +1 -1
- package/dist/esm/rooted-component/create-rooted-component/create-rooted-component.d.ts +1 -1
- package/dist/esm/rooted-component/create-rooted-component/create-rooted-component.d.ts.map +1 -1
- package/dist/esm/rooted-component/create-rooted-component/create-rooted-component.js.map +1 -1
- package/dist/esm/rooted-component/get-extended-rooted-component/get-extended-rooted-component.d.ts.map +1 -1
- package/dist/esm/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js +1 -2
- package/dist/esm/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js.map +1 -1
- package/dist/esm/rooted-component/rooted-component.d.ts +1 -1
- package/dist/esm/rooted-component/rooted-component.d.ts.map +1 -1
- package/dist/esm/rooted-component/rooted-component.js +14 -5
- package/dist/esm/rooted-component/rooted-component.js.map +1 -1
- package/dist/esm/type/rooted-component-with-selectors.type.d.ts +1 -1
- package/dist/esm/type/rooted-component-with-selectors.type.d.ts.map +1 -1
- package/dist/esm/util/index.d.ts +0 -1
- package/dist/esm/util/index.d.ts.map +1 -1
- package/dist/esm/util/index.js +0 -1
- package/dist/esm/util/index.js.map +1 -1
- package/package.json +3 -3
- package/readme.md +1 -0
- package/dist/cjs/util/find-enum-root-selector.util.d.ts +0 -2
- package/dist/cjs/util/find-enum-root-selector.util.d.ts.map +0 -1
- package/dist/cjs/util/find-enum-root-selector.util.js +0 -12
- package/dist/cjs/util/find-enum-root-selector.util.js.map +0 -1
- package/dist/esm/util/find-enum-root-selector.util.d.ts +0 -2
- package/dist/esm/util/find-enum-root-selector.util.d.ts.map +0 -1
- package/dist/esm/util/find-enum-root-selector.util.js +0 -8
- package/dist/esm/util/find-enum-root-selector.util.js.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ComponentInputArg, RootedComponentWithSelectors } from '../../type';
|
|
2
|
-
export declare const create$RootedComponent: <T>(selectors: T, selectorOrElement
|
|
2
|
+
export declare const create$RootedComponent: <T>(selectors: T, selectorOrElement: ComponentInputArg) => RootedComponentWithSelectors<T>;
|
|
3
3
|
//# sourceMappingURL=create$-rooted-component.d.ts.map
|
package/dist/cjs/rooted-component/create$-rooted-component/create$-rooted-component.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create$-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/create$-rooted-component/create$-rooted-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAElF,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"create$-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/create$-rooted-component/create$-rooted-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAElF,eAAO,MAAM,sBAAsB,uCAEZ,iBAAiB,oCACwD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create$-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/create$-rooted-component/create$-rooted-component.ts"],"names":[],"mappings":";;;AAAA,0FAAqF;AAI9E,MAAM,sBAAsB,GAAG,CAClC,SAAY,EACZ,
|
|
1
|
+
{"version":3,"file":"create$-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/create$-rooted-component/create$-rooted-component.ts"],"names":[],"mappings":";;;AAAA,0FAAqF;AAI9E,MAAM,sBAAsB,GAAG,CAClC,SAAY,EACZ,iBAAoC,EACL,EAAE,CAAC,IAAI,CAAC,IAAA,2CAAmB,EAAI,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;AAHpF,QAAA,sBAAsB,0BAG8D"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ComponentConfigInterface, ComponentInputArg, RootedComponentWithSelectors } from '../../type';
|
|
2
|
-
export declare const createRootedComponent: <T>(selectors: T, selectorOrElement
|
|
2
|
+
export declare const createRootedComponent: <T>(selectors: T, selectorOrElement: ComponentInputArg, config?: ComponentConfigInterface) => RootedComponentWithSelectors<T>;
|
|
3
3
|
//# sourceMappingURL=create-rooted-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAE5G,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"create-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAE5G,eAAO,MAAM,qBAAqB,uCAEX,iBAAiB,WAC3B,wBAAwB,oCACkE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":";;;AAAA,uFAAkF;AAI3E,MAAM,qBAAqB,GAAG,CACjC,SAAY,EACZ,
|
|
1
|
+
{"version":3,"file":"create-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":";;;AAAA,uFAAkF;AAI3E,MAAM,qBAAqB,GAAG,CACjC,SAAY,EACZ,iBAAoC,EACpC,MAAiC,EACF,EAAE,CAAC,IAAI,CAAC,IAAA,yCAAkB,EAAI,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;AAJ3F,QAAA,qBAAqB,yBAIsE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-extended-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/get-extended-rooted-component/get-extended-rooted-component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-extended-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/get-extended-rooted-component/get-extended-rooted-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,wBAAwB,EAAqB,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAChH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,eAAO,MAAM,0BAA0B,4FAG3B,wBAAwB,2CAW/B,CAAC"}
|
package/dist/cjs/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js
CHANGED
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getExtendedRootedComponent = void 0;
|
|
4
4
|
const default_component_config_1 = require("../../config/default-component.config");
|
|
5
|
-
const util_1 = require("../../util");
|
|
6
5
|
const rooted_component_1 = require("../rooted-component");
|
|
7
6
|
const getExtendedRootedComponent = (selectors, ParentComponent, config = (0, default_component_config_1.defaultComponentConfig)()) =>
|
|
8
7
|
// @ts-expect-error We use proxy for dynamic fields
|
|
9
8
|
class extends rooted_component_1.RootedComponent {
|
|
10
|
-
constructor(selectorOrElement
|
|
9
|
+
constructor(selectorOrElement) {
|
|
11
10
|
super(config, selectors, selectorOrElement);
|
|
12
11
|
if (ParentComponent !== rooted_component_1.RootedComponent) {
|
|
13
12
|
this.addParentComponent(new ParentComponent(selectorOrElement));
|
package/dist/cjs/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-extended-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/get-extended-rooted-component/get-extended-rooted-component.ts"],"names":[],"mappings":";;;AAAA,oFAA+E;AAC/E,
|
|
1
|
+
{"version":3,"file":"get-extended-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/get-extended-rooted-component/get-extended-rooted-component.ts"],"names":[],"mappings":";;;AAAA,oFAA+E;AAC/E,0DAAsD;AAK/C,MAAM,0BAA0B,GAAG,CACtC,SAAY,EACZ,eAA6B,EAC7B,SAAmC,IAAA,iDAAsB,GAAE,EACrB,EAAE;AACxC,mDAAmD;AACnD,KAAM,SAAQ,kCAAe;IACzB,YAAY,iBAAoC;QAC5C,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAE5C,IAAI,eAAe,KAAK,kCAAe,EAAE;YACrC,IAAI,CAAC,kBAAkB,CAAC,IAAI,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC;SACnE;IACL,CAAC;CACJ,CAAC;AAdO,QAAA,0BAA0B,8BAcjC"}
|
|
@@ -6,7 +6,7 @@ import type { ChainablePromiseArray, ChainablePromiseElement } from 'webdriverio
|
|
|
6
6
|
export declare class RootedComponent<T = any> extends Component<T> {
|
|
7
7
|
selectors: Enum<T>;
|
|
8
8
|
protected readonly parentElInput: ComponentInputArg;
|
|
9
|
-
constructor(config: ComponentConfigInterface, selectors: Enum<T>, selectorOrElement
|
|
9
|
+
constructor(config: ComponentConfigInterface, selectors: Enum<T>, selectorOrElement: ComponentInputArg);
|
|
10
10
|
get RootEl(): ChainablePromiseElement<WebdriverIO.Element>;
|
|
11
11
|
getChildEl(selector: string): ChainablePromiseElement<WebdriverIO.Element>;
|
|
12
12
|
getChildEls(selector: string): ChainablePromiseArray<WebdriverIO.ElementArray>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooted-component.d.ts","sourceRoot":"","sources":["../../../src/rooted-component/rooted-component.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAIlF,qBAAa,eAAe,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"rooted-component.d.ts","sourceRoot":"","sources":["../../../src/rooted-component/rooted-component.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAIlF,qBAAa,eAAe,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IAGQ,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;IAFhF,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,iBAAiB,CAAC;gBAExC,MAAM,EAAE,wBAAwB,EAAkB,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,iBAAiB;IA6BtH,IAAI,MAAM,IAAI,uBAAuB,CAAC,WAAW,CAAC,OAAO,CAAC,CAEzD;IAEQ,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,uBAAuB,CAAC,WAAW,CAAC,OAAO,CAAC;IAI1E,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,qBAAqB,CAAC,WAAW,CAAC,YAAY,CAAC;IAI9E,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,uBAAuB,CAAC,WAAW,CAAC,OAAO,CAAC;IAIrG,OAAO,CAAC,SAAS;CASpB"}
|
|
@@ -7,18 +7,27 @@ const util_1 = require("../util");
|
|
|
7
7
|
// TODO: All Root should have all methods from wdio element, can we do this through the proxy?
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
9
|
class RootedComponent extends component_1.Component {
|
|
10
|
-
constructor(config, selectors, selectorOrElement
|
|
10
|
+
constructor(config, selectors, selectorOrElement) {
|
|
11
11
|
if (!(0, shared_1.isDefined)(selectorOrElement)) {
|
|
12
12
|
throw new Error('Cannot create RootedComponent - Neither root selector nor root element is passed');
|
|
13
13
|
}
|
|
14
|
+
if (!(0, shared_1.isString)(selectorOrElement) && 'els' in selectorOrElement) {
|
|
15
|
+
throw new Error('Cannot create RootedComponent from SelectorElement, use .el()');
|
|
16
|
+
}
|
|
14
17
|
super(config, selectors);
|
|
15
18
|
this.selectors = selectors;
|
|
16
19
|
this.parentElInput = selectorOrElement;
|
|
17
20
|
// eslint-disable-next-line no-constructor-return
|
|
18
21
|
return new Proxy(this, {
|
|
19
22
|
get(client, field, receiver) {
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
return client.proxyGet(field, receiver, () => {
|
|
24
|
+
if (!['then', 'catch', 'finally'].includes(field)) {
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
26
|
+
return Reflect.get(client.getRootEl(), field, receiver);
|
|
27
|
+
}
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
29
|
+
return Reflect.get(client, field, receiver);
|
|
30
|
+
});
|
|
22
31
|
},
|
|
23
32
|
});
|
|
24
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooted-component.js","sourceRoot":"","sources":["../../../src/rooted-component/rooted-component.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"rooted-component.js","sourceRoot":"","sources":["../../../src/rooted-component/rooted-component.ts"],"names":[],"mappings":";;;AAAA,kDAA8E;AAE9E,sDAAmD;AACnD,kCAAgD;AAMhD,8FAA8F;AAC9F,8DAA8D;AAC9D,MAAa,eAAyB,SAAQ,qBAAY;IAGtD,YAAY,MAAgC,EAAkB,SAAkB,EAAE,iBAAoC;QAClH,IAAI,CAAC,IAAA,kBAAS,EAAC,iBAAiB,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;SACvG;QAED,IAAI,CAAC,IAAA,iBAAQ,EAAC,iBAAiB,CAAC,IAAI,KAAK,IAAI,iBAAiB,EAAE;YAC5D,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;SACpF;QAED,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QATiC,cAAS,GAAT,SAAS,CAAS;QAW5E,IAAI,CAAC,aAAa,GAAG,iBAAiB,CAAC;QAEvC,iDAAiD;QACjD,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE;YACnB,GAAG,CAAC,MAAM,EAAE,KAAa,EAAE,QAAQ;gBAC/B,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE;oBACzC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;wBAC/C,+DAA+D;wBAC/D,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;qBAC3D;oBAED,+DAA+D;oBAC/D,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;gBAChD,CAAC,CAAC,CAAC;YACP,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;IAC5B,CAAC;IAEQ,UAAU,CAAC,QAAgB;QAChC,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACzD,CAAC;IAEQ,WAAW,CAAC,QAAgB;QACjC,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAC1D,CAAC;IAEQ,eAAe,CAAC,QAAgB,EAAE,GAAW;QAClD,OAAO,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACpE,CAAC;IAEO,SAAS;QACb,IAAI,IAAA,yBAAgB,EAAC,IAAI,CAAC,aAAa,CAAC,EAAE;YACtC,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SAChD;aAAM,IAAI,MAAM,IAAI,IAAI,CAAC,aAAa,EAAE;YACrC,OAAO,IAAI,CAAC,aAAa,CAAC;SAC7B;QAED,OAAO,IAAA,4BAAqB,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACrD,CAAC;CACJ;AAzDD,0CAyDC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { RootedComponent } from '../rooted-component/rooted-component';
|
|
2
2
|
import type { SelectorElement } from '../selector-element/selector-element';
|
|
3
|
-
export declare type RootedComponentWithSelectors<T> =
|
|
3
|
+
export declare type RootedComponentWithSelectors<T> = Record<keyof T, SelectorElement & WebdriverIO.Element> & RootedComponent<T> & WebdriverIO.Element;
|
|
4
4
|
//# sourceMappingURL=rooted-component-with-selectors.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooted-component-with-selectors.type.d.ts","sourceRoot":"","sources":["../../../src/type/rooted-component-with-selectors.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,oBAAY,4BAA4B,CAAC,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"rooted-component-with-selectors.type.d.ts","sourceRoot":"","sources":["../../../src/type/rooted-component-with-selectors.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,oBAAY,4BAA4B,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,WAAW,CAAC,OAAO,CAAC,GAChG,eAAe,CAAC,CAAC,CAAC,GAClB,WAAW,CAAC,OAAO,CAAC"}
|
package/dist/cjs/util/index.d.ts
CHANGED
|
@@ -2,5 +2,4 @@ export { setTestID } from './set-test-id/set-test-id';
|
|
|
2
2
|
export { getTestID } from './get-test-id/get-test-id';
|
|
3
3
|
export { setPropTestID } from './set-prop-test-id/set-prop-test-id';
|
|
4
4
|
export { wdioElementChainByRef } from './wdio-element-chain-by-ref/wdio-element-chain-by-ref.util';
|
|
5
|
-
export { findEnumRootSelector } from './find-enum-root-selector.util';
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC"}
|
package/dist/cjs/util/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.wdioElementChainByRef = exports.setPropTestID = exports.getTestID = exports.setTestID = void 0;
|
|
4
4
|
var set_test_id_1 = require("./set-test-id/set-test-id");
|
|
5
5
|
Object.defineProperty(exports, "setTestID", { enumerable: true, get: function () { return set_test_id_1.setTestID; } });
|
|
6
6
|
var get_test_id_1 = require("./get-test-id/get-test-id");
|
|
@@ -9,6 +9,4 @@ var set_prop_test_id_1 = require("./set-prop-test-id/set-prop-test-id");
|
|
|
9
9
|
Object.defineProperty(exports, "setPropTestID", { enumerable: true, get: function () { return set_prop_test_id_1.setPropTestID; } });
|
|
10
10
|
var wdio_element_chain_by_ref_util_1 = require("./wdio-element-chain-by-ref/wdio-element-chain-by-ref.util");
|
|
11
11
|
Object.defineProperty(exports, "wdioElementChainByRef", { enumerable: true, get: function () { return wdio_element_chain_by_ref_util_1.wdioElementChainByRef; } });
|
|
12
|
-
var find_enum_root_selector_util_1 = require("./find-enum-root-selector.util");
|
|
13
|
-
Object.defineProperty(exports, "findEnumRootSelector", { enumerable: true, get: function () { return find_enum_root_selector_util_1.findEnumRootSelector; } });
|
|
14
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/util/index.ts"],"names":[],"mappings":";;;AAAA,yDAAsD;AAA7C,wGAAA,SAAS,OAAA;AAClB,yDAAsD;AAA7C,wGAAA,SAAS,OAAA;AAClB,wEAAoE;AAA3D,iHAAA,aAAa,OAAA;AACtB,6GAAmG;AAA1F,uIAAA,qBAAqB,OAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/util/index.ts"],"names":[],"mappings":";;;AAAA,yDAAsD;AAA7C,wGAAA,SAAS,OAAA;AAClB,yDAAsD;AAA7C,wGAAA,SAAS,OAAA;AAClB,wEAAoE;AAA3D,iHAAA,aAAa,OAAA;AACtB,6GAAmG;AAA1F,uIAAA,qBAAqB,OAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ComponentInputArg, RootedComponentWithSelectors } from '../../type';
|
|
2
|
-
export declare const create$RootedComponent: <T>(selectors: T, selectorOrElement
|
|
2
|
+
export declare const create$RootedComponent: <T>(selectors: T, selectorOrElement: ComponentInputArg) => RootedComponentWithSelectors<T>;
|
|
3
3
|
//# sourceMappingURL=create$-rooted-component.d.ts.map
|
package/dist/esm/rooted-component/create$-rooted-component/create$-rooted-component.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create$-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/create$-rooted-component/create$-rooted-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAElF,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"create$-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/create$-rooted-component/create$-rooted-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAElF,eAAO,MAAM,sBAAsB,uCAEZ,iBAAiB,oCACwD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create$-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/create$-rooted-component/create$-rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAIrF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAClC,SAAY,EACZ,
|
|
1
|
+
{"version":3,"file":"create$-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/create$-rooted-component/create$-rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAIrF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAClC,SAAY,EACZ,iBAAoC,EACL,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAI,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ComponentConfigInterface, ComponentInputArg, RootedComponentWithSelectors } from '../../type';
|
|
2
|
-
export declare const createRootedComponent: <T>(selectors: T, selectorOrElement
|
|
2
|
+
export declare const createRootedComponent: <T>(selectors: T, selectorOrElement: ComponentInputArg, config?: ComponentConfigInterface) => RootedComponentWithSelectors<T>;
|
|
3
3
|
//# sourceMappingURL=create-rooted-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAE5G,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"create-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAE5G,eAAO,MAAM,qBAAqB,uCAEX,iBAAiB,WAC3B,wBAAwB,oCACkE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAIlF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACjC,SAAY,EACZ,
|
|
1
|
+
{"version":3,"file":"create-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAIlF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACjC,SAAY,EACZ,iBAAoC,EACpC,MAAiC,EACF,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAI,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-extended-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/get-extended-rooted-component/get-extended-rooted-component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-extended-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/rooted-component/get-extended-rooted-component/get-extended-rooted-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,wBAAwB,EAAqB,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAChH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,eAAO,MAAM,0BAA0B,4FAG3B,wBAAwB,2CAW/B,CAAC"}
|
package/dist/esm/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { defaultComponentConfig } from '../../config/default-component.config';
|
|
2
|
-
import { findEnumRootSelector } from '../../util';
|
|
3
2
|
import { RootedComponent } from '../rooted-component';
|
|
4
3
|
export const getExtendedRootedComponent = (selectors, ParentComponent, config = defaultComponentConfig()) =>
|
|
5
4
|
// @ts-expect-error We use proxy for dynamic fields
|
|
6
5
|
class extends RootedComponent {
|
|
7
|
-
constructor(selectorOrElement
|
|
6
|
+
constructor(selectorOrElement) {
|
|
8
7
|
super(config, selectors, selectorOrElement);
|
|
9
8
|
if (ParentComponent !== RootedComponent) {
|
|
10
9
|
this.addParentComponent(new ParentComponent(selectorOrElement));
|
package/dist/esm/rooted-component/get-extended-rooted-component/get-extended-rooted-component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-extended-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/get-extended-rooted-component/get-extended-rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"get-extended-rooted-component.js","sourceRoot":"","sources":["../../../../src/rooted-component/get-extended-rooted-component/get-extended-rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKtD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACtC,SAAY,EACZ,eAA6B,EAC7B,SAAmC,sBAAsB,EAAE,EACrB,EAAE;AACxC,mDAAmD;AACnD,KAAM,SAAQ,eAAe;IACzB,YAAY,iBAAoC;QAC5C,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAE5C,IAAI,eAAe,KAAK,eAAe,EAAE;YACrC,IAAI,CAAC,kBAAkB,CAAC,IAAI,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC;SACnE;IACL,CAAC;CACJ,CAAC"}
|
|
@@ -6,7 +6,7 @@ import type { ChainablePromiseArray, ChainablePromiseElement } from 'webdriverio
|
|
|
6
6
|
export declare class RootedComponent<T = any> extends Component<T> {
|
|
7
7
|
selectors: Enum<T>;
|
|
8
8
|
protected readonly parentElInput: ComponentInputArg;
|
|
9
|
-
constructor(config: ComponentConfigInterface, selectors: Enum<T>, selectorOrElement
|
|
9
|
+
constructor(config: ComponentConfigInterface, selectors: Enum<T>, selectorOrElement: ComponentInputArg);
|
|
10
10
|
get RootEl(): ChainablePromiseElement<WebdriverIO.Element>;
|
|
11
11
|
getChildEl(selector: string): ChainablePromiseElement<WebdriverIO.Element>;
|
|
12
12
|
getChildEls(selector: string): ChainablePromiseArray<WebdriverIO.ElementArray>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooted-component.d.ts","sourceRoot":"","sources":["../../../src/rooted-component/rooted-component.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAIlF,qBAAa,eAAe,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"rooted-component.d.ts","sourceRoot":"","sources":["../../../src/rooted-component/rooted-component.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAIlF,qBAAa,eAAe,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IAGQ,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;IAFhF,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,iBAAiB,CAAC;gBAExC,MAAM,EAAE,wBAAwB,EAAkB,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,iBAAiB;IA6BtH,IAAI,MAAM,IAAI,uBAAuB,CAAC,WAAW,CAAC,OAAO,CAAC,CAEzD;IAEQ,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,uBAAuB,CAAC,WAAW,CAAC,OAAO,CAAC;IAI1E,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,qBAAqB,CAAC,WAAW,CAAC,YAAY,CAAC;IAI9E,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,uBAAuB,CAAC,WAAW,CAAC,OAAO,CAAC;IAIrG,OAAO,CAAC,SAAS;CASpB"}
|
|
@@ -1,23 +1,32 @@
|
|
|
1
|
-
import { isDefined, isNotEmptyString } from '@rnw-community/shared';
|
|
1
|
+
import { isDefined, isNotEmptyString, isString } from '@rnw-community/shared';
|
|
2
2
|
import { Component } from '../component/component';
|
|
3
|
-
import {
|
|
3
|
+
import { wdioElementChainByRef } from '../util';
|
|
4
4
|
// TODO: All Root should have all methods from wdio element, can we do this through the proxy?
|
|
5
5
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
6
|
export class RootedComponent extends Component {
|
|
7
7
|
selectors;
|
|
8
8
|
parentElInput;
|
|
9
|
-
constructor(config, selectors, selectorOrElement
|
|
9
|
+
constructor(config, selectors, selectorOrElement) {
|
|
10
10
|
if (!isDefined(selectorOrElement)) {
|
|
11
11
|
throw new Error('Cannot create RootedComponent - Neither root selector nor root element is passed');
|
|
12
12
|
}
|
|
13
|
+
if (!isString(selectorOrElement) && 'els' in selectorOrElement) {
|
|
14
|
+
throw new Error('Cannot create RootedComponent from SelectorElement, use .el()');
|
|
15
|
+
}
|
|
13
16
|
super(config, selectors);
|
|
14
17
|
this.selectors = selectors;
|
|
15
18
|
this.parentElInput = selectorOrElement;
|
|
16
19
|
// eslint-disable-next-line no-constructor-return
|
|
17
20
|
return new Proxy(this, {
|
|
18
21
|
get(client, field, receiver) {
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
return client.proxyGet(field, receiver, () => {
|
|
23
|
+
if (!['then', 'catch', 'finally'].includes(field)) {
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
25
|
+
return Reflect.get(client.getRootEl(), field, receiver);
|
|
26
|
+
}
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
28
|
+
return Reflect.get(client, field, receiver);
|
|
29
|
+
});
|
|
21
30
|
},
|
|
22
31
|
});
|
|
23
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooted-component.js","sourceRoot":"","sources":["../../../src/rooted-component/rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"rooted-component.js","sourceRoot":"","sources":["../../../src/rooted-component/rooted-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAMhD,8FAA8F;AAC9F,8DAA8D;AAC9D,MAAM,OAAO,eAAyB,SAAQ,SAAY;IAGQ;IAF3C,aAAa,CAAoB;IAEpD,YAAY,MAAgC,EAAkB,SAAkB,EAAE,iBAAoC;QAClH,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;SACvG;QAED,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,KAAK,IAAI,iBAAiB,EAAE;YAC5D,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;SACpF;QAED,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QATiC,cAAS,GAAT,SAAS,CAAS;QAW5E,IAAI,CAAC,aAAa,GAAG,iBAAiB,CAAC;QAEvC,iDAAiD;QACjD,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE;YACnB,GAAG,CAAC,MAAM,EAAE,KAAa,EAAE,QAAQ;gBAC/B,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE;oBACzC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;wBAC/C,+DAA+D;wBAC/D,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;qBAC3D;oBAED,+DAA+D;oBAC/D,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;gBAChD,CAAC,CAAC,CAAC;YACP,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;IAC5B,CAAC;IAEQ,UAAU,CAAC,QAAgB;QAChC,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACzD,CAAC;IAEQ,WAAW,CAAC,QAAgB;QACjC,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAC1D,CAAC;IAEQ,eAAe,CAAC,QAAgB,EAAE,GAAW;QAClD,OAAO,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACpE,CAAC;IAEO,SAAS;QACb,IAAI,gBAAgB,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;YACtC,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SAChD;aAAM,IAAI,MAAM,IAAI,IAAI,CAAC,aAAa,EAAE;YACrC,OAAO,IAAI,CAAC,aAAa,CAAC;SAC7B;QAED,OAAO,qBAAqB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACrD,CAAC;CACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { RootedComponent } from '../rooted-component/rooted-component';
|
|
2
2
|
import type { SelectorElement } from '../selector-element/selector-element';
|
|
3
|
-
export declare type RootedComponentWithSelectors<T> =
|
|
3
|
+
export declare type RootedComponentWithSelectors<T> = Record<keyof T, SelectorElement & WebdriverIO.Element> & RootedComponent<T> & WebdriverIO.Element;
|
|
4
4
|
//# sourceMappingURL=rooted-component-with-selectors.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooted-component-with-selectors.type.d.ts","sourceRoot":"","sources":["../../../src/type/rooted-component-with-selectors.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,oBAAY,4BAA4B,CAAC,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"rooted-component-with-selectors.type.d.ts","sourceRoot":"","sources":["../../../src/type/rooted-component-with-selectors.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,oBAAY,4BAA4B,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,WAAW,CAAC,OAAO,CAAC,GAChG,eAAe,CAAC,CAAC,CAAC,GAClB,WAAW,CAAC,OAAO,CAAC"}
|
package/dist/esm/util/index.d.ts
CHANGED
|
@@ -2,5 +2,4 @@ export { setTestID } from './set-test-id/set-test-id';
|
|
|
2
2
|
export { getTestID } from './get-test-id/get-test-id';
|
|
3
3
|
export { setPropTestID } from './set-prop-test-id/set-prop-test-id';
|
|
4
4
|
export { wdioElementChainByRef } from './wdio-element-chain-by-ref/wdio-element-chain-by-ref.util';
|
|
5
|
-
export { findEnumRootSelector } from './find-enum-root-selector.util';
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC"}
|
package/dist/esm/util/index.js
CHANGED
|
@@ -2,5 +2,4 @@ export { setTestID } from './set-test-id/set-test-id';
|
|
|
2
2
|
export { getTestID } from './get-test-id/get-test-id';
|
|
3
3
|
export { setPropTestID } from './set-prop-test-id/set-prop-test-id';
|
|
4
4
|
export { wdioElementChainByRef } from './wdio-element-chain-by-ref/wdio-element-chain-by-ref.util';
|
|
5
|
-
export { findEnumRootSelector } from './find-enum-root-selector.util';
|
|
6
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rnw-community/wdio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "WDIO commands, page objects and utils",
|
|
6
6
|
"keywords": [
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=14.0.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "a7b85c5155960ba879af7051959463ffaaa14334",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@rnw-community/shared": "^0.
|
|
49
|
+
"@rnw-community/shared": "^0.45.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@wdio/types": "^7.20.7",
|
package/readme.md
CHANGED
|
@@ -7,6 +7,7 @@ WDIO commands and utils.
|
|
|
7
7
|
- Refactor tests to mock MockElement(rename to MockElementPromise), use it instead of mockElement object
|
|
8
8
|
- Rename all tests `its` properly after API stabilizes
|
|
9
9
|
- Write docs with the examples
|
|
10
|
+
- Add tests for extended class instance ctor return from async function - it resolves to WDIO element =)
|
|
10
11
|
|
|
11
12
|
## Installation
|
|
12
13
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-enum-root-selector.util.d.ts","sourceRoot":"","sources":["../../../src/util/find-enum-root-selector.util.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,uBAAsB,MAAM,GAAG,SAO/D,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findEnumRootSelector = void 0;
|
|
4
|
-
const shared_1 = require("@rnw-community/shared");
|
|
5
|
-
const findEnumRootSelector = (selectors) => {
|
|
6
|
-
const selectorKeys = Object.keys(selectors);
|
|
7
|
-
const rootSelectorKey = selectorKeys.find(key => key === 'Root');
|
|
8
|
-
// @ts-expect-error Improve typing
|
|
9
|
-
return (0, shared_1.isDefined)(rootSelectorKey) ? selectors[rootSelectorKey] : undefined;
|
|
10
|
-
};
|
|
11
|
-
exports.findEnumRootSelector = findEnumRootSelector;
|
|
12
|
-
//# sourceMappingURL=find-enum-root-selector.util.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-enum-root-selector.util.js","sourceRoot":"","sources":["../../../src/util/find-enum-root-selector.util.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAE3C,MAAM,oBAAoB,GAAG,CAAI,SAAY,EAAsB,EAAE;IACxE,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAE5C,MAAM,eAAe,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,MAAM,CAAC,CAAC;IAEjE,kCAAkC;IAClC,OAAO,IAAA,kBAAS,EAAC,eAAe,CAAC,CAAC,CAAC,CAAE,SAAS,CAAC,eAAe,CAAuB,CAAC,CAAC,CAAC,SAAS,CAAC;AACtG,CAAC,CAAC;AAPW,QAAA,oBAAoB,wBAO/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-enum-root-selector.util.d.ts","sourceRoot":"","sources":["../../../src/util/find-enum-root-selector.util.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,uBAAsB,MAAM,GAAG,SAO/D,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { isDefined } from '@rnw-community/shared';
|
|
2
|
-
export const findEnumRootSelector = (selectors) => {
|
|
3
|
-
const selectorKeys = Object.keys(selectors);
|
|
4
|
-
const rootSelectorKey = selectorKeys.find(key => key === 'Root');
|
|
5
|
-
// @ts-expect-error Improve typing
|
|
6
|
-
return isDefined(rootSelectorKey) ? selectors[rootSelectorKey] : undefined;
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=find-enum-root-selector.util.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-enum-root-selector.util.js","sourceRoot":"","sources":["../../../src/util/find-enum-root-selector.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAI,SAAY,EAAsB,EAAE;IACxE,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAE5C,MAAM,eAAe,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,MAAM,CAAC,CAAC;IAEjE,kCAAkC;IAClC,OAAO,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAAE,SAAS,CAAC,eAAe,CAAuB,CAAC,CAAC,CAAC,SAAS,CAAC;AACtG,CAAC,CAAC"}
|