@applitools/eyes-playwright 1.39.5 → 1.39.6

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,70 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.39.6](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.39.5...js/eyes-playwright@1.39.6) (2025-09-09)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * update properties keys to not have special characters | FLD-3477 ([#3211](https://github.com/Applitools-Dev/sdk/issues/3211)) ([38aa7ab](https://github.com/Applitools-Dev/sdk/commit/38aa7ab3454ea55ef22f3c9a4792a6117f24b0a7))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/utils bumped to 1.12.0
14
+ #### Features
15
+
16
+ * enable canvas with webgl for autonomous | FLD 3515 ([#3197](https://github.com/Applitools-Dev/sdk/issues/3197)) ([23f22e5](https://github.com/Applitools-Dev/sdk/commit/23f22e517d52dc70f24093dfb21e072b9aa9fb60))
17
+ * @applitools/core bumped to 4.46.0
18
+ #### Features
19
+
20
+ * enable canvas with webgl for autonomous | FLD 3515 ([#3197](https://github.com/Applitools-Dev/sdk/issues/3197)) ([23f22e5](https://github.com/Applitools-Dev/sdk/commit/23f22e517d52dc70f24093dfb21e072b9aa9fb60))
21
+
22
+
23
+ #### Bug Fixes
24
+
25
+ * update offline test fixtures to use Google Fonts v12 ([#3215](https://github.com/Applitools-Dev/sdk/issues/3215)) ([ba8ef0c](https://github.com/Applitools-Dev/sdk/commit/ba8ef0c3b11a7f5e9e59a58f29fd5d60760a68ee))
26
+
27
+
28
+
29
+ * @applitools/logger bumped to 2.2.3
30
+
31
+ * @applitools/dom-snapshot bumped to 4.13.6
32
+
33
+ * @applitools/socket bumped to 1.3.4
34
+
35
+ * @applitools/req bumped to 1.8.3
36
+
37
+ * @applitools/image bumped to 1.2.3
38
+
39
+ * @applitools/dom-capture bumped to 11.6.4
40
+
41
+ * @applitools/driver bumped to 1.23.4
42
+
43
+ * @applitools/spec-driver-webdriver bumped to 1.4.4
44
+
45
+ * @applitools/spec-driver-selenium bumped to 1.7.4
46
+
47
+ * @applitools/spec-driver-playwright bumped to 1.7.4
48
+
49
+ * @applitools/spec-driver-puppeteer bumped to 1.6.4
50
+
51
+ * @applitools/screenshoter bumped to 3.12.4
52
+
53
+ * @applitools/nml-client bumped to 1.11.4
54
+
55
+ * @applitools/tunnel-client bumped to 1.11.1
56
+
57
+ * @applitools/ufg-client bumped to 1.17.3
58
+
59
+ * @applitools/core-base bumped to 1.27.3
60
+
61
+ * @applitools/ec-client bumped to 1.12.6
62
+
63
+ * @applitools/eyes bumped to 1.36.5
64
+
65
+ * @applitools/test-server bumped to 1.3.2
66
+
67
+
3
68
  ## [1.39.5](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.39.4...js/eyes-playwright@1.39.5) (2025-09-04)
4
69
 
5
70
 
@@ -68,9 +68,15 @@ exports.test = test_1.test.extend({
68
68
  await use();
69
69
  const eyes = page.__eyes;
70
70
  if (eyes) {
71
+ const logger = eyes
72
+ .getLogger()
73
+ .getLogger()
74
+ .extend({ tags: [`close-eyes-if-needed-${utils_1.general.shortid()}`] });
75
+ logger.log('Used reporters:', testInfo.config.reporter);
71
76
  await eyes.closeAsync();
72
77
  if (isUsingEyesReporter) {
73
- await writeResultsWhenReady({ eyes, runner, testInfo });
78
+ logger.log('Using Eyes reporter. Writing results..');
79
+ await writeResultsWhenReady({ eyes, runner, testInfo, logger });
74
80
  }
75
81
  if (eyesConfig.failTestsOnDiff === 'afterEach') {
76
82
  await eyes.getResults(true);
@@ -92,17 +98,20 @@ function outputDigest(workerInfo, results) {
92
98
  function output(...args) {
93
99
  console.log('👀', ...args);
94
100
  }
95
- async function writeResultsWhenReady({ eyes, runner, testInfo }) {
101
+ async function writeResultsWhenReady({ eyes, runner, testInfo, logger, }) {
96
102
  var _a, _b;
97
103
  const fixturePromises = ((_a = runner.fixturePromises) !== null && _a !== void 0 ? _a : (runner.fixturePromises = []));
104
+ logger = logger.extend({ tags: [`write-results-${utils_1.general.shortid()}`] });
98
105
  const uuid = utils_1.general.guid();
106
+ const applitoolsIdentifier = `${uuid}|${(_b = eyes.getServerUrl()) !== null && _b !== void 0 ? _b : 'https://eyes.applitools.com'}|${eyes.getApiKey()}`;
99
107
  await testInfo.attach('applitoolsIdentifier', {
100
- body: `${uuid}|${(_b = eyes.getServerUrl()) !== null && _b !== void 0 ? _b : 'https://eyes.applitools.com'}|${eyes.getApiKey()}`,
108
+ body: applitoolsIdentifier,
101
109
  });
110
+ logger.log('Attached Applitools identifier:', applitoolsIdentifier);
102
111
  fixturePromises.push(eyes
103
112
  .getResults(false)
104
113
  .then(async (testResults) => {
105
- await reporter_1.InternalData.write({ testInfo, data: testResults, eyes, uuid });
114
+ await reporter_1.InternalData.write({ testInfo, data: testResults, eyes, uuid, logger });
106
115
  })
107
116
  .catch((e) => {
108
117
  var _a;
@@ -144,17 +144,26 @@ const makeReporterRequest = (settings) => {
144
144
  download,
145
145
  };
146
146
  async function upload(uuid, data) {
147
+ logger.log('Uploading data for UUID:', uuid);
147
148
  const blobClient = new storage_blob_1.BlockBlobClient(settings.uploadUrl);
148
- const [response1, response2] = await Promise.all([
149
- req(`/batch/${uuid}/report/${uuid}`, {
150
- method: 'POST',
151
- }),
152
- blobClient.upload(JSON.stringify(data), JSON.stringify(data).length),
153
- ]);
154
- return {
155
- respCreateUpload: await response1.json(),
156
- respUpload: JSON.stringify(response2),
157
- };
149
+ try {
150
+ const [response1, response2] = await Promise.all([
151
+ req(`/batch/${uuid}/report/${uuid}`, {
152
+ method: 'POST',
153
+ }),
154
+ blobClient.upload(JSON.stringify(data), JSON.stringify(data).length),
155
+ ]);
156
+ const uploadResponse = {
157
+ respCreateUpload: await response1.json(),
158
+ respUpload: JSON.stringify(response2),
159
+ };
160
+ logger.log('Data written successfully. Upload response:', uploadResponse);
161
+ return uploadResponse;
162
+ }
163
+ catch (error) {
164
+ logger.error('Failed to upload data:', error);
165
+ throw error;
166
+ }
158
167
  }
159
168
  async function download(uuid) {
160
169
  const response = await req(`/batch/${uuid}/report/${uuid}`, {
@@ -164,9 +173,9 @@ const makeReporterRequest = (settings) => {
164
173
  }
165
174
  };
166
175
  exports.InternalData = {
167
- async write({ testInfo, data, eyes, uuid }) {
168
- var _a, _b;
169
- const logger = ((_a = eyes.getLogger) === null || _a === void 0 ? void 0 : _a.call(eyes)) || (0, logger_1.makeLogger)();
176
+ async write({ testInfo, data, eyes, uuid, logger, }) {
177
+ var _a;
178
+ logger = logger.extend({ tags: [`internal-data-write-${utils.general.shortid()}`] });
170
179
  if (!data || data.length === 0) {
171
180
  logger.log('No data to write for test:', testInfo.title);
172
181
  return;
@@ -175,20 +184,21 @@ exports.InternalData = {
175
184
  .replace('__batch_id__', uuid)
176
185
  .replace('__report_id__', uuid);
177
186
  const { upload } = makeReporterRequest({
178
- serverUrl: (_b = eyes.getServerUrl()) !== null && _b !== void 0 ? _b : 'https://eyes.applitools.com',
187
+ serverUrl: (_a = eyes.getServerUrl()) !== null && _a !== void 0 ? _a : 'https://eyes.applitools.com',
179
188
  apiKey: eyes.getApiKey(),
180
189
  uploadUrl,
181
190
  logger: logger,
182
191
  });
183
- const response = await upload(uuid, {
192
+ await upload(uuid, {
184
193
  key: `${testInfo.testId}--${testInfo.retry}`,
185
194
  data,
186
195
  });
187
- logger.log('Data written successfully:', response);
188
196
  },
189
197
  async consume(uuid, eyes) {
190
- var _a;
191
- const logger = ((_a = eyes.getLogger) === null || _a === void 0 ? void 0 : _a.call(eyes)) || (0, logger_1.makeLogger)();
198
+ var _a, _b, _c;
199
+ const logger = (((_c = (_a = eyes.getLogger) === null || _a === void 0 ? void 0 : (_b = _a.call(eyes)).getLogger) === null || _c === void 0 ? void 0 : _c.call(_b)) || (0, logger_1.makeLogger)()).extend({
200
+ tags: [`internal-data-consume-${utils.general.shortid()}`],
201
+ });
192
202
  const { download } = makeReporterRequest({
193
203
  serverUrl: eyes.getServerUrl(),
194
204
  apiKey: eyes.getApiKey(),
@@ -99,11 +99,11 @@ exports.expect = test_1.expect.extend({
99
99
  configuration.properties = [
100
100
  ...((_c = configuration.properties) !== null && _c !== void 0 ? _c : []),
101
101
  {
102
- name: 'playwright: expect.toHaveScreenshot options',
102
+ name: 'playwright expect toHaveScreenshot options',
103
103
  value: JSON.stringify(options),
104
104
  },
105
105
  {
106
- name: 'playwright: syntax used',
106
+ name: 'playwright expect syntax used',
107
107
  value: 'toHaveScreenshot',
108
108
  },
109
109
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-playwright",
3
- "version": "1.39.5",
3
+ "version": "1.39.6",
4
4
  "description": "Applitools Eyes SDK for Playwright",
5
5
  "keywords": [
6
6
  "eyes-playwright",
@@ -59,10 +59,10 @@
59
59
  "up:framework": "echo \"$(jq '.devDependencies.playwright = $ENV.APPLITOOLS_FRAMEWORK_VERSION' ./package.json)\" > ./package.json"
60
60
  },
61
61
  "dependencies": {
62
- "@applitools/eyes": "1.36.4",
63
- "@applitools/req": "1.8.2",
64
- "@applitools/spec-driver-playwright": "1.7.3",
65
- "@applitools/utils": "1.11.1",
62
+ "@applitools/eyes": "1.36.5",
63
+ "@applitools/req": "1.8.3",
64
+ "@applitools/spec-driver-playwright": "1.7.4",
65
+ "@applitools/utils": "1.12.0",
66
66
  "@azure/storage-blob": "^12.28.0",
67
67
  "@inquirer/prompts": "7.0.1",
68
68
  "chalk": "4.1.2",