@empiricalrun/playwright-utils 0.4.1 → 0.5.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/CHANGELOG.md
CHANGED
package/dist/test/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { PlaywrightTestArgs, PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions, TestType } from "@playwright/test";
|
|
2
|
+
import { injectLocatorHighlightScripts } from "./scripts";
|
|
2
3
|
export declare const baseTestFixture: (testFn: TestType<PlaywrightTestArgs & PlaywrightTestOptions, PlaywrightWorkerArgs & PlaywrightWorkerOptions>) => TestType<PlaywrightTestArgs & PlaywrightTestOptions & {
|
|
3
4
|
[key: string]: any;
|
|
4
5
|
}, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
|
|
6
|
+
export { injectLocatorHighlightScripts };
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/test/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,QAAQ,EACT,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,WAAW,CAAC;AAE1D,eAAO,MAAM,eAAe,WAClB,SACN,kBAAkB,GAAG,qBAAqB,EAC1C,oBAAoB,GAAG,uBAAuB,CAC/C;;kDAQF,CAAC;AAEF,OAAO,EAAE,6BAA6B,EAAE,CAAC"}
|
package/dist/test/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.baseTestFixture = void 0;
|
|
3
|
+
exports.injectLocatorHighlightScripts = exports.baseTestFixture = void 0;
|
|
4
4
|
const scripts_1 = require("./scripts");
|
|
5
|
+
Object.defineProperty(exports, "injectLocatorHighlightScripts", { enumerable: true, get: function () { return scripts_1.injectLocatorHighlightScripts; } });
|
|
5
6
|
const baseTestFixture = function (testFn) {
|
|
6
7
|
return testFn.extend({
|
|
7
8
|
page: async ({ page }, use) => {
|
|
8
|
-
(0, scripts_1.
|
|
9
|
+
(0, scripts_1.injectLocatorHighlightScripts)(page);
|
|
9
10
|
await use(page);
|
|
10
11
|
},
|
|
11
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test/scripts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAK7C,wBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test/scripts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAK7C,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,QASvD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.injectLocatorHighlightScripts = void 0;
|
|
4
4
|
const locator_highlights_1 = require("./locator-highlights");
|
|
5
5
|
const mouse_pointer_1 = require("./mouse-pointer");
|
|
6
|
-
function
|
|
6
|
+
function injectLocatorHighlightScripts(page) {
|
|
7
7
|
try {
|
|
8
8
|
// pointer highlighter and focus highlighter
|
|
9
9
|
(0, mouse_pointer_1.addMousePointerHighlighter)(page);
|
|
@@ -14,4 +14,4 @@ function addCustomScripts(page) {
|
|
|
14
14
|
console.error("Failed to add mouse pointer highlighter", e);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
exports.
|
|
17
|
+
exports.injectLocatorHighlightScripts = injectLocatorHighlightScripts;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/playwright-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"
|
|
12
|
-
"
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"./test": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
15
|
+
"types": "./dist/test/index.d.ts",
|
|
16
|
+
"default": "./dist/test/index.js"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|