@badisi/wdio-harness 4.4.1 → 5.0.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/index.d.mts +1 -6
- package/index.mjs +4 -8
- package/package.json +4 -4
package/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentHarness, ComponentHarnessConstructor, ElementDimensions, EventData, HarnessEnvironment, HarnessQuery, ModifierKeys, TestElement, TestKey, TextOptions } from "@angular/cdk/testing";
|
|
2
|
-
//#region src/WebdriverIOTestElement.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* A `TestElement` implementation for WebdriverIO.
|
|
5
4
|
*/
|
|
@@ -86,8 +85,6 @@ declare class WebdriverIOTestElement implements TestElement {
|
|
|
86
85
|
/** Writes info to the console outputs. */
|
|
87
86
|
private logAction;
|
|
88
87
|
}
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region src/WebdriverIOHarnessEnvironment.d.ts
|
|
91
88
|
/**
|
|
92
89
|
* A `HarnessEnvironment` implementation for WebdriverIO.
|
|
93
90
|
*/
|
|
@@ -120,8 +117,6 @@ declare class WebdriverIOHarnessEnvironment extends HarnessEnvironment<Webdriver
|
|
|
120
117
|
/** Creates a `HarnessLoader` rooted at the given raw element. */
|
|
121
118
|
protected createEnvironment(element: WebdriverIO.Element): HarnessEnvironment<WebdriverIO.Element>;
|
|
122
119
|
}
|
|
123
|
-
//#endregion
|
|
124
|
-
//#region src/index.d.ts
|
|
125
120
|
/** Module augmentation to expose the host element as a public api */
|
|
126
121
|
declare module "@angular/cdk/testing" {
|
|
127
122
|
interface ComponentHarness {
|
|
@@ -161,4 +156,4 @@ export declare const createHarnessEnvironment: (rootElement?: WebdriverIO.Elemen
|
|
|
161
156
|
* app that never finish (timers, etc).
|
|
162
157
|
*/
|
|
163
158
|
export declare const waitForAngular: () => Promise<void>;
|
|
164
|
-
|
|
159
|
+
export {};
|
package/index.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ComponentHarness, HarnessEnvironment, TestKey } from "@angular/cdk/testing";
|
|
2
2
|
import { $, browser } from "@wdio/globals";
|
|
3
3
|
import logger from "@wdio/logger";
|
|
4
|
-
|
|
4
|
+
// src/utils.ts
|
|
5
5
|
const colorize = (msg, color) => process.stdout.isTTY ? `${color}${msg}\x1b[0m` : msg;
|
|
6
6
|
const magenta = (msg) => colorize(msg, "\x1B[35m");
|
|
7
7
|
const green = (msg) => colorize(msg, "\x1B[32m");
|
|
8
|
-
|
|
9
|
-
//#region src/WebdriverIOTestElement.ts
|
|
8
|
+
// src/WebdriverIOTestElement.ts
|
|
10
9
|
/** Maps the `TestKey` constants to WebdriverIO's `Key` constants. */
|
|
11
10
|
const getKey = (key) => ({
|
|
12
11
|
[TestKey.BACKSPACE]: "Backspace",
|
|
@@ -265,8 +264,7 @@ var WebdriverIOTestElement = class {
|
|
|
265
264
|
logger("wdio-harness").info(`${magenta(action)} ${green(this.hostElement.selector.toString())} ${args ? args : ""}`);
|
|
266
265
|
}
|
|
267
266
|
};
|
|
268
|
-
|
|
269
|
-
//#region src/WebdriverIOHarnessEnvironment.ts
|
|
267
|
+
// src/WebdriverIOHarnessEnvironment.ts
|
|
270
268
|
/**
|
|
271
269
|
* A `HarnessEnvironment` implementation for WebdriverIO.
|
|
272
270
|
*/
|
|
@@ -310,8 +308,7 @@ var WebdriverIOHarnessEnvironment = class WebdriverIOHarnessEnvironment extends
|
|
|
310
308
|
return new WebdriverIOHarnessEnvironment(element, { documentRoot: this.documentRoot });
|
|
311
309
|
}
|
|
312
310
|
};
|
|
313
|
-
|
|
314
|
-
//#region src/index.ts
|
|
311
|
+
// src/index.ts
|
|
315
312
|
/** Patches `ComponentHarness.prototype` to expose the host element. */
|
|
316
313
|
let _patched = false;
|
|
317
314
|
const patchComponentHarness = () => {
|
|
@@ -373,5 +370,4 @@ const waitForAngular = async () => {
|
|
|
373
370
|
Promise.all(promises).then(done);
|
|
374
371
|
`, []);
|
|
375
372
|
};
|
|
376
|
-
//#endregion
|
|
377
373
|
export { createHarnessEnvironment, getAllHarnesses, getHarness, patchComponentHarness, waitForAngular };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@badisi/wdio-harness",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "WebdriverIO support for Angular component test harnesses.",
|
|
5
5
|
"homepage": "https://github.com/Badisi/wdio-harness",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@angular/cdk": ">= 13 < 22",
|
|
44
|
-
"@wdio/globals": ">=
|
|
45
|
-
"@wdio/logger": ">=
|
|
46
|
-
"webdriverio": ">=
|
|
44
|
+
"@wdio/globals": ">= 10 < 11",
|
|
45
|
+
"@wdio/logger": ">= 10 < 11",
|
|
46
|
+
"webdriverio": ">= 10 < 11"
|
|
47
47
|
}
|
|
48
48
|
}
|