@applitools/eyes-playwright 1.39.2 → 1.39.4
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 +76 -0
- package/dist/fixture/cli.js +12 -5
- package/dist/fixture/debug-reporter.js +18 -0
- package/dist/fixture/getEyes.js +24 -0
- package/dist/fixture/reportRenderer.js +4 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,81 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.39.4](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.39.3...js/eyes-playwright@1.39.4) (2025-08-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* execute the playwright example with api key in env var | AD-10543 ([#3083](https://github.com/Applitools-Dev/sdk/issues/3083)) ([f842cf9](https://github.com/Applitools-Dev/sdk/commit/f842cf98bf91d23df1b17bfedeae1174883603b1))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* @applitools/dom-snapshot bumped to 4.13.4
|
|
14
|
+
#### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* canvas blob ([#3194](https://github.com/Applitools-Dev/sdk/issues/3194)) ([d90cfca](https://github.com/Applitools-Dev/sdk/commit/d90cfcaa78df93d4bd8992d77f41eb93edd56f4c))
|
|
17
|
+
* canvas blobs ([#3192](https://github.com/Applitools-Dev/sdk/issues/3192)) ([f15ac4e](https://github.com/Applitools-Dev/sdk/commit/f15ac4ed68cc1746ee6cef51f2258388428fd1c7))
|
|
18
|
+
* @applitools/core bumped to 4.44.5
|
|
19
|
+
#### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* browser extension | FLD-3221 ([#3185](https://github.com/Applitools-Dev/sdk/issues/3185)) ([8212155](https://github.com/Applitools-Dev/sdk/commit/8212155e51ce919beb3bcecc7da1970da4a65be7))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
* @applitools/eyes bumped to 1.36.3
|
|
26
|
+
#### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* browser extension | FLD-3221 ([#3185](https://github.com/Applitools-Dev/sdk/issues/3185)) ([8212155](https://github.com/Applitools-Dev/sdk/commit/8212155e51ce919beb3bcecc7da1970da4a65be7))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [1.39.3](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.39.2...js/eyes-playwright@1.39.3) (2025-08-21)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* playwright html reporter failure on retries | FLD-3477 ([#3179](https://github.com/Applitools-Dev/sdk/issues/3179)) ([7ec03a8](https://github.com/Applitools-Dev/sdk/commit/7ec03a8a905ebb1fe4c7d278ff172cc7d75230c8))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Dependencies
|
|
42
|
+
|
|
43
|
+
* @applitools/socket bumped to 1.3.3
|
|
44
|
+
#### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* tunnel uncaught error | FLD-3356 ([#3128](https://github.com/Applitools-Dev/sdk/issues/3128)) ([ed5fb8a](https://github.com/Applitools-Dev/sdk/commit/ed5fb8aad596ec0d8b45a89077a7765c24ae8a8e))
|
|
47
|
+
* @applitools/driver bumped to 1.23.3
|
|
48
|
+
#### Bug Fixes
|
|
49
|
+
|
|
50
|
+
* make orientation more robust | FLD-3470 ([#3166](https://github.com/Applitools-Dev/sdk/issues/3166)) ([3745427](https://github.com/Applitools-Dev/sdk/commit/37454279234b085dc9a159077b3f278cdccc203a))
|
|
51
|
+
* @applitools/tunnel-client bumped to 1.10.4
|
|
52
|
+
#### Bug Fixes
|
|
53
|
+
|
|
54
|
+
* tunnel uncaught error | FLD-3356 ([#3128](https://github.com/Applitools-Dev/sdk/issues/3128)) ([ed5fb8a](https://github.com/Applitools-Dev/sdk/commit/ed5fb8aad596ec0d8b45a89077a7765c24ae8a8e))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
* @applitools/dom-snapshot bumped to 4.13.3
|
|
59
|
+
|
|
60
|
+
* @applitools/spec-driver-webdriver bumped to 1.4.3
|
|
61
|
+
|
|
62
|
+
* @applitools/spec-driver-selenium bumped to 1.7.3
|
|
63
|
+
|
|
64
|
+
* @applitools/spec-driver-playwright bumped to 1.7.3
|
|
65
|
+
|
|
66
|
+
* @applitools/spec-driver-puppeteer bumped to 1.6.3
|
|
67
|
+
|
|
68
|
+
* @applitools/screenshoter bumped to 3.12.3
|
|
69
|
+
|
|
70
|
+
* @applitools/nml-client bumped to 1.11.3
|
|
71
|
+
|
|
72
|
+
* @applitools/ec-client bumped to 1.12.4
|
|
73
|
+
|
|
74
|
+
* @applitools/core bumped to 4.44.4
|
|
75
|
+
|
|
76
|
+
* @applitools/eyes bumped to 1.36.2
|
|
77
|
+
|
|
78
|
+
|
|
3
79
|
## [1.39.2](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.39.1...js/eyes-playwright@1.39.2) (2025-08-12)
|
|
4
80
|
|
|
5
81
|
|
package/dist/fixture/cli.js
CHANGED
|
@@ -157,16 +157,17 @@ async function init(args) {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
async function runExample() {
|
|
160
|
-
const playwrightTmpConfigPath = '
|
|
160
|
+
const playwrightTmpConfigPath = path_1.default.join(process.cwd(), 'eyes-examples', 'playwright.tmp.config.ts');
|
|
161
161
|
const playwrightTmpExists = fs_1.default.existsSync(playwrightTmpConfigPath);
|
|
162
162
|
await writeTmpPlaywrightConfig();
|
|
163
163
|
await runPlaywrightCommand();
|
|
164
164
|
await cleanupTmpPlaywrightConfig();
|
|
165
165
|
async function writeTmpPlaywrightConfig() {
|
|
166
|
+
var _a;
|
|
166
167
|
if (!playwrightTmpExists) {
|
|
167
168
|
const playwrighConfig = await fs_1.promises.readFile('./playwright.config.ts', 'utf-8');
|
|
168
169
|
const apikeyMatch = playwrighConfig.match(/apiKey: ([^,]+)/);
|
|
169
|
-
const apiKey = apikeyMatch ? apikeyMatch[1] :
|
|
170
|
+
const apiKey = (_a = apikeyMatch === null || apikeyMatch === void 0 ? void 0 : apikeyMatch[1]) === null || _a === void 0 ? void 0 : _a.replace(/[^a-zA-Z0-9]/g, '');
|
|
170
171
|
const serverUrlMatch = playwrighConfig.match(/serverUrl: ([^,]+)/);
|
|
171
172
|
const serverUrl = serverUrlMatch ? serverUrlMatch[1] : undefined;
|
|
172
173
|
const playwrightTmpConfig = `import { defineConfig, devices } from '@playwright/test';
|
|
@@ -177,8 +178,12 @@ export default defineConfig<EyesFixture>({
|
|
|
177
178
|
reporter: [['@applitools/eyes-playwright/reporter', {open: 'always', outputFolder: './eyes-playwright-report'}]],
|
|
178
179
|
use: {
|
|
179
180
|
eyesConfig: {
|
|
180
|
-
|
|
181
|
-
|
|
181
|
+
${apiKey
|
|
182
|
+
? `apiKey: '${apiKey}'`
|
|
183
|
+
: "// apiKey: '' // alternatively, set this via environment variable APPLITOOLS_API_KEY"},
|
|
184
|
+
${serverUrl
|
|
185
|
+
? `serverUrl: ${serverUrl}`
|
|
186
|
+
: "// serverUrl: 'https://eyes.applitools.com' // alternatively, set this via environment variable APPLITOOLS_SERVER_URL"}
|
|
182
187
|
}
|
|
183
188
|
}
|
|
184
189
|
})`;
|
|
@@ -191,7 +196,9 @@ export default defineConfig<EyesFixture>({
|
|
|
191
196
|
}
|
|
192
197
|
}
|
|
193
198
|
async function runPlaywrightCommand() {
|
|
194
|
-
|
|
199
|
+
// Use path normalization and quotes to support Windows paths with spaces/backslashes
|
|
200
|
+
const quotedConfigPath = `"${playwrightTmpConfigPath}"`;
|
|
201
|
+
await utils.process.sh(`npx playwright test --config ${quotedConfigPath}`, {
|
|
195
202
|
spawnOptions: { stdio: 'inherit' },
|
|
196
203
|
});
|
|
197
204
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const nodeOptions = ((_a = process.env.NODE_DEBUG) !== null && _a !== void 0 ? _a : '').split(',');
|
|
5
|
+
const supportedCategories = process.env.CI
|
|
6
|
+
? ['pw:api', 'test.step', 'expect']
|
|
7
|
+
: ['pw', 'hook', 'test.step', 'expect', 'fixture'];
|
|
8
|
+
class DebugReporter {
|
|
9
|
+
onStepEnd(_test, _result, step) {
|
|
10
|
+
if (process.env.CI || nodeOptions.includes('playwright')) {
|
|
11
|
+
if (supportedCategories.includes(step.category)) {
|
|
12
|
+
// eslint-disable-next-line no-console
|
|
13
|
+
console.log(` ~ ${step.category}: ${step.title} (${step.duration}ms)`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = DebugReporter;
|
package/dist/fixture/getEyes.js
CHANGED
|
@@ -37,7 +37,31 @@ async function getEyes({ testInfo, eyesConfig, eyesRunner, page, }) {
|
|
|
37
37
|
eyes.check = makeStep('eyes.check', eyes.check.bind(eyes));
|
|
38
38
|
eyes.close = makeStep('eyes.close', eyes.close.bind(eyes));
|
|
39
39
|
eyes.closeAsync = makeStep('eyes.closeAsync (without exception)', eyes.closeAsync.bind(eyes));
|
|
40
|
+
// INTERNAL DEBUG CALLBACKS - Execute beforeOpen callback if provided
|
|
41
|
+
const mergedConfig = { ...playwrightConfig, ...projectConfig, ...eyesConfig };
|
|
42
|
+
if (mergedConfig.beforeOpen) {
|
|
43
|
+
try {
|
|
44
|
+
await mergedConfig.beforeOpen();
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
// Don't let callback failures break the main flow, just log the error
|
|
48
|
+
// eslint-disable-next-line no-console
|
|
49
|
+
console.warn('👀 beforeOpen callback failed:', error);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
40
52
|
await eyes.open(page, configuration.appName, configuration.testName);
|
|
53
|
+
// INTERNAL DEBUG CALLBACKS - Execute afterOpen callback if provided
|
|
54
|
+
if (mergedConfig.afterOpen) {
|
|
55
|
+
try {
|
|
56
|
+
await mergedConfig.afterOpen();
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
// Don't let callback failures break the main flow, just log the error
|
|
60
|
+
// eslint-disable-next-line no-console
|
|
61
|
+
console.warn('👀 afterOpen callback failed:', error);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
;
|
|
41
65
|
page.__eyes = eyes;
|
|
42
66
|
eyesRunner.isUsed = true;
|
|
43
67
|
return eyes;
|
|
@@ -394,6 +394,7 @@ class ReportRenderer {
|
|
|
394
394
|
this._createEyesResultIframes(test, iframeSrc, currentSelectedRetryIndex, shouldFilterUnresolved);
|
|
395
395
|
}
|
|
396
396
|
_observeRetryTabSlectionChanged = (test, iframeSrc) => {
|
|
397
|
+
const shouldFilterUnresolved = new URLSearchParams(window.location.search).get('unresolved');
|
|
397
398
|
const retryTabs = document.getElementsByClassName('tabbed-pane-tab-element');
|
|
398
399
|
let selectedRetryIndex = Array.from(retryTabs).findIndex(tab => tab.classList.contains('selected'));
|
|
399
400
|
|
|
@@ -628,11 +629,10 @@ class ReportRenderer {
|
|
|
628
629
|
const eyesResultsForRun = eyesResultsForTest.filter(result => result.playwrightRetry === _result.retry);
|
|
629
630
|
if (eyesResultsForRun.length > 0) {
|
|
630
631
|
// get eyes status for the current retry, so we can later get the status of the test
|
|
631
|
-
results.push(getStatus(
|
|
632
|
+
results.push(getStatus(eyesResultsForRun).status);
|
|
632
633
|
} else results.push(null);
|
|
633
634
|
return results
|
|
634
635
|
}, []);
|
|
635
|
-
|
|
636
636
|
updatePlaywrightTestStatus(test, fileInReport, reportStats, eyesStatuses);
|
|
637
637
|
});
|
|
638
638
|
});
|
|
@@ -754,7 +754,8 @@ function updatePlaywrightTestStatus(test, fileInReport, reportStats, eyesStatuse
|
|
|
754
754
|
}
|
|
755
755
|
|
|
756
756
|
async function getTestResults() {
|
|
757
|
-
const
|
|
757
|
+
const playwrightReportBase64 = window.playwrightReportBase64?.textContent ?? window.playwrightReportBase64;
|
|
758
|
+
const base64Data = playwrightReportBase64.replace('data:application/zip;base64,', '');
|
|
758
759
|
const zip = new JSZip();
|
|
759
760
|
await zip.loadAsync(base64Data, {base64: true});
|
|
760
761
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-playwright",
|
|
3
|
-
"version": "1.39.
|
|
3
|
+
"version": "1.39.4",
|
|
4
4
|
"description": "Applitools Eyes SDK for Playwright",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eyes-playwright",
|
|
@@ -59,9 +59,9 @@
|
|
|
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.
|
|
62
|
+
"@applitools/eyes": "1.36.3",
|
|
63
63
|
"@applitools/req": "1.8.2",
|
|
64
|
-
"@applitools/spec-driver-playwright": "1.7.
|
|
64
|
+
"@applitools/spec-driver-playwright": "1.7.3",
|
|
65
65
|
"@applitools/utils": "1.11.1",
|
|
66
66
|
"@azure/storage-blob": "^12.28.0",
|
|
67
67
|
"@inquirer/prompts": "7.0.1",
|