@applitools/eyes-playwright 1.35.0 → 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,60 @@
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
+
3
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)
4
59
 
5
60
 
@@ -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.35.0",
3
+ "version": "1.35.1",
4
4
  "description": "Applitools Eyes SDK for Playwright",
5
5
  "keywords": [
6
6
  "eyes-playwright",
@@ -59,7 +59,7 @@
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.31.0",
62
+ "@applitools/eyes": "1.31.1",
63
63
  "@applitools/spec-driver-playwright": "1.5.6",
64
64
  "@applitools/utils": "1.7.7",
65
65
  "@inquirer/prompts": "7.0.1",