@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
@@ -1,5 +1,17 @@
1
1
  # @empiricalrun/playwright-utils
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9094774: feat: expose locator highlighter scripts
8
+
9
+ ## 0.4.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 6b24c0c: fix: package import issue
14
+
3
15
  ## 0.4.1
4
16
 
5
17
  ### Patch Changes
@@ -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
@@ -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;AAI1B,eAAO,MAAM,eAAe,WAClB,SACN,kBAAkB,GAAG,qBAAqB,EAC1C,oBAAoB,GAAG,uBAAuB,CAC/C;;kDAQF,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"}
@@ -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.addCustomScripts)(page);
9
+ (0, scripts_1.injectLocatorHighlightScripts)(page);
9
10
  await use(page);
10
11
  },
11
12
  });
@@ -1,3 +1,3 @@
1
1
  import type { Page } from "@playwright/test";
2
- export declare function addCustomScripts(page: Page): void;
2
+ export declare function injectLocatorHighlightScripts(page: Page): void;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -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,gBAAgB,CAAC,IAAI,EAAE,IAAI,QAS1C"}
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.addCustomScripts = void 0;
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 addCustomScripts(page) {
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.addCustomScripts = addCustomScripts;
17
+ exports.injectLocatorHighlightScripts = injectLocatorHighlightScripts;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/playwright-utils",
3
- "version": "0.4.1",
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
- "default": "./dist/index.js",
12
- "types": "./dist/index.d.ts"
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
13
  },
14
14
  "./test": {
15
- "default": "./dist/test/index.js",
16
- "types": "./dist/test/index.d.ts"
15
+ "types": "./dist/test/index.d.ts",
16
+ "default": "./dist/test/index.js"
17
17
  }
18
18
  },
19
19
  "repository": {