@applitools/eyes-playwright 1.47.2 → 1.47.3

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,99 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.47.3](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.47.2...js/eyes-playwright@1.47.3) (2026-05-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * preserve trace UI under playwright --ui mode | FLD-4250 ([#3845](https://github.com/Applitools-Dev/sdk/issues/3845)) ([c1f8ded](https://github.com/Applitools-Dev/sdk/commit/c1f8ded20236c4f02e185a1bc16e51b941611f55))
9
+ * support Playwright 1.60+ | AD-13590 AD-13207 ([#3834](https://github.com/Applitools-Dev/sdk/issues/3834)) ([b78d16d](https://github.com/Applitools-Dev/sdk/commit/b78d16d74f93d402337bdcb323774665740b3235))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * @applitools/snippets bumped to 2.9.1
15
+ #### Bug Fixes
16
+
17
+ * declare @babel/preset-typescript dep for sandbox build ([#3815](https://github.com/Applitools-Dev/sdk/issues/3815)) ([10c44c6](https://github.com/Applitools-Dev/sdk/commit/10c44c66635f1ed4e0361f22ecebf2221c2cc912))
18
+ * @applitools/dom-snapshot bumped to 4.17.1
19
+
20
+ * @applitools/req bumped to 1.10.1
21
+ #### Bug Fixes
22
+
23
+ * http2 support via settings AD 13119 ([#3804](https://github.com/Applitools-Dev/sdk/issues/3804)) ([759d451](https://github.com/Applitools-Dev/sdk/commit/759d4518254828140aa50e2c5de14e80af0b997c))
24
+ * @applitools/driver bumped to 1.26.1
25
+ #### Bug Fixes
26
+
27
+ * address CI regressions from executeBrowserCommands and Chromium 140+ service worker ([#3848](https://github.com/Applitools-Dev/sdk/issues/3848)) ([099ada5](https://github.com/Applitools-Dev/sdk/commit/099ada5e52d4153157b98c2203df428579527e49))
28
+
29
+
30
+
31
+ * @applitools/spec-driver-playwright bumped to 1.9.1
32
+ #### Bug Fixes
33
+
34
+ * address CI regressions from executeBrowserCommands and Chromium 140+ service worker ([#3848](https://github.com/Applitools-Dev/sdk/issues/3848)) ([099ada5](https://github.com/Applitools-Dev/sdk/commit/099ada5e52d4153157b98c2203df428579527e49))
35
+
36
+
37
+
38
+ * @applitools/ufg-client bumped to 1.22.1
39
+ #### Bug Fixes
40
+
41
+ * http2 support via settings AD 13119 ([#3804](https://github.com/Applitools-Dev/sdk/issues/3804)) ([759d451](https://github.com/Applitools-Dev/sdk/commit/759d4518254828140aa50e2c5de14e80af0b997c))
42
+
43
+
44
+
45
+ * @applitools/core bumped to 4.63.0
46
+ #### Features
47
+
48
+ * soft-deprecate CheckSettings.timeout() with telemetry [[#3705](https://github.com/Applitools-Dev/sdk/issues/3705)] ([#3805](https://github.com/Applitools-Dev/sdk/issues/3805)) ([a5d6390](https://github.com/Applitools-Dev/sdk/commit/a5d6390f17fc0380736b88cbe05dd147e66a86cf))
49
+
50
+
51
+ #### Bug Fixes
52
+
53
+ * avoid double-scaling environment viewport in classic mode | FLD-4359 ([#3793](https://github.com/Applitools-Dev/sdk/issues/3793)) ([246050b](https://github.com/Applitools-Dev/sdk/commit/246050b8a7984b869c068262162a69191c834947))
54
+ * http2 support via settings AD 13119 ([#3804](https://github.com/Applitools-Dev/sdk/issues/3804)) ([759d451](https://github.com/Applitools-Dev/sdk/commit/759d4518254828140aa50e2c5de14e80af0b997c))
55
+
56
+
57
+
58
+ * @applitools/screenshoter bumped to 3.12.20
59
+
60
+ * @applitools/tunnel-client bumped to 1.11.13
61
+
62
+ * @applitools/core-base bumped to 1.34.0
63
+ #### Features
64
+
65
+ * soft-deprecate CheckSettings.timeout() with telemetry [[#3705](https://github.com/Applitools-Dev/sdk/issues/3705)] ([#3805](https://github.com/Applitools-Dev/sdk/issues/3805)) ([a5d6390](https://github.com/Applitools-Dev/sdk/commit/a5d6390f17fc0380736b88cbe05dd147e66a86cf))
66
+
67
+
68
+ #### Bug Fixes
69
+
70
+ * http2 support via settings AD 13119 ([#3804](https://github.com/Applitools-Dev/sdk/issues/3804)) ([759d451](https://github.com/Applitools-Dev/sdk/commit/759d4518254828140aa50e2c5de14e80af0b997c))
71
+
72
+
73
+
74
+ * @applitools/spec-driver-webdriver bumped to 1.6.1
75
+
76
+ * @applitools/spec-driver-selenium bumped to 1.8.1
77
+
78
+ * @applitools/spec-driver-puppeteer bumped to 1.8.1
79
+
80
+ * @applitools/nml-client bumped to 1.11.27
81
+
82
+ * @applitools/ec-client bumped to 1.12.29
83
+
84
+ * @applitools/eyes bumped to 1.42.0
85
+ #### Features
86
+
87
+ * soft-deprecate CheckSettings.timeout() with telemetry [[#3705](https://github.com/Applitools-Dev/sdk/issues/3705)] ([#3805](https://github.com/Applitools-Dev/sdk/issues/3805)) ([a5d6390](https://github.com/Applitools-Dev/sdk/commit/a5d6390f17fc0380736b88cbe05dd147e66a86cf))
88
+
89
+
90
+ #### Bug Fixes
91
+
92
+ * http2 support via settings AD 13119 ([#3804](https://github.com/Applitools-Dev/sdk/issues/3804)) ([759d451](https://github.com/Applitools-Dev/sdk/commit/759d4518254828140aa50e2c5de14e80af0b997c))
93
+
94
+
95
+
96
+
3
97
  ## [1.47.2](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.47.1...js/eyes-playwright@1.47.2) (2026-05-05)
4
98
 
5
99
 
@@ -30,7 +30,19 @@ const req_1 = require("@applitools/req");
30
30
  const utils = __importStar(require("@applitools/utils"));
31
31
  const logger_1 = require("@applitools/logger");
32
32
  const playwrightPath = require.resolve('playwright');
33
- const HtmlReporter = require(path.join(path.dirname(playwrightPath), '/lib/reporters/html')).default;
33
+ // Playwright moved the HtmlReporter from `lib/reporters/html.js` (≤1.59) into the bundled
34
+ // `lib/runner/index.js` (1.60+, exposed as `.html.default`). Both paths are private — not in
35
+ // `package.json#exports` — so resolve via absolute path (which bypasses exports gating). Try
36
+ // the 1.60+ location first, fall back to the pre-1.60 file. AD-13590.
37
+ const HtmlReporter = (() => {
38
+ const pwRoot = path.dirname(playwrightPath);
39
+ try {
40
+ return require(path.join(pwRoot, 'lib/runner/index.js')).html.default;
41
+ }
42
+ catch {
43
+ return require(path.join(pwRoot, 'lib/reporters/html')).default;
44
+ }
45
+ })();
34
46
  const pluginsFile = require.resolve('../../dist/fixture/reportRenderer.js');
35
47
  const styleFile = require.resolve('./reporterStyle.css');
36
48
  const createInjectedScript = (testResultsMap) => `
@@ -49,9 +61,48 @@ class EyesReporter extends HtmlReporter {
49
61
  constructor(options) {
50
62
  super(options);
51
63
  this.applitoolsIdentifiers = [];
64
+ // Detect Playwright UI mode so `onTestEnd` can avoid mutating the result: under
65
+ // `--ui`, the test server has already serialized the result and pushed it to the
66
+ // live UI client, so any splice into `attachments` / `_endPayload.attachments` /
67
+ // `steps[*].attachments` desyncs the trace viewer (Actions list / Source tab /
68
+ // Canvas disappear). Two signals are OR'd because no single one covers every
69
+ // supported Playwright version:
70
+ // 1. `options._isTestServer` — the official, propagated flag on Playwright
71
+ // 1.55–1.56. Upstream deleted it in 1.57 when the test runner and runner
72
+ // were merged, and did not replace it with any other propagated property.
73
+ // 2. A scan of `process.argv` for the CLI tokens that put Playwright into UI
74
+ // mode (`--ui`, `--ui-host`, `--ui-port`, and their `=value` forms). The
75
+ // reporter is constructed in the same Node process that parsed the CLI,
76
+ // and commander does not mutate `process.argv`, so the original token
77
+ // survives to this point on every version. This is a heuristic: the only
78
+ // known false-negative is a script that calls `runUIMode(...)` directly
79
+ // without going through `playwright test --ui`, which is not a documented
80
+ // entry point.
81
+ this._isUnderTestServer = Boolean(options === null || options === void 0 ? void 0 : options._isTestServer) || EyesReporter._argvIndicatesUiMode();
82
+ }
83
+ static _argvIndicatesUiMode() {
84
+ return process.argv.some(arg => arg === '--ui' ||
85
+ arg === '--ui-host' ||
86
+ arg === '--ui-port' ||
87
+ arg.startsWith('--ui=') ||
88
+ arg.startsWith('--ui-host=') ||
89
+ arg.startsWith('--ui-port='));
52
90
  }
53
91
  onTestEnd(test, result) {
54
92
  var _a;
93
+ // Under Playwright UI mode (`--ui`), the test server has already serialized `result`
94
+ // (including `_endPayload.attachments`) and pushed it to the live UI client. Any
95
+ // mutation of attachments / steps after that point corrupts the trace viewer's
96
+ // model — Actions list, Source tab, and Canvas disappear after the test completes.
97
+ // Collect the Eyes identifier without mutating the result, and skip the upstream
98
+ // onTestEnd as well.
99
+ if (this._isUnderTestServer) {
100
+ const index = result.attachments.findIndex(a => a.name === 'applitoolsIdentifier');
101
+ if (index > -1) {
102
+ this.applitoolsIdentifiers.push(result.attachments[index].body.toString());
103
+ }
104
+ return;
105
+ }
55
106
  (_a = super.onTestEnd) === null || _a === void 0 ? void 0 : _a.call(this, test, result);
56
107
  const index = result.attachments.findIndex(a => a.name === 'applitoolsIdentifier');
57
108
  if (index > -1) {
package/fixture.js CHANGED
@@ -3,4 +3,4 @@
3
3
  * Modern module resolution uses the "exports" field in package.json.
4
4
  * This file ensures the fixture can be imported by users with older TypeScript configs.
5
5
  */
6
- module.exports = require('./dist/fixture/index.js');
6
+ module.exports = require('./dist/fixture/index.js')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-playwright",
3
- "version": "1.47.2",
3
+ "version": "1.47.3",
4
4
  "description": "Applitools Eyes SDK for Playwright",
5
5
  "keywords": [
6
6
  "eyes-playwright",
@@ -63,9 +63,10 @@
63
63
  "up:framework": "echo \"$(jq '.devDependencies.playwright = $ENV.APPLITOOLS_FRAMEWORK_VERSION' ./package.json)\" > ./package.json"
64
64
  },
65
65
  "dependencies": {
66
- "@applitools/eyes": "1.41.0",
67
- "@applitools/req": "1.10.0",
68
- "@applitools/spec-driver-playwright": "1.9.0",
66
+ "@applitools/eyes": "1.42.0",
67
+ "@applitools/logger": "2.2.11",
68
+ "@applitools/req": "1.10.1",
69
+ "@applitools/spec-driver-playwright": "1.9.1",
69
70
  "@applitools/utils": "1.14.4",
70
71
  "@inquirer/prompts": "7.0.1",
71
72
  "chalk": "4.1.2",
@@ -83,8 +84,10 @@
83
84
  "@rollup/plugin-typescript": "^12.1.0",
84
85
  "@types/node": "^12.20.55",
85
86
  "jszip": "^3.10.1",
87
+ "mocha": "^11.7.5",
86
88
  "nock": "^13.3.2",
87
89
  "playwright": "1.55.1",
90
+ "playwright-core": "1.55.1",
88
91
  "rollup": "^4.1.4"
89
92
  },
90
93
  "peerDependencies": {