@applitools/eyes-storybook 3.53.9 → 3.53.11

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,71 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.53.11](https://github.com/Applitools-Dev/sdk/compare/js/eyes-storybook@3.53.10...js/eyes-storybook@3.53.11) (2025-03-04)
4
+
5
+
6
+ ### Performance Improvements
7
+
8
+ * allow blocking problematic urls on storybook ([#2814](https://github.com/Applitools-Dev/sdk/issues/2814)) ([6d46b13](https://github.com/Applitools-Dev/sdk/commit/6d46b1382865be6197cf42dc800a3b3796d75168))
9
+
10
+ ## [3.53.10](https://github.com/Applitools-Dev/sdk/compare/js/eyes-storybook@3.53.9...js/eyes-storybook@3.53.10) (2025-02-26)
11
+
12
+
13
+ ### Dependencies
14
+
15
+ * @applitools/utils bumped to 1.7.8
16
+ #### Performance Improvements
17
+
18
+ * ufg client dedup job info elements ([#2811](https://github.com/Applitools-Dev/sdk/issues/2811)) ([c04c147](https://github.com/Applitools-Dev/sdk/commit/c04c14776736a422292ada1029820e975adc3d31))
19
+ * @applitools/eyes bumped to 1.32.3
20
+ #### Bug Fixes
21
+
22
+ * stitchMode in checkSettings ([#2777](https://github.com/Applitools-Dev/sdk/issues/2777)) ([eb8d14f](https://github.com/Applitools-Dev/sdk/commit/eb8d14f5466aed803b67c0250017c503766c0c4a))
23
+
24
+
25
+
26
+ * @applitools/logger bumped to 2.1.1
27
+
28
+ * @applitools/dom-snapshot bumped to 4.11.16
29
+
30
+ * @applitools/socket bumped to 1.2.2
31
+
32
+ * @applitools/req bumped to 1.7.8
33
+
34
+ * @applitools/image bumped to 1.1.17
35
+
36
+ * @applitools/driver bumped to 1.20.5
37
+
38
+ * @applitools/spec-driver-webdriver bumped to 1.1.26
39
+
40
+ * @applitools/spec-driver-selenium bumped to 1.5.96
41
+
42
+ * @applitools/spec-driver-puppeteer bumped to 1.4.25
43
+
44
+ * @applitools/screenshoter bumped to 3.10.6
45
+
46
+ * @applitools/nml-client bumped to 1.8.25
47
+
48
+ * @applitools/tunnel-client bumped to 1.6.3
49
+
50
+ * @applitools/ufg-client bumped to 1.16.6
51
+ #### Performance Improvements
52
+
53
+ * ufg client dedup job info elements ([#2811](https://github.com/Applitools-Dev/sdk/issues/2811)) ([c04c147](https://github.com/Applitools-Dev/sdk/commit/c04c14776736a422292ada1029820e975adc3d31))
54
+
55
+
56
+
57
+ * @applitools/core-base bumped to 1.22.2
58
+
59
+ * @applitools/ec-client bumped to 1.10.5
60
+
61
+ * @applitools/core bumped to 4.31.4
62
+ #### Performance Improvements
63
+
64
+ * ufg client dedup job info elements ([#2811](https://github.com/Applitools-Dev/sdk/issues/2811)) ([c04c147](https://github.com/Applitools-Dev/sdk/commit/c04c14776736a422292ada1029820e975adc3d31))
65
+
66
+
67
+
68
+
3
69
  ## [3.53.9](https://github.com/Applitools-Dev/sdk/compare/js/eyes-storybook@3.53.8...js/eyes-storybook@3.53.9) (2025-02-23)
4
70
 
5
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-storybook",
3
- "version": "3.53.9",
3
+ "version": "3.53.11",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "applitools",
@@ -53,15 +53,15 @@
53
53
  "up:framework": "cd test/fixtures/storybook-versions/${APPLITOOLS_FRAMEWORK_VERSION} && npm ci"
54
54
  },
55
55
  "dependencies": {
56
- "@applitools/core": "4.31.3",
57
- "@applitools/driver": "1.20.4",
58
- "@applitools/eyes": "1.32.2",
56
+ "@applitools/core": "4.31.4",
57
+ "@applitools/driver": "1.20.5",
58
+ "@applitools/eyes": "1.32.3",
59
59
  "@applitools/functional-commons": "1.6.0",
60
- "@applitools/logger": "2.1.0",
60
+ "@applitools/logger": "2.1.1",
61
61
  "@applitools/monitoring-commons": "1.0.19",
62
- "@applitools/spec-driver-puppeteer": "1.4.24",
63
- "@applitools/ufg-client": "1.16.5",
64
- "@applitools/utils": "1.7.7",
62
+ "@applitools/spec-driver-puppeteer": "1.4.25",
63
+ "@applitools/ufg-client": "1.16.6",
64
+ "@applitools/utils": "1.7.8",
65
65
  "boxen": "4.2.0",
66
66
  "chalk": "3.0.0",
67
67
  "detect-port": "1.3.0",
@@ -19,4 +19,5 @@ module.exports = {
19
19
  include: undefined,
20
20
  startStorybookServerTimeout: 300,
21
21
  navigationWaitUntil: undefined,
22
+ networkBlockPatterns: undefined,
22
23
  };
@@ -59,6 +59,18 @@ async function eyesStorybook({
59
59
  if (config.puppeteerExtraHTTPHeaders) {
60
60
  await page.setExtraHTTPHeaders(config.puppeteerExtraHTTPHeaders);
61
61
  }
62
+ if (config.networkBlockPatterns) {
63
+ await page.setRequestInterception(true);
64
+ page.on('request', request => {
65
+ logger.log(`[master page] Request to ${request.url()}`);
66
+ if (config.networkBlockPatterns.some(pattern => request.url().includes(pattern))) {
67
+ logger.log(`[master page] Blocking request to ${request.url()}`);
68
+ request.abort();
69
+ } else {
70
+ request.continue();
71
+ }
72
+ });
73
+ }
62
74
  const environment = extractEnvironment();
63
75
  const core = await makeCore({spec, agentId, environment, logger});
64
76
  const manager = await core.makeManager({
package/src/initPage.js CHANGED
@@ -7,6 +7,18 @@ function makeInitPage({iframeUrl, config, browser, logger, getTransitiongIntoIE,
7
7
  logger.log('initializing puppeteer page number ', pageId);
8
8
  const browserContext = await browser.createBrowserContext();
9
9
  const page = await browserContext.newPage();
10
+ if (config.networkBlockPatterns) {
11
+ await page.setRequestInterception(true);
12
+ page.on('request', request => {
13
+ logger.log(`[page ${pageId}] Request to ${request.url()}`);
14
+ if (config.networkBlockPatterns.some(pattern => request.url().includes(pattern))) {
15
+ logger.log(`[page ${pageId}] Blocking request to ${request.url()}`);
16
+ request.abort();
17
+ } else {
18
+ request.continue();
19
+ }
20
+ });
21
+ }
10
22
 
11
23
  if (config.viewportSize) {
12
24
  await page.setViewport(config.viewportSize);
@@ -62,6 +62,13 @@ module.exports = {
62
62
  },
63
63
  },
64
64
 
65
+ networkBlockPatterns: {
66
+ alias: ['network-block-patterns'],
67
+ description: 'Patterns to block from network requests',
68
+ requiresArg: false,
69
+ array: true,
70
+ },
71
+
65
72
  navigationWaitUntil: {
66
73
  alias: ['navigation-wait-until'],
67
74
  description: 'When to consider navigation to be finished',