@applitools/eyes-storybook 3.44.2 → 3.45.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
@@ -1,5 +1,143 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.45.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes-storybook@3.44.3...js/eyes-storybook@3.45.0) (2023-11-21)
4
+
5
+
6
+ ### Features
7
+
8
+ * added notification about outdated sdk version ([#2012](https://github.com/applitools/eyes.sdk.javascript1/issues/2012)) ([0f0a646](https://github.com/applitools/eyes.sdk.javascript1/commit/0f0a6462a56e7c97f9a22173c3b63af91e220adb))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/utils bumped to 1.6.3
14
+ #### Bug Fixes
15
+
16
+ * don't throw error for missing configuration file ([#2034](https://github.com/applitools/eyes.sdk.javascript1/issues/2034)) ([d084e7b](https://github.com/applitools/eyes.sdk.javascript1/commit/d084e7bf6e1727e3969622b4e597881f18241eb3))
17
+ * @applitools/logger bumped to 2.0.13
18
+
19
+ * @applitools/req bumped to 1.6.3
20
+
21
+ * @applitools/image bumped to 1.1.8
22
+
23
+ * @applitools/dom-snapshot bumped to 4.7.14
24
+ #### Bug Fixes
25
+
26
+ * preserve css declarations order in dom-snapshot ([#2037](https://github.com/applitools/eyes.sdk.javascript1/issues/2037)) ([1381851](https://github.com/applitools/eyes.sdk.javascript1/commit/1381851d46f28ea7e7724025c4eab33c81c4e144))
27
+ * @applitools/spec-driver-webdriver bumped to 1.0.50
28
+ #### Bug Fixes
29
+
30
+ * send devtool commands in chromium ([#2039](https://github.com/applitools/eyes.sdk.javascript1/issues/2039)) ([ff42043](https://github.com/applitools/eyes.sdk.javascript1/commit/ff42043c3d9f110eb7b22ab1a8448d77859923b4))
31
+
32
+
33
+
34
+ * @applitools/spec-driver-puppeteer bumped to 1.3.0
35
+ #### Features
36
+
37
+ * added notification about outdated sdk version ([#2012](https://github.com/applitools/eyes.sdk.javascript1/issues/2012)) ([0f0a646](https://github.com/applitools/eyes.sdk.javascript1/commit/0f0a6462a56e7c97f9a22173c3b63af91e220adb))
38
+
39
+
40
+
41
+ * @applitools/core-base bumped to 1.7.3
42
+ #### Bug Fixes
43
+
44
+ * remove connection timeout in case of a long running tasks ([#2006](https://github.com/applitools/eyes.sdk.javascript1/issues/2006)) ([49a596a](https://github.com/applitools/eyes.sdk.javascript1/commit/49a596ac1b022a66b5c07ecfee458cc061891ce0))
45
+ * return result when error in the ufg ([#2020](https://github.com/applitools/eyes.sdk.javascript1/issues/2020)) ([28cdcc5](https://github.com/applitools/eyes.sdk.javascript1/commit/28cdcc5a859641d0edde032165c5068fcc580c8d))
46
+
47
+
48
+
49
+ * @applitools/socket bumped to 1.1.13
50
+
51
+ * @applitools/spec-driver-selenium bumped to 1.5.64
52
+
53
+ * @applitools/driver bumped to 1.15.1
54
+
55
+ * @applitools/screenshoter bumped to 3.8.16
56
+
57
+ * @applitools/nml-client bumped to 1.5.16
58
+
59
+ * @applitools/tunnel-client bumped to 1.3.1
60
+
61
+ * @applitools/ufg-client bumped to 1.9.8
62
+
63
+ * @applitools/ec-client bumped to 1.7.16
64
+
65
+ * @applitools/core bumped to 4.2.0
66
+ #### Features
67
+
68
+ * added notification about outdated sdk version ([#2012](https://github.com/applitools/eyes.sdk.javascript1/issues/2012)) ([0f0a646](https://github.com/applitools/eyes.sdk.javascript1/commit/0f0a6462a56e7c97f9a22173c3b63af91e220adb))
69
+ * log driver environment info to splank ([#2023](https://github.com/applitools/eyes.sdk.javascript1/issues/2023)) ([11d0546](https://github.com/applitools/eyes.sdk.javascript1/commit/11d0546e76962b4c231e140b0229b8402da27f69))
70
+
71
+
72
+ #### Bug Fixes
73
+
74
+ * return result when error in the ufg ([#2020](https://github.com/applitools/eyes.sdk.javascript1/issues/2020)) ([28cdcc5](https://github.com/applitools/eyes.sdk.javascript1/commit/28cdcc5a859641d0edde032165c5068fcc580c8d))
75
+
76
+
77
+
78
+
79
+ ## [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)
80
+
81
+
82
+ ### Bug Fixes
83
+
84
+ * 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))
85
+
86
+
87
+ ### Dependencies
88
+
89
+ * @applitools/dom-shared bumped to 1.0.11
90
+ #### Bug Fixes
91
+
92
+ * (java/eyes-appium-java5): fix incorrect stitchMode mapping in checkSettings ([c70428e](https://github.com/applitools/eyes.sdk.javascript1/commit/c70428ec83e26b8b5e398ff11814f8376ca97d56))
93
+ * @applitools/dom-capture bumped to 11.2.4
94
+ #### Bug Fixes
95
+
96
+ * (java/eyes-appium-java5): fix incorrect stitchMode mapping in checkSettings ([c70428e](https://github.com/applitools/eyes.sdk.javascript1/commit/c70428ec83e26b8b5e398ff11814f8376ca97d56))
97
+
98
+
99
+
100
+ * @applitools/dom-snapshot bumped to 4.7.13
101
+ #### Bug Fixes
102
+
103
+ * (java/eyes-appium-java5): fix incorrect stitchMode mapping in checkSettings ([c70428e](https://github.com/applitools/eyes.sdk.javascript1/commit/c70428ec83e26b8b5e398ff11814f8376ca97d56))
104
+ * 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))
105
+
106
+
107
+
108
+ * @applitools/driver bumped to 1.15.0
109
+ #### Features
110
+
111
+ * 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))
112
+ * @applitools/screenshoter bumped to 3.8.15
113
+
114
+ * @applitools/nml-client bumped to 1.5.15
115
+
116
+ * @applitools/ufg-client bumped to 1.9.7
117
+ #### Bug Fixes
118
+
119
+ * added retries on ufg requests that respond with 503 status code ([7d78917](https://github.com/applitools/eyes.sdk.javascript1/commit/7d78917d559fa182c6723ca34cef2118cf08a036))
120
+ * @applitools/spec-driver-webdriver bumped to 1.0.49
121
+
122
+ * @applitools/spec-driver-selenium bumped to 1.5.63
123
+
124
+ * @applitools/spec-driver-puppeteer bumped to 1.2.5
125
+
126
+ * @applitools/ec-client bumped to 1.7.15
127
+
128
+ * @applitools/core bumped to 4.1.0
129
+ #### Features
130
+
131
+ * 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))
132
+
133
+
134
+ #### Bug Fixes
135
+
136
+ * 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))
137
+
138
+
139
+
140
+
3
141
  ## [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)
4
142
 
5
143
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-storybook",
3
- "version": "3.44.2",
3
+ "version": "3.45.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "applitools",
@@ -32,6 +32,7 @@
32
32
  "test:e2e": "MOCHA_GROUP=e2e run --top-level mocha --no-timeouts --trace-warnings 'test/e2e/*.e2e.test.js'",
33
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",
@@ -54,14 +55,14 @@
54
55
  "up:framework": "yarn add --dev --caret @storybook/react${APPLITOOLS_FRAMEWORK_VERSION:+@$APPLITOOLS_FRAMEWORK_VERSION}"
55
56
  },
56
57
  "dependencies": {
57
- "@applitools/core": "4.0.2",
58
- "@applitools/driver": "1.14.4",
58
+ "@applitools/core": "4.2.0",
59
+ "@applitools/driver": "1.15.1",
59
60
  "@applitools/functional-commons": "1.6.0",
60
- "@applitools/logger": "2.0.12",
61
+ "@applitools/logger": "2.0.13",
61
62
  "@applitools/monitoring-commons": "1.0.19",
62
- "@applitools/spec-driver-puppeteer": "1.2.4",
63
- "@applitools/ufg-client": "1.9.6",
64
- "@applitools/utils": "1.6.2",
63
+ "@applitools/spec-driver-puppeteer": "1.3.0",
64
+ "@applitools/ufg-client": "1.9.8",
65
+ "@applitools/utils": "1.6.3",
65
66
  "boxen": "4.2.0",
66
67
  "chalk": "3.0.0",
67
68
  "detect-port": "1.3.0",
@@ -74,7 +75,7 @@
74
75
  "yargs": "17.7.2"
75
76
  },
76
77
  "devDependencies": {
77
- "@applitools/bongo": "^5.7.0",
78
+ "@applitools/bongo": "^5.7.6",
78
79
  "@applitools/sdk-shared": "0.9.15",
79
80
  "@applitools/snaptdout": "^1.0.1",
80
81
  "@applitools/test-server": "^1.2.2",
@@ -6,7 +6,14 @@ function extractEnvironment() {
6
6
  } catch {
7
7
  // NOTE: ignore error
8
8
  }
9
- return {versions};
9
+ let sdk;
10
+ try {
11
+ const {name, version} = require('../package.json');
12
+ sdk = {lang: 'js', name, currentVersion: version};
13
+ } catch {
14
+ // NOTE: ignore error
15
+ }
16
+ return {versions, sdk};
10
17
  }
11
18
 
12
19
  module.exports = {extractEnvironment};
@@ -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;