@rnw-community/wdio 0.36.0 → 0.37.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/command/by-index.command.d.ts +3 -0
- package/dist/command/by-index.command.d.ts.map +1 -0
- package/dist/command/by-index.command.js +12 -0
- package/dist/command/by-index.command.js.map +1 -0
- package/dist/command/index.d.ts +1 -0
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +1 -0
- package/dist/command/index.js.map +1 -1
- package/dist/command/test-id-index.command.d.ts +2 -2
- package/dist/command/test-id-index.command.d.ts.map +1 -1
- package/dist/command/test-id-index.command.js.map +1 -1
- package/dist/command/test-id.command.d.ts +2 -2
- package/dist/command/test-id.command.d.ts.map +1 -1
- package/dist/command/test-id.command.js.map +1 -1
- package/dist/command/test-ids.command.d.ts +2 -2
- package/dist/command/test-ids.command.d.ts.map +1 -1
- package/dist/command/test-ids.command.js.map +1 -1
- package/dist/component/component/component.d.ts +6 -1
- package/dist/component/component/component.d.ts.map +1 -1
- package/dist/component/component/component.js +8 -7
- package/dist/component/component/component.js.map +1 -1
- package/dist/component/component/create$-component/create$-component.d.ts +4 -0
- package/dist/component/component/create$-component/create$-component.d.ts.map +1 -0
- package/dist/component/component/create$-component/create$-component.js +7 -0
- package/dist/component/component/create$-component/create$-component.js.map +1 -0
- package/dist/component/component/create-component/create-component.d.ts +4 -0
- package/dist/component/component/create-component/create-component.d.ts.map +1 -0
- package/dist/component/{create-component → component/create-component}/create-component.js +0 -0
- package/dist/component/component/create-component/create-component.js.map +1 -0
- package/dist/component/component/get$-component/get$-component.d.ts +3 -0
- package/dist/component/component/get$-component/get$-component.d.ts.map +1 -0
- package/dist/component/component/get$-component/get$-component.js +8 -0
- package/dist/component/component/get$-component/get$-component.js.map +1 -0
- package/dist/component/component/get-component/get-component.d.ts +4 -0
- package/dist/component/component/get-component/get-component.d.ts.map +1 -0
- package/dist/component/component/get-component/get-component.js +17 -0
- package/dist/component/component/get-component/get-component.js.map +1 -0
- package/dist/component/default$-component.config.d.ts +3 -0
- package/dist/component/default$-component.config.d.ts.map +1 -0
- package/dist/component/default$-component.config.js +10 -0
- package/dist/component/default$-component.config.js.map +1 -0
- package/dist/component/default-component.config.d.ts +3 -0
- package/dist/component/default-component.config.d.ts.map +1 -0
- package/dist/component/default-component.config.js +10 -0
- package/dist/component/default-component.config.js.map +1 -0
- package/dist/component/index.d.ts +8 -5
- package/dist/component/index.d.ts.map +1 -1
- package/dist/component/index.js +13 -20
- package/dist/component/index.js.map +1 -1
- package/dist/component/rooted-component/create$-rooted-component/create$-rooted-component.d.ts +4 -0
- package/dist/component/rooted-component/create$-rooted-component/create$-rooted-component.d.ts.map +1 -0
- package/dist/component/rooted-component/create$-rooted-component/create$-rooted-component.js +7 -0
- package/dist/component/rooted-component/create$-rooted-component/create$-rooted-component.js.map +1 -0
- package/dist/component/rooted-component/create-rooted-component/create-rooted-component.d.ts +5 -0
- package/dist/component/rooted-component/create-rooted-component/create-rooted-component.d.ts.map +1 -0
- package/dist/component/{create-rooted-component → rooted-component/create-rooted-component}/create-rooted-component.js +1 -1
- package/dist/component/rooted-component/create-rooted-component/create-rooted-component.js.map +1 -0
- package/dist/component/rooted-component/get$-rooted-component/get$-rooted-component.d.ts +4 -0
- package/dist/component/rooted-component/get$-rooted-component/get$-rooted-component.d.ts.map +1 -0
- package/dist/component/rooted-component/get$-rooted-component/get$-rooted-component.js +8 -0
- package/dist/component/rooted-component/get$-rooted-component/get$-rooted-component.js.map +1 -0
- package/dist/component/rooted-component/get-rooted-component/get-rooted-component.d.ts +4 -0
- package/dist/component/rooted-component/get-rooted-component/get-rooted-component.d.ts.map +1 -0
- package/dist/component/{get-rooted-component → rooted-component/get-rooted-component}/get-rooted-component.js +6 -13
- package/dist/component/rooted-component/get-rooted-component/get-rooted-component.js.map +1 -0
- package/dist/component/rooted-component/rooted-component.d.ts +3 -5
- package/dist/component/rooted-component/rooted-component.d.ts.map +1 -1
- package/dist/component/rooted-component/rooted-component.js +11 -23
- package/dist/component/rooted-component/rooted-component.js.map +1 -1
- package/dist/component/type/component-config-arg.type.d.ts +7 -0
- package/dist/component/type/component-config-arg.type.d.ts.map +1 -0
- package/dist/component/type/component-config-arg.type.js +3 -0
- package/dist/component/type/component-config-arg.type.js.map +1 -0
- package/dist/component/type/component-input-arg.type.d.ts +3 -0
- package/dist/component/type/component-input-arg.type.d.ts.map +1 -0
- package/dist/component/type/component-input-arg.type.js +3 -0
- package/dist/component/type/component-input-arg.type.js.map +1 -0
- package/dist/component/type/component-with-selectors-ctor.type.d.ts +4 -0
- package/dist/component/type/component-with-selectors-ctor.type.d.ts.map +1 -0
- package/dist/component/type/component-with-selectors-ctor.type.js +3 -0
- package/dist/component/type/component-with-selectors-ctor.type.js.map +1 -0
- package/dist/component/type/component.type.d.ts +6 -0
- package/dist/component/type/component.type.d.ts.map +1 -0
- package/dist/component/type/component.type.js +3 -0
- package/dist/component/type/component.type.js.map +1 -0
- package/dist/component/type/index.d.ts +5 -0
- package/dist/component/type/index.d.ts.map +1 -1
- package/dist/component/type/rooted-component-with-selectors-ctor.type.d.ts +4 -0
- package/dist/component/type/rooted-component-with-selectors-ctor.type.d.ts.map +1 -0
- package/dist/component/type/rooted-component-with-selectors-ctor.type.js +3 -0
- package/dist/component/type/rooted-component-with-selectors-ctor.type.js.map +1 -0
- package/dist/component/util/create-component-with-selectors-proxy.util.d.ts +5 -0
- package/dist/component/util/create-component-with-selectors-proxy.util.d.ts.map +1 -0
- package/dist/component/util/create-component-with-selectors-proxy.util.js +15 -0
- package/dist/component/util/create-component-with-selectors-proxy.util.js.map +1 -0
- package/dist/component/util/index.d.ts +1 -0
- package/dist/component/util/index.d.ts.map +1 -1
- package/dist/component/util/index.js +3 -1
- package/dist/component/util/index.js.map +1 -1
- package/dist/component/util/proxy-call.util.d.ts +2 -1
- package/dist/component/util/proxy-call.util.d.ts.map +1 -1
- package/dist/component/util/proxy-call.util.js.map +1 -1
- package/dist/type/el-selector-fn.type.d.ts +3 -0
- package/dist/type/el-selector-fn.type.d.ts.map +1 -0
- package/dist/type/el-selector-fn.type.js +3 -0
- package/dist/type/el-selector-fn.type.js.map +1 -0
- package/dist/type/els-index-selector-fn.type.d.ts +3 -0
- package/dist/type/els-index-selector-fn.type.d.ts.map +1 -0
- package/dist/type/els-index-selector-fn.type.js +3 -0
- package/dist/type/els-index-selector-fn.type.js.map +1 -0
- package/dist/type/els-selector-fn.type.d.ts +4 -0
- package/dist/type/els-selector-fn.type.d.ts.map +1 -0
- package/dist/type/els-selector-fn.type.js +3 -0
- package/dist/type/els-selector-fn.type.js.map +1 -0
- package/dist/type/index.d.ts +3 -0
- package/dist/type/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/component/create-component/create-component.d.ts +0 -4
- package/dist/component/create-component/create-component.d.ts.map +0 -1
- package/dist/component/create-component/create-component.js.map +0 -1
- package/dist/component/create-rooted-component/create-rooted-component.d.ts +0 -4
- package/dist/component/create-rooted-component/create-rooted-component.d.ts.map +0 -1
- package/dist/component/create-rooted-component/create-rooted-component.js.map +0 -1
- package/dist/component/get-component/get-component.d.ts +0 -6
- package/dist/component/get-component/get-component.d.ts.map +0 -1
- package/dist/component/get-component/get-component.js +0 -24
- package/dist/component/get-component/get-component.js.map +0 -1
- package/dist/component/get-rooted-component/get-rooted-component.d.ts +0 -6
- package/dist/component/get-rooted-component/get-rooted-component.d.ts.map +0 -1
- package/dist/component/get-rooted-component/get-rooted-component.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"by-index.command.d.ts","sourceRoot":"","sources":["../../src/command/by-index.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,eAAO,MAAM,SAAS,EAAE,kBAQvB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.byIndex$$ = void 0;
|
|
4
|
+
const byIndex$$ = async (testID, index, context = browser) => {
|
|
5
|
+
const elements = await context.$$(testID);
|
|
6
|
+
if (index >= elements.length || index < 0) {
|
|
7
|
+
throw new Error(`Cannot get item by testID "${testID}" with index "${index}"`);
|
|
8
|
+
}
|
|
9
|
+
return elements[index];
|
|
10
|
+
};
|
|
11
|
+
exports.byIndex$$ = byIndex$$;
|
|
12
|
+
//# sourceMappingURL=by-index.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"by-index.command.js","sourceRoot":"","sources":["../../src/command/by-index.command.ts"],"names":[],"mappings":";;;AAEO,MAAM,SAAS,GAAuB,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAAE;IACpF,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IAE1C,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;AARW,QAAA,SAAS,aAQpB"}
|
package/dist/command/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './test-ids.command';
|
|
|
3
3
|
export * from './test-id-index.command';
|
|
4
4
|
export * from './slow-input.command';
|
|
5
5
|
export * from './clear-input.command';
|
|
6
|
+
export * from './by-index.command';
|
|
6
7
|
export * from './mobile/open-deep-link.command';
|
|
7
8
|
export * from './mobile/relative-click.command';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC"}
|
package/dist/command/index.js
CHANGED
|
@@ -19,6 +19,7 @@ __exportStar(require("./test-ids.command"), exports);
|
|
|
19
19
|
__exportStar(require("./test-id-index.command"), exports);
|
|
20
20
|
__exportStar(require("./slow-input.command"), exports);
|
|
21
21
|
__exportStar(require("./clear-input.command"), exports);
|
|
22
|
+
__exportStar(require("./by-index.command"), exports);
|
|
22
23
|
__exportStar(require("./mobile/open-deep-link.command"), exports);
|
|
23
24
|
__exportStar(require("./mobile/relative-click.command"), exports);
|
|
24
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,qDAAmC;AACnC,0DAAwC;AACxC,uDAAqC;AACrC,wDAAsC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,qDAAmC;AACnC,0DAAwC;AACxC,uDAAqC;AACrC,wDAAsC;AACtC,qDAAmC;AAEnC,kEAAgD;AAChD,kEAAgD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const testID$$Index:
|
|
1
|
+
import type { ElsIndexSelectorFn } from '../type';
|
|
2
|
+
export declare const testID$$Index: ElsIndexSelectorFn;
|
|
3
3
|
//# sourceMappingURL=test-id-index.command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-id-index.command.d.ts","sourceRoot":"","sources":["../../src/command/test-id-index.command.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"test-id-index.command.d.ts","sourceRoot":"","sources":["../../src/command/test-id-index.command.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,eAAO,MAAM,aAAa,EAAE,kBAQ3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,GAAuB,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAAE;IACxF,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;AARW,QAAA,aAAa,iBAQxB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const testID$:
|
|
1
|
+
import type { ElSelectorFn } from '../type';
|
|
2
|
+
export declare const testID$: ElSelectorFn;
|
|
3
3
|
//# sourceMappingURL=test-id.command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-id.command.d.ts","sourceRoot":"","sources":["../../src/command/test-id.command.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"test-id.command.d.ts","sourceRoot":"","sources":["../../src/command/test-id.command.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,OAAO,EAAE,YAA2F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-id.command.js","sourceRoot":"","sources":["../../src/command/test-id.command.ts"],"names":[],"mappings":";;;AAAA,0CAA6C;AAItC,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"test-id.command.js","sourceRoot":"","sources":["../../src/command/test-id.command.ts"],"names":[],"mappings":";;;AAAA,0CAA6C;AAItC,MAAM,OAAO,GAAiB,KAAK,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,EAAE,EAAE,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,IAAA,yBAAc,EAAC,MAAM,CAAC,CAAC,CAAC;AAArG,QAAA,OAAO,WAA8F"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const testID$$:
|
|
1
|
+
import type { ElsSelectorFn } from '../type';
|
|
2
|
+
export declare const testID$$: ElsSelectorFn;
|
|
3
3
|
//# sourceMappingURL=test-ids.command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-ids.command.d.ts","sourceRoot":"","sources":["../../src/command/test-ids.command.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"test-ids.command.d.ts","sourceRoot":"","sources":["../../src/command/test-ids.command.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,QAAQ,EAAE,aAA6F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-ids.command.js","sourceRoot":"","sources":["../../src/command/test-ids.command.ts"],"names":[],"mappings":";;;AAAA,0CAA6C;AAItC,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"test-ids.command.js","sourceRoot":"","sources":["../../src/command/test-ids.command.ts"],"names":[],"mappings":";;;AAAA,0CAA6C;AAItC,MAAM,QAAQ,GAAkB,KAAK,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,EAAE,EAAE,CAAC,MAAM,OAAO,CAAC,EAAE,CAAC,IAAA,yBAAc,EAAC,MAAM,CAAC,CAAC,CAAC;AAAxG,QAAA,QAAQ,YAAgG"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/// <reference types="webdriverio/async" />
|
|
2
|
-
import type {
|
|
2
|
+
import type { ElSelectorFn, ElsIndexSelectorFn, ElsSelectorFn } from '../../type';
|
|
3
|
+
import type { ClickArgs, ComponentConfigInterface, SetValueArgs, WaitForDisplayedArgs, WaitForEnabledArgs, WaitForExistArgs } from '../type';
|
|
3
4
|
import type { Location } from 'webdriverio/build/commands/element/getLocation';
|
|
4
5
|
import type { Size } from 'webdriverio/build/commands/element/getSize';
|
|
5
6
|
export declare class Component {
|
|
7
|
+
protected elSelectorFn: ElSelectorFn;
|
|
8
|
+
protected elsSelectorFn: ElsSelectorFn;
|
|
9
|
+
protected elsIndexSelectorFn: ElsIndexSelectorFn;
|
|
10
|
+
constructor(config: ComponentConfigInterface);
|
|
6
11
|
clickChildEl(selector: string, ...args: ClickArgs): Promise<void>;
|
|
7
12
|
clickByIdxChildEl(selector: string, idx: number, ...args: ClickArgs): Promise<void>;
|
|
8
13
|
setValueChildEl(selector: string, ...args: SetValueArgs): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/component/component/component.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/component/component/component.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,KAAK,EACR,SAAS,EACT,wBAAwB,EACxB,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EACnB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4CAA4C,CAAC;AAEvE,qBAAa,SAAS;IAClB,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IACrC,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IACvC,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBAErC,MAAM,EAAE,wBAAwB;IAMtC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAInF,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvE,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAItD,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIrD,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIjD,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/E,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvF,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAInF,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIvD,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;IAI1D,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC;IAIhE,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;CAGrF"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Component = void 0;
|
|
4
|
-
const command_1 = require("../../command");
|
|
5
4
|
class Component {
|
|
5
|
+
constructor(config) {
|
|
6
|
+
this.elSelectorFn = config.elSelectorFn;
|
|
7
|
+
this.elsSelectorFn = config.elsSelectorFn;
|
|
8
|
+
this.elsIndexSelectorFn = config.elsIndexSelectorFn;
|
|
9
|
+
}
|
|
6
10
|
async clickChildEl(selector, ...args) {
|
|
7
11
|
await (await this.getChildEl(selector)).click(...args);
|
|
8
12
|
}
|
|
@@ -36,17 +40,14 @@ class Component {
|
|
|
36
40
|
async getSizeChildEl(selector) {
|
|
37
41
|
return await (await this.getChildEl(selector)).getSize();
|
|
38
42
|
}
|
|
39
|
-
// eslint-disable-next-line class-methods-use-this
|
|
40
43
|
async getChildEl(selector) {
|
|
41
|
-
return await
|
|
44
|
+
return await this.elSelectorFn(selector);
|
|
42
45
|
}
|
|
43
|
-
// eslint-disable-next-line class-methods-use-this
|
|
44
46
|
async getChildEls(selector) {
|
|
45
|
-
return await
|
|
47
|
+
return await this.elsSelectorFn(selector);
|
|
46
48
|
}
|
|
47
|
-
// eslint-disable-next-line class-methods-use-this
|
|
48
49
|
async getChildElByIdx(selector, idx) {
|
|
49
|
-
return await
|
|
50
|
+
return await this.elsIndexSelectorFn(selector, idx);
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
exports.Component = Component;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/component/component/component.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/component/component/component.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create$-component.d.ts","sourceRoot":"","sources":["../../../../src/component/component/create$-component/create$-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,eAAO,MAAM,gBAAgB,qEACU,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.create$Component = void 0;
|
|
4
|
+
const get__component_1 = require("../get$-component/get$-component");
|
|
5
|
+
const create$Component = (selectors) => new ((0, get__component_1.get$Component)(selectors))();
|
|
6
|
+
exports.create$Component = create$Component;
|
|
7
|
+
//# sourceMappingURL=create$-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create$-component.js","sourceRoot":"","sources":["../../../../src/component/component/create$-component/create$-component.ts"],"names":[],"mappings":";;;AAAA,qEAAiE;AAK1D,MAAM,gBAAgB,GAAG,CAAmB,SAAkB,EAA6B,EAAE,CAChG,IAAI,CAAC,IAAA,8BAAa,EAAI,SAAS,CAAC,CAAC,EAAE,CAAC;AAD3B,QAAA,gBAAgB,oBACW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-component.d.ts","sourceRoot":"","sources":["../../../../src/component/component/create-component/create-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,eAAO,MAAM,eAAe,qEACU,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-component.js","sourceRoot":"","sources":["../../../../src/component/component/create-component/create-component.ts"],"names":[],"mappings":";;;AAAA,kEAA8D;AAKvD,MAAM,eAAe,GAAG,CAAmB,SAAkB,EAA6B,EAAE,CAC/F,IAAI,CAAC,IAAA,4BAAY,EAAI,SAAS,CAAC,CAAC,EAAE,CAAC;AAD1B,QAAA,eAAe,mBACW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get$-component.d.ts","sourceRoot":"","sources":["../../../../src/component/component/get$-component/get$-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,eAAO,MAAM,aAAa,EAAE,OAAO,YAA4E,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.get$Component = void 0;
|
|
4
|
+
const default__component_config_1 = require("../../default$-component.config");
|
|
5
|
+
const get_component_1 = require("../get-component/get-component");
|
|
6
|
+
const get$Component = selectors => (0, get_component_1.getComponent)(selectors, default__component_config_1.default$ComponentConfig);
|
|
7
|
+
exports.get$Component = get$Component;
|
|
8
|
+
//# sourceMappingURL=get$-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get$-component.js","sourceRoot":"","sources":["../../../../src/component/component/get$-component/get$-component.ts"],"names":[],"mappings":";;;AAAA,+EAA0E;AAC1E,kEAA8D;AAEvD,MAAM,aAAa,GAAwB,SAAS,CAAC,EAAE,CAAC,IAAA,4BAAY,EAAC,SAAS,EAAE,mDAAuB,CAAC,CAAC;AAAnG,QAAA,aAAa,iBAAsF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Enum } from '../../../type';
|
|
2
|
+
import type { ComponentConfigInterface, ComponentWithSelectorsCtor } from '../../type';
|
|
3
|
+
export declare const getComponent: <T extends string>(selectors: Enum<T>, config?: ComponentConfigInterface) => ComponentWithSelectorsCtor<T>;
|
|
4
|
+
//# sourceMappingURL=get-component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-component.d.ts","sourceRoot":"","sources":["../../../../src/component/component/get-component/get-component.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAEvF,eAAO,MAAM,YAAY,kDAEb,wBAAwB,kCAU/B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getComponent = void 0;
|
|
4
|
+
const default_component_config_1 = require("../../default-component.config");
|
|
5
|
+
const util_1 = require("../../util");
|
|
6
|
+
const component_1 = require("../component");
|
|
7
|
+
const getComponent = (selectors, config = default_component_config_1.defaultComponentConfig) =>
|
|
8
|
+
// @ts-expect-error We use proxy for dynamic fields
|
|
9
|
+
class extends component_1.Component {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(config);
|
|
12
|
+
// eslint-disable-next-line no-constructor-return
|
|
13
|
+
return (0, util_1.createComponentWithSelectorsProxy)(this, selectors);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
exports.getComponent = getComponent;
|
|
17
|
+
//# sourceMappingURL=get-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-component.js","sourceRoot":"","sources":["../../../../src/component/component/get-component/get-component.ts"],"names":[],"mappings":";;;AAAA,6EAAwE;AACxE,qCAA+D;AAC/D,4CAAyC;AAKlC,MAAM,YAAY,GAAG,CACxB,SAAkB,EAClB,SAAmC,iDAAsB,EAC5B,EAAE;AAC/B,mDAAmD;AACnD,KAAM,SAAQ,qBAAS;IACnB;QACI,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,iDAAiD;QACjD,OAAO,IAAA,wCAAiC,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC9D,CAAC;CACJ,CAAC;AAZO,QAAA,YAAY,gBAYnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default$-component.config.d.ts","sourceRoot":"","sources":["../../src/component/default$-component.config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAC;AAEvD,eAAO,MAAM,uBAAuB,EAAE,wBAIrC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default$ComponentConfig = void 0;
|
|
4
|
+
const command_1 = require("../command");
|
|
5
|
+
exports.default$ComponentConfig = {
|
|
6
|
+
elSelectorFn: $,
|
|
7
|
+
elsSelectorFn: $$,
|
|
8
|
+
elsIndexSelectorFn: command_1.byIndex$$,
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=default$-component.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default$-component.config.js","sourceRoot":"","sources":["../../src/component/default$-component.config.ts"],"names":[],"mappings":";;;AAAA,wCAAuC;AAI1B,QAAA,uBAAuB,GAA6B;IAC7D,YAAY,EAAE,CAAC;IACf,aAAa,EAAE,EAAE;IACjB,kBAAkB,EAAE,mBAAS;CAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-component.config.d.ts","sourceRoot":"","sources":["../../src/component/default-component.config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAC;AAEvD,eAAO,MAAM,sBAAsB,EAAE,wBAIpC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultComponentConfig = void 0;
|
|
4
|
+
const command_1 = require("../command");
|
|
5
|
+
exports.defaultComponentConfig = {
|
|
6
|
+
elSelectorFn: command_1.testID$,
|
|
7
|
+
elsIndexSelectorFn: command_1.testID$$Index,
|
|
8
|
+
elsSelectorFn: command_1.testID$$,
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=default-component.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-component.config.js","sourceRoot":"","sources":["../../src/component/default-component.config.ts"],"names":[],"mappings":";;;AAAA,wCAA8D;AAIjD,QAAA,sBAAsB,GAA6B;IAC5D,YAAY,EAAE,iBAAO;IACrB,kBAAkB,EAAE,uBAAa;IACjC,aAAa,EAAE,kBAAQ;CAC1B,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export { Component } from './component/component';
|
|
2
|
-
export { getComponent } from './get-component/get-component';
|
|
3
|
-
export { createComponent } from './create-component/create-component';
|
|
2
|
+
export { getComponent } from './component/get-component/get-component';
|
|
3
|
+
export { createComponent } from './component/create-component/create-component';
|
|
4
|
+
export { create$Component } from './component/create$-component/create$-component';
|
|
5
|
+
export { get$Component } from './component/get$-component/get$-component';
|
|
4
6
|
export { RootedComponent } from './rooted-component/rooted-component';
|
|
5
|
-
export { getRootedComponent } from './get-rooted-component/get-rooted-component';
|
|
6
|
-
export { createRootedComponent } from './create-rooted-component/create-rooted-component';
|
|
7
|
-
export
|
|
7
|
+
export { getRootedComponent } from './rooted-component/get-rooted-component/get-rooted-component';
|
|
8
|
+
export { createRootedComponent } from './rooted-component/create-rooted-component/create-rooted-component';
|
|
9
|
+
export { create$RootedComponent } from './rooted-component/create$-rooted-component/create$-rooted-component';
|
|
10
|
+
export { get$RootedComponent } from './rooted-component/get$-rooted-component/get$-rooted-component';
|
|
8
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/component/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/component/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAC;AAC3G,OAAO,EAAE,sBAAsB,EAAE,MAAM,sEAAsE,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,MAAM,gEAAgE,CAAC"}
|
package/dist/component/index.js
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
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
|
-
exports.createRootedComponent = exports.getRootedComponent = exports.RootedComponent = exports.createComponent = exports.getComponent = exports.Component = void 0;
|
|
3
|
+
exports.get$RootedComponent = exports.create$RootedComponent = exports.createRootedComponent = exports.getRootedComponent = exports.RootedComponent = exports.get$Component = exports.create$Component = exports.createComponent = exports.getComponent = exports.Component = void 0;
|
|
18
4
|
var component_1 = require("./component/component");
|
|
19
5
|
Object.defineProperty(exports, "Component", { enumerable: true, get: function () { return component_1.Component; } });
|
|
20
|
-
var get_component_1 = require("./get-component/get-component");
|
|
6
|
+
var get_component_1 = require("./component/get-component/get-component");
|
|
21
7
|
Object.defineProperty(exports, "getComponent", { enumerable: true, get: function () { return get_component_1.getComponent; } });
|
|
22
|
-
var create_component_1 = require("./create-component/create-component");
|
|
8
|
+
var create_component_1 = require("./component/create-component/create-component");
|
|
23
9
|
Object.defineProperty(exports, "createComponent", { enumerable: true, get: function () { return create_component_1.createComponent; } });
|
|
10
|
+
var create__component_1 = require("./component/create$-component/create$-component");
|
|
11
|
+
Object.defineProperty(exports, "create$Component", { enumerable: true, get: function () { return create__component_1.create$Component; } });
|
|
12
|
+
var get__component_1 = require("./component/get$-component/get$-component");
|
|
13
|
+
Object.defineProperty(exports, "get$Component", { enumerable: true, get: function () { return get__component_1.get$Component; } });
|
|
24
14
|
var rooted_component_1 = require("./rooted-component/rooted-component");
|
|
25
15
|
Object.defineProperty(exports, "RootedComponent", { enumerable: true, get: function () { return rooted_component_1.RootedComponent; } });
|
|
26
|
-
var get_rooted_component_1 = require("./get-rooted-component/get-rooted-component");
|
|
16
|
+
var get_rooted_component_1 = require("./rooted-component/get-rooted-component/get-rooted-component");
|
|
27
17
|
Object.defineProperty(exports, "getRootedComponent", { enumerable: true, get: function () { return get_rooted_component_1.getRootedComponent; } });
|
|
28
|
-
var create_rooted_component_1 = require("./create-rooted-component/create-rooted-component");
|
|
18
|
+
var create_rooted_component_1 = require("./rooted-component/create-rooted-component/create-rooted-component");
|
|
29
19
|
Object.defineProperty(exports, "createRootedComponent", { enumerable: true, get: function () { return create_rooted_component_1.createRootedComponent; } });
|
|
30
|
-
|
|
20
|
+
var create__rooted_component_1 = require("./rooted-component/create$-rooted-component/create$-rooted-component");
|
|
21
|
+
Object.defineProperty(exports, "create$RootedComponent", { enumerable: true, get: function () { return create__rooted_component_1.create$RootedComponent; } });
|
|
22
|
+
var get__rooted_component_1 = require("./rooted-component/get$-rooted-component/get$-rooted-component");
|
|
23
|
+
Object.defineProperty(exports, "get$RootedComponent", { enumerable: true, get: function () { return get__rooted_component_1.get$RootedComponent; } });
|
|
31
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/component/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/component/index.ts"],"names":[],"mappings":";;;AAAA,mDAAkD;AAAzC,sGAAA,SAAS,OAAA;AAClB,yEAAuE;AAA9D,6GAAA,YAAY,OAAA;AACrB,kFAAgF;AAAvE,mHAAA,eAAe,OAAA;AACxB,qFAAmF;AAA1E,qHAAA,gBAAgB,OAAA;AACzB,4EAA0E;AAAjE,+GAAA,aAAa,OAAA;AAEtB,wEAAsE;AAA7D,mHAAA,eAAe,OAAA;AACxB,qGAAkG;AAAzF,0HAAA,kBAAkB,OAAA;AAC3B,8GAA2G;AAAlG,gIAAA,qBAAqB,OAAA;AAC9B,iHAA8G;AAArG,kIAAA,sBAAsB,OAAA;AAC/B,wGAAqG;AAA5F,4HAAA,mBAAmB,OAAA"}
|
package/dist/component/rooted-component/create$-rooted-component/create$-rooted-component.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Enum } from '../../../type';
|
|
2
|
+
import type { ComponentInputArg, RootedComponentWithSelectors } from '../../type';
|
|
3
|
+
export declare const create$RootedComponent: <T extends string>(selectors: Enum<T>, selectorOrElement?: ComponentInputArg) => RootedComponentWithSelectors<T>;
|
|
4
|
+
//# sourceMappingURL=create$-rooted-component.d.ts.map
|
package/dist/component/rooted-component/create$-rooted-component/create$-rooted-component.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create$-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/component/rooted-component/create$-rooted-component/create$-rooted-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAElF,eAAO,MAAM,sBAAsB,6DAEX,iBAAiB,oCACuD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.create$RootedComponent = void 0;
|
|
4
|
+
const get__rooted_component_1 = require("../get$-rooted-component/get$-rooted-component");
|
|
5
|
+
const create$RootedComponent = (selectors, selectorOrElement) => new ((0, get__rooted_component_1.get$RootedComponent)(selectors))(selectorOrElement);
|
|
6
|
+
exports.create$RootedComponent = create$RootedComponent;
|
|
7
|
+
//# sourceMappingURL=create$-rooted-component.js.map
|
package/dist/component/rooted-component/create$-rooted-component/create$-rooted-component.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create$-rooted-component.js","sourceRoot":"","sources":["../../../../src/component/rooted-component/create$-rooted-component/create$-rooted-component.ts"],"names":[],"mappings":";;;AAAA,0FAAqF;AAK9E,MAAM,sBAAsB,GAAG,CAClC,SAAkB,EAClB,iBAAqC,EACN,EAAE,CAAC,IAAI,CAAC,IAAA,2CAAmB,EAAI,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;AAHpF,QAAA,sBAAsB,0BAG8D"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Enum } from '../../../type';
|
|
2
|
+
import type { ComponentInputArg, RootedComponentWithSelectors } from '../../type';
|
|
3
|
+
import type { ComponentConfigInterface } from '../../type/component-config-arg.type';
|
|
4
|
+
export declare const createRootedComponent: <T extends string>(selectors: Enum<T>, selectorOrElement?: ComponentInputArg, config?: ComponentConfigInterface) => RootedComponentWithSelectors<T>;
|
|
5
|
+
//# sourceMappingURL=create-rooted-component.d.ts.map
|
package/dist/component/rooted-component/create-rooted-component/create-rooted-component.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/component/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAErF,eAAO,MAAM,qBAAqB,6DAEV,iBAAiB,WAC5B,wBAAwB,oCACkE,CAAC"}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createRootedComponent = void 0;
|
|
4
4
|
const get_rooted_component_1 = require("../get-rooted-component/get-rooted-component");
|
|
5
|
-
const createRootedComponent = (selectors, selectorOrElement) => new ((0, get_rooted_component_1.getRootedComponent)(selectors))(selectorOrElement);
|
|
5
|
+
const createRootedComponent = (selectors, selectorOrElement, config) => new ((0, get_rooted_component_1.getRootedComponent)(selectors, config))(selectorOrElement);
|
|
6
6
|
exports.createRootedComponent = createRootedComponent;
|
|
7
7
|
//# sourceMappingURL=create-rooted-component.js.map
|
package/dist/component/rooted-component/create-rooted-component/create-rooted-component.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-rooted-component.js","sourceRoot":"","sources":["../../../../src/component/rooted-component/create-rooted-component/create-rooted-component.ts"],"names":[],"mappings":";;;AAAA,uFAAkF;AAM3E,MAAM,qBAAqB,GAAG,CACjC,SAAkB,EAClB,iBAAqC,EACrC,MAAiC,EACF,EAAE,CAAC,IAAI,CAAC,IAAA,yCAAkB,EAAI,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;AAJ3F,QAAA,qBAAqB,yBAIsE"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Enum } from '../../../type';
|
|
2
|
+
import type { RootedComponentWithSelectorsCtor } from '../../type';
|
|
3
|
+
export declare const get$RootedComponent: <T extends string>(selectors: Enum<T>) => RootedComponentWithSelectorsCtor<T>;
|
|
4
|
+
//# sourceMappingURL=get$-rooted-component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get$-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/component/rooted-component/get$-rooted-component/get$-rooted-component.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAEnE,eAAO,MAAM,mBAAmB,+EAC0B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.get$RootedComponent = void 0;
|
|
4
|
+
const default__component_config_1 = require("../../default$-component.config");
|
|
5
|
+
const get_rooted_component_1 = require("../get-rooted-component/get-rooted-component");
|
|
6
|
+
const get$RootedComponent = (selectors) => (0, get_rooted_component_1.getRootedComponent)(selectors, default__component_config_1.default$ComponentConfig);
|
|
7
|
+
exports.get$RootedComponent = get$RootedComponent;
|
|
8
|
+
//# sourceMappingURL=get$-rooted-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get$-rooted-component.js","sourceRoot":"","sources":["../../../../src/component/rooted-component/get$-rooted-component/get$-rooted-component.ts"],"names":[],"mappings":";;;AAAA,+EAA0E;AAC1E,uFAAkF;AAK3E,MAAM,mBAAmB,GAAG,CAAmB,SAAkB,EAAuC,EAAE,CAC7G,IAAA,yCAAkB,EAAC,SAAS,EAAE,mDAAuB,CAAC,CAAC;AAD9C,QAAA,mBAAmB,uBAC2B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Enum } from '../../../type';
|
|
2
|
+
import type { ComponentConfigInterface, RootedComponentWithSelectorsCtor } from '../../type';
|
|
3
|
+
export declare const getRootedComponent: <T extends string>(selectors: Enum<T>, config?: ComponentConfigInterface) => RootedComponentWithSelectorsCtor<T>;
|
|
4
|
+
//# sourceMappingURL=get-rooted-component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-rooted-component.d.ts","sourceRoot":"","sources":["../../../../src/component/rooted-component/get-rooted-component/get-rooted-component.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,wBAAwB,EAAqB,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAEhH,eAAO,MAAM,kBAAkB,kDAEnB,wBAAwB,wCAgB/B,CAAC"}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRootedComponent = void 0;
|
|
4
4
|
const shared_1 = require("@rnw-community/shared");
|
|
5
|
-
const
|
|
6
|
-
const util_1 = require("
|
|
7
|
-
const
|
|
5
|
+
const default_component_config_1 = require("../../default-component.config");
|
|
6
|
+
const util_1 = require("../../util");
|
|
7
|
+
const rooted_component_1 = require("../rooted-component");
|
|
8
|
+
const getRootedComponent = (selectors, config = default_component_config_1.defaultComponentConfig) =>
|
|
8
9
|
// @ts-expect-error We use proxy for dynamic fields
|
|
9
10
|
class extends rooted_component_1.RootedComponent {
|
|
10
11
|
constructor(selectorOrElement) {
|
|
@@ -12,17 +13,9 @@ class extends rooted_component_1.RootedComponent {
|
|
|
12
13
|
if (!(0, shared_1.isDefined)(rootSelector)) {
|
|
13
14
|
throw new Error('Cannot create RootedComponent - Neither root selector nor root element is passed');
|
|
14
15
|
}
|
|
15
|
-
super(rootSelector);
|
|
16
|
+
super(rootSelector, config);
|
|
16
17
|
// eslint-disable-next-line no-constructor-return
|
|
17
|
-
return
|
|
18
|
-
get(client, field, receiver) {
|
|
19
|
-
if (field in client) {
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
21
|
-
return Reflect.get(client, field, receiver);
|
|
22
|
-
}
|
|
23
|
-
return (0, util_1.proxyCall)(client, selectors, field);
|
|
24
|
-
},
|
|
25
|
-
});
|
|
18
|
+
return (0, util_1.createComponentWithSelectorsProxy)(this, selectors);
|
|
26
19
|
}
|
|
27
20
|
};
|
|
28
21
|
exports.getRootedComponent = getRootedComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-rooted-component.js","sourceRoot":"","sources":["../../../../src/component/rooted-component/get-rooted-component/get-rooted-component.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAElD,6EAAwE;AACxE,qCAAqF;AACrF,0DAAsD;AAK/C,MAAM,kBAAkB,GAAG,CAC9B,SAAkB,EAClB,SAAmC,iDAAsB,EACtB,EAAE;AACrC,mDAAmD;AACnD,KAAM,SAAQ,kCAAe;IACzB,YAAY,iBAAqC;QAC7C,MAAM,YAAY,GAAG,IAAA,kBAAS,EAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAA,2BAAoB,EAAC,SAAS,CAAC,CAAC;QAExG,IAAI,CAAC,IAAA,kBAAS,EAAC,YAAY,CAAC,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;SACvG;QAED,KAAK,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QAE5B,iDAAiD;QACjD,OAAO,IAAA,wCAAiC,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC9D,CAAC;CACJ,CAAC;AAlBO,QAAA,kBAAkB,sBAkBzB"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
/// <reference types="webdriverio/async" />
|
|
2
2
|
import { Component } from '../component/component';
|
|
3
|
-
import type { ClickArgs, WaitForDisplayedArgs, WaitForEnabledArgs, WaitForExistArgs } from '../type';
|
|
3
|
+
import type { ClickArgs, ComponentConfigInterface, ComponentInputArg, WaitForDisplayedArgs, WaitForEnabledArgs, WaitForExistArgs } from '../type';
|
|
4
4
|
export declare class RootedComponent extends Component {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
private readonly constructorSelector;
|
|
8
|
-
constructor(selectorOrElement: WebdriverIO.Element | string);
|
|
5
|
+
protected readonly parentElInput: ComponentInputArg;
|
|
6
|
+
constructor(parentElInput: ComponentInputArg, config: ComponentConfigInterface);
|
|
9
7
|
get RootEl(): Promise<WebdriverIO.Element>;
|
|
10
8
|
waitForDisplayed(...args: WaitForDisplayedArgs): Promise<void>;
|
|
11
9
|
waitForEnabled(...args: WaitForEnabledArgs): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooted-component.d.ts","sourceRoot":"","sources":["../../../src/component/rooted-component/rooted-component.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"rooted-component.d.ts","sourceRoot":"","sources":["../../../src/component/rooted-component/rooted-component.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,KAAK,EACR,SAAS,EACT,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EACnB,MAAM,SAAS,CAAC;AAEjB,qBAAa,eAAgB,SAAQ,SAAS;IAC9B,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,iBAAiB;gBAAhC,aAAa,EAAE,iBAAiB,EAAE,MAAM,EAAE,wBAAwB;IAIjG,IAAI,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAQzC;IAEK,gBAAgB,CAAC,GAAG,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9D,cAAc,CAAC,GAAG,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1D,YAAY,CAAC,GAAG,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAItD,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAI/B,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAI9B,KAAK,CAAC,GAAG,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/B,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;IAI1D,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC;IAIhE,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;CAG9F"}
|