@applitools/eyes-storybook 3.29.0 → 3.29.3

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 CHANGED
@@ -3,6 +3,31 @@
3
3
  ## Unreleased
4
4
 
5
5
 
6
+ ## 3.29.3 - 2022/8/18
7
+
8
+ ### Features
9
+ ### Bug fixes
10
+ - Better support in DOM slot element
11
+ - fix error handling
12
+
13
+ ## 3.29.2 - 2022/7/14
14
+
15
+ ### Features
16
+ - Allow configuration file to be loaded from ancestor directories
17
+ ### Bug fixes
18
+ - Fixed bug where a failure in a single UFG environment fails all other environments in the same configuration
19
+
20
+ ## 3.29.1 - 2022/6/16
21
+
22
+ ### Features
23
+ - Allowed `` values in custom properties
24
+ - Add special attribute for pseudo elements
25
+ - Support padding for regions in the following region types - ignoreRegions, layoutRegions, strictRegions, contentRegions
26
+ ### Bug fixes
27
+ - Fixed broken links to enums implementation in the README.md
28
+ - Fix rendering issues with Salesforce Lightning design system
29
+ - Add timeout when attempting to get data for a story
30
+
6
31
  ## 3.29.0 - 2022/6/2
7
32
 
8
33
  ### 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-sdk-core/lib/config/DeviceName.js
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-sdk-core/lib/config/IosDeviceName.js
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.0",
3
+ "version": "3.29.3",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "applitools",
@@ -14,10 +14,13 @@
14
14
  "repository": {
15
15
  "type": "git",
16
16
  "url": "git://github.com/applitools/eyes.sdk.javascript1.git",
17
- "directory": "packages/eyes-storybook"
17
+ "directory": "js/packages/eyes-storybook"
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
  },
@@ -31,10 +34,11 @@
31
34
  "build": "rollup -c rollup.config.js",
32
35
  "build:heavy": "node scripts/bitmap.js",
33
36
  "test": "yarn build && yarn test:mocha && yarn lint",
34
- "test:versions": "yarn build && yarn test:e2e:versions && yarn lint",
37
+ "test:sanity": "yarn test:unit && yarn test:it",
35
38
  "test:mocha": "yarn test:unit && yarn test:it && yarn test:e2e",
36
39
  "test:unit": "mocha --no-timeouts --trace-warnings 'test/unit/*.test.js'",
37
40
  "test:it": "mocha --no-timeouts --trace-warnings 'test/it/*.test.js'",
41
+ "test:versions": "yarn build && yarn test:e2e:versions && yarn lint",
38
42
  "test:e2e": "mocha --no-timeouts --trace-warnings 'test/e2e/*.e2e.test.js'",
39
43
  "test:e2e:versions": "npx mocha --no-timeouts --trace-warnings --require test/fixtures/storybook-versions/mochaHooks.js test/e2e/*.e2e.versions.test.js",
40
44
  "test:e2e:versions_local": "STORYBOOK_VERSION=latest npx mocha --no-timeouts --trace-warnings --require test/fixtures/storybook-versions/mochaHooks.js test/e2e/*.e2e.versions.test.js",
@@ -66,15 +70,15 @@
66
70
  }
67
71
  },
68
72
  "dependencies": {
69
- "@applitools/driver": "1.8.15",
70
- "@applitools/eyes-sdk-core": "13.6.28",
73
+ "@applitools/driver": "1.9.21",
74
+ "@applitools/eyes-sdk-core": "13.8.22",
71
75
  "@applitools/functional-commons": "1.6.0",
72
- "@applitools/logger": "1.1.8",
76
+ "@applitools/logger": "1.1.16",
73
77
  "@applitools/monitoring-commons": "1.0.19",
74
- "@applitools/spec-driver-puppeteer": "1.1.4",
75
- "@applitools/test-server": "1.0.10",
76
- "@applitools/utils": "1.3.3",
77
- "@applitools/visual-grid-client": "15.12.37",
78
+ "@applitools/spec-driver-puppeteer": "1.1.8",
79
+ "@applitools/test-server": "1.1.4",
80
+ "@applitools/utils": "1.3.10",
81
+ "@applitools/visual-grid-client": "15.13.16",
78
82
  "boxen": "4.2.0",
79
83
  "chalk": "3.0.0",
80
84
  "detect-port": "1.3.0",
@@ -86,9 +90,9 @@
86
90
  "yargs": "15.4.1"
87
91
  },
88
92
  "devDependencies": {
89
- "@applitools/bongo": "^2.1.1",
93
+ "@applitools/bongo": "^2.1.6",
90
94
  "@applitools/scripts": "^1.1.0",
91
- "@applitools/sdk-shared": "0.9.11",
95
+ "@applitools/sdk-shared": "0.9.13",
92
96
  "@applitools/snaptdout": "^1.0.1",
93
97
  "@storybook/addon-interactions": "^6.4.18",
94
98
  "@storybook/react": "^6.4.18",
@@ -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,22 @@ 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
- const err = await page.evaluate(renderStoryWithClientAPI, story.index);
22
- err && handleRenderStoryError(err);
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 && !ex.message.includes('Eyes could not render stories properly'))
32
+ handleRenderStoryError(ex);
33
+ else {
34
+ const errMsg = ex.message || ex;
35
+ throw new Error(errMsg);
36
+ }
37
+ }
23
38
  } else {
24
39
  await renderStoryLegacy();
25
40
  }