@applitools/eyes-storybook 3.36.0 → 3.37.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 +44 -0
- package/package.json +16 -26
- package/src/cli.js +1 -1
- package/src/eyesStorybook.js +5 -11
- package/src/initPage.js +1 -0
- package/src/pagePool.js +1 -0
- package/src/processResults.js +4 -4
- package/src/wrapBundle.js +1 -1
- package/src/yargsOptions.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,50 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
## [3.37.1](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes-storybook@3.37.0...js/eyes-storybook@3.37.1) (2023-07-18)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Performance Improvements
|
|
11
|
+
|
|
12
|
+
* improve runtime performance ([#1763](https://github.com/applitools/eyes.sdk.javascript1/issues/1763)) ([3efcc85](https://github.com/applitools/eyes.sdk.javascript1/commit/3efcc85df1d8ec09884bd6bae26758cc4d649f97))
|
|
13
|
+
|
|
14
|
+
## [3.37.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes-storybook@3.36.0...js/eyes-storybook@3.37.0) (2023-07-18)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* support retries on stuck requests ([#1773](https://github.com/applitools/eyes.sdk.javascript1/issues/1773)) ([4db470e](https://github.com/applitools/eyes.sdk.javascript1/commit/4db470ee6829c13cfaf7e521ef91e20854266edd))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* fix lint config and remove extranous deps ([aea605c](https://github.com/applitools/eyes.sdk.javascript1/commit/aea605c4a1d6cca37d84b464af369cdbff3c6234))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Dependencies
|
|
28
|
+
|
|
29
|
+
* @applitools/req bumped from 1.4.0 to 1.5.0
|
|
30
|
+
#### Features
|
|
31
|
+
|
|
32
|
+
* support retries on stuck requests ([be673bb](https://github.com/applitools/eyes.sdk.javascript1/commit/be673bb505c9b21d6aea37d86e88513e95e3cb02))
|
|
33
|
+
* @applitools/ufg-client bumped from 1.4.1 to 1.5.0
|
|
34
|
+
#### Features
|
|
35
|
+
|
|
36
|
+
* support retries on stuck requests ([be673bb](https://github.com/applitools/eyes.sdk.javascript1/commit/be673bb505c9b21d6aea37d86e88513e95e3cb02))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
* @applitools/core bumped to 3.6.2
|
|
41
|
+
|
|
42
|
+
* @applitools/core-base bumped from 1.4.0 to 1.4.1
|
|
43
|
+
|
|
44
|
+
* @applitools/ec-client bumped from 1.7.0 to 1.7.1
|
|
45
|
+
|
|
46
|
+
* @applitools/tunnel-client bumped from 1.1.0 to 1.1.1
|
|
47
|
+
|
|
48
|
+
* @applitools/nml-client bumped from 1.5.2 to 1.5.3
|
|
49
|
+
|
|
50
|
+
|
|
7
51
|
## [3.36.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes-storybook-v3.35.1...js/eyes-storybook@3.36.0) (2023-07-05)
|
|
8
52
|
|
|
9
53
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-storybook",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.37.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"scripts": {
|
|
28
|
-
"lint": "eslint '**/*.js'",
|
|
28
|
+
"lint": "run --top-level eslint '**/*.js'",
|
|
29
29
|
"build": "rollup -c rollup.config.js",
|
|
30
30
|
"build:heavy": "node scripts/bitmap.js",
|
|
31
31
|
"test": "yarn build && yarn test:mocha && yarn lint",
|
|
32
|
-
"test:mocha": "mocha --no-timeouts --trace-warnings 'test/{unit,it,e2e}/*.test.js'",
|
|
33
|
-
"test:unit": "mocha --no-timeouts --trace-warnings 'test/unit/*.test.js'",
|
|
34
|
-
"test:it": "mocha --no-timeouts --trace-warnings 'test/it/*.test.js'",
|
|
35
|
-
"test:versions": "yarn build && yarn test:e2e:versions && yarn lint",
|
|
36
|
-
"test:e2e": "mocha --no-timeouts --trace-warnings 'test/e2e/*.e2e.test.js'",
|
|
32
|
+
"test:mocha": "run --top-level mocha --no-timeouts --trace-warnings 'test/{unit,it,e2e}/*.test.js'",
|
|
33
|
+
"test:unit": "run --top-level mocha --no-timeouts --trace-warnings 'test/unit/*.test.js'",
|
|
34
|
+
"test:it": "run --top-level mocha --no-timeouts --trace-warnings 'test/it/*.test.js'",
|
|
35
|
+
"test:versions": "run --top-level yarn build && yarn test:e2e:versions && yarn lint",
|
|
36
|
+
"test:e2e": "run --top-level mocha --no-timeouts --trace-warnings 'test/e2e/*.e2e.test.js'",
|
|
37
37
|
"test:e2e:versions": "npx mocha --no-timeouts --trace-warnings --require test/fixtures/storybook-versions/mochaHooks.js test/versions/*.e2e.versions.test.js",
|
|
38
38
|
"test:e2e:versions_local": "APPLITOOLS_FRAMEWORK_VERSION=latest npx mocha --no-timeouts --trace-warnings --require test/fixtures/storybook-versions/mochaHooks.js test/versions/*.e2e.versions.test.js",
|
|
39
39
|
"test:heavy": "node bin/eyes-storybook.js -f test/fixtures/heavyStorybook/applitools.config.js",
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"postinstall": "node src/postinstall"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@applitools/core": "3.
|
|
61
|
-
"@applitools/driver": "1.13.
|
|
60
|
+
"@applitools/core": "^3.6.2",
|
|
61
|
+
"@applitools/driver": "^1.13.1",
|
|
62
62
|
"@applitools/functional-commons": "1.6.0",
|
|
63
|
-
"@applitools/logger": "2.0.5",
|
|
63
|
+
"@applitools/logger": "^2.0.5",
|
|
64
64
|
"@applitools/monitoring-commons": "1.0.19",
|
|
65
|
-
"@applitools/spec-driver-puppeteer": "1.1.
|
|
66
|
-
"@applitools/ufg-client": "1.
|
|
67
|
-
"@applitools/utils": "1.5.0",
|
|
65
|
+
"@applitools/spec-driver-puppeteer": "^1.1.69",
|
|
66
|
+
"@applitools/ufg-client": "^1.5.0",
|
|
67
|
+
"@applitools/utils": "^1.5.0",
|
|
68
68
|
"boxen": "4.2.0",
|
|
69
69
|
"chalk": "3.0.0",
|
|
70
70
|
"detect-port": "1.3.0",
|
|
@@ -74,34 +74,24 @@
|
|
|
74
74
|
"puppeteer": "19.8.0",
|
|
75
75
|
"strip-ansi": "6.0.0",
|
|
76
76
|
"throat": "6.0.1",
|
|
77
|
-
"yargs": "
|
|
77
|
+
"yargs": "17.7.2"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@applitools/bongo": "^
|
|
80
|
+
"@applitools/bongo": "^5.0.4",
|
|
81
81
|
"@applitools/sdk-shared": "0.9.15",
|
|
82
82
|
"@applitools/snaptdout": "^1.0.1",
|
|
83
83
|
"@applitools/test-server": "^1.2.2",
|
|
84
|
+
"@babel/eslint-parser": "^7.22.9",
|
|
84
85
|
"@storybook/addon-interactions": "^6.4.18",
|
|
85
86
|
"@storybook/react": "^6.4.18",
|
|
86
87
|
"@storybook/testing-library": "^0.0.9",
|
|
87
88
|
"@testing-library/dom": "^5.6.1",
|
|
88
|
-
"babel-core": "^6.26.3",
|
|
89
|
-
"babel-eslint": "^10.1.0",
|
|
90
|
-
"babel-loader": "^8.0.6",
|
|
91
|
-
"babel-preset-env": "^1.7.0",
|
|
92
|
-
"babel-preset-react": "^6.24.1",
|
|
93
89
|
"bitmap-manipulation": "^2.0.0",
|
|
94
90
|
"chai": "^4.2.0",
|
|
95
91
|
"core-js": "^3.6.1",
|
|
96
|
-
"eslint": "^6.6.0",
|
|
97
|
-
"eslint-plugin-mocha-no-only": "^1.1.0",
|
|
98
|
-
"eslint-plugin-node": "^10.0.0",
|
|
99
|
-
"eslint-plugin-prettier": "^3.1.1",
|
|
100
92
|
"express": "^4.17.1",
|
|
101
93
|
"filenamify": "^4.1.0",
|
|
102
|
-
"mocha": "^10.2.0",
|
|
103
94
|
"node-fetch": "^2.6.0",
|
|
104
|
-
"prettier": "^1.19.1",
|
|
105
95
|
"react": "^16.12.0",
|
|
106
96
|
"react-dom": "^16.12.0",
|
|
107
97
|
"rollup": "^1.28.0",
|
package/src/cli.js
CHANGED
|
@@ -18,7 +18,7 @@ const {presult} = require('@applitools/functional-commons');
|
|
|
18
18
|
const chalk = require('chalk');
|
|
19
19
|
const {performance, timeItAsync} = makeTiming();
|
|
20
20
|
|
|
21
|
-
(async function() {
|
|
21
|
+
(async function () {
|
|
22
22
|
try {
|
|
23
23
|
const argv = yargs
|
|
24
24
|
.usage('Usage: $0 [options]')
|
package/src/eyesStorybook.js
CHANGED
|
@@ -161,19 +161,12 @@ async function eyesStorybook({
|
|
|
161
161
|
try {
|
|
162
162
|
const stories = await getStoriesWithSpinner();
|
|
163
163
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
new Array(CONCURRENT_TABS).fill().map(async () => {
|
|
167
|
-
const {pageId} = await pagePool.createPage();
|
|
168
|
-
pagePool.addToPool(pageId);
|
|
169
|
-
}),
|
|
170
|
-
);
|
|
171
|
-
} else {
|
|
172
|
-
for (const _x of new Array(CONCURRENT_TABS).fill()) {
|
|
164
|
+
await Promise.all(
|
|
165
|
+
Array.from({length: CONCURRENT_TABS}, async () => {
|
|
173
166
|
const {pageId} = await pagePool.createPage();
|
|
174
167
|
pagePool.addToPool(pageId);
|
|
175
|
-
}
|
|
176
|
-
|
|
168
|
+
}),
|
|
169
|
+
);
|
|
177
170
|
|
|
178
171
|
const filteredStories = filterStories({stories, config});
|
|
179
172
|
const storiesIncludingVariations = addVariationStories({
|
|
@@ -258,6 +251,7 @@ async function eyesStorybook({
|
|
|
258
251
|
} finally {
|
|
259
252
|
logger.log('total time: ', performance['renderStories']);
|
|
260
253
|
logger.log('perf results', performance);
|
|
254
|
+
pagePool.isClosed = true;
|
|
261
255
|
await browser.close();
|
|
262
256
|
clearTimeout(memoryTimeout);
|
|
263
257
|
}
|
package/src/initPage.js
CHANGED
|
@@ -34,6 +34,7 @@ function makeInitPage({iframeUrl, config, browser, logger, getTransitiongIntoIE,
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
page.on('close', async () => {
|
|
37
|
+
if (pagePool.isClosed) return;
|
|
37
38
|
if (!getTransitiongIntoIE() && pagePool.isInPool(pageId)) {
|
|
38
39
|
logger.log(
|
|
39
40
|
`Puppeteer page closed [page ${pageId}] while still in page pool, creating a new one instead`,
|
package/src/pagePool.js
CHANGED
package/src/processResults.js
CHANGED
|
@@ -79,10 +79,10 @@ function processResults({
|
|
|
79
79
|
`\nA total of ${unresolved.length} difference${pluralize(unresolved, [
|
|
80
80
|
's were',
|
|
81
81
|
' was',
|
|
82
|
-
])} found and ${errors.length} stor${pluralize(errors, [
|
|
83
|
-
|
|
84
|
-
'
|
|
85
|
-
|
|
82
|
+
])} found and ${errors.length} stor${pluralize(errors, ['ies', 'y'])} failed for ${pluralize(
|
|
83
|
+
errors,
|
|
84
|
+
['', 'an '],
|
|
85
|
+
)}unexpected error${pluralize(errors)}.`,
|
|
86
86
|
);
|
|
87
87
|
} else if (warnForUnsavedNewTests) {
|
|
88
88
|
const countText =
|
package/src/wrapBundle.js
CHANGED
package/src/yargsOptions.js
CHANGED
|
@@ -54,7 +54,7 @@ module.exports = {
|
|
|
54
54
|
'A string that represents a story title or a regex (starts and ends with /) to match stories title',
|
|
55
55
|
requiresArg: false,
|
|
56
56
|
string: true,
|
|
57
|
-
coerce: function(arg) {
|
|
57
|
+
coerce: function (arg) {
|
|
58
58
|
if (arg.startsWith('/') && arg.endsWith('/')) {
|
|
59
59
|
// create a regex and remove slashes from the start and end of the input
|
|
60
60
|
return new RegExp(arg.substring(1, arg.length - 1));
|