@applitools/eyes-storybook 3.32.1 → 3.33.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 +13 -0
- package/package.json +8 -8
- package/src/eyesStorybook.js +11 -9
- package/src/getStoryData.js +9 -2
- package/src/renderStories.js +2 -1
- package/src/utils/prepare-settings.js +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
## 3.33.1 - 2023/4/26
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
### Bug fixes
|
|
10
|
+
- Make sure to pass LayoutBreakpoints and WaitBeforeCapture from story config to dom snapshot
|
|
11
|
+
- Map UFG config correctly
|
|
12
|
+
|
|
13
|
+
## 3.33.0 - 2023/4/26
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
### Bug fixes
|
|
17
|
+
- Fixed `disableBrowserFetching` option behavior
|
|
18
|
+
|
|
6
19
|
## 3.32.1 - 2023/4/16
|
|
7
20
|
|
|
8
21
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-storybook",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.33.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@applitools/core": "2.
|
|
77
|
-
"@applitools/driver": "1.11.
|
|
76
|
+
"@applitools/core": "2.5.5",
|
|
77
|
+
"@applitools/driver": "1.11.46",
|
|
78
78
|
"@applitools/functional-commons": "1.6.0",
|
|
79
|
-
"@applitools/logger": "1.1.
|
|
79
|
+
"@applitools/logger": "1.1.52",
|
|
80
80
|
"@applitools/monitoring-commons": "1.0.19",
|
|
81
|
-
"@applitools/spec-driver-puppeteer": "1.1.
|
|
82
|
-
"@applitools/test-server": "1.1.
|
|
83
|
-
"@applitools/ufg-client": "1.2.
|
|
84
|
-
"@applitools/utils": "1.3.
|
|
81
|
+
"@applitools/spec-driver-puppeteer": "1.1.57",
|
|
82
|
+
"@applitools/test-server": "1.1.31",
|
|
83
|
+
"@applitools/ufg-client": "1.2.11",
|
|
84
|
+
"@applitools/utils": "1.3.35",
|
|
85
85
|
"boxen": "4.2.0",
|
|
86
86
|
"chalk": "3.0.0",
|
|
87
87
|
"detect-port": "1.3.0",
|
package/src/eyesStorybook.js
CHANGED
|
@@ -16,6 +16,7 @@ const getIframeUrl = require('./getIframeUrl');
|
|
|
16
16
|
const createPagePool = require('./pagePool');
|
|
17
17
|
const getClientAPI = require('../dist/getClientAPI');
|
|
18
18
|
const {takeDomSnapshots} = require('@applitools/core');
|
|
19
|
+
const {prepareTakeDomSnapshotsSettings} = require('./utils/prepare-settings');
|
|
19
20
|
const {Driver} = require('@applitools/driver');
|
|
20
21
|
const spec = require('@applitools/spec-driver-puppeteer');
|
|
21
22
|
const {refineErrorMessage} = require('./errMessages');
|
|
@@ -93,7 +94,7 @@ async function eyesStorybook({
|
|
|
93
94
|
}
|
|
94
95
|
const client = await makeUFGClient({
|
|
95
96
|
config: {
|
|
96
|
-
...account.
|
|
97
|
+
...account.ufgServer,
|
|
97
98
|
...account,
|
|
98
99
|
proxy,
|
|
99
100
|
concurrency: testConcurrency,
|
|
@@ -117,14 +118,15 @@ async function eyesStorybook({
|
|
|
117
118
|
const result = await takeDomSnapshots({
|
|
118
119
|
logger,
|
|
119
120
|
driver,
|
|
120
|
-
settings: {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
121
|
+
settings: prepareTakeDomSnapshotsSettings({
|
|
122
|
+
config,
|
|
123
|
+
options: {
|
|
124
|
+
layoutBreakpoints,
|
|
125
|
+
renderers,
|
|
126
|
+
waitBeforeCapture,
|
|
127
|
+
skipResources,
|
|
128
|
+
},
|
|
129
|
+
}),
|
|
128
130
|
provides: {
|
|
129
131
|
getChromeEmulationDevices: client.getChromeEmulationDevices,
|
|
130
132
|
getIOSDevices: client.getIOSDevices,
|
package/src/getStoryData.js
CHANGED
|
@@ -11,7 +11,14 @@ const DOM_SNAPSHOTS_TIMEOUT = 5 * 60 * 1000;
|
|
|
11
11
|
const utils = require('@applitools/utils');
|
|
12
12
|
|
|
13
13
|
function makeGetStoryData({logger, takeDomSnapshots, waitBeforeCapture, reloadPagePerStory}) {
|
|
14
|
-
return async function getStoryData({
|
|
14
|
+
return async function getStoryData({
|
|
15
|
+
story,
|
|
16
|
+
storyUrl,
|
|
17
|
+
page,
|
|
18
|
+
renderers,
|
|
19
|
+
waitBeforeStory,
|
|
20
|
+
layoutBreakpoints,
|
|
21
|
+
}) {
|
|
15
22
|
const title = getStoryBaselineName(story);
|
|
16
23
|
logger.log(`getting data from story`, title);
|
|
17
24
|
|
|
@@ -58,7 +65,7 @@ function makeGetStoryData({logger, takeDomSnapshots, waitBeforeCapture, reloadPa
|
|
|
58
65
|
const domSnapshotsPromise = takeDomSnapshots({
|
|
59
66
|
page,
|
|
60
67
|
renderers,
|
|
61
|
-
layoutBreakpoints: eyesParameters ? eyesParameters.layoutBreakpoints :
|
|
68
|
+
layoutBreakpoints: eyesParameters ? eyesParameters.layoutBreakpoints : layoutBreakpoints,
|
|
62
69
|
waitBeforeCapture: wait
|
|
63
70
|
? async () => {
|
|
64
71
|
logger.log(`waiting before screenshot of ${title} ${wait}`);
|
package/src/renderStories.js
CHANGED
|
@@ -67,7 +67,8 @@ function makeRenderStories({
|
|
|
67
67
|
storyUrl,
|
|
68
68
|
renderers: story.config.renderers,
|
|
69
69
|
page,
|
|
70
|
-
|
|
70
|
+
layoutBreakpoints: story.config.layoutBreakpoints,
|
|
71
|
+
waitBeforeStory: waitBeforeCapture || story.config.waitBeforeCapture,
|
|
71
72
|
}),
|
|
72
73
|
);
|
|
73
74
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function prepareTakeDomSnapshotsSettings({config, options}) {
|
|
2
|
+
let result = {...options};
|
|
3
|
+
result.layoutBreakpoints =
|
|
4
|
+
result.layoutBreakpoints !== undefined ? result.layoutBreakpoints : config.layoutBreakpoints;
|
|
5
|
+
result.disableBrowserFetching = config.disableBrowserFetching;
|
|
6
|
+
return result;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
module.exports = {
|
|
10
|
+
prepareTakeDomSnapshotsSettings,
|
|
11
|
+
};
|