@applitools/eyes-storybook 3.31.4 → 3.31.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 +7 -0
- package/package.json +4 -4
- package/src/cli.js +4 -4
- package/src/handleJsonFile.js +3 -2
- package/src/handleTapFile.js +9 -2
- package/src/handleXmlFile.js +3 -2
- package/src/processResults.js +2 -4
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-storybook",
|
|
3
|
-
"version": "3.31.
|
|
3
|
+
"version": "3.31.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -73,14 +73,14 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@applitools/core": "2.4.
|
|
76
|
+
"@applitools/core": "2.4.3",
|
|
77
77
|
"@applitools/driver": "1.11.37",
|
|
78
78
|
"@applitools/functional-commons": "1.6.0",
|
|
79
79
|
"@applitools/logger": "1.1.48",
|
|
80
80
|
"@applitools/monitoring-commons": "1.0.19",
|
|
81
81
|
"@applitools/spec-driver-puppeteer": "1.1.49",
|
|
82
82
|
"@applitools/test-server": "1.1.28",
|
|
83
|
-
"@applitools/ufg-client": "1.2.
|
|
83
|
+
"@applitools/ufg-client": "1.2.4",
|
|
84
84
|
"@applitools/utils": "1.3.32",
|
|
85
85
|
"boxen": "4.2.0",
|
|
86
86
|
"chalk": "3.0.0",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"yargs": "15.4.1"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@applitools/bongo": "^3.0.
|
|
97
|
+
"@applitools/bongo": "^3.0.3",
|
|
98
98
|
"@applitools/sdk-shared": "0.9.15",
|
|
99
99
|
"@applitools/snaptdout": "^1.0.1",
|
|
100
100
|
"@storybook/addon-interactions": "^6.4.18",
|
package/src/cli.js
CHANGED
|
@@ -42,7 +42,7 @@ const {performance, timeItAsync} = makeTiming();
|
|
|
42
42
|
process.exit(config.exitcode ? config.exitcode : 0);
|
|
43
43
|
} else {
|
|
44
44
|
const totalTime = performance['eyesStorybook'];
|
|
45
|
-
const {exitCode,
|
|
45
|
+
const {exitCode, summary, outputStr} = processResults({
|
|
46
46
|
results,
|
|
47
47
|
totalTime,
|
|
48
48
|
testConcurrency: config.testConcurrency,
|
|
@@ -50,13 +50,13 @@ const {performance, timeItAsync} = makeTiming();
|
|
|
50
50
|
});
|
|
51
51
|
console.log(outputStr);
|
|
52
52
|
if (config.jsonFilePath) {
|
|
53
|
-
handleJsonFile(config.jsonFilePath,
|
|
53
|
+
handleJsonFile(config.jsonFilePath, summary);
|
|
54
54
|
}
|
|
55
55
|
if (config.tapFilePath) {
|
|
56
|
-
handleTapFile(config.tapFilePath,
|
|
56
|
+
handleTapFile(config.tapFilePath, summary);
|
|
57
57
|
}
|
|
58
58
|
if (config.xmlFilePath) {
|
|
59
|
-
handleXmlFile(config.xmlFilePath,
|
|
59
|
+
handleXmlFile(config.xmlFilePath, summary, {totalTime});
|
|
60
60
|
}
|
|
61
61
|
process.exit(config.exitcode ? exitCode : 0);
|
|
62
62
|
}
|
package/src/handleJsonFile.js
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const {resolve} = require('path');
|
|
5
|
+
const {formatters} = require('@applitools/core');
|
|
5
6
|
|
|
6
|
-
function handleJsonFile(jsonFilePath,
|
|
7
|
+
function handleJsonFile(jsonFilePath, summary) {
|
|
7
8
|
const path = resolve(jsonFilePath, 'eyes.json');
|
|
8
|
-
fs.writeFileSync(path,
|
|
9
|
+
fs.writeFileSync(path, formatters.toJsonOutput(summary));
|
|
9
10
|
return path;
|
|
10
11
|
}
|
|
11
12
|
|
package/src/handleTapFile.js
CHANGED
|
@@ -2,10 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const {resolve} = require('path');
|
|
5
|
+
const {formatters} = require('@applitools/core');
|
|
5
6
|
|
|
6
|
-
function handleTapFile(tapFilePath,
|
|
7
|
+
function handleTapFile(tapFilePath, summary) {
|
|
7
8
|
const path = resolve(tapFilePath, 'eyes.tap');
|
|
8
|
-
fs.writeFileSync(
|
|
9
|
+
fs.writeFileSync(
|
|
10
|
+
path,
|
|
11
|
+
formatters.toHierarchicTAPString(summary.results, {
|
|
12
|
+
includeSubTests: false,
|
|
13
|
+
markNewAsPassed: true,
|
|
14
|
+
}),
|
|
15
|
+
);
|
|
9
16
|
return path;
|
|
10
17
|
}
|
|
11
18
|
|
package/src/handleXmlFile.js
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const {resolve} = require('path');
|
|
5
|
+
const {formatters} = require('@applitools/core');
|
|
5
6
|
|
|
6
|
-
function handleXmlFile(xmlFilePath,
|
|
7
|
+
function handleXmlFile(xmlFilePath, summary, {suiteName = 'Eyes Storybook', totalTime} = {}) {
|
|
7
8
|
const path = resolve(xmlFilePath, 'eyes.xml');
|
|
8
|
-
fs.writeFileSync(path,
|
|
9
|
+
fs.writeFileSync(path, formatters.toXmlOutput(summary.results, {suiteName, totalTime}));
|
|
9
10
|
return path;
|
|
10
11
|
}
|
|
11
12
|
|
package/src/processResults.js
CHANGED
|
@@ -4,9 +4,8 @@ const chalk = require('chalk');
|
|
|
4
4
|
const utils = require('@applitools/utils');
|
|
5
5
|
const uniq = require('./uniq');
|
|
6
6
|
const concurrencyMsg = require('./concurrencyMsg');
|
|
7
|
-
const {formatters} = require('@applitools/core');
|
|
8
7
|
|
|
9
|
-
function processResults({results
|
|
8
|
+
function processResults({results, totalTime, testConcurrency, saveNewTests = true}) {
|
|
10
9
|
let outputStr = '\n';
|
|
11
10
|
const pluralize = utils.general.pluralize;
|
|
12
11
|
let testResults = flatten(results.summary.results);
|
|
@@ -102,12 +101,11 @@ function processResults({results = [], totalTime, testConcurrency, saveNewTests
|
|
|
102
101
|
// TODO require from core
|
|
103
102
|
outputStr += `\n${concurrencyMsg}\n`;
|
|
104
103
|
}
|
|
105
|
-
const formatter = formatters.toJsonOutput(results.summary);
|
|
106
104
|
const exitCode =
|
|
107
105
|
!warnForUnsavedNewTests && passedOrNew.length && !errors.length && !unresolved.length ? 0 : 1;
|
|
108
106
|
return {
|
|
109
107
|
outputStr,
|
|
110
|
-
|
|
108
|
+
summary: results.summary,
|
|
111
109
|
exitCode,
|
|
112
110
|
};
|
|
113
111
|
}
|