@applitools/eyes-storybook 3.29.0 → 3.29.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 +11 -0
- package/README.md +2 -2
- package/package.json +12 -9
- package/src/getStoryData.js +17 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
## 3.29.1 - 2022/6/16
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
- Allowed `` values in custom properties
|
|
10
|
+
- Add special attribute for pseudo elements
|
|
11
|
+
- Support padding for regions in the following region types - ignoreRegions, layoutRegions, strictRegions, contentRegions
|
|
12
|
+
### Bug fixes
|
|
13
|
+
- Fixed broken links to enums implementation in the README.md
|
|
14
|
+
- Fix rendering issues with Salesforce Lightning design system
|
|
15
|
+
- Add timeout when attempting to get data for a story
|
|
16
|
+
|
|
6
17
|
## 3.29.0 - 2022/6/2
|
|
7
18
|
|
|
8
19
|
### Features
|
package/README.md
CHANGED
|
@@ -293,7 +293,7 @@ module.exports = {
|
|
|
293
293
|
|
|
294
294
|
Possible values for screen orientation are `landscape` and `portrait`, and if no value is specified, the default is `portrait`.
|
|
295
295
|
|
|
296
|
-
The list of device names is available at https://github.com/applitools/eyes.sdk.javascript1/blob/master/packages/eyes-
|
|
296
|
+
The list of device names is available at https://github.com/applitools/eyes.sdk.javascript1/blob/master/packages/eyes-api/src/enums/DeviceName.ts
|
|
297
297
|
|
|
298
298
|
In addition, it's possible to use chrome's device emulation with custom viewport sizes, pixel density and mobile mode, by passing `deviceScaleFactor` and `mobile` in addition to `width` and `height`. For example:
|
|
299
299
|
|
|
@@ -323,7 +323,7 @@ module.exports = {
|
|
|
323
323
|
}
|
|
324
324
|
```
|
|
325
325
|
|
|
326
|
-
The list of devices is available at https://github.com/applitools/eyes.sdk.javascript1/blob/master/packages/eyes-
|
|
326
|
+
The list of devices is available at https://github.com/applitools/eyes.sdk.javascript1/blob/master/packages/eyes-api/src/enums/IosDeviceName.ts
|
|
327
327
|
|
|
328
328
|
Possible values for `iosVersion` are:
|
|
329
329
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-storybook",
|
|
3
|
-
"version": "3.29.
|
|
3
|
+
"version": "3.29.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "SEE LICENSE IN LICENSE",
|
|
20
20
|
"author": "Applitools Team <team@applitools.com>",
|
|
21
|
+
"aliases": [
|
|
22
|
+
"storybook"
|
|
23
|
+
],
|
|
21
24
|
"bin": {
|
|
22
25
|
"eyes-storybook": "./bin/eyes-storybook.js"
|
|
23
26
|
},
|
|
@@ -66,15 +69,15 @@
|
|
|
66
69
|
}
|
|
67
70
|
},
|
|
68
71
|
"dependencies": {
|
|
69
|
-
"@applitools/driver": "1.
|
|
70
|
-
"@applitools/eyes-sdk-core": "13.
|
|
72
|
+
"@applitools/driver": "1.9.3",
|
|
73
|
+
"@applitools/eyes-sdk-core": "13.8.1",
|
|
71
74
|
"@applitools/functional-commons": "1.6.0",
|
|
72
|
-
"@applitools/logger": "1.1.
|
|
75
|
+
"@applitools/logger": "1.1.11",
|
|
73
76
|
"@applitools/monitoring-commons": "1.0.19",
|
|
74
|
-
"@applitools/spec-driver-puppeteer": "1.1.
|
|
75
|
-
"@applitools/test-server": "1.0.
|
|
76
|
-
"@applitools/utils": "1.3.
|
|
77
|
-
"@applitools/visual-grid-client": "15.12.
|
|
77
|
+
"@applitools/spec-driver-puppeteer": "1.1.5",
|
|
78
|
+
"@applitools/test-server": "1.0.11",
|
|
79
|
+
"@applitools/utils": "1.3.7",
|
|
80
|
+
"@applitools/visual-grid-client": "15.12.44",
|
|
78
81
|
"boxen": "4.2.0",
|
|
79
82
|
"chalk": "3.0.0",
|
|
80
83
|
"detect-port": "1.3.0",
|
|
@@ -86,7 +89,7 @@
|
|
|
86
89
|
"yargs": "15.4.1"
|
|
87
90
|
},
|
|
88
91
|
"devDependencies": {
|
|
89
|
-
"@applitools/bongo": "^2.1.
|
|
92
|
+
"@applitools/bongo": "^2.1.5",
|
|
90
93
|
"@applitools/scripts": "^1.1.0",
|
|
91
94
|
"@applitools/sdk-shared": "0.9.11",
|
|
92
95
|
"@applitools/snaptdout": "^1.0.1",
|
package/src/getStoryData.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
const {presult} = require('@applitools/functional-commons');
|
|
2
|
+
const {presult, ptimeoutWithError} = require('@applitools/functional-commons');
|
|
3
3
|
const {ArgumentGuard} = require('@applitools/eyes-sdk-core');
|
|
4
4
|
const renderStoryWithClientAPI = require('../dist/renderStoryWithClientAPI');
|
|
5
5
|
const runRunBeforeScript = require('../dist/runRunBeforeScript');
|
|
@@ -7,6 +7,7 @@ const getStoryBaselineName = require('./getStoryBaselineName');
|
|
|
7
7
|
const {URL} = require('url');
|
|
8
8
|
const runRunAfterScript = require('../dist/runRunAfterScript');
|
|
9
9
|
const waitFor = require('./waitFor');
|
|
10
|
+
const PAGE_EVALUATE_TIMEOUT = 120000;
|
|
10
11
|
|
|
11
12
|
function makeGetStoryData({logger, takeDomSnapshots, waitBeforeCapture, reloadPagePerStory}) {
|
|
12
13
|
return async function getStoryData({story, storyUrl, page, browser, waitBeforeStory}) {
|
|
@@ -18,8 +19,21 @@ function makeGetStoryData({logger, takeDomSnapshots, waitBeforeCapture, reloadPa
|
|
|
18
19
|
const currentUrl = page.url();
|
|
19
20
|
const expectedQueryParams = eyesParameters ? eyesParameters.queryParams : undefined;
|
|
20
21
|
if (urlQueryParamsEquals(currentUrl, expectedQueryParams)) {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
try {
|
|
23
|
+
const err = await ptimeoutWithError(
|
|
24
|
+
page.evaluate(renderStoryWithClientAPI, story.index),
|
|
25
|
+
PAGE_EVALUATE_TIMEOUT,
|
|
26
|
+
'page evaluate timed out!',
|
|
27
|
+
);
|
|
28
|
+
logger.log(`[story data] done with page evaluate for story index: ${story.index}`);
|
|
29
|
+
err && handleRenderStoryError(err);
|
|
30
|
+
} catch (ex) {
|
|
31
|
+
if (!ex.message.includes('Eyes could not render stories properly'))
|
|
32
|
+
handleRenderStoryError(ex);
|
|
33
|
+
else {
|
|
34
|
+
throw ex;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
23
37
|
} else {
|
|
24
38
|
await renderStoryLegacy();
|
|
25
39
|
}
|