@applitools/eyes-playwright 1.30.2 → 1.32.0
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 +89 -0
- package/README.md +2 -2
- package/dist/fixture/cli.js +1 -1
- package/dist/fixture/defaults/eyesConfiguration.js +3 -4
- package/dist/fixture/getEyes.js +7 -1
- package/dist/fixture/images/link.svg +0 -1
- package/dist/fixture/index.js +7 -3
- package/dist/fixture/reportRenderer.js +344 -60
- package/dist/fixture/reporterStyle.css +17 -4
- package/package.json +5 -5
- package/types/index.d.ts +284 -261
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,94 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.32.0](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.31.0...js/eyes-playwright@1.32.0) (2024-11-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* playwright report - small ui fixes ([0297307](https://github.com/Applitools-Dev/sdk/commit/02973071be1faf3138773901214613b7f048df62))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* playwright docs links ([#2627](https://github.com/Applitools-Dev/sdk/issues/2627)) ([5f7c794](https://github.com/Applitools-Dev/sdk/commit/5f7c794a603c060e0082f0d29a56d1947bf44d8b))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
* @applitools/driver bumped to 1.20.0
|
|
19
|
+
#### Features
|
|
20
|
+
|
|
21
|
+
* add an option to keep the navigation bar for android devices ([#2608](https://github.com/Applitools-Dev/sdk/issues/2608)) ([e7647e0](https://github.com/Applitools-Dev/sdk/commit/e7647e0105a7aa47e6bf3b20ab033f1e389ca849))
|
|
22
|
+
* @applitools/screenshoter bumped to 3.10.0
|
|
23
|
+
#### Features
|
|
24
|
+
|
|
25
|
+
* add an option to keep the navigation bar for android devices ([#2608](https://github.com/Applitools-Dev/sdk/issues/2608)) ([e7647e0](https://github.com/Applitools-Dev/sdk/commit/e7647e0105a7aa47e6bf3b20ab033f1e389ca849))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
* @applitools/core bumped to 4.24.0
|
|
30
|
+
#### Features
|
|
31
|
+
|
|
32
|
+
* add an option to keep the navigation bar for android devices ([#2608](https://github.com/Applitools-Dev/sdk/issues/2608)) ([e7647e0](https://github.com/Applitools-Dev/sdk/commit/e7647e0105a7aa47e6bf3b20ab033f1e389ca849))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
* @applitools/dom-snapshot bumped to 4.11.9
|
|
37
|
+
|
|
38
|
+
* @applitools/spec-driver-webdriver bumped to 1.1.20
|
|
39
|
+
|
|
40
|
+
* @applitools/spec-driver-selenium bumped to 1.5.91
|
|
41
|
+
|
|
42
|
+
* @applitools/spec-driver-playwright bumped to 1.5.3
|
|
43
|
+
|
|
44
|
+
* @applitools/spec-driver-puppeteer bumped to 1.4.20
|
|
45
|
+
|
|
46
|
+
* @applitools/nml-client bumped to 1.8.18
|
|
47
|
+
|
|
48
|
+
* @applitools/ec-client bumped to 1.9.14
|
|
49
|
+
|
|
50
|
+
* @applitools/eyes bumped to 1.27.0
|
|
51
|
+
#### Features
|
|
52
|
+
|
|
53
|
+
* add an option to keep the navigation bar for android devices ([#2608](https://github.com/Applitools-Dev/sdk/issues/2608)) ([e7647e0](https://github.com/Applitools-Dev/sdk/commit/e7647e0105a7aa47e6bf3b20ab033f1e389ca849))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## [1.31.0](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright-v1.30.3...js/eyes-playwright@1.31.0) (2024-11-11)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### Features
|
|
62
|
+
|
|
63
|
+
* add playwright fixture ([#2412](https://github.com/Applitools-Dev/sdk/issues/2412)) ([0632e93](https://github.com/Applitools-Dev/sdk/commit/0632e93dd7f53029a8c5f4230d22a05abf5fefd4))
|
|
64
|
+
* handle retries on the custom html report for playwright ([#2597](https://github.com/Applitools-Dev/sdk/issues/2597)) ([0a93555](https://github.com/Applitools-Dev/sdk/commit/0a935551f5dc939352de700ca904c83f578a1113))
|
|
65
|
+
* html report for playwright ([#2576](https://github.com/Applitools-Dev/sdk/issues/2576)) ([f93f164](https://github.com/Applitools-Dev/sdk/commit/f93f164a289f5676bcc9d650e5e3d90b8e6a6920))
|
|
66
|
+
* offline execution ([#2528](https://github.com/Applitools-Dev/sdk/issues/2528)) ([e6c3b9e](https://github.com/Applitools-Dev/sdk/commit/e6c3b9e3315203027551da3bfdecf90490edd029))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Bug Fixes
|
|
70
|
+
|
|
71
|
+
* ignore browser config with classic ([#2620](https://github.com/Applitools-Dev/sdk/issues/2620)) ([6098078](https://github.com/Applitools-Dev/sdk/commit/6098078baea000bbad0f1b42edbfc5489ab4eaf2))
|
|
72
|
+
* playwright fixture feedback ([#2617](https://github.com/Applitools-Dev/sdk/issues/2617)) ([8440631](https://github.com/Applitools-Dev/sdk/commit/8440631280c9a0e79ea2d973656e4c6fd9fb6bc5))
|
|
73
|
+
* playwright fixture run-example cli ([7243c7a](https://github.com/Applitools-Dev/sdk/commit/7243c7a88673fda2df3536d9efd60d371c1ff835))
|
|
74
|
+
* trigger playwright release ([1d3ea3e](https://github.com/Applitools-Dev/sdk/commit/1d3ea3e4d2059c12d8013f04c18f5facffbc5846))
|
|
75
|
+
* trigger release ([c97dbfc](https://github.com/Applitools-Dev/sdk/commit/c97dbfc89245f374917702a867b87f2794155e54))
|
|
76
|
+
* trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
|
|
77
|
+
* tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### Code Refactoring
|
|
81
|
+
|
|
82
|
+
* start linting "no-floating-promises" (wip) ([#2539](https://github.com/Applitools-Dev/sdk/issues/2539)) ([51b91cb](https://github.com/Applitools-Dev/sdk/commit/51b91cb15603f7d68e4bd6a16eb0f80e3f380295))
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Dependencies
|
|
86
|
+
|
|
87
|
+
* @applitools/eyes bumped to 1.26.4
|
|
88
|
+
#### Bug Fixes
|
|
89
|
+
|
|
90
|
+
* organize configuration alphabetically and add getters and setters ([684490d](https://github.com/Applitools-Dev/sdk/commit/684490d8d85d1dd0f07bafdcc38febfcf7c58d08))
|
|
91
|
+
|
|
3
92
|
## [1.30.2](https://github.com/Applitools-Dev/sdk/compare/js/eyes-playwright@1.30.1...js/eyes-playwright@1.30.2) (2024-10-31)
|
|
4
93
|
|
|
5
94
|
|
package/README.md
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
<br/>
|
|
9
9
|
|
|
10
10
|
## Resources
|
|
11
|
-
- [Quick start](https://applitools.com/tutorials/
|
|
12
|
-
- [API reference](https://applitools.com/
|
|
11
|
+
- [Quick start](https://applitools.com/tutorials/playwright)
|
|
12
|
+
- [API reference](https://applitools.com/tutorials/playwright/api/overview)
|
package/dist/fixture/cli.js
CHANGED
|
@@ -153,7 +153,7 @@ async function init(args) {
|
|
|
153
153
|
log('');
|
|
154
154
|
log("👀 The Eyes HTML reporter extends Playwright's HTML reporter with improved side by side visual comparison");
|
|
155
155
|
log('');
|
|
156
|
-
log('Visit
|
|
156
|
+
log('Visit https://applitools.com/tutorials/playwright for more information.');
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
async function runExample() {
|
|
@@ -42,18 +42,17 @@ function addBatchDefaults({ configuration }) {
|
|
|
42
42
|
return batch;
|
|
43
43
|
}
|
|
44
44
|
function getFinalEyesConfiguration({ playwrightConfig = {}, projectConfig = {}, eyesConfig = {}, testInfo, }) {
|
|
45
|
-
var _a, _b, _c
|
|
45
|
+
var _a, _b, _c;
|
|
46
46
|
const configuration = {
|
|
47
47
|
...playwrightConfig,
|
|
48
48
|
...projectConfig,
|
|
49
49
|
...eyesConfig,
|
|
50
50
|
};
|
|
51
51
|
(_a = configuration.appName) !== null && _a !== void 0 ? _a : (configuration.appName = 'My App');
|
|
52
|
-
(_b = configuration.
|
|
53
|
-
(_c = configuration.testName) !== null && _c !== void 0 ? _c : (configuration.testName = testInfo.titlePath.join(' > '));
|
|
52
|
+
(_b = configuration.testName) !== null && _b !== void 0 ? _b : (configuration.testName = testInfo.titlePath.slice(1).join(' > '));
|
|
54
53
|
configuration.properties = addConfigurationProperties({ properties: configuration.properties, testInfo });
|
|
55
54
|
configuration.batch = addBatchDefaults({ configuration });
|
|
56
|
-
(
|
|
55
|
+
(_c = configuration.stitchMode) !== null && _c !== void 0 ? _c : (configuration.stitchMode = 'CSS');
|
|
57
56
|
configuration.forceFullPageScreenshot = true;
|
|
58
57
|
const displayName = typeof configuration.displayName === 'function' ? configuration.displayName(testInfo) : configuration.displayName;
|
|
59
58
|
const testName = typeof configuration.testName === 'function' ? configuration.testName(testInfo) : configuration.testName;
|
package/dist/fixture/getEyes.js
CHANGED
|
@@ -19,6 +19,10 @@ async function getEyes({ testInfo, eyesConfig, eyesRunner, page, }) {
|
|
|
19
19
|
eyesConfig,
|
|
20
20
|
testInfo,
|
|
21
21
|
});
|
|
22
|
+
// TODO remove this once bug in eyes/core is fixed. The bug is that when passing browsersInfo with classic runner, a test with viewport size 0x0 is created for each browser configuration. It should just be ignored.
|
|
23
|
+
if (eyesRunner.type === 'classic' && configuration.browsersInfo) {
|
|
24
|
+
delete configuration.browsersInfo;
|
|
25
|
+
}
|
|
22
26
|
const eyes = new index_1.Eyes(eyesRunner, {
|
|
23
27
|
// batches are closed automatically after some time, and closing batch from one process might make another process to open a new batch when it's not neccessary.
|
|
24
28
|
// therefore, we decides to set dontCloseBatches to true. If the user wants to see a notification after the batch is closed, we expect them to use our
|
|
@@ -33,12 +37,14 @@ async function getEyes({ testInfo, eyesConfig, eyesRunner, page, }) {
|
|
|
33
37
|
eyes.closeAsync = makeStep('eyes.closeAsync (without exception)', eyes.closeAsync.bind(eyes));
|
|
34
38
|
await eyes.open(page, configuration.appName, configuration.testName);
|
|
35
39
|
page.__eyes = eyes;
|
|
40
|
+
eyesRunner.isUsed = true;
|
|
36
41
|
return eyes;
|
|
37
42
|
}
|
|
38
43
|
exports.getEyes = getEyes;
|
|
39
44
|
function makeStep(title, f, { box } = { box: true }) {
|
|
40
45
|
return (async (...args) => {
|
|
41
|
-
|
|
46
|
+
const stepTitle = typeof args[0] === 'string' ? `${title} - ${args[0]}` : title;
|
|
47
|
+
return test_1.test.step(stepTitle, async () => {
|
|
42
48
|
return await f(...args);
|
|
43
49
|
}, { box });
|
|
44
50
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox='0 0 16 16' width='16' height='16'>
|
|
2
|
-
<title>link</title>
|
|
3
2
|
<path fillRule='evenodd' d='M10.604 1h4.146a.25.25 0 01.25.25v4.146a.25.25 0 01-.427.177L13.03 4.03 9.28 7.78a.75.75 0 01-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0110.604 1zM3.75 2A1.75 1.75 0 002 3.75v8.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 12.25v-3.5a.75.75 0 00-1.5 0v3.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h3.5a.75.75 0 000-1.5h-3.5z'></path>
|
|
4
3
|
</svg>
|
package/dist/fixture/index.js
CHANGED
|
@@ -40,7 +40,9 @@ exports.test = test_1.test.extend({
|
|
|
40
40
|
const eyesConfig = 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) {
|
|
44
|
+
output(`Waiting on eyes results for worker #${workerInfo.parallelIndex}-${workerInfo.workerIndex} - it might take a while`);
|
|
45
|
+
}
|
|
44
46
|
try {
|
|
45
47
|
await Promise.all((_a = runner === null || runner === void 0 ? void 0 : runner.fixturePromises) !== null && _a !== void 0 ? _a : []);
|
|
46
48
|
await runner.getAllTestResults(eyesConfig.failTestsOnDiff === 'afterAll').catch(err => {
|
|
@@ -51,9 +53,11 @@ exports.test = test_1.test.extend({
|
|
|
51
53
|
}
|
|
52
54
|
finally {
|
|
53
55
|
const results = await runner.getAllTestResults(false);
|
|
54
|
-
|
|
56
|
+
if (runner.isUsed) {
|
|
57
|
+
output(outputDigest(workerInfo, results));
|
|
58
|
+
}
|
|
55
59
|
if (eyesConfig.afterAll) {
|
|
56
|
-
eyesConfig.afterAll(results.getAllResults());
|
|
60
|
+
await eyesConfig.afterAll(results.getAllResults());
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
63
|
},
|