@applitools/eyes-storybook 3.44.1 → 3.44.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
@@ -1,5 +1,82 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.44.3](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes-storybook@3.44.2...js/eyes-storybook@3.44.3) (2023-11-07)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * add .cmd for storybook binary for windows for local binaries ([#1964](https://github.com/applitools/eyes.sdk.javascript1/issues/1964)) ([b6ee7d9](https://github.com/applitools/eyes.sdk.javascript1/commit/b6ee7d90d13a85f4ccc999cdcbaedb868d94b307))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/dom-shared bumped to 1.0.11
14
+ #### Bug Fixes
15
+
16
+ * (java/eyes-appium-java5): fix incorrect stitchMode mapping in checkSettings ([c70428e](https://github.com/applitools/eyes.sdk.javascript1/commit/c70428ec83e26b8b5e398ff11814f8376ca97d56))
17
+ * @applitools/dom-capture bumped to 11.2.4
18
+ #### Bug Fixes
19
+
20
+ * (java/eyes-appium-java5): fix incorrect stitchMode mapping in checkSettings ([c70428e](https://github.com/applitools/eyes.sdk.javascript1/commit/c70428ec83e26b8b5e398ff11814f8376ca97d56))
21
+
22
+
23
+
24
+ * @applitools/dom-snapshot bumped to 4.7.13
25
+ #### Bug Fixes
26
+
27
+ * (java/eyes-appium-java5): fix incorrect stitchMode mapping in checkSettings ([c70428e](https://github.com/applitools/eyes.sdk.javascript1/commit/c70428ec83e26b8b5e398ff11814f8376ca97d56))
28
+ * handled duplicated style properties in inline style tags ([#2014](https://github.com/applitools/eyes.sdk.javascript1/issues/2014)) ([2f8bada](https://github.com/applitools/eyes.sdk.javascript1/commit/2f8bada9cd44c65a69e54cbd08f57534632f12d2))
29
+
30
+
31
+
32
+ * @applitools/driver bumped to 1.15.0
33
+ #### Features
34
+
35
+ * added warning when driver used with capabilities that may conflict with applitools lib workflow ([#2011](https://github.com/applitools/eyes.sdk.javascript1/issues/2011)) ([081006d](https://github.com/applitools/eyes.sdk.javascript1/commit/081006d879894db03a2713129b66586496b6eb02))
36
+ * @applitools/screenshoter bumped to 3.8.15
37
+
38
+ * @applitools/nml-client bumped to 1.5.15
39
+
40
+ * @applitools/ufg-client bumped to 1.9.7
41
+ #### Bug Fixes
42
+
43
+ * added retries on ufg requests that respond with 503 status code ([7d78917](https://github.com/applitools/eyes.sdk.javascript1/commit/7d78917d559fa182c6723ca34cef2118cf08a036))
44
+ * @applitools/spec-driver-webdriver bumped to 1.0.49
45
+
46
+ * @applitools/spec-driver-selenium bumped to 1.5.63
47
+
48
+ * @applitools/spec-driver-puppeteer bumped to 1.2.5
49
+
50
+ * @applitools/ec-client bumped to 1.7.15
51
+
52
+ * @applitools/core bumped to 4.1.0
53
+ #### Features
54
+
55
+ * added warning when driver used with capabilities that may conflict with applitools lib workflow ([#2011](https://github.com/applitools/eyes.sdk.javascript1/issues/2011)) ([081006d](https://github.com/applitools/eyes.sdk.javascript1/commit/081006d879894db03a2713129b66586496b6eb02))
56
+
57
+
58
+ #### Bug Fixes
59
+
60
+ * fixed issue that caused dom snapshots to be taken for different viewport sizes when layout breakpoints were explicitly turned off ([4121876](https://github.com/applitools/eyes.sdk.javascript1/commit/4121876189f133b6023cfea52ca91c02c31079fb))
61
+
62
+
63
+
64
+
65
+ ## [3.44.2](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes-storybook@3.44.1...js/eyes-storybook@3.44.2) (2023-10-30)
66
+
67
+
68
+ ### Bug Fixes
69
+
70
+ * docs for eyes setup and concurrency message output ([#1953](https://github.com/applitools/eyes.sdk.javascript1/issues/1953)) ([13704da](https://github.com/applitools/eyes.sdk.javascript1/commit/13704dac39fa899c5e8bdb268539cd46aee5ccfb))
71
+
72
+
73
+ ### Dependencies
74
+
75
+ * @applitools/core bumped to 4.0.2
76
+ #### Bug Fixes
77
+
78
+ * generate safe selectors as close as possible to taking dom snapshot ([#1987](https://github.com/applitools/eyes.sdk.javascript1/issues/1987)) ([102208b](https://github.com/applitools/eyes.sdk.javascript1/commit/102208b909c0b149808f6e4c24a0a662305b1b78))
79
+
3
80
  ## [3.44.1](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes-storybook@3.44.0...js/eyes-storybook@3.44.1) (2023-10-25)
4
81
 
5
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-storybook",
3
- "version": "3.44.1",
3
+ "version": "3.44.3",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "applitools",
@@ -28,10 +28,11 @@
28
28
  "test:mocha": "run --top-level mocha --no-timeouts --trace-warnings 'test/{unit,it,e2e}/*.test.js'",
29
29
  "test:unit": "run --top-level mocha --no-timeouts --trace-warnings 'test/unit/*.test.js'",
30
30
  "test:it": "run --top-level mocha --no-timeouts --trace-warnings 'test/it/*.test.js'",
31
- "test:versions": "run --top-level yarn build && yarn test:e2e:versions && yarn lint",
32
- "test:e2e": "run --top-level mocha --no-timeouts --trace-warnings 'test/e2e/*.e2e.test.js'",
33
- "test:e2e:versions": "npx mocha --no-timeouts --trace-warnings --require test/fixtures/storybook-versions/mochaHooks.js test/versions/*.e2e.versions.test.js",
31
+ "test:versions": "yarn build && yarn test:e2e:versions && yarn lint",
32
+ "test:e2e": "MOCHA_GROUP=e2e run --top-level mocha --no-timeouts --trace-warnings 'test/e2e/*.e2e.test.js'",
33
+ "test:e2e:versions": "MOCHA_GROUP=e2e_versions run --top-level mocha --no-timeouts --trace-warnings test/versions/*.e2e.versions.test.js",
34
34
  "test:e2e:versions_local": "APPLITOOLS_FRAMEWORK_VERSION=latest npx mocha --no-timeouts --trace-warnings --require test/fixtures/storybook-versions/mochaHooks.js test/versions/*.e2e.versions.test.js",
35
+ "test:sanity": "run --top-level mocha --no-timeouts --trace-warnings 'test/sanity/*.test.js'",
35
36
  "test:heavy": "node bin/eyes-storybook.js -f test/fixtures/heavyStorybook/applitools.config.js",
36
37
  "storybook": "start-storybook -c test/fixtures/appWithStorybook -p 9001 -s test/fixtures",
37
38
  "storybook:httpHeaders": "start-storybook -c test/fixtures/appWithCustomHttpHeaders -p 9007",
@@ -50,16 +51,17 @@
50
51
  "changelog": "git changelog -x -p -f v$npm_package_version > History.md && git add ./History.md && git commit -am 'changelog'",
51
52
  "changelog:init": "git config changelog.format \"* %s [[%h]($(echo $npm_package_repository_url|cut -d+ -f2|cut -d. -f1-2)/commit/%H)]\"",
52
53
  "changelog:install": "sudo apt-get install git-extras",
53
- "postinstall": "node src/postinstall"
54
+ "postinstall": "node src/postinstall",
55
+ "up:framework": "yarn add --dev --caret @storybook/react${APPLITOOLS_FRAMEWORK_VERSION:+@$APPLITOOLS_FRAMEWORK_VERSION}"
54
56
  },
55
57
  "dependencies": {
56
- "@applitools/core": "4.0.1",
57
- "@applitools/driver": "1.14.4",
58
+ "@applitools/core": "4.1.0",
59
+ "@applitools/driver": "1.15.0",
58
60
  "@applitools/functional-commons": "1.6.0",
59
61
  "@applitools/logger": "2.0.12",
60
62
  "@applitools/monitoring-commons": "1.0.19",
61
- "@applitools/spec-driver-puppeteer": "1.2.4",
62
- "@applitools/ufg-client": "1.9.6",
63
+ "@applitools/spec-driver-puppeteer": "1.2.5",
64
+ "@applitools/ufg-client": "1.9.7",
63
65
  "@applitools/utils": "1.6.2",
64
66
  "boxen": "4.2.0",
65
67
  "chalk": "3.0.0",
@@ -73,7 +75,7 @@
73
75
  "yargs": "17.7.2"
74
76
  },
75
77
  "devDependencies": {
76
- "@applitools/bongo": "^5.7.0",
78
+ "@applitools/bongo": "^5.7.4",
77
79
  "@applitools/sdk-shared": "0.9.15",
78
80
  "@applitools/snaptdout": "^1.0.1",
79
81
  "@applitools/test-server": "^1.2.2",
@@ -4,6 +4,6 @@ const chalk = require('chalk');
4
4
  module.exports = chalk.yellow(`
5
5
  Important notice: Your Applitools visual tests are currently running with a concurrency value of 5.
6
6
  This means that only up to 5 visual tests can run in parallel, and therefore the execution might be slower.
7
- If your Applitools license supports a higher concurrency level, learn how to configure it here: https://www.npmjs.com/package/@applitools/eyes-storybook#concurrency.
7
+ If your Applitools license supports a higher concurrency level, set the "testConcurrency" parameter as explained here: https://applitools.com/docs/api-ref/sdk-api/storybook/config.
8
8
  Need a higher concurrency in your account? Email us @ sdr@applitools.com with your required concurrency level.
9
9
  `);
@@ -9,16 +9,9 @@ const path = require('path');
9
9
  * @returns {Promise<string|null>} The path to the command.
10
10
  */
11
11
  module.exports = async function findNpmModuleCommandPath(npmModuleCommand, packageJsonDirPath) {
12
- const isWindows = process.platform.startsWith('win');
13
-
14
12
  let checkRootPath = path.resolve(packageJsonDirPath);
15
13
  while (checkRootPath !== '') {
16
- const commandPath = path.join(
17
- checkRootPath,
18
- 'node_modules',
19
- '.bin',
20
- npmModuleCommand + (isWindows ? '.cmd' : ''),
21
- );
14
+ const commandPath = path.join(checkRootPath, 'node_modules', '.bin', npmModuleCommand);
22
15
  if (await doesFileExist(commandPath)) return commandPath;
23
16
 
24
17
  const nextPath = path.dirname(checkRootPath);
@@ -0,0 +1,34 @@
1
+ const {resolve} = require('path');
2
+ const fs = require('fs');
3
+ const findNpmModuleCommandPath = require('../findNpmModuleCommandPath');
4
+
5
+ async function determineStorybookVersion({packagePath, isWindows}) {
6
+ let sbArg,
7
+ storybookPath,
8
+ isVersion7 = false;
9
+
10
+ const commandV6 = 'start-storybook' + (isWindows ? '.cmd' : '');
11
+ const commandV7 = 'sb' + (isWindows ? '.cmd' : '');
12
+ const storybookPathV6 = resolve(packagePath, 'node_modules/.bin', commandV6);
13
+ const storybookPathV7 = resolve(packagePath, 'node_modules/.bin', commandV7);
14
+
15
+ // first we look for the binaries in the local node_modules/.bin folder in case there are multiple versions of storybook installed
16
+ if (fs.existsSync(storybookPathV6)) {
17
+ storybookPath = storybookPathV6;
18
+ } else if (fs.existsSync(storybookPathV7)) {
19
+ storybookPath = storybookPathV7;
20
+ isVersion7 = true;
21
+ sbArg = 'dev';
22
+ } else {
23
+ // the binary is not in the local node_modules/.bin folder, so we need to find it
24
+ storybookPath = await findNpmModuleCommandPath(commandV6, packagePath);
25
+ if (!storybookPath) {
26
+ storybookPath = await findNpmModuleCommandPath(commandV7, packagePath);
27
+ isVersion7 = true;
28
+ sbArg = 'dev';
29
+ }
30
+ }
31
+
32
+ return {storybookPath, isVersion7, sbArg};
33
+ }
34
+ module.exports = determineStorybookVersion;
@@ -12,8 +12,7 @@ const {
12
12
  const startStorybookServer = require('./startStorybookServer');
13
13
  const {isIE} = require('./shouldRenderIE');
14
14
  const {makeLogger} = require('@applitools/logger');
15
- const findNpmModuleCommandPath = require('./findNpmModuleCommandPath');
16
- const {resolve} = require('path');
15
+ const determineStorybookVersion = require('./utils/determineStorybookVersion');
17
16
 
18
17
  async function validateAndPopulateConfig({config, packagePath = '', logger = makeLogger()}) {
19
18
  if (!config.apiKey) {
@@ -22,7 +21,10 @@ async function validateAndPopulateConfig({config, packagePath = '', logger = mak
22
21
 
23
22
  const packageJsonPath = `${packagePath}/package.json`;
24
23
  const packageJson = fs.existsSync(packageJsonPath) ? require(packageJsonPath) : undefined;
25
- const {storybookPath, isVersion7, sbArg} = await determineStorybookVersion(packagePath);
24
+ const {storybookPath, isVersion7, sbArg} = await determineStorybookVersion({
25
+ packagePath,
26
+ isWindows: process.platform.startsWith('win'),
27
+ });
26
28
  logger.log(
27
29
  `[validateAndPopulateConfig] storybookPath=${storybookPath} isVersion7=${isVersion7} sbArg=${sbArg}`,
28
30
  );
@@ -76,34 +78,4 @@ async function validateAndPopulateConfig({config, packagePath = '', logger = mak
76
78
  }
77
79
  return isVersion7;
78
80
  }
79
-
80
- async function determineStorybookVersion(packagePath) {
81
- let sbArg,
82
- storybookPath,
83
- isVersion7 = false;
84
-
85
- const storybookPathV6 = resolve(packagePath, 'node_modules/.bin/start-storybook');
86
- const storybookPathV7 = resolve(packagePath, 'node_modules/.bin/sb');
87
-
88
- // first we look for the binaries in the local node_modules/.bin folder in case there are multiple versions of storybook installed
89
- if (fs.existsSync(storybookPathV6)) {
90
- storybookPath = storybookPathV6;
91
- } else if (fs.existsSync(storybookPathV7)) {
92
- storybookPath = storybookPathV7;
93
- isVersion7 = true;
94
- sbArg = 'dev';
95
- } else {
96
- // the binary is not in the local node_modules/.bin folder, so we need to find it
97
- storybookPath = await findNpmModuleCommandPath('start-storybook', packagePath);
98
- if (!storybookPath) {
99
- storybookPath = await findNpmModuleCommandPath('sb', packagePath);
100
- isVersion7 = true;
101
- sbArg = 'dev';
102
- } else {
103
- isVersion7 = false;
104
- }
105
- }
106
-
107
- return {storybookPath, isVersion7, sbArg};
108
- }
109
81
  module.exports = validateAndPopulateConfig;