@empiricalrun/playwright-utils 0.62.1 → 0.63.1

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.
Files changed (136) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/api-worker-client.d.ts +0 -13
  3. package/dist/api-worker-client.d.ts.map +1 -1
  4. package/dist/api-worker-client.js +0 -15
  5. package/dist/auth/google.d.ts.map +1 -1
  6. package/dist/auth/google.js +0 -1
  7. package/dist/auth/index.d.ts.map +1 -1
  8. package/dist/auth/index.js +0 -9
  9. package/dist/config/index.d.ts.map +1 -1
  10. package/dist/config/index.js +0 -8
  11. package/dist/generated/api-worker-openapi.d.ts +3031 -1420
  12. package/dist/generated/api-worker-openapi.d.ts.map +1 -1
  13. package/dist/overlay-tests/cache.spec.js +31 -17
  14. package/dist/overlay-tests/click.spec.js +2 -25
  15. package/dist/overlay-tests/dismiss-mechanics.spec.d.ts +2 -0
  16. package/dist/overlay-tests/dismiss-mechanics.spec.d.ts.map +1 -0
  17. package/dist/overlay-tests/dismiss-mechanics.spec.js +59 -0
  18. package/dist/overlay-tests/dropdown.spec.d.ts +2 -0
  19. package/dist/overlay-tests/dropdown.spec.d.ts.map +1 -0
  20. package/dist/overlay-tests/dropdown.spec.js +53 -0
  21. package/dist/overlay-tests/fixtures.d.ts +3 -1
  22. package/dist/overlay-tests/fixtures.d.ts.map +1 -1
  23. package/dist/overlay-tests/fixtures.js +15 -0
  24. package/dist/overlay-tests/typesafe-hit-check.spec.d.ts +2 -0
  25. package/dist/overlay-tests/typesafe-hit-check.spec.d.ts.map +1 -0
  26. package/dist/overlay-tests/typesafe-hit-check.spec.js +57 -0
  27. package/dist/overlay-tests/typesafe.spec.d.ts +2 -0
  28. package/dist/overlay-tests/typesafe.spec.d.ts.map +1 -0
  29. package/dist/overlay-tests/typesafe.spec.js +86 -0
  30. package/dist/playwright-extensions.d.ts.map +1 -1
  31. package/dist/playwright-extensions.js +0 -1
  32. package/dist/reporter/attachment-cleanup-test-reporter.d.ts +0 -6
  33. package/dist/reporter/attachment-cleanup-test-reporter.d.ts.map +1 -1
  34. package/dist/reporter/attachment-cleanup-test-reporter.js +0 -6
  35. package/dist/reporter/attachment-cleanup.d.ts +0 -33
  36. package/dist/reporter/attachment-cleanup.d.ts.map +1 -1
  37. package/dist/reporter/attachment-cleanup.js +2 -51
  38. package/dist/reporter/empirical-reporter.d.ts.map +1 -1
  39. package/dist/reporter/empirical-reporter.js +0 -9
  40. package/dist/reporter/harness.d.ts +0 -62
  41. package/dist/reporter/harness.d.ts.map +1 -1
  42. package/dist/reporter/harness.js +1 -53
  43. package/dist/reporter/ibr-utils.d.ts +0 -5
  44. package/dist/reporter/ibr-utils.d.ts.map +1 -1
  45. package/dist/reporter/ibr-utils.js +0 -5
  46. package/dist/reporter/incremental-blob-reporter.d.ts +0 -17
  47. package/dist/reporter/incremental-blob-reporter.d.ts.map +1 -1
  48. package/dist/reporter/incremental-blob-reporter.js +5 -35
  49. package/dist/reporter/lifecycle-events.d.ts.map +1 -1
  50. package/dist/reporter/lifecycle-events.js +0 -9
  51. package/dist/reporter/parity-utils.d.ts +0 -30
  52. package/dist/reporter/parity-utils.d.ts.map +1 -1
  53. package/dist/reporter/parity-utils.js +4 -28
  54. package/dist/reporter/reporter-state.d.ts +0 -12
  55. package/dist/reporter/reporter-state.d.ts.map +1 -1
  56. package/dist/reporter/reporter-state.js +0 -12
  57. package/dist/reporter/test-case-sync.d.ts.map +1 -1
  58. package/dist/reporter/test-case-sync.js +0 -12
  59. package/dist/reporter/uploader.d.ts.map +1 -1
  60. package/dist/reporter/uploader.js +0 -6
  61. package/dist/reporter/util.d.ts +0 -33
  62. package/dist/reporter/util.d.ts.map +1 -1
  63. package/dist/reporter/util.js +0 -37
  64. package/dist/telemetry.d.ts.map +1 -1
  65. package/dist/telemetry.js +1 -10
  66. package/dist/test/coverage.d.ts.map +1 -1
  67. package/dist/test/coverage.js +1 -3
  68. package/dist/test/expect/visual.d.ts.map +1 -1
  69. package/dist/test/expect/visual.js +1 -9
  70. package/dist/test/index.d.ts.map +1 -1
  71. package/dist/test/index.js +4 -21
  72. package/dist/test/scripts/agent-capabilities.js +2 -2
  73. package/dist/test/scripts/index.d.ts +2 -2
  74. package/dist/test/scripts/index.d.ts.map +1 -1
  75. package/dist/test/scripts/index.js +3 -16
  76. package/dist/test/scripts/pw-locator-patch/actions/click.d.ts.map +1 -0
  77. package/dist/test/scripts/pw-locator-patch/{highlight → actions}/click.js +8 -6
  78. package/dist/test/scripts/pw-locator-patch/actions/hover.d.ts.map +1 -0
  79. package/dist/test/scripts/pw-locator-patch/{highlight → actions}/hover.js +0 -3
  80. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/cache.d.ts +1 -1
  81. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/cache.d.ts.map +1 -1
  82. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/cache.js +9 -13
  83. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/index.d.ts +3 -0
  84. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/index.d.ts.map +1 -1
  85. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/index.js +14 -12
  86. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/prompt.d.ts.map +1 -1
  87. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/prompt.js +0 -1
  88. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/typesafe.d.ts +38 -0
  89. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/typesafe.d.ts.map +1 -0
  90. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/typesafe.js +159 -0
  91. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/utils.d.ts +3 -0
  92. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/utils.d.ts.map +1 -1
  93. package/dist/test/scripts/pw-locator-patch/dismiss-overlays/utils.js +13 -5
  94. package/dist/test/scripts/pw-locator-patch/utils/index.d.ts +0 -1
  95. package/dist/test/scripts/pw-locator-patch/utils/index.d.ts.map +1 -1
  96. package/dist/test/scripts/pw-locator-patch/utils/index.js +0 -18
  97. package/dist/test/types.d.ts +2 -5
  98. package/dist/test/types.d.ts.map +1 -1
  99. package/dist/test/video-labels.d.ts.map +1 -1
  100. package/dist/test/video-labels.js +0 -1
  101. package/dist/webhook.d.ts.map +1 -1
  102. package/dist/webhook.js +0 -3
  103. package/docs/fixtures.md +4 -5
  104. package/package.json +6 -6
  105. package/playwright.config.ts +0 -4
  106. package/tsconfig.tsbuildinfo +1 -1
  107. package/upstream-oracle/ibr-adapter.js +0 -23
  108. package/upstream-oracle/run.mjs +1 -69
  109. package/dist/test/scripts/locator-highlights.d.ts +0 -4
  110. package/dist/test/scripts/locator-highlights.d.ts.map +0 -1
  111. package/dist/test/scripts/locator-highlights.js +0 -28
  112. package/dist/test/scripts/pw-locator-patch/highlight/click.d.ts.map +0 -1
  113. package/dist/test/scripts/pw-locator-patch/highlight/expect.d.ts +0 -5
  114. package/dist/test/scripts/pw-locator-patch/highlight/expect.d.ts.map +0 -1
  115. package/dist/test/scripts/pw-locator-patch/highlight/expect.js +0 -23
  116. package/dist/test/scripts/pw-locator-patch/highlight/hover.d.ts.map +0 -1
  117. package/dist/test/scripts/pw-locator-patch/highlight/inner-text.d.ts +0 -6
  118. package/dist/test/scripts/pw-locator-patch/highlight/inner-text.d.ts.map +0 -1
  119. package/dist/test/scripts/pw-locator-patch/highlight/inner-text.js +0 -30
  120. package/dist/test/scripts/pw-locator-patch/highlight/input-value.d.ts +0 -6
  121. package/dist/test/scripts/pw-locator-patch/highlight/input-value.d.ts.map +0 -1
  122. package/dist/test/scripts/pw-locator-patch/highlight/input-value.js +0 -30
  123. package/dist/test/scripts/pw-locator-patch/highlight/is-checked.d.ts +0 -6
  124. package/dist/test/scripts/pw-locator-patch/highlight/is-checked.d.ts.map +0 -1
  125. package/dist/test/scripts/pw-locator-patch/highlight/is-checked.js +0 -30
  126. package/dist/test/scripts/pw-locator-patch/highlight/is-disabled.d.ts +0 -6
  127. package/dist/test/scripts/pw-locator-patch/highlight/is-disabled.d.ts.map +0 -1
  128. package/dist/test/scripts/pw-locator-patch/highlight/is-disabled.js +0 -30
  129. package/dist/test/scripts/pw-locator-patch/highlight/is-editable.d.ts +0 -6
  130. package/dist/test/scripts/pw-locator-patch/highlight/is-editable.d.ts.map +0 -1
  131. package/dist/test/scripts/pw-locator-patch/highlight/is-editable.js +0 -29
  132. package/dist/test/scripts/pw-locator-patch/highlight/text-content.d.ts +0 -6
  133. package/dist/test/scripts/pw-locator-patch/highlight/text-content.d.ts.map +0 -1
  134. package/dist/test/scripts/pw-locator-patch/highlight/text-content.js +0 -30
  135. /package/dist/test/scripts/pw-locator-patch/{highlight → actions}/click.d.ts +0 -0
  136. /package/dist/test/scripts/pw-locator-patch/{highlight → actions}/hover.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/test/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,iFAAiF;IACjF,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG;IAClD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/test/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG;IACjD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"video-labels.d.ts","sourceRoot":"","sources":["../../src/test/video-labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAQ7C,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,QAGtD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAE5D;AAED,wBAAgB,WAAW,CACzB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,GACtB,MAAM,CAQR"}
1
+ {"version":3,"file":"video-labels.d.ts","sourceRoot":"","sources":["../../src/test/video-labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAQ7C,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,QAEtD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAE5D;AAED,wBAAgB,WAAW,CACzB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,GACtB,MAAM,CAQR"}
@@ -8,7 +8,6 @@ function sanitizeLabel(label) {
8
8
  return label.replace(/[^a-z0-9._-]/gi, "_").slice(0, 80) || "video";
9
9
  }
10
10
  function setVideoLabel(page, label) {
11
- // Sanitize immediately when setting
12
11
  videoLabels.set(page, sanitizeLabel(label));
13
12
  }
14
13
  function getVideoLabel(page) {
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../src/webhook.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,eAAe,GAAG,OAAO,GAAG,cAAc,CAAC;AAyPhD,wBAAsB,aAAa,CACjC,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,eAAe,CAAA;CAAO,GACnE,OAAO,CAAC,MAAM,CAAC,CAMjB;AAED,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GACzB,OAAO,CAAC,cAAc,EAAE,CAAC,CAO3B"}
1
+ {"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../src/webhook.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,eAAe,GAAG,OAAO,GAAG,cAAc,CAAC;AAmPhD,wBAAsB,aAAa,CACjC,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,eAAe,CAAA;CAAO,GACnE,OAAO,CAAC,MAAM,CAAC,CAMjB;AAED,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GACzB,OAAO,CAAC,cAAc,EAAE,CAAC,CAO3B"}
package/dist/webhook.js CHANGED
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getWebhookUrl = getWebhookUrl;
4
4
  exports.queryWebhookRequests = queryWebhookRequests;
5
5
  const api_worker_client_1 = require("./api-worker-client");
6
- // ── webhook.site provider ──
7
6
  const WEBHOOK_SITE_BASE_URL = "https://webhook.site";
8
7
  const DEFAULT_TOKEN_EXPIRY = 604800;
9
8
  function escapeQueryTerm(term) {
@@ -99,7 +98,6 @@ async function webhookSiteQuery(token, content) {
99
98
  }
100
99
  return webhookSiteQueryDirect(token, content);
101
100
  }
102
- // ── inbox provider ──
103
101
  const INBOX_WORKER_URL = "https://inbox.empirical.run";
104
102
  function inboxRowToWebhookRequest(row) {
105
103
  let headers = {};
@@ -165,7 +163,6 @@ async function inboxQuery(token, content) {
165
163
  }
166
164
  return response.data.map(inboxRowToWebhookRequest);
167
165
  }
168
- // ── public API ──
169
166
  function extractToken(webhookUrl) {
170
167
  let url;
171
168
  try {
package/docs/fixtures.md CHANGED
@@ -15,12 +15,11 @@ export const test = baseTestFixture(base);
15
15
  export const expect = extendExpect(baseExpect);
16
16
  ```
17
17
 
18
- ## Highlighters and agentic behaviors
18
+ ## Agentic behaviors
19
19
 
20
- `baseTestFixture` patches the playwright page object to add locator helpers.
21
- Pass `mousePointerHighlighter: false` to turn off the action annotations in videos.
22
-
23
- These methods also enable agentic behaviors like dismissing overlays.
20
+ `baseTestFixture` patches the playwright page object to add the `locator.query()` vision
21
+ method and agentic behaviors like dismissing overlays that block a click or hover.
22
+ Opt out with `baseTestFixture(base, { visionMethods: false })` or `{ agentCapabilities: false }`.
24
23
 
25
24
  ## Custom Matchers
26
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/playwright-utils",
3
- "version": "0.62.1",
3
+ "version": "0.63.1",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },
@@ -45,7 +45,7 @@
45
45
  "openapi-typescript": "7.6.1",
46
46
  "playwright-core": "1.63.0",
47
47
  "serve-handler": "^6.1.6",
48
- "@empiricalrun/shared-types": "0.20.6"
48
+ "@empiricalrun/shared-types": "0.21.1"
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/code-frame": "^7.24.7",
@@ -58,10 +58,10 @@
58
58
  "puppeteer-extra-plugin-recaptcha": "^3.6.8",
59
59
  "rimraf": "^6.0.1",
60
60
  "ts-morph": "^23.0.0",
61
- "@empiricalrun/cua": "^0.5.1",
62
- "@empiricalrun/llm": "^0.28.1",
63
- "@empiricalrun/r2-uploader": "^0.11.2",
64
- "@empiricalrun/reporter": "^0.30.2"
61
+ "@empiricalrun/cua": "^0.5.3",
62
+ "@empiricalrun/llm": "^0.28.2",
63
+ "@empiricalrun/r2-uploader": "^0.11.3",
64
+ "@empiricalrun/reporter": "^0.30.3"
65
65
  },
66
66
  "scripts": {
67
67
  "dev": "pnpm gen:api-worker-openapi && tsgo --build --watch",
@@ -1,12 +1,8 @@
1
1
  import { defineConfig } from "@playwright/test";
2
2
 
3
- // This config is for browser tests to verify the
4
- // functionality of features inside playwright-utils
5
3
  export default defineConfig({
6
4
  testDir: "./src/overlay-tests",
7
5
  retries: 0,
8
- // Test timeout needs to be large enough for master agent etc.
9
- // to run overlay dismissal. Action timeout can be small.
10
6
  timeout: 150_000,
11
7
  fullyParallel: true,
12
8
  workers: "50%",
@@ -1 +1 @@
1
- {"version":"7.0.0-dev.20260623.1","root":["./src/api-worker-client.ts","./src/email.ts","./src/inbox-client.ts","./src/index.ts","./src/kv.ts","./src/logger.ts","./src/mailosaur-client.ts","./src/playwright-extensions.ts","./src/telemetry.ts","./src/webhook.ts","./src/auth/google.ts","./src/auth/index.ts","./src/auth/types.ts","./src/captcha/index.ts","./src/config/index.ts","./src/config/proxy.ts","./src/config/devices/types.ts","./src/generated/api-worker-openapi.ts","./src/overlay-tests/cache.spec.ts","./src/overlay-tests/click.spec.ts","./src/overlay-tests/fixtures.ts","./src/overlay-tests/patch.spec.ts","./src/overlay-tests/visual.spec.ts","./src/reporter/attachment-cleanup-test-reporter.ts","./src/reporter/attachment-cleanup.ts","./src/reporter/blob-utils.ts","./src/reporter/empirical-reporter.ts","./src/reporter/failing-line.ts","./src/reporter/harness.ts","./src/reporter/ibr-utils.ts","./src/reporter/incremental-blob-reporter.ts","./src/reporter/lifecycle-events.ts","./src/reporter/local-test.ts","./src/reporter/parity-utils.ts","./src/reporter/reporter-state.ts","./src/reporter/test-case-sync-reporter.ts","./src/reporter/test-case-sync.ts","./src/reporter/uploader.ts","./src/reporter/util.ts","./src/test/constants.ts","./src/test/coverage.ts","./src/test/index.ts","./src/test/types.ts","./src/test/video-labels.ts","./src/test/expect/index.ts","./src/test/expect/types.ts","./src/test/expect/visual.ts","./src/test/expect/webhook.ts","./src/test/scripts/agent-capabilities.ts","./src/test/scripts/index.ts","./src/test/scripts/locator-highlights.ts","./src/test/scripts/locator-vision.ts","./src/test/scripts/types.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/cache.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/index.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/prompt.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/types.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/utils.ts","./src/test/scripts/pw-locator-patch/highlight/click.ts","./src/test/scripts/pw-locator-patch/highlight/expect.ts","./src/test/scripts/pw-locator-patch/highlight/hover.ts","./src/test/scripts/pw-locator-patch/highlight/inner-text.ts","./src/test/scripts/pw-locator-patch/highlight/input-value.ts","./src/test/scripts/pw-locator-patch/highlight/is-checked.ts","./src/test/scripts/pw-locator-patch/highlight/is-disabled.ts","./src/test/scripts/pw-locator-patch/highlight/is-editable.ts","./src/test/scripts/pw-locator-patch/highlight/text-content.ts","./src/test/scripts/pw-locator-patch/utils/index.ts","./src/test/scripts/pw-locator-patch/vision/query.ts"]}
1
+ {"version":"7.0.0-dev.20260623.1","root":["./src/api-worker-client.ts","./src/email.ts","./src/inbox-client.ts","./src/index.ts","./src/kv.ts","./src/logger.ts","./src/mailosaur-client.ts","./src/playwright-extensions.ts","./src/telemetry.ts","./src/webhook.ts","./src/auth/google.ts","./src/auth/index.ts","./src/auth/types.ts","./src/captcha/index.ts","./src/config/index.ts","./src/config/proxy.ts","./src/config/devices/types.ts","./src/generated/api-worker-openapi.ts","./src/overlay-tests/cache.spec.ts","./src/overlay-tests/click.spec.ts","./src/overlay-tests/dismiss-mechanics.spec.ts","./src/overlay-tests/dropdown.spec.ts","./src/overlay-tests/fixtures.ts","./src/overlay-tests/patch.spec.ts","./src/overlay-tests/typesafe-hit-check.spec.ts","./src/overlay-tests/typesafe.spec.ts","./src/overlay-tests/visual.spec.ts","./src/reporter/attachment-cleanup-test-reporter.ts","./src/reporter/attachment-cleanup.ts","./src/reporter/blob-utils.ts","./src/reporter/empirical-reporter.ts","./src/reporter/failing-line.ts","./src/reporter/harness.ts","./src/reporter/ibr-utils.ts","./src/reporter/incremental-blob-reporter.ts","./src/reporter/lifecycle-events.ts","./src/reporter/local-test.ts","./src/reporter/parity-utils.ts","./src/reporter/reporter-state.ts","./src/reporter/test-case-sync-reporter.ts","./src/reporter/test-case-sync.ts","./src/reporter/uploader.ts","./src/reporter/util.ts","./src/test/constants.ts","./src/test/coverage.ts","./src/test/index.ts","./src/test/types.ts","./src/test/video-labels.ts","./src/test/expect/index.ts","./src/test/expect/types.ts","./src/test/expect/visual.ts","./src/test/expect/webhook.ts","./src/test/scripts/agent-capabilities.ts","./src/test/scripts/index.ts","./src/test/scripts/locator-vision.ts","./src/test/scripts/types.ts","./src/test/scripts/pw-locator-patch/actions/click.ts","./src/test/scripts/pw-locator-patch/actions/hover.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/cache.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/index.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/prompt.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/types.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/typesafe.ts","./src/test/scripts/pw-locator-patch/dismiss-overlays/utils.ts","./src/test/scripts/pw-locator-patch/utils/index.ts","./src/test/scripts/pw-locator-patch/vision/query.ts"]}
@@ -1,23 +1,3 @@
1
- /**
2
- * Adapter that lets the IncrementalBlobReporter (IBR) stand in for
3
- * Playwright's built-in blob reporter inside the upstream Playwright repo's
4
- * test harness (tests/playwright-test).
5
- *
6
- * Used with PWTEST_INTERMEDIATE_BLOB_REPORT=1 and the fixture patch in
7
- * intermediate-mode-ibr.patch: every inline scenario in upstream's runner
8
- * suite then executes through IBR -> merge-reports instead of blob ->
9
- * merge-reports, turning Playwright's own tests into a completeness oracle
10
- * for the IBR blob format. See run.mjs for orchestration.
11
- *
12
- * A subclass rather than a wrapper so every event handler — including ones
13
- * IBR gains later — is inherited automatically instead of hand-forwarded
14
- * (a wrapper once silently swallowed onStdOut/onError). The only remaining
15
- * bridge is output location: the harness merges <packageRoot>/blob-report/
16
- * report-N.zip, IBR writes blob-report-incremental/incremental-report-N.zip,
17
- * so the zip is copied over after onEnd. Sharding needs no bridge: IBR falls
18
- * back to config.shard when SHARD_INDEX/TOTAL_SHARDS are not set.
19
- */
20
-
21
1
  const fs = require("fs");
22
2
  const path = require("path");
23
3
 
@@ -29,9 +9,6 @@ if (!IBR_DIST) {
29
9
  );
30
10
  }
31
11
 
32
- // Keep IBR off its local-testing path (attachment embedding + auto-merge)
33
- // and away from real uploads. Must happen before construction: IBR reads
34
- // env when instantiated.
35
12
  delete process.env.LOCAL_TEST;
36
13
  delete process.env.R2_ACCOUNT_ID;
37
14
  delete process.env.S3_UPLOAD_BUCKET;
@@ -1,30 +1,3 @@
1
- /**
2
- * Runs upstream Playwright's own runner test suite (tests/playwright-test)
3
- * through the IncrementalBlobReporter and compares failures against the
4
- * built-in blob reporter baseline.
5
- *
6
- * How: upstream's PWTEST_INTERMEDIATE_BLOB_REPORT=1 mode reroutes every
7
- * inline scenario through <reporter> -> merge-reports -> json before applying
8
- * the normal assertions — Playwright's own completeness oracle for the blob
9
- * format. The fixture patch (intermediate-mode-ibr.patch) lets
10
- * PWTEST_IBR_ADAPTER swap IBR in as that reporter.
11
- *
12
- * Both modes run the same spec files; environment noise cancels in the
13
- * baseline diff. Any IBR-only failure fails the run — the job stays red
14
- * until IBR reaches parity on these specs. It staying green is the signal
15
- * that the built-in blob reporter is safe to drop. The one carve-out is
16
- * EXPECTED_IBR_ONLY below: failures caused by injecting an external reporter
17
- * rather than by the blob format, each with the reason it cannot pass, and
18
- * each policed by a staleness check so the list cannot rot.
19
- *
20
- * Usage:
21
- * node run.mjs --pw-repo <upstream clone at the pinned tag>
22
- * [--specs basic.spec.ts,stdio.spec.ts] [--workers N] [--shard i/n]
23
- *
24
- * The clone must be bootstrapped (npm ci + npm run build). This script
25
- * (re)applies the fixture patch idempotently on every run.
26
- */
27
-
28
1
  import { spawn } from "node:child_process";
29
2
  import fs from "node:fs";
30
3
  import os from "node:os";
@@ -33,11 +6,6 @@ import { fileURLToPath } from "node:url";
33
6
 
34
7
  const ORACLE_DIR = path.dirname(fileURLToPath(import.meta.url));
35
8
 
36
- // The default sweep is EVERY spec in upstream's tests/playwright-test —
37
- // IBR is meant to become the default blob reporter, so it has to stand the
38
- // whole runner suite. Only structurally out-of-scope specs are excluded,
39
- // each with its reason printed at startup (no silent caps). First matching
40
- // rule wins.
41
9
  const EXCLUSION_RULES = [
42
10
  [
43
11
  (name) => name.startsWith("playwright.ct-"),
@@ -68,12 +36,6 @@ const EXCLUSION_RULES = [
68
36
  "semantics are covered by reporter-blob.spec.ts) and they busy-loop " +
69
37
  "workers under load, wedging the sweep",
70
38
  ],
71
- // The two specs below are SLOW, not wedged — measured, they make steady
72
- // progress and simply do not fit in SPEC_TIMEOUT_MS. The oracle runs one
73
- // spec per invocation and Playwright keeps a file's tests on a single
74
- // worker (fullyParallel defaults to false), so a long file runs strictly
75
- // serially however many --workers it is given. Both were already
76
- // contributing no signal, just a 10-minute timeout each.
77
39
  [
78
40
  (name) => name === "only-changed.spec.ts",
79
41
  "git-based run selection (--only-changed), not report format; 13 tests " +
@@ -86,15 +48,6 @@ const EXCLUSION_RULES = [
86
48
  ],
87
49
  ];
88
50
 
89
- // Upstream tests that fail through IBR for reasons OUTSIDE the blob format —
90
- // artifacts of injecting an external reporter into upstream's harness, not
91
- // gaps in what IBR writes. They are reported and subtracted from the failure
92
- // count instead of turning the job red.
93
- //
94
- // Kept honest by the staleness check at the end: an entry whose spec ran and
95
- // did NOT fail is reported and fails the run, so a fixed test cannot sit here
96
- // pretending to be unfixable. Add an entry only with the reason it can never
97
- // pass; anything that could be fixed belongs in the failure list.
98
51
  const EXPECTED_IBR_ONLY = [
99
52
  {
100
53
  key:
@@ -108,15 +61,10 @@ const EXPECTED_IBR_ONLY = [
108
61
  },
109
62
  ];
110
63
 
111
- /** Spec file name out of a failure key ("cache.spec.ts:53 › title"). */
112
64
  function specOfKey(key) {
113
65
  return key.slice(0, key.indexOf(":"));
114
66
  }
115
67
 
116
- // Tests skipped by title via --grep-invert. Reserved for tests that WEDGE
117
- // the sweep — a busy-looped worker no per-test timeout can interrupt — so
118
- // exclusion is surgical (exact title match) and every entry carries the
119
- // observed reason. Everything else in the spec still runs.
120
68
  const HANGING_TESTS = [];
121
69
 
122
70
  function discoverSpecs(pwRepo) {
@@ -147,7 +95,6 @@ const DEFAULT_IBR_DIST = path.join(
147
95
 
148
96
  function parseArgs(argv) {
149
97
  const args = { specs: null, workers: 4, shard: null };
150
- // Normalize --flag=value into --flag value.
151
98
  argv = argv.flatMap((a) =>
152
99
  a.startsWith("--") && a.includes("=")
153
100
  ? [a.slice(0, a.indexOf("=")), a.slice(a.indexOf("=") + 1)]
@@ -199,7 +146,6 @@ function run(command, cmdArgs, options) {
199
146
  });
200
147
  }
201
148
 
202
- /** Failed-test keys ("file:line › suite › title") from a Playwright JSON report. */
203
149
  function collectFailures(report) {
204
150
  const failures = new Set();
205
151
  const visit = (suite, titles) => {
@@ -265,17 +211,12 @@ async function runMode({ pwRepo, spec, workers, mode, ibrDist }) {
265
211
  env.PWTEST_IBR_ADAPTER = ADAPTER_PATH;
266
212
  env.PWTEST_IBR_DIST = ibrDist;
267
213
  }
268
- // The inner run writes its JSON report at the end, so nothing streams to
269
- // stdout while it runs. Heartbeat from the test-results dir (the outer
270
- // harness creates one dir per executed test) so long modes show progress.
271
214
  const testResultsDir = path.join(pwRepo, "test-results");
272
215
  const heartbeat = setInterval(() => {
273
216
  let dirs = 0;
274
217
  try {
275
218
  dirs = fs.readdirSync(testResultsDir).length;
276
- } catch {
277
- // Not created yet.
278
- }
219
+ } catch {}
279
220
  const minutes = Math.round((Date.now() - startedAt) / 60_000);
280
221
  console.log(
281
222
  ` [${mode} ${spec}] ~${dirs} tests executed, ${minutes}m elapsed`,
@@ -289,9 +230,6 @@ async function runMode({ pwRepo, spec, workers, mode, ibrDist }) {
289
230
  "--",
290
231
  spec,
291
232
  `--workers=${workers}`,
292
- // Absorbs outer-harness flake: a scenario that fails on IBR's real gaps
293
- // fails every retry, while an infra hiccup passes on retry and is
294
- // reported "flaky" (not counted as a failure).
295
233
  "--retries=2",
296
234
  `--global-timeout=${SPEC_TIMEOUT_MS}`,
297
235
  // An empty --grep-invert would match (and thus drop) every test, so
@@ -349,7 +287,6 @@ if (!args.specs) {
349
287
  }
350
288
  }
351
289
  if (args.shard) {
352
- // Round-robin slice so slow specs spread across shards.
353
290
  args.specs = args.specs.filter(
354
291
  (_, i) => i % args.shard.total === args.shard.index - 1,
355
292
  );
@@ -365,9 +302,6 @@ for (const { pattern, reason } of HANGING_TESTS) {
365
302
  for (const { key, reason } of EXPECTED_IBR_ONLY) {
366
303
  console.log(` [expected-ibr-only] ${key} — ${reason}`);
367
304
  }
368
- // Each spec runs both modes back to back as its own bounded invocation
369
- // (see SPEC_TIMEOUT_MS); a hang or count mismatch quarantines that spec and
370
- // the sweep continues.
371
305
  const ibrOnly = [];
372
306
  const hungSpecs = [];
373
307
  const mismatchedSpecs = [];
@@ -443,8 +377,6 @@ for (const spec of mismatchedSpecs) {
443
377
  console.log(` [mismatch] ${spec}`);
444
378
  }
445
379
 
446
- // An expected failure whose spec ran and passed means the list is stale —
447
- // that is a fix to celebrate by deleting the entry, not a silent pass.
448
380
  const staleExpected = EXPECTED_IBR_ONLY.filter(
449
381
  ({ key }) => comparedSpecs.has(specOfKey(key)) && !matchedExpected.has(key),
450
382
  );
@@ -1,4 +0,0 @@
1
- import type { Page } from "@playwright/test";
2
- import { TestFn } from "./types";
3
- export declare function addLocatorHighlights(page: Page, testFn: TestFn): void;
4
- //# sourceMappingURL=locator-highlights.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locator-highlights.d.ts","sourceRoot":"","sources":["../../../src/test/scripts/locator-highlights.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAU7C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAK9D"}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addLocatorHighlights = addLocatorHighlights;
4
- const expect_1 = require("./pw-locator-patch/highlight/expect");
5
- const hover_1 = require("./pw-locator-patch/highlight/hover");
6
- const inner_text_1 = require("./pw-locator-patch/highlight/inner-text");
7
- const input_value_1 = require("./pw-locator-patch/highlight/input-value");
8
- const is_checked_1 = require("./pw-locator-patch/highlight/is-checked");
9
- const is_disabled_1 = require("./pw-locator-patch/highlight/is-disabled");
10
- const is_editable_1 = require("./pw-locator-patch/highlight/is-editable");
11
- const text_content_1 = require("./pw-locator-patch/highlight/text-content");
12
- function addLocatorHighlights(page, testFn) {
13
- applyHighlights(page, testFn);
14
- page.context().on("page", async (newPage) => {
15
- applyHighlights(newPage, testFn);
16
- });
17
- }
18
- function applyHighlights(page, testFn) {
19
- const LocatorClass = page.locator("").constructor;
20
- (0, hover_1.patchHover)(LocatorClass, testFn);
21
- (0, expect_1.patchExpect)(LocatorClass);
22
- (0, input_value_1.patchInputValue)(LocatorClass, testFn);
23
- (0, is_checked_1.patchIsChecked)(LocatorClass, testFn);
24
- (0, is_editable_1.patchIsEditable)(LocatorClass, testFn);
25
- (0, is_disabled_1.patchIsDisabled)(LocatorClass, testFn);
26
- (0, inner_text_1.patchInnerText)(LocatorClass, testFn);
27
- (0, text_content_1.patchTextContent)(LocatorClass, testFn);
28
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"click.d.ts","sourceRoot":"","sources":["../../../../../src/test/scripts/pw-locator-patch/highlight/click.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAQrC,wBAAgB,UAAU,CACxB,YAAY,EAAE,QAAQ,GAAG;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,EAC/C,MAAM,EAAE,MAAM,QA2Df"}
@@ -1,5 +0,0 @@
1
- import type { Locator } from "@playwright/test";
2
- export declare function patchExpect(LocatorClass: Function & {
3
- prototype: Locator;
4
- }): void;
5
- //# sourceMappingURL=expect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"expect.d.ts","sourceRoot":"","sources":["../../../../../src/test/scripts/pw-locator-patch/highlight/expect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAMhD,wBAAgB,WAAW,CAAC,YAAY,EAAE,QAAQ,GAAG;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,QAoB1E"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.patchExpect = patchExpect;
4
- const utils_1 = require("../utils");
5
- const isExpectPatched = new WeakMap();
6
- function patchExpect(LocatorClass) {
7
- if (isExpectPatched.get(LocatorClass)) {
8
- return;
9
- }
10
- const originalExpect = LocatorClass.prototype._expect;
11
- // No need to add test.step in this patch as its already an internal method and is not part of stack trace
12
- // if added then its tracked as a separate step in playwright trace
13
- // @ts-ignore _expect is a private method in playwright
14
- // https://github.com/microsoft/playwright/blob/69287f26bc514b740eac40160503d6fac8185d37/packages/playwright-core/src/client/locator.ts#L352
15
- LocatorClass.prototype._expect = async function (expression, options) {
16
- const result = await originalExpect.apply(this, [expression, options]);
17
- if (result.matches) {
18
- await (0, utils_1.scrollIntoView)(this);
19
- }
20
- return result;
21
- };
22
- isExpectPatched.set(LocatorClass, true);
23
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"hover.d.ts","sourceRoot":"","sources":["../../../../../src/test/scripts/pw-locator-patch/highlight/hover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAOrC,wBAAgB,UAAU,CACxB,YAAY,EAAE,QAAQ,GAAG;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,EAC/C,MAAM,EAAE,MAAM,QAmDf"}
@@ -1,6 +0,0 @@
1
- import type { Locator } from "@playwright/test";
2
- import { TestFn } from "../../types";
3
- export declare function patchInnerText(LocatorClass: Function & {
4
- prototype: Locator;
5
- }, testFn: TestFn): void;
6
- //# sourceMappingURL=inner-text.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inner-text.d.ts","sourceRoot":"","sources":["../../../../../src/test/scripts/pw-locator-patch/highlight/inner-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAKrC,wBAAgB,cAAc,CAC5B,YAAY,EAAE,QAAQ,GAAG;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,EAC/C,MAAM,EAAE,MAAM,QA4Bf"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.patchInnerText = patchInnerText;
4
- const utils_1 = require("../utils");
5
- const isInnerTextPatched = new WeakMap();
6
- function patchInnerText(LocatorClass, testFn) {
7
- if (isInnerTextPatched.get(LocatorClass)) {
8
- return;
9
- }
10
- const originalInnerText = LocatorClass.prototype.innerText;
11
- //ref: https://github.com/microsoft/playwright/blob/69287f26bc514b740eac40160503d6fac8185d37/packages/playwright-core/src/client/locator.ts#L251
12
- LocatorClass.prototype.innerText = async function (options) {
13
- let result;
14
- const stepName = `locator.innerText(${(0, utils_1.description)(this)})`;
15
- await testFn.step(stepName, async () => {
16
- try {
17
- result = await originalInnerText.apply(this, [options]);
18
- }
19
- catch (error) {
20
- if (error instanceof Error) {
21
- Error.captureStackTrace(error, LocatorClass.prototype.innerText);
22
- }
23
- throw error;
24
- }
25
- await (0, utils_1.scrollIntoView)(this);
26
- }, { box: true });
27
- return result;
28
- };
29
- isInnerTextPatched.set(LocatorClass, true);
30
- }
@@ -1,6 +0,0 @@
1
- import type { Locator } from "@playwright/test";
2
- import { TestFn } from "../../types";
3
- export declare function patchInputValue(LocatorClass: Function & {
4
- prototype: Locator;
5
- }, testFn: TestFn): void;
6
- //# sourceMappingURL=input-value.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input-value.d.ts","sourceRoot":"","sources":["../../../../../src/test/scripts/pw-locator-patch/highlight/input-value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAKrC,wBAAgB,eAAe,CAC7B,YAAY,EAAE,QAAQ,GAAG;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,EAC/C,MAAM,EAAE,MAAM,QA4Bf"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.patchInputValue = patchInputValue;
4
- const utils_1 = require("../utils");
5
- const isInputValuePatched = new WeakMap();
6
- function patchInputValue(LocatorClass, testFn) {
7
- if (isInputValuePatched.get(LocatorClass)) {
8
- return;
9
- }
10
- const originalInputValue = LocatorClass.prototype.inputValue;
11
- //ref: github.com/microsoft/playwright/blob/69287f26bc514b740eac40160503d6fac8185d37/packages/playwright-core/src/client/locator.ts#L255
12
- LocatorClass.prototype.inputValue = async function (options) {
13
- let result;
14
- const stepName = `locator.inputValue(${(0, utils_1.description)(this)})`;
15
- await testFn.step(stepName, async () => {
16
- try {
17
- result = await originalInputValue.apply(this, [options]);
18
- }
19
- catch (error) {
20
- if (error instanceof Error) {
21
- Error.captureStackTrace(error, LocatorClass.prototype.inputValue);
22
- }
23
- throw error;
24
- }
25
- await (0, utils_1.scrollIntoView)(this);
26
- }, { box: true });
27
- return result;
28
- };
29
- isInputValuePatched.set(LocatorClass, true);
30
- }
@@ -1,6 +0,0 @@
1
- import type { Locator } from "@playwright/test";
2
- import { TestFn } from "../../types";
3
- export declare function patchIsChecked(LocatorClass: Function & {
4
- prototype: Locator;
5
- }, testFn: TestFn): void;
6
- //# sourceMappingURL=is-checked.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-checked.d.ts","sourceRoot":"","sources":["../../../../../src/test/scripts/pw-locator-patch/highlight/is-checked.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAKrC,wBAAgB,cAAc,CAC5B,YAAY,EAAE,QAAQ,GAAG;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,EAC/C,MAAM,EAAE,MAAM,QA4Bf"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.patchIsChecked = patchIsChecked;
4
- const utils_1 = require("../utils");
5
- const isIsCheckedPatched = new WeakMap();
6
- function patchIsChecked(LocatorClass, testFn) {
7
- if (isIsCheckedPatched.get(LocatorClass)) {
8
- return;
9
- }
10
- const originalIsChecked = LocatorClass.prototype.isChecked;
11
- LocatorClass.prototype.isChecked = async function (options) {
12
- // ref: https://github.com/microsoft/playwright/blob/69287f26bc514b740eac40160503d6fac8185d37/packages/playwright-core/src/client/locator.ts#L259
13
- let result;
14
- const stepName = `locator.isChecked(${(0, utils_1.description)(this)})`;
15
- await testFn.step(stepName, async () => {
16
- try {
17
- result = await originalIsChecked.apply(this, [options]);
18
- }
19
- catch (error) {
20
- if (error instanceof Error) {
21
- Error.captureStackTrace(error, LocatorClass.prototype.isChecked);
22
- }
23
- throw error;
24
- }
25
- await (0, utils_1.scrollIntoView)(this);
26
- }, { box: true });
27
- return result;
28
- };
29
- isIsCheckedPatched.set(LocatorClass, true);
30
- }
@@ -1,6 +0,0 @@
1
- import type { Locator } from "@playwright/test";
2
- import { TestFn } from "../../types";
3
- export declare function patchIsDisabled(LocatorClass: Function & {
4
- prototype: Locator;
5
- }, testFn: TestFn): void;
6
- //# sourceMappingURL=is-disabled.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-disabled.d.ts","sourceRoot":"","sources":["../../../../../src/test/scripts/pw-locator-patch/highlight/is-disabled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAKrC,wBAAgB,eAAe,CAC7B,YAAY,EAAE,QAAQ,GAAG;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,EAC/C,MAAM,EAAE,MAAM,QA4Bf"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.patchIsDisabled = patchIsDisabled;
4
- const utils_1 = require("../utils");
5
- const isIsDisabledPatched = new WeakMap();
6
- function patchIsDisabled(LocatorClass, testFn) {
7
- if (isIsDisabledPatched.get(LocatorClass)) {
8
- return;
9
- }
10
- const originalIsDisabled = LocatorClass.prototype.isDisabled;
11
- LocatorClass.prototype.isDisabled = async function (options) {
12
- // ref: https://github.com/microsoft/playwright/blob/69287f26bc514b740eac40160503d6fac8185d37/packages/playwright-core/src/client/locator.ts#L263
13
- let result;
14
- const stepName = `locator.isDisabled(${(0, utils_1.description)(this)})`;
15
- await testFn.step(stepName, async () => {
16
- try {
17
- result = await originalIsDisabled.apply(this, [options]);
18
- }
19
- catch (error) {
20
- if (error instanceof Error) {
21
- Error.captureStackTrace(error, LocatorClass.prototype.isDisabled);
22
- }
23
- throw error;
24
- }
25
- await (0, utils_1.scrollIntoView)(this);
26
- }, { box: true });
27
- return result;
28
- };
29
- isIsDisabledPatched.set(LocatorClass, true);
30
- }
@@ -1,6 +0,0 @@
1
- import type { Locator } from "@playwright/test";
2
- import { TestFn } from "../../types";
3
- export declare function patchIsEditable(LocatorClass: Function & {
4
- prototype: Locator;
5
- }, testFn: TestFn): void;
6
- //# sourceMappingURL=is-editable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-editable.d.ts","sourceRoot":"","sources":["../../../../../src/test/scripts/pw-locator-patch/highlight/is-editable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAKrC,wBAAgB,eAAe,CAC7B,YAAY,EAAE,QAAQ,GAAG;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,EAC/C,MAAM,EAAE,MAAM,QA2Bf"}
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.patchIsEditable = patchIsEditable;
4
- const utils_1 = require("../utils");
5
- const isIsEditablePatched = new WeakMap();
6
- function patchIsEditable(LocatorClass, testFn) {
7
- if (isIsEditablePatched.get(LocatorClass)) {
8
- return;
9
- }
10
- const originalIsEditable = LocatorClass.prototype.isEditable;
11
- LocatorClass.prototype.isEditable = async function (options) {
12
- let result;
13
- const stepName = `locator.isEditable(${(0, utils_1.description)(this)})`;
14
- await testFn.step(stepName, async () => {
15
- try {
16
- result = await originalIsEditable.apply(this, [options]);
17
- }
18
- catch (error) {
19
- if (error instanceof Error) {
20
- Error.captureStackTrace(error, LocatorClass.prototype.isEditable);
21
- }
22
- throw error;
23
- }
24
- await (0, utils_1.scrollIntoView)(this);
25
- }, { box: true });
26
- return result;
27
- };
28
- isIsEditablePatched.set(LocatorClass, true);
29
- }
@@ -1,6 +0,0 @@
1
- import type { Locator } from "@playwright/test";
2
- import { TestFn } from "../../types";
3
- export declare function patchTextContent(LocatorClass: Function & {
4
- prototype: Locator;
5
- }, testFn: TestFn): void;
6
- //# sourceMappingURL=text-content.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"text-content.d.ts","sourceRoot":"","sources":["../../../../../src/test/scripts/pw-locator-patch/highlight/text-content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAKrC,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,QAAQ,GAAG;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,EAC/C,MAAM,EAAE,MAAM,QA4Bf"}