@applitools/eyes-storybook 3.30.1 → 3.31.0

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,19 @@
3
3
  ## Unreleased
4
4
 
5
5
 
6
+ ## 3.31.0 - 2023/2/15
7
+
8
+ ### Features
9
+ - Crop screenshot image base on account info
10
+ - Add the option to send external http headers to Puppeteer Page object
11
+ ### Bug fixes
12
+
13
+ ## 3.30.2 - 2023/1/23
14
+
15
+ ### Features
16
+ ### Bug fixes
17
+ - Update dependencies
18
+
6
19
  ## 3.30.1 - 2023/1/3
7
20
 
8
21
  ### Features
package/README.md CHANGED
@@ -178,6 +178,7 @@ In addition to command-line arguments, it's possible to define the following con
178
178
  | `ignoreBaseline` | false | |
179
179
  | `runInDocker` | false | If you are having issues running the SDK in docker, set this flag to `true`. See more info [below](#running-eyes-storybook-in-docker) |
180
180
  | `puppeteerOptions` | undefined | Options to send to `puppeteer.launch`. This is a low-level configuration and should be used with great care. Example use `{ args: ['--no-sandbox'], headless: false, devtools: true}` |
181
+ | `puppeteerExtraHTTPHeaders` | undefined | Options to send to `page.setExtraHTTPHeaders`. [See docs](https://pptr.dev/api/puppeteer.page.setextrahttpheaders)|
181
182
  | `jsonFilePath` | undefined | Directory path of a results file. If set, then a [JSON](https://www.json.org/json-en.html) file is created in this directory, the file is created with the name eyes.json and contains the Eyes test results. |
182
183
  | `tapFilePath` | undefined | Directory path of a results file. If set, then a [TAP](https://en.wikipedia.org/wiki/Test_Anything_Protocol#Specification) file is created in this directory, the file is created with the name eyes.tap and contains the Eyes test results. |
183
184
  | `xmlFilePath` | undefined | Directory path of a results file. If set, then a [XUnit XML](https://google.github.io/rich-test-results/xunitxml) file is created in this directory, the file is created with the name eyes.xml and contains the Eyes test results. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-storybook",
3
- "version": "3.30.1",
3
+ "version": "3.31.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "applitools",
@@ -43,6 +43,7 @@
43
43
  "test:e2e:versions": "npx mocha --no-timeouts --trace-warnings --require test/fixtures/storybook-versions/mochaHooks.js test/e2e/*.e2e.versions.test.js",
44
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",
45
45
  "storybook": "start-storybook -c test/fixtures/appWithStorybook -p 9001 -s test/fixtures",
46
+ "storybook:httpHeaders": "start-storybook -c test/fixtures/appWithCustomHttpHeaders -p 9007",
46
47
  "storybook:jslayout": "start-storybook -c test/fixtures/jsLayoutStorybookLocal -p 9001 -s test/fixtures",
47
48
  "storybook:csf": "yarn storybook:csf-service && start-storybook -c test/fixtures/storybookCSF/.storybook-temp -p 9001",
48
49
  "storybook:csf-service": "cp -r test/fixtures/storybookCSF/.storybook/. test/fixtures/storybookCSF/.storybook-temp && rm test/fixtures/storybookCSF/.storybook-temp/config.js",
@@ -54,6 +55,7 @@
54
55
  "eyes-storybook:heavy": "node bin/eyes-storybook.js -f test/fixtures/heavyStorybook/applitools.config.js",
55
56
  "eyes-storybook:configured": "node bin/eyes-storybook.js -f scripts/preconfigured.config.js",
56
57
  "eyes-storybook:zeroStories": "node bin/eyes-storybook.js -f test/fixtures/zeroStoriesRetry/applitools.config.js",
58
+ "eyes-storybook:httpHeaders": "node bin/eyes-storybook.js -f test/fixtures/appWithCustomHttpHeaders/applitools.config.js",
57
59
  "eyes-storybook:csf-v7": "node bin/eyes-storybook.js -f test/fixtures/storybookCSFV7/applitools.config.js",
58
60
  "changelog": "git changelog -x -p -f v$npm_package_version > History.md && git add ./History.md && git commit -am 'changelog'",
59
61
  "changelog:init": "git config changelog.format \"* %s [[%h]($(echo $npm_package_repository_url|cut -d+ -f2|cut -d. -f1-2)/commit/%H)]\"",
@@ -72,29 +74,28 @@
72
74
  }
73
75
  },
74
76
  "dependencies": {
75
- "@applitools/core": "1.3.7",
76
- "@applitools/driver": "1.11.21",
77
+ "@applitools/core": "2.3.1",
78
+ "@applitools/driver": "1.11.30",
77
79
  "@applitools/functional-commons": "1.6.0",
78
- "@applitools/logger": "1.1.36",
80
+ "@applitools/logger": "1.1.45",
79
81
  "@applitools/monitoring-commons": "1.0.19",
80
- "@applitools/spec-driver-puppeteer": "1.1.31",
81
- "@applitools/test-server": "1.1.16",
82
- "@applitools/ufg-client": "1.1.12",
83
- "@applitools/utils": "1.3.22",
82
+ "@applitools/spec-driver-puppeteer": "1.1.41",
83
+ "@applitools/test-server": "1.1.25",
84
+ "@applitools/ufg-client": "1.1.25",
85
+ "@applitools/utils": "1.3.30",
84
86
  "boxen": "4.2.0",
85
87
  "chalk": "3.0.0",
86
88
  "detect-port": "1.3.0",
87
89
  "lodash.flatten": "4.4.0",
88
90
  "lodash.pick": "4.4.0",
89
91
  "ora": "3.4.0",
90
- "puppeteer": "10.2.0",
92
+ "puppeteer": "19.5.0",
91
93
  "strip-ansi": "6.0.0",
92
94
  "throat": "6.0.1",
93
95
  "yargs": "15.4.1"
94
96
  },
95
97
  "devDependencies": {
96
- "@applitools/bongo": "^2.2.0",
97
- "@applitools/scripts": "^1.2.0",
98
+ "@applitools/bongo": "^2.2.5",
98
99
  "@applitools/sdk-shared": "0.9.15",
99
100
  "@applitools/snaptdout": "^1.0.1",
100
101
  "@storybook/addon-interactions": "^6.4.18",
@@ -205,12 +205,12 @@ async function eyesStorybook({
205
205
  timeItAsync,
206
206
  }),
207
207
  );
208
- const [errorCloseManager, testResultsSummary] = await presult(
209
- manager.closeManager({throwErr: false}),
208
+ const [errorInGetResults, testResultsSummary] = await presult(
209
+ manager.getResults({throwErr: false}),
210
210
  );
211
211
 
212
- if (errorCloseManager) {
213
- logger.log('failed to close manager', errorCloseManager);
212
+ if (errorInGetResults) {
213
+ logger.log('failed to get results', errorInGetResults);
214
214
  }
215
215
 
216
216
  if (error) {
package/src/initPage.js CHANGED
@@ -22,6 +22,10 @@ function makeInitPage({iframeUrl, config, browser, logger, getTransitiongIntoIE,
22
22
  });
23
23
  }
24
24
 
25
+ if (config.puppeteerExtraHTTPHeaders) {
26
+ await page.setExtraHTTPHeaders(config.puppeteerExtraHTTPHeaders);
27
+ }
28
+
25
29
  page.on('close', async () => {
26
30
  if (!getTransitiongIntoIE() && pagePool.isInPool(pageId)) {
27
31
  logger.log(