@badisi/wdio-harness 2.0.1 → 2.0.2
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.
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import { ComponentHarness, ComponentHarnessConstructor, HarnessEnvironment } from '@angular/cdk/testing';
|
|
2
|
+
import { Element as WebdriverIOElement, ElementArray as WebdriverIOElementArray } from 'webdriverio';
|
|
3
|
+
import { WebdriverIOTestElement } from './WebdriverIOTestElement.js';
|
|
3
4
|
/**
|
|
4
5
|
* A `HarnessEnvironment` implementation for WebdriverIO.
|
|
5
6
|
*/
|
|
6
|
-
export declare class WebdriverIOHarnessEnvironment extends HarnessEnvironment<
|
|
7
|
+
export declare class WebdriverIOHarnessEnvironment extends HarnessEnvironment<WebdriverIOElement> {
|
|
7
8
|
/**
|
|
8
9
|
* Keep a reference to the `document` element because `rawRootElement`
|
|
9
10
|
* will be the root element of the harness's environment.
|
|
10
11
|
*/
|
|
11
12
|
private documentRoot;
|
|
12
|
-
protected constructor(rawRootElement:
|
|
13
|
-
documentRoot:
|
|
13
|
+
protected constructor(rawRootElement: WebdriverIOElement, options: {
|
|
14
|
+
documentRoot: WebdriverIOElement;
|
|
14
15
|
});
|
|
15
16
|
/** Creates a `HarnessLoader` rooted at the document root. */
|
|
16
|
-
static loader(documentRoot:
|
|
17
|
+
static loader(documentRoot: WebdriverIOElement): Promise<WebdriverIOHarnessEnvironment>;
|
|
17
18
|
/**
|
|
18
19
|
* Flushes change detection and async tasks captured in the Angular zone.
|
|
19
20
|
* In most cases it should not be necessary to call this manually. However, there may be some edge
|
|
@@ -22,13 +23,13 @@ export declare class WebdriverIOHarnessEnvironment extends HarnessEnvironment<We
|
|
|
22
23
|
forceStabilize(): Promise<void>;
|
|
23
24
|
waitForTasksOutsideAngular(): Promise<void>;
|
|
24
25
|
/** Creates a `ComponentHarness` for the given harness type with the given raw host element. */
|
|
25
|
-
createComponentHarness<T extends ComponentHarness>(harnessType: ComponentHarnessConstructor<T>, element:
|
|
26
|
+
createComponentHarness<T extends ComponentHarness>(harnessType: ComponentHarnessConstructor<T>, element: WebdriverIOElement): T;
|
|
26
27
|
/** Gets a list of all elements matching the given selector under this environment's root element. */
|
|
27
|
-
protected getAllRawElements(selector: string): Promise<
|
|
28
|
+
protected getAllRawElements(selector: string): Promise<WebdriverIOElementArray>;
|
|
28
29
|
/** Gets the root element for the document. */
|
|
29
|
-
protected getDocumentRoot():
|
|
30
|
+
protected getDocumentRoot(): WebdriverIOElement;
|
|
30
31
|
/** Creates a `TestElement` from a raw element. */
|
|
31
|
-
protected createTestElement(element:
|
|
32
|
+
protected createTestElement(element: WebdriverIOElement): WebdriverIOTestElement;
|
|
32
33
|
/** Creates a `HarnessLoader` rooted at the given raw element. */
|
|
33
|
-
protected createEnvironment(element:
|
|
34
|
+
protected createEnvironment(element: WebdriverIOElement): HarnessEnvironment<WebdriverIOElement>;
|
|
34
35
|
}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { ElementDimensions, EventData, ModifierKeys, TestElement, TestKey, TextOptions } from '@angular/cdk/testing';
|
|
2
|
+
import { Element as WebdriverIOElement } from 'webdriverio';
|
|
2
3
|
/** Module augmentation to expose the host element as a public api */
|
|
3
4
|
declare module '@angular/cdk/testing' {
|
|
4
5
|
interface ComponentHarness {
|
|
5
|
-
element():
|
|
6
|
+
element(): WebdriverIOElement;
|
|
6
7
|
}
|
|
7
8
|
interface TestElement {
|
|
8
|
-
element():
|
|
9
|
+
element(): WebdriverIOElement;
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* A `TestElement` implementation for WebdriverIO.
|
|
13
14
|
*/
|
|
14
15
|
export declare class WebdriverIOTestElement implements TestElement {
|
|
15
|
-
readonly hostElement:
|
|
16
|
-
constructor(hostElement:
|
|
16
|
+
readonly hostElement: WebdriverIOElement;
|
|
17
|
+
constructor(hostElement: WebdriverIOElement);
|
|
17
18
|
/** Return the host element. */
|
|
18
|
-
element():
|
|
19
|
+
element(): WebdriverIOElement;
|
|
19
20
|
/** Blur the element. */
|
|
20
21
|
blur(): Promise<void>;
|
|
21
22
|
/** Clear the element's input (for input and textarea elements only). */
|