@applitools/eyes-storybook 3.37.2 → 3.37.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 +126 -0
- package/package.json +10 -10
- package/src/eyesStorybook.js +30 -46
- package/src/generateConfig.js +1 -5
- package/src/renderStory.js +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,132 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
## [3.37.4](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes-storybook@3.37.3...js/eyes-storybook@3.37.4) (2023-07-21)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Dependencies
|
|
16
|
+
|
|
17
|
+
* @applitools/core bumped to 3.6.4
|
|
18
|
+
#### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
* @applitools/core-base bumped to 1.4.3
|
|
25
|
+
#### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
* @applitools/image bumped to 1.1.2
|
|
32
|
+
#### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
35
|
+
* @applitools/logger bumped to 2.0.7
|
|
36
|
+
#### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
39
|
+
* @applitools/req bumped to 1.5.2
|
|
40
|
+
#### Bug Fixes
|
|
41
|
+
|
|
42
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
43
|
+
* @applitools/driver bumped to 1.13.3
|
|
44
|
+
#### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
* @applitools/ec-client bumped to 1.7.3
|
|
51
|
+
#### Bug Fixes
|
|
52
|
+
|
|
53
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
* @applitools/socket bumped to 1.1.7
|
|
58
|
+
#### Bug Fixes
|
|
59
|
+
|
|
60
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
* @applitools/spec-driver-webdriver bumped to 1.0.40
|
|
65
|
+
#### Bug Fixes
|
|
66
|
+
|
|
67
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
* @applitools/tunnel-client bumped to 1.1.3
|
|
72
|
+
#### Bug Fixes
|
|
73
|
+
|
|
74
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
* @applitools/nml-client bumped to 1.5.5
|
|
79
|
+
#### Bug Fixes
|
|
80
|
+
|
|
81
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
* @applitools/spec-driver-webdriverio bumped to 1.5.9
|
|
86
|
+
#### Bug Fixes
|
|
87
|
+
|
|
88
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
* @applitools/screenshoter bumped to 3.8.6
|
|
93
|
+
#### Bug Fixes
|
|
94
|
+
|
|
95
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
* @applitools/ufg-client bumped to 1.5.2
|
|
100
|
+
#### Bug Fixes
|
|
101
|
+
|
|
102
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
* @applitools/spec-driver-puppeteer bumped to 1.1.71
|
|
107
|
+
#### Bug Fixes
|
|
108
|
+
|
|
109
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
* @applitools/spec-driver-selenium bumped to 1.5.54
|
|
114
|
+
#### Bug Fixes
|
|
115
|
+
|
|
116
|
+
* fix workspace dependencies ([2a3856f](https://github.com/applitools/eyes.sdk.javascript1/commit/2a3856f3ce3bcf1407f59c676653b6f218556760))
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
## [3.37.3](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes-storybook@3.37.2...js/eyes-storybook@3.37.3) (2023-07-21)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
### Code Refactoring
|
|
125
|
+
|
|
126
|
+
* ufg client ([#1780](https://github.com/applitools/eyes.sdk.javascript1/issues/1780)) ([d60cf16](https://github.com/applitools/eyes.sdk.javascript1/commit/d60cf1616741a96b152a1548760bb98116e5c3f9))
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
### Dependencies
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
7
133
|
## [3.37.2](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes-storybook@3.37.1...js/eyes-storybook@3.37.2) (2023-07-18)
|
|
8
134
|
|
|
9
135
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-storybook",
|
|
3
|
-
"version": "3.37.
|
|
3
|
+
"version": "3.37.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"lint": "run --top-level eslint '**/*.js'",
|
|
29
29
|
"build": "rollup -c rollup.config.js",
|
|
30
30
|
"build:heavy": "node scripts/bitmap.js",
|
|
31
|
-
"test": "yarn build && yarn test:mocha
|
|
31
|
+
"test": "yarn build && yarn test:mocha",
|
|
32
32
|
"test:mocha": "run --top-level mocha --no-timeouts --trace-warnings 'test/{unit,it,e2e}/*.test.js'",
|
|
33
33
|
"test:unit": "run --top-level mocha --no-timeouts --trace-warnings 'test/unit/*.test.js'",
|
|
34
34
|
"test:it": "run --top-level mocha --no-timeouts --trace-warnings 'test/it/*.test.js'",
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"postinstall": "node src/postinstall"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@applitools/core": "
|
|
61
|
-
"@applitools/driver": "
|
|
60
|
+
"@applitools/core": "3.6.4",
|
|
61
|
+
"@applitools/driver": "1.13.3",
|
|
62
62
|
"@applitools/functional-commons": "1.6.0",
|
|
63
|
-
"@applitools/logger": "
|
|
63
|
+
"@applitools/logger": "2.0.7",
|
|
64
64
|
"@applitools/monitoring-commons": "1.0.19",
|
|
65
|
-
"@applitools/spec-driver-puppeteer": "
|
|
66
|
-
"@applitools/ufg-client": "
|
|
67
|
-
"@applitools/utils": "
|
|
65
|
+
"@applitools/spec-driver-puppeteer": "1.1.71",
|
|
66
|
+
"@applitools/ufg-client": "1.5.2",
|
|
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",
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
"ora": "3.4.0",
|
|
74
74
|
"puppeteer": "20.8.3",
|
|
75
75
|
"strip-ansi": "6.0.0",
|
|
76
|
-
"throat": "6.0.
|
|
76
|
+
"throat": "6.0.2",
|
|
77
77
|
"yargs": "17.7.2"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@applitools/bongo": "^5.
|
|
80
|
+
"@applitools/bongo": "^5.1.5",
|
|
81
81
|
"@applitools/sdk-shared": "0.9.15",
|
|
82
82
|
"@applitools/snaptdout": "^1.0.1",
|
|
83
83
|
"@applitools/test-server": "^1.2.2",
|
package/src/eyesStorybook.js
CHANGED
|
@@ -47,14 +47,7 @@ async function eyesStorybook({
|
|
|
47
47
|
: Number(process.env.APPLITOOLS_CONCURRENT_TABS);
|
|
48
48
|
logger.log(`Running with ${CONCURRENT_TABS} concurrent tabs`);
|
|
49
49
|
|
|
50
|
-
const {
|
|
51
|
-
storybookUrl,
|
|
52
|
-
readStoriesTimeout,
|
|
53
|
-
reloadPagePerStory,
|
|
54
|
-
proxy,
|
|
55
|
-
testConcurrency,
|
|
56
|
-
useDnsCache,
|
|
57
|
-
} = config;
|
|
50
|
+
const {storybookUrl, readStoriesTimeout, reloadPagePerStory} = config;
|
|
58
51
|
|
|
59
52
|
let iframeUrl;
|
|
60
53
|
try {
|
|
@@ -75,40 +68,33 @@ async function eyesStorybook({
|
|
|
75
68
|
const core = await makeCore({spec, agentId, logger});
|
|
76
69
|
const manager = await core.makeManager({
|
|
77
70
|
type: 'ufg',
|
|
78
|
-
settings: {
|
|
79
|
-
concurrency: testConcurrency,
|
|
80
|
-
},
|
|
81
|
-
logger,
|
|
71
|
+
settings: {concurrency: config.testConcurrency},
|
|
82
72
|
});
|
|
83
73
|
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
74
|
+
const account = await core
|
|
75
|
+
.getAccountInfo({
|
|
76
|
+
settings: {
|
|
77
|
+
eyesServerUrl: config.eyesServerUrl,
|
|
78
|
+
apiKey: config.apiKey,
|
|
79
|
+
agentId,
|
|
80
|
+
proxy: config.proxy,
|
|
81
|
+
useDnsCache: config.useDnsCache,
|
|
82
|
+
},
|
|
83
|
+
})
|
|
84
|
+
.catch(async error => {
|
|
85
|
+
if (error && error.message && error.message.includes('Unauthorized(401)')) {
|
|
86
|
+
const failMsg = 'Incorrect API Key';
|
|
87
|
+
logger.log(failMsg);
|
|
88
|
+
await browser.close();
|
|
89
|
+
clearTimeout(memoryTimeout);
|
|
90
|
+
throw new Error(failMsg);
|
|
91
|
+
} else {
|
|
92
|
+
throw error;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
92
95
|
|
|
93
96
|
const getStoriesWithConfig = makeGetStoriesWithConfig({config});
|
|
94
|
-
|
|
95
|
-
if (error && error.message && error.message.includes('Unauthorized(401)')) {
|
|
96
|
-
const failMsg = 'Incorrect API Key';
|
|
97
|
-
logger.log(failMsg);
|
|
98
|
-
await browser.close();
|
|
99
|
-
clearTimeout(memoryTimeout);
|
|
100
|
-
throw new Error(failMsg);
|
|
101
|
-
}
|
|
102
|
-
const client = await makeUFGClient({
|
|
103
|
-
config: {
|
|
104
|
-
...account.ufgServer,
|
|
105
|
-
...account,
|
|
106
|
-
proxy,
|
|
107
|
-
concurrency: testConcurrency,
|
|
108
|
-
useDnsCache,
|
|
109
|
-
},
|
|
110
|
-
logger,
|
|
111
|
-
});
|
|
97
|
+
const client = await makeUFGClient({settings: {...account.ufgServer, ...account}, logger});
|
|
112
98
|
|
|
113
99
|
const initPage = makeInitPage({
|
|
114
100
|
iframeUrl,
|
|
@@ -191,11 +177,6 @@ async function eyesStorybook({
|
|
|
191
177
|
logger,
|
|
192
178
|
takeDomSnapshots: doTakeDomSnapshots,
|
|
193
179
|
});
|
|
194
|
-
const closeSettings = {
|
|
195
|
-
...settings,
|
|
196
|
-
updateBaselineIfNew: config.saveNewTests,
|
|
197
|
-
updateBaselineIfDifferent: config.saveFailedTests,
|
|
198
|
-
};
|
|
199
180
|
const renderStory = makeRenderStory({
|
|
200
181
|
logger: logger.extend({label: 'renderStory'}),
|
|
201
182
|
openEyes: manager.openEyes,
|
|
@@ -203,10 +184,13 @@ async function eyesStorybook({
|
|
|
203
184
|
timeItAsync,
|
|
204
185
|
reloadPagePerStory,
|
|
205
186
|
storyDataGap: config.storyDataGap,
|
|
206
|
-
concurrency: testConcurrency,
|
|
187
|
+
concurrency: config.testConcurrency,
|
|
207
188
|
appName: config.appName,
|
|
208
|
-
closeSettings
|
|
209
|
-
|
|
189
|
+
closeSettings: {
|
|
190
|
+
updateBaselineIfNew: config.saveNewTests,
|
|
191
|
+
updateBaselineIfDifferent: config.saveFailedTests,
|
|
192
|
+
},
|
|
193
|
+
serverSettings: account.eyesServer,
|
|
210
194
|
});
|
|
211
195
|
|
|
212
196
|
const renderStories = makeRenderStories({
|
package/src/generateConfig.js
CHANGED
|
@@ -50,11 +50,7 @@ function generateConfig({argv = {}, defaultConfig = {}, externalConfigParams = [
|
|
|
50
50
|
? result.concurrency * 5
|
|
51
51
|
: 5;
|
|
52
52
|
|
|
53
|
-
result.
|
|
54
|
-
? result.serverUrl
|
|
55
|
-
: utils.general.getEnvValue('SERVER_URL')
|
|
56
|
-
? utils.general.getEnvValue('SERVER_URL')
|
|
57
|
-
: 'https://eyesapi.applitools.com';
|
|
53
|
+
result.eyesServerUrl = result.serverUrl;
|
|
58
54
|
|
|
59
55
|
result.viewportSize = result.viewportSize ? result.viewportSize : {width: 1024, height: 600};
|
|
60
56
|
|
package/src/renderStory.js
CHANGED
|
@@ -125,17 +125,18 @@ function makeRenderStory({
|
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
return timeItAsync(baselineName, async () => {
|
|
128
|
-
const
|
|
128
|
+
const eyes = await openEyes({settings: openParams});
|
|
129
129
|
return new Promise((resolve, reject) => {
|
|
130
130
|
throttle(async () => {
|
|
131
131
|
try {
|
|
132
|
-
|
|
133
|
-
settings: {...checkParams, ...closeSettings, throwEx: false},
|
|
132
|
+
await eyes.checkAndClose({
|
|
134
133
|
target: snapshots,
|
|
134
|
+
settings: {...checkParams, ...closeSettings},
|
|
135
135
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
const results = await eyes.getResults();
|
|
137
|
+
resolve(results);
|
|
138
|
+
} catch (err) {
|
|
139
|
+
reject(err);
|
|
139
140
|
}
|
|
140
141
|
});
|
|
141
142
|
});
|