@empiricalrun/playwright-utils 0.25.14 → 0.25.15

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,11 @@
1
1
  # @empiricalrun/playwright-utils
2
2
 
3
+ ## 0.25.15
4
+
5
+ ### Patch Changes
6
+
7
+ - 02d11dc: fix: highlighting options should fallback if override has missing keys
8
+
3
9
  ## 0.25.14
4
10
 
5
11
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,MAAM,EACN,IAAI,EACJ,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,cAAc,CAAC;QACvB,UAAU,QAAQ,CAAC,CAAC;YAClB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;SAC9C;KACF;CACF;AAED,QAAA,MAAM,YAAY,mBAA6B,aAAa,0CAG3D,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,IAAI,CAAC;IACX,yBAAyB,EAAE,CACzB,OAAO,CAAC,EAAE,qBAAqB,KAC5B,OAAO,CAAC;QAAE,OAAO,EAAE,cAAc,CAAC;QAAC,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;IACtD,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAIF,QAAA,MAAM,eAAe,WACX,SACN,kBAAkB,GAAG,qBAAqB,EAC1C,oBAAoB,GAAG,uBAAuB,CAC/C,YACQ,eAAe,uHA0DzB,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,6BAA6B,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,MAAM,EACN,IAAI,EACJ,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,cAAc,CAAC;QACvB,UAAU,QAAQ,CAAC,CAAC;YAClB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;SAC9C;KACF;CACF;AAED,QAAA,MAAM,YAAY,mBAA6B,aAAa,0CAG3D,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,IAAI,CAAC;IACX,yBAAyB,EAAE,CACzB,OAAO,CAAC,EAAE,qBAAqB,KAC5B,OAAO,CAAC;QAAE,OAAO,EAAE,cAAc,CAAC;QAAC,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;IACtD,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAUF,QAAA,MAAM,eAAe,WACX,SACN,kBAAkB,GAAG,qBAAqB,EAC1C,oBAAoB,GAAG,uBAAuB,CAC/C,YACQ,eAAe,uHAwDzB,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,6BAA6B,EAAE,CAAC"}
@@ -16,15 +16,19 @@ const extendExpect = function (expectInstance) {
16
16
  };
17
17
  exports.extendExpect = extendExpect;
18
18
  const videoStore = "videos-store";
19
- const baseTestFixture = function (testFn, options = {
19
+ const defaultOptions = {
20
20
  mousePointerHighlighter: true,
21
21
  locatorHighlighter: true,
22
22
  visionMethods: true,
23
23
  agentCapabilities: true,
24
- }) {
24
+ };
25
+ const baseTestFixture = function (testFn, options = defaultOptions) {
25
26
  const extendedTestFn = testFn.extend({
26
27
  page: async ({ page }, use) => {
27
- (0, scripts_1.injectLocatorHighlightScripts)(page, extendedTestFn, options);
28
+ (0, scripts_1.injectLocatorHighlightScripts)(page, extendedTestFn, {
29
+ ...defaultOptions,
30
+ ...options,
31
+ });
28
32
  await use(page);
29
33
  },
30
34
  customContextPageProvider: async ({ browser }, use, testInfo) => {
@@ -1 +1 @@
1
- {"version":3,"file":"agent-capabilities.d.ts","sourceRoot":"","sources":["../../../src/test/scripts/agent-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAG7C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAOjC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAK9D"}
1
+ {"version":3,"file":"agent-capabilities.d.ts","sourceRoot":"","sources":["../../../src/test/scripts/agent-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAI7C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAQjC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAK9D"}
@@ -2,9 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addAgentCapabilities = void 0;
4
4
  const click_1 = require("./pw-locator-patch/highlight/click");
5
+ const hover_1 = require("./pw-locator-patch/highlight/hover");
5
6
  function applyPatchForAutoDismissOverlay(page, testFn) {
6
7
  const LocatorClass = page.locator("").constructor;
7
8
  (0, click_1.patchClick)(LocatorClass, testFn);
9
+ (0, hover_1.patchHover)(LocatorClass, testFn);
8
10
  }
9
11
  function addAgentCapabilities(page, testFn) {
10
12
  applyPatchForAutoDismissOverlay(page, testFn);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/playwright-utils",
3
- "version": "0.25.14",
3
+ "version": "0.25.15",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -38,9 +38,9 @@
38
38
  "mailosaur": "^8.6.1",
39
39
  "puppeteer-extra-plugin-recaptcha": "^3.6.8",
40
40
  "rimraf": "^6.0.1",
41
+ "@empiricalrun/llm": "^0.14.2",
41
42
  "@empiricalrun/r2-uploader": "^0.3.8",
42
- "@empiricalrun/test-gen": "^0.53.3",
43
- "@empiricalrun/llm": "^0.14.2"
43
+ "@empiricalrun/test-gen": "^0.53.3"
44
44
  },
45
45
  "scripts": {
46
46
  "dev": "tsc --build --watch",