@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,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.patchTextContent = patchTextContent;
4
- const utils_1 = require("../utils");
5
- const isTextContentPatched = new WeakMap();
6
- function patchTextContent(LocatorClass, testFn) {
7
- if (isTextContentPatched.get(LocatorClass)) {
8
- return;
9
- }
10
- const originalTextContent = LocatorClass.prototype.textContent;
11
- // ref: https://github.com/microsoft/playwright/blob/69287f26bc514b740eac40160503d6fac8185d37/packages/playwright-core/src/client/locator.ts#L318
12
- LocatorClass.prototype.textContent = async function (options) {
13
- let result;
14
- const stepName = `locator.textContent(${(0, utils_1.description)(this)})`;
15
- await testFn.step(stepName, async () => {
16
- try {
17
- result = await originalTextContent.apply(this, [options]);
18
- }
19
- catch (error) {
20
- if (error instanceof Error) {
21
- Error.captureStackTrace(error, LocatorClass.prototype.textContent);
22
- }
23
- throw error;
24
- }
25
- await (0, utils_1.scrollIntoView)(this);
26
- }, { box: true });
27
- return result;
28
- };
29
- isTextContentPatched.set(LocatorClass, true);
30
- }