@applitools/eyes-storybook 3.53.4 → 3.53.5

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
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.53.5](https://github.com/Applitools-Dev/sdk/compare/js/eyes-storybook@3.53.4...js/eyes-storybook@3.53.5) (2025-01-23)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * stabilize page in storybook ([#2751](https://github.com/Applitools-Dev/sdk/issues/2751)) ([2a3b85e](https://github.com/Applitools-Dev/sdk/commit/2a3b85e2b052cd44260c11622b91b8a5c94736a8))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/ufg-client bumped to 1.16.2
14
+ #### Bug Fixes
15
+
16
+ * stabilize page in storybook ([#2751](https://github.com/Applitools-Dev/sdk/issues/2751)) ([2a3b85e](https://github.com/Applitools-Dev/sdk/commit/2a3b85e2b052cd44260c11622b91b8a5c94736a8))
17
+ * @applitools/core bumped to 4.30.1
18
+
19
+ * @applitools/eyes bumped to 1.31.3
20
+
21
+
3
22
  ## [3.53.4](https://github.com/Applitools-Dev/sdk/compare/js/eyes-storybook@3.53.3...js/eyes-storybook@3.53.4) (2025-01-22)
4
23
 
5
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-storybook",
3
- "version": "3.53.4",
3
+ "version": "3.53.5",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "applitools",
@@ -54,14 +54,14 @@
54
54
  "up:framework": "cd test/fixtures/storybook-versions/${APPLITOOLS_FRAMEWORK_VERSION} && npm ci"
55
55
  },
56
56
  "dependencies": {
57
- "@applitools/core": "4.30.0",
57
+ "@applitools/core": "4.30.1",
58
58
  "@applitools/driver": "1.20.3",
59
- "@applitools/eyes": "1.31.2",
59
+ "@applitools/eyes": "1.31.3",
60
60
  "@applitools/functional-commons": "1.6.0",
61
61
  "@applitools/logger": "2.1.0",
62
62
  "@applitools/monitoring-commons": "1.0.19",
63
63
  "@applitools/spec-driver-puppeteer": "1.4.23",
64
- "@applitools/ufg-client": "1.16.1",
64
+ "@applitools/ufg-client": "1.16.2",
65
65
  "@applitools/utils": "1.7.7",
66
66
  "boxen": "4.2.0",
67
67
  "chalk": "3.0.0",
@@ -23,7 +23,7 @@ const {extractEnvironment} = require('./extractEnvironment');
23
23
  const {makeCore} = require('@applitools/core');
24
24
  const makeGetStoriesWithConfig = require('./getStoriesWithConfig');
25
25
 
26
- const MAX_RETRIES = 50;
26
+ const MAX_RETRIES = 30;
27
27
  const RETRY_INTERVAL = 1000;
28
28
 
29
29
  async function eyesStorybook({
@@ -4,6 +4,9 @@ const getStoryBaselineName = require('./getStoryBaselineName');
4
4
  const ora = require('ora');
5
5
  const {presult} = require('@applitools/functional-commons');
6
6
 
7
+ const MAX_RETRIES = 30;
8
+ const RETRY_INTERVAL = 1000;
9
+
7
10
  function makeRenderStories({
8
11
  getStoryData,
9
12
  pagePool,
@@ -149,7 +152,7 @@ function makeRenderStories({
149
152
 
150
153
  const {pageId, page} = pageObj;
151
154
  logger.log(`[prepareNewPage] new page is ready: ${pageId}`);
152
- const [errorInSanity] = await presult(page.evaluate(getClientAPI));
155
+ const [errorInSanity] = await getClientAPIWithRetry(page, MAX_RETRIES);
153
156
  if (errorInSanity) {
154
157
  logger.log(
155
158
  `[prepareNewPage] new page ${pageId} is corrupted. preparing new page. ${errorInSanity}`,
@@ -163,6 +166,17 @@ function makeRenderStories({
163
166
  newPageIdToAdd = pageId;
164
167
  }
165
168
  };
169
+
170
+ async function getClientAPIWithRetry(page, remainingRetries) {
171
+ const [err] = await presult(page.evaluate(getClientAPI));
172
+ if (!err || remainingRetries == 0) {
173
+ return [err];
174
+ } else if (err) {
175
+ logger.log('Error in getClientAPI:', err, `retrying... ${remainingRetries - 1} are left`);
176
+ await delay(RETRY_INTERVAL);
177
+ return await getClientAPIWithRetry(page, remainingRetries - 1);
178
+ }
179
+ }
166
180
  }
167
181
 
168
182
  module.exports = makeRenderStories;