@applitools/eyes-playwright 1.34.1 → 1.35.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,121 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.35.1](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.35.0...js/eyes-playwright@1.35.1) (2025-01-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * playwright fixture with ESM ([#2741](https://github.com/Applitools-Dev/sdk/issues/2741)) ([9319a87](https://github.com/Applitools-Dev/sdk/commit/9319a870571cb7321ba85cc9a60bdae2eb953c97))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/socket bumped to 1.2.1
14
+ #### Bug Fixes
15
+
16
+ * mask from config property ([#2739](https://github.com/Applitools-Dev/sdk/issues/2739)) ([6840624](https://github.com/Applitools-Dev/sdk/commit/6840624f5f3f56512dce96547815904adec94704))
17
+ * @applitools/req bumped to 1.7.7
18
+ #### Bug Fixes
19
+
20
+ * memory usage going high when resource is uint8array ([#2743](https://github.com/Applitools-Dev/sdk/issues/2743)) ([d06deeb](https://github.com/Applitools-Dev/sdk/commit/d06deeb845de62e96ec623efefa90ae65a703736))
21
+ * @applitools/spec-driver-webdriver bumped to 1.1.24
22
+ #### Bug Fixes
23
+
24
+ * universal core on windows ([#2736](https://github.com/Applitools-Dev/sdk/issues/2736)) ([9bd0744](https://github.com/Applitools-Dev/sdk/commit/9bd0744ca816a020973f20645aeb2460af76f44c))
25
+ * @applitools/ufg-client bumped to 1.16.1
26
+ #### Bug Fixes
27
+
28
+ * memory usage going high when resource is uint8array ([#2743](https://github.com/Applitools-Dev/sdk/issues/2743)) ([d06deeb](https://github.com/Applitools-Dev/sdk/commit/d06deeb845de62e96ec623efefa90ae65a703736))
29
+
30
+
31
+
32
+ * @applitools/core bumped to 4.29.1
33
+ #### Bug Fixes
34
+
35
+ * mask from config property ([#2739](https://github.com/Applitools-Dev/sdk/issues/2739)) ([6840624](https://github.com/Applitools-Dev/sdk/commit/6840624f5f3f56512dce96547815904adec94704))
36
+ * universal core on windows ([#2736](https://github.com/Applitools-Dev/sdk/issues/2736)) ([9bd0744](https://github.com/Applitools-Dev/sdk/commit/9bd0744ca816a020973f20645aeb2460af76f44c))
37
+
38
+
39
+
40
+ * @applitools/screenshoter bumped to 3.10.4
41
+
42
+ * @applitools/nml-client bumped to 1.8.23
43
+
44
+ * @applitools/tunnel-client bumped to 1.6.1
45
+ #### Bug Fixes
46
+
47
+ * memory usage going high when resource is uint8array ([#2743](https://github.com/Applitools-Dev/sdk/issues/2743)) ([d06deeb](https://github.com/Applitools-Dev/sdk/commit/d06deeb845de62e96ec623efefa90ae65a703736))
48
+
49
+
50
+
51
+ * @applitools/core-base bumped to 1.22.1
52
+
53
+ * @applitools/ec-client bumped to 1.10.2
54
+
55
+ * @applitools/eyes bumped to 1.31.1
56
+
57
+
58
+ ## [1.35.0](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.34.1...js/eyes-playwright@1.35.0) (2025-01-13)
59
+
60
+
61
+ ### Features
62
+
63
+ * jsonFilePath in offline mode ([#2734](https://github.com/Applitools-Dev/sdk/issues/2734)) ([2f9fbe8](https://github.com/Applitools-Dev/sdk/commit/2f9fbe8fc3c5212db6b7cc58a98b041c3ffd5572))
64
+
65
+
66
+ ### Dependencies
67
+
68
+ * @applitools/dom-snapshot bumped to 4.11.14
69
+ #### Bug Fixes
70
+
71
+ * remove side-eyes and fix code scanning issues ([#2712](https://github.com/Applitools-Dev/sdk/issues/2712)) ([cda98e4](https://github.com/Applitools-Dev/sdk/commit/cda98e4748c73cd97c11f646a2b5e26ff9416892))
72
+
73
+
74
+
75
+ * @applitools/snippets bumped to 2.6.4
76
+ #### Bug Fixes
77
+
78
+ * remove side-eyes and fix code scanning issues ([#2712](https://github.com/Applitools-Dev/sdk/issues/2712)) ([cda98e4](https://github.com/Applitools-Dev/sdk/commit/cda98e4748c73cd97c11f646a2b5e26ff9416892))
79
+ * @applitools/dom-capture bumped to 11.5.4
80
+ #### Bug Fixes
81
+
82
+ * remove side-eyes and fix code scanning issues ([#2712](https://github.com/Applitools-Dev/sdk/issues/2712)) ([cda98e4](https://github.com/Applitools-Dev/sdk/commit/cda98e4748c73cd97c11f646a2b5e26ff9416892))
83
+ * @applitools/core bumped to 4.29.0
84
+ #### Features
85
+
86
+ * jsonFilePath in offline mode ([#2734](https://github.com/Applitools-Dev/sdk/issues/2734)) ([2f9fbe8](https://github.com/Applitools-Dev/sdk/commit/2f9fbe8fc3c5212db6b7cc58a98b041c3ffd5572))
87
+
88
+
89
+ #### Bug Fixes
90
+
91
+ * support batching tests in distributed env - close batch only when required ([#2733](https://github.com/Applitools-Dev/sdk/issues/2733)) ([2e59e4a](https://github.com/Applitools-Dev/sdk/commit/2e59e4a76edcc02b8888dfc78a42749bae76f79c))
92
+
93
+
94
+
95
+ * @applitools/driver bumped to 1.20.3
96
+
97
+ * @applitools/spec-driver-webdriver bumped to 1.1.23
98
+
99
+ * @applitools/spec-driver-selenium bumped to 1.5.94
100
+
101
+ * @applitools/spec-driver-playwright bumped to 1.5.6
102
+
103
+ * @applitools/spec-driver-puppeteer bumped to 1.4.23
104
+
105
+ * @applitools/screenshoter bumped to 3.10.3
106
+
107
+ * @applitools/nml-client bumped to 1.8.22
108
+
109
+ * @applitools/ec-client bumped to 1.10.1
110
+
111
+ * @applitools/eyes bumped to 1.31.0
112
+ #### Features
113
+
114
+ * jsonFilePath in offline mode ([#2734](https://github.com/Applitools-Dev/sdk/issues/2734)) ([2f9fbe8](https://github.com/Applitools-Dev/sdk/commit/2f9fbe8fc3c5212db6b7cc58a98b041c3ffd5572))
115
+
116
+
117
+
118
+
3
119
  ## [1.34.1](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.34.0...js/eyes-playwright@1.34.1) (2024-12-31)
4
120
 
5
121
 
@@ -5,13 +5,11 @@ const test_1 = require("@playwright/test");
5
5
  const index_1 = require("../index");
6
6
  const eyesConfiguration_1 = require("./defaults/eyesConfiguration");
7
7
  async function getEyes({ testInfo, eyesConfig, eyesRunner, page, }) {
8
- var _a, _b, _c, _d, _e;
8
+ var _a, _b, _c, _d;
9
9
  if (page.__eyes) {
10
10
  return page.__eyes;
11
11
  }
12
- const playwrightConfig = (_c = (_b = ((testInfo.config.configFile
13
- ? (_a = require(testInfo.config.configFile)) === null || _a === void 0 ? void 0 : _a.default
14
- : {}))) === null || _b === void 0 ? void 0 : _b.use) === null || _c === void 0 ? void 0 : _c.eyesConfig;
12
+ const playwrightConfig = (_b = (_a = ((testInfo.config.configFile ? await import(testInfo.config.configFile) : {}))) === null || _a === void 0 ? void 0 : _a.use) === null || _b === void 0 ? void 0 : _b.eyesConfig;
15
13
  const projectConfig = testInfo.project.use.eyesConfig;
16
14
  const configuration = (0, eyesConfiguration_1.getFinalEyesConfiguration)({
17
15
  playwrightConfig,
@@ -30,7 +28,7 @@ async function getEyes({ testInfo, eyesConfig, eyesRunner, page, }) {
30
28
  dontCloseBatches: true,
31
29
  ...configuration,
32
30
  });
33
- addLogHandlers(eyes, (_e = (_d = eyesConfig.logConfig) !== null && _d !== void 0 ? _d : projectConfig === null || projectConfig === void 0 ? void 0 : projectConfig.logConfig) !== null && _e !== void 0 ? _e : playwrightConfig === null || playwrightConfig === void 0 ? void 0 : playwrightConfig.logConfig, testInfo);
31
+ addLogHandlers(eyes, (_d = (_c = eyesConfig.logConfig) !== null && _c !== void 0 ? _c : projectConfig === null || projectConfig === void 0 ? void 0 : projectConfig.logConfig) !== null && _d !== void 0 ? _d : playwrightConfig === null || playwrightConfig === void 0 ? void 0 : playwrightConfig.logConfig, testInfo);
34
32
  eyes.open = makeStep('eyes.open', eyes.open.bind(eyes));
35
33
  eyes.check = makeStep('eyes.check', eyes.check.bind(eyes));
36
34
  eyes.close = makeStep('eyes.close', eyes.close.bind(eyes));
@@ -37,7 +37,7 @@ exports.test = test_1.test.extend({
37
37
  eyesRunner: [
38
38
  async ({}, use, workerInfo) => {
39
39
  var _a;
40
- const eyesConfig = getEyesConfigForWorker(workerInfo);
40
+ const eyesConfig = await getEyesConfigForWorker(workerInfo);
41
41
  const runner = eyesConfig.type === 'ufg' ? new index_1.VisualGridRunner(eyesConfig) : new index_1.ClassicRunner(eyesConfig);
42
42
  await use(runner);
43
43
  if (runner.isUsed) {
@@ -130,16 +130,16 @@ function writeResultsWhenReady({ eyes, runner, testInfo }) {
130
130
  throw new Error(`Failed to get eyes test results: ${(_a = e === null || e === void 0 ? void 0 : e.message) !== null && _a !== void 0 ? _a : e} ${e === null || e === void 0 ? void 0 : e.stack}`);
131
131
  }));
132
132
  }
133
- function getEyesConfigForWorker(workerInfo) {
134
- var _a, _b, _c, _d;
135
- const playwrightConfig = (_c = (_b = ((workerInfo.config.configFile
136
- ? (_a = require(workerInfo.config.configFile)) === null || _a === void 0 ? void 0 : _a.default
137
- : {}))) === null || _b === void 0 ? void 0 : _b.use) === null || _c === void 0 ? void 0 : _c.eyesConfig;
133
+ async function getEyesConfigForWorker(workerInfo) {
134
+ var _a, _b, _c;
135
+ const playwrightConfig = (_b = (_a = ((workerInfo.config.configFile
136
+ ? await import(workerInfo.config.configFile)
137
+ : {}))) === null || _a === void 0 ? void 0 : _a.use) === null || _b === void 0 ? void 0 : _b.eyesConfig;
138
138
  const projectConfig = workerInfo.project.use.eyesConfig;
139
139
  const eyesConfig = {
140
140
  ...playwrightConfig,
141
141
  ...projectConfig,
142
142
  };
143
- (_d = eyesConfig.failTestsOnDiff) !== null && _d !== void 0 ? _d : (eyesConfig.failTestsOnDiff = process.env.CI ? 'afterAll' : 'afterEach');
143
+ (_c = eyesConfig.failTestsOnDiff) !== null && _c !== void 0 ? _c : (eyesConfig.failTestsOnDiff = process.env.CI ? 'afterAll' : 'afterEach');
144
144
  return eyesConfig;
145
145
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-playwright",
3
- "version": "1.34.1",
3
+ "version": "1.35.1",
4
4
  "description": "Applitools Eyes SDK for Playwright",
5
5
  "keywords": [
6
6
  "eyes-playwright",
@@ -59,8 +59,8 @@
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.30.0",
63
- "@applitools/spec-driver-playwright": "1.5.5",
62
+ "@applitools/eyes": "1.31.1",
63
+ "@applitools/spec-driver-playwright": "1.5.6",
64
64
  "@applitools/utils": "1.7.7",
65
65
  "@inquirer/prompts": "7.0.1",
66
66
  "chalk": "4.1.2",
package/types/index.d.ts CHANGED
@@ -481,6 +481,7 @@ export type ConfigurationPlain = {
481
481
  environmentName?: undefined | string;
482
482
  forceFullPageScreenshot?: undefined | boolean;
483
483
  gitMergeBaseTimestamp?: undefined | string;
484
+ latestCommitInfo?: undefined | { timestamp: string; sha: string; };
484
485
  hideCaret?: undefined | boolean;
485
486
  hideScrollbars?: undefined | boolean;
486
487
  hostApp?: undefined | string;
@@ -655,6 +656,10 @@ export class Configuration implements Required<ConfigurationPlain> {
655
656
  set gitMergeBaseTimestamp(gitMergeBaseTimestamp: string);
656
657
  getGitMergeBaseTimestamp(): string;
657
658
  setGitMergeBaseTimestamp(gitMergeBaseTimestamp: string): Configuration;
659
+ get latestCommitInfo(): { timestamp: string; sha: string; };
660
+ set latestCommitInfo(latestCommitInfo: { timestamp: string; sha: string; });
661
+ getLatestCommitInfo(): { timestamp: string; sha: string; };
662
+ setLatestCommitInfo(latestCommitInfo: { timestamp: string; sha: string; }): Configuration;
658
663
  get hideCaret(): boolean;
659
664
  set hideCaret(hideCaret: boolean);
660
665
  getHideCaret(): boolean;