@applitools/eyes-playwright 1.36.3 → 1.36.5

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,49 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.36.5](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.36.4...js/eyes-playwright@1.36.5) (2025-03-13)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * playwright 1.50 report failing due to a new attachments step ([#2840](https://github.com/Applitools-Dev/sdk/issues/2840)) ([07a466f](https://github.com/Applitools-Dev/sdk/commit/07a466f1ddd42eb5b50ac2e19ae7e79d9dae4701))
9
+ * playwright bad import of configuration ([#2837](https://github.com/Applitools-Dev/sdk/issues/2837)) ([cec8dee](https://github.com/Applitools-Dev/sdk/commit/cec8deed06788029baf63f156c5d84002d7168fb))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * @applitools/spec-driver-webdriver bumped to 1.2.0
15
+ #### Features
16
+
17
+ * support HTTPS_PROXY and HTTP_PROXY environment variables ([#2795](https://github.com/Applitools-Dev/sdk/issues/2795)) ([226ae08](https://github.com/Applitools-Dev/sdk/commit/226ae08627381a1212df8b938c6576e82c777914))
18
+ * @applitools/core bumped to 4.33.0
19
+ #### Features
20
+
21
+ * support HTTPS_PROXY and HTTP_PROXY environment variables ([#2795](https://github.com/Applitools-Dev/sdk/issues/2795)) ([226ae08](https://github.com/Applitools-Dev/sdk/commit/226ae08627381a1212df8b938c6576e82c777914))
22
+
23
+
24
+
25
+ * @applitools/screenshoter bumped to 3.10.7
26
+
27
+ * @applitools/nml-client bumped to 1.8.26
28
+
29
+ * @applitools/ec-client bumped to 1.10.6
30
+
31
+ * @applitools/eyes bumped to 1.32.7
32
+
33
+
34
+ ## [1.36.4](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.36.3...js/eyes-playwright@1.36.4) (2025-03-06)
35
+
36
+
37
+ ### Dependencies
38
+
39
+ * @applitools/core bumped to 4.32.2
40
+ #### Bug Fixes
41
+
42
+ * add environment variable aliases (_NAME suffix) ([#2791](https://github.com/Applitools-Dev/sdk/issues/2791)) ([67501a4](https://github.com/Applitools-Dev/sdk/commit/67501a4f5491319ca62949a56ee03face08a59e5))
43
+ * support test concurrency in offline mode ([#2831](https://github.com/Applitools-Dev/sdk/issues/2831)) ([3b7d137](https://github.com/Applitools-Dev/sdk/commit/3b7d137a9b34bb5c564e0a5c7d3fb2520ef8a167))
44
+ * @applitools/eyes bumped to 1.32.6
45
+
46
+
3
47
  ## [1.36.3](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.36.2...js/eyes-playwright@1.36.3) (2025-02-26)
4
48
 
5
49
 
@@ -6,12 +6,14 @@ const index_1 = require("../index");
6
6
  const eyesConfiguration_1 = require("./defaults/eyesConfiguration");
7
7
  const url_1 = require("url");
8
8
  async function getEyes({ testInfo, eyesConfig, eyesRunner, page, }) {
9
- var _a, _b, _c, _d;
9
+ var _a, _b, _c, _d, _e;
10
10
  if (page.__eyes) {
11
11
  return page.__eyes;
12
12
  }
13
13
  const { configFile } = testInfo.config;
14
- const playwrightConfig = (_b = (_a = ((configFile ? await import((0, url_1.pathToFileURL)(configFile).href) : {}))) === null || _a === void 0 ? void 0 : _a.use) === null || _b === void 0 ? void 0 : _b.eyesConfig;
14
+ const playwrightConfigModule = configFile ? await import((0, url_1.pathToFileURL)(configFile).href) : {};
15
+ const playwrightConfig = ((_a = playwrightConfigModule === null || playwrightConfigModule === void 0 ? void 0 : playwrightConfigModule.use) === null || _a === void 0 ? void 0 : _a.eyesConfig) ||
16
+ ((_c = (_b = playwrightConfigModule === null || playwrightConfigModule === void 0 ? void 0 : playwrightConfigModule.default) === null || _b === void 0 ? void 0 : _b.use) === null || _c === void 0 ? void 0 : _c.eyesConfig);
15
17
  const projectConfig = testInfo.project.use.eyesConfig;
16
18
  const configuration = (0, eyesConfiguration_1.getFinalEyesConfiguration)({
17
19
  playwrightConfig,
@@ -30,7 +32,7 @@ async function getEyes({ testInfo, eyesConfig, eyesRunner, page, }) {
30
32
  dontCloseBatches: true,
31
33
  ...configuration,
32
34
  });
33
- 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);
35
+ 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);
34
36
  eyes.open = makeStep('eyes.open', eyes.open.bind(eyes));
35
37
  eyes.check = makeStep('eyes.check', eyes.check.bind(eyes));
36
38
  eyes.close = makeStep('eyes.close', eyes.close.bind(eyes));
@@ -55,9 +55,16 @@ class EyesReporter extends HtmlReporter {
55
55
  if (index > -1) {
56
56
  const internalId = result.attachments[index].body.toString();
57
57
  this.internalIds.push(internalId);
58
- result.attachments.splice(index, 1);
58
+ this.removeInternalIdAttachment(result);
59
59
  }
60
60
  }
61
+ removeInternalIdAttachment(result) {
62
+ var _a;
63
+ const index = result.attachments ? result.attachments.findIndex(a => a.name === 'internalId') : -1;
64
+ if (index > -1)
65
+ (_a = result.attachments) === null || _a === void 0 ? void 0 : _a.splice(index, 1);
66
+ result.steps.forEach(step => this.removeInternalIdAttachment(step));
67
+ }
61
68
  async onEnd(result) {
62
69
  await super.onEnd(result);
63
70
  const testResultsMap = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-playwright",
3
- "version": "1.36.3",
3
+ "version": "1.36.5",
4
4
  "description": "Applitools Eyes SDK for Playwright",
5
5
  "keywords": [
6
6
  "eyes-playwright",
@@ -51,15 +51,15 @@
51
51
  "build:report": "rollup --config src/fixture/build/rollup.config.ts --configPlugin typescript && cp src/fixture/reporterStyle.css dist/fixture && cp -R src/fixture/images dist/fixture",
52
52
  "build:cli": "cp -R src/fixture/example dist/fixture",
53
53
  "generate:tests": "NODE_OPTIONS='--experimental-import-meta-resolve --experimental-loader=@applitools/generic/dist/code-loader.js' generic ./test/generic/config.mjs",
54
- "test": "APPLITOOLS_SHOW_LOGS=true APPLITOOLS_LOG_FILE=\"./logs/$(uuidgen).log\" APPLITOOLS_BATCH_NAME='JS Tests: eyes-playwright' APPLITOOLS_BATCH_ID=$(uuidgen) run --top-level mocha './**/*.spec.{js,ts}' --parallel --jobs ${MOCHA_JOBS:-15} --exit",
55
- "test:coverage": "APPLITOOLS_SHOW_LOGS=true APPLITOOLS_LOG_FILE=\"./logs/$(uuidgen).log\" APPLITOOLS_BATCH_NAME='JS Coverage Tests: eyes-playwright' APPLITOOLS_BATCH_ID=$(uuidgen) MOCHA_GROUP=coverage run --top-level mocha './test/generated-coverage/*.spec.js' --parallel --jobs ${MOCHA_JOBS:-15} --exit",
54
+ "test": "APPLITOOLS_SHOW_LOGS=true APPLITOOLS_LOG_FILE=\"./logs/$(uuidgen).log\" APPLITOOLS_BATCH_NAME='JS Tests: eyes-playwright' APPLITOOLS_BATCH_ID=$(uuidgen) run --top-level mocha './test/*.spec.{js,ts}' --exit",
55
+ "test:coverage": "APPLITOOLS_SHOW_LOGS=true APPLITOOLS_LOG_FILE=\"./logs/$(uuidgen).log\" APPLITOOLS_BATCH_NAME='JS Coverage Tests: eyes-playwright' APPLITOOLS_BATCH_ID=$(uuidgen) MOCHA_GROUP=coverage run --top-level mocha './test/generated-coverage/*.spec.js' --parallel --jobs ${MOCHA_JOBS:-8} --exit",
56
56
  "test:fixture": "APPLITOOLS_SHOW_LOGS=true APPLITOOLS_LOG_FILE=\"./logs/$(npx uuid).log\" APPLITOOLS_BATCH_NAME='JS Coverage Tests: eyes-playwright-fixture' APPLITOOLS_BATCH_ID=$(npx uuid) run playwright test",
57
57
  "setup": "run playwright:setup",
58
58
  "playwright:setup": "yarn playwright install --with-deps chromium firefox webkit",
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.32.3",
62
+ "@applitools/eyes": "1.32.7",
63
63
  "@applitools/spec-driver-playwright": "1.5.8",
64
64
  "@applitools/utils": "1.7.8",
65
65
  "@inquirer/prompts": "7.0.1",