@applitools/eyes-storybook 3.30.2 → 3.31.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 +13 -0
- package/README.md +1 -0
- package/package.json +11 -10
- package/src/eyesStorybook.js +8 -4
- package/src/initPage.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
## 3.31.1 - 2023/2/21
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
### Bug fixes
|
|
10
|
+
- Make sure to send http headers in the main storybook tab
|
|
11
|
+
|
|
12
|
+
## 3.31.0 - 2023/2/15
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
- Crop screenshot image base on account info
|
|
16
|
+
- Add the option to send external http headers to Puppeteer Page object
|
|
17
|
+
### Bug fixes
|
|
18
|
+
|
|
6
19
|
## 3.30.2 - 2023/1/23
|
|
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.
|
|
3
|
+
"version": "3.31.1",
|
|
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,15 +74,15 @@
|
|
|
72
74
|
}
|
|
73
75
|
},
|
|
74
76
|
"dependencies": {
|
|
75
|
-
"@applitools/core": "
|
|
76
|
-
"@applitools/driver": "1.11.
|
|
77
|
+
"@applitools/core": "2.3.6",
|
|
78
|
+
"@applitools/driver": "1.11.32",
|
|
77
79
|
"@applitools/functional-commons": "1.6.0",
|
|
78
|
-
"@applitools/logger": "1.1.
|
|
80
|
+
"@applitools/logger": "1.1.46",
|
|
79
81
|
"@applitools/monitoring-commons": "1.0.19",
|
|
80
|
-
"@applitools/spec-driver-puppeteer": "1.1.
|
|
81
|
-
"@applitools/test-server": "1.1.
|
|
82
|
-
"@applitools/ufg-client": "1.1.
|
|
83
|
-
"@applitools/utils": "1.3.
|
|
82
|
+
"@applitools/spec-driver-puppeteer": "1.1.44",
|
|
83
|
+
"@applitools/test-server": "1.1.26",
|
|
84
|
+
"@applitools/ufg-client": "1.1.26",
|
|
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",
|
|
@@ -93,8 +95,7 @@
|
|
|
93
95
|
"yargs": "15.4.1"
|
|
94
96
|
},
|
|
95
97
|
"devDependencies": {
|
|
96
|
-
"@applitools/bongo": "^2.2.
|
|
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",
|
package/src/eyesStorybook.js
CHANGED
|
@@ -61,6 +61,10 @@ async function eyesStorybook({
|
|
|
61
61
|
const browser = await puppeteer.launch(config.puppeteerOptions);
|
|
62
62
|
logger.log('browser launched');
|
|
63
63
|
const page = await browser.newPage();
|
|
64
|
+
// we send http headers here and in init page
|
|
65
|
+
if (config.puppeteerExtraHTTPHeaders) {
|
|
66
|
+
await page.setExtraHTTPHeaders(config.puppeteerExtraHTTPHeaders);
|
|
67
|
+
}
|
|
64
68
|
const core = await makeCore({
|
|
65
69
|
spec,
|
|
66
70
|
concurrency: testConcurrency,
|
|
@@ -205,12 +209,12 @@ async function eyesStorybook({
|
|
|
205
209
|
timeItAsync,
|
|
206
210
|
}),
|
|
207
211
|
);
|
|
208
|
-
const [
|
|
209
|
-
manager.
|
|
212
|
+
const [errorInGetResults, testResultsSummary] = await presult(
|
|
213
|
+
manager.getResults({throwErr: false}),
|
|
210
214
|
);
|
|
211
215
|
|
|
212
|
-
if (
|
|
213
|
-
logger.log('failed to
|
|
216
|
+
if (errorInGetResults) {
|
|
217
|
+
logger.log('failed to get results', errorInGetResults);
|
|
214
218
|
}
|
|
215
219
|
|
|
216
220
|
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(
|