@applitools/eyes-cypress 3.24.0-beta.5 → 3.25.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +2191 -2195
  2. package/LICENSE +25 -25
  3. package/README.md +803 -782
  4. package/bin/eyes-setup.js +21 -21
  5. package/commands.js +2 -2
  6. package/dist/browser/spec-driver.js +110 -106
  7. package/dist/plugin/handler.js +55 -55
  8. package/eyes-index.d.ts +34 -34
  9. package/index.js +2 -2
  10. package/package.json +98 -97
  11. package/src/browser/commands.js +188 -188
  12. package/src/browser/eyesCheckMapping.js +104 -103
  13. package/src/browser/eyesOpenMapping.js +60 -60
  14. package/src/browser/makeSend.js +18 -18
  15. package/src/browser/refer.js +57 -57
  16. package/src/browser/sendRequest.js +16 -16
  17. package/src/browser/socket.js +144 -143
  18. package/src/browser/socketCommands.js +81 -81
  19. package/src/browser/spec-driver.ts +117 -111
  20. package/src/pem/server.cert +22 -22
  21. package/src/pem/server.key +27 -27
  22. package/src/plugin/concurrencyMsg.js +8 -8
  23. package/src/plugin/config.js +54 -54
  24. package/src/plugin/defaultPort.js +1 -1
  25. package/src/plugin/errorDigest.js +96 -96
  26. package/src/plugin/getErrorsAndDiffs.js +34 -34
  27. package/src/plugin/handleTestResults.js +35 -39
  28. package/src/plugin/handler.ts +58 -58
  29. package/src/plugin/hooks.js +51 -50
  30. package/src/plugin/isGlobalHooksSupported.js +13 -13
  31. package/src/plugin/pluginExport.js +60 -60
  32. package/src/plugin/server.js +98 -98
  33. package/src/plugin/startPlugin.js +15 -13
  34. package/src/plugin/webSocket.js +130 -130
  35. package/src/setup/addEyesCommands.js +24 -24
  36. package/src/setup/addEyesCypressPlugin.js +15 -15
  37. package/src/setup/getCypressConfig.js +16 -16
  38. package/src/setup/getFilePath.js +22 -22
  39. package/src/setup/handleCommands.js +23 -23
  40. package/src/setup/handlePlugin.js +23 -23
  41. package/src/setup/handleTypeScript.js +21 -21
  42. package/src/setup/isCommandsDefined.js +7 -7
  43. package/src/setup/isPluginDefined.js +7 -7
  44. package/test/fixtures/testAppCopies/.gitignore +1 -1
@@ -1,23 +1,23 @@
1
- 'use strict';
2
-
3
- const chalk = require('chalk');
4
- const {readFileSync, writeFileSync} = require('fs');
5
- const addEyesCommands = require('./addEyesCommands');
6
- const isCommandsDefined = require('./isCommandsDefined');
7
- const getFilePath = require('./getFilePath');
8
- const getCypressConfig = require('./getCypressConfig');
9
-
10
- function handleCommands(cwd) {
11
- const cypressConfig = getCypressConfig(cwd);
12
- const commandsFilePath = getFilePath('support', cypressConfig, cwd);
13
- const commandsFileContent = readFileSync(commandsFilePath).toString();
14
-
15
- if (!isCommandsDefined(commandsFileContent)) {
16
- writeFileSync(commandsFilePath, addEyesCommands(commandsFileContent));
17
- console.log(chalk.cyan('Commands defined.'));
18
- } else {
19
- console.log(chalk.cyan('Commands already defined.'));
20
- }
21
- }
22
-
23
- module.exports = handleCommands;
1
+ 'use strict';
2
+
3
+ const chalk = require('chalk');
4
+ const {readFileSync, writeFileSync} = require('fs');
5
+ const addEyesCommands = require('./addEyesCommands');
6
+ const isCommandsDefined = require('./isCommandsDefined');
7
+ const getFilePath = require('./getFilePath');
8
+ const getCypressConfig = require('./getCypressConfig');
9
+
10
+ function handleCommands(cwd) {
11
+ const cypressConfig = getCypressConfig(cwd);
12
+ const commandsFilePath = getFilePath('support', cypressConfig, cwd);
13
+ const commandsFileContent = readFileSync(commandsFilePath).toString();
14
+
15
+ if (!isCommandsDefined(commandsFileContent)) {
16
+ writeFileSync(commandsFilePath, addEyesCommands(commandsFileContent));
17
+ console.log(chalk.cyan('Commands defined.'));
18
+ } else {
19
+ console.log(chalk.cyan('Commands already defined.'));
20
+ }
21
+ }
22
+
23
+ module.exports = handleCommands;
@@ -1,23 +1,23 @@
1
- 'use strict';
2
-
3
- const {readFileSync, writeFileSync} = require('fs');
4
- const chalk = require('chalk');
5
- const addEyesCypressPlugin = require('./addEyesCypressPlugin');
6
- const isPluginDefined = require('./isPluginDefined');
7
- const getFilePath = require('./getFilePath');
8
- const getCypressConfig = require('./getCypressConfig');
9
-
10
- function handlePlugin(cwd) {
11
- const cypressConfig = getCypressConfig(cwd);
12
- const pluginsFilePath = getFilePath('plugins', cypressConfig, cwd);
13
- const pluginsFileContent = readFileSync(pluginsFilePath).toString();
14
-
15
- if (!isPluginDefined(pluginsFileContent)) {
16
- writeFileSync(pluginsFilePath, addEyesCypressPlugin(pluginsFileContent));
17
- console.log(chalk.cyan('Plugins defined.'));
18
- } else {
19
- console.log(chalk.cyan('Plugins already defined'));
20
- }
21
- }
22
-
23
- module.exports = handlePlugin;
1
+ 'use strict';
2
+
3
+ const {readFileSync, writeFileSync} = require('fs');
4
+ const chalk = require('chalk');
5
+ const addEyesCypressPlugin = require('./addEyesCypressPlugin');
6
+ const isPluginDefined = require('./isPluginDefined');
7
+ const getFilePath = require('./getFilePath');
8
+ const getCypressConfig = require('./getCypressConfig');
9
+
10
+ function handlePlugin(cwd) {
11
+ const cypressConfig = getCypressConfig(cwd);
12
+ const pluginsFilePath = getFilePath('plugins', cypressConfig, cwd);
13
+ const pluginsFileContent = readFileSync(pluginsFilePath).toString();
14
+
15
+ if (!isPluginDefined(pluginsFileContent)) {
16
+ writeFileSync(pluginsFilePath, addEyesCypressPlugin(pluginsFileContent));
17
+ console.log(chalk.cyan('Plugins defined.'));
18
+ } else {
19
+ console.log(chalk.cyan('Plugins already defined'));
20
+ }
21
+ }
22
+
23
+ module.exports = handlePlugin;
@@ -1,21 +1,21 @@
1
- 'use strict';
2
- const chalk = require('chalk');
3
- const {writeFileSync, existsSync} = require('fs');
4
- const getFilePath = require('./getFilePath');
5
- const getCypressConfig = require('./getCypressConfig');
6
- const eyesIndexContent = `import "@applitools/eyes-cypress"`;
7
-
8
- function handleTypeScript(cwd) {
9
- const cypressConfig = getCypressConfig(cwd);
10
- const typeScriptFilePath = getFilePath('typeScript', cypressConfig, cwd);
11
-
12
- if (!existsSync(typeScriptFilePath)) {
13
- writeFileSync(typeScriptFilePath, eyesIndexContent);
14
- console.log(chalk.cyan('Typescript defined.'));
15
- } else {
16
- console.log(chalk.cyan('Typescript already defined.'));
17
- }
18
- }
19
-
20
- module.exports = handleTypeScript;
21
- module.exports.eyesIndexContent = eyesIndexContent;
1
+ 'use strict';
2
+ const chalk = require('chalk');
3
+ const {writeFileSync, existsSync} = require('fs');
4
+ const getFilePath = require('./getFilePath');
5
+ const getCypressConfig = require('./getCypressConfig');
6
+ const eyesIndexContent = `import "@applitools/eyes-cypress"`;
7
+
8
+ function handleTypeScript(cwd) {
9
+ const cypressConfig = getCypressConfig(cwd);
10
+ const typeScriptFilePath = getFilePath('typeScript', cypressConfig, cwd);
11
+
12
+ if (!existsSync(typeScriptFilePath)) {
13
+ writeFileSync(typeScriptFilePath, eyesIndexContent);
14
+ console.log(chalk.cyan('Typescript defined.'));
15
+ } else {
16
+ console.log(chalk.cyan('Typescript already defined.'));
17
+ }
18
+ }
19
+
20
+ module.exports = handleTypeScript;
21
+ module.exports.eyesIndexContent = eyesIndexContent;
@@ -1,7 +1,7 @@
1
- 'use strict';
2
-
3
- function isCommandsDefined(content) {
4
- return !!content.match(/['"]@applitools\/eyes-cypress\/commands['"]\s*/);
5
- }
6
-
7
- module.exports = isCommandsDefined;
1
+ 'use strict';
2
+
3
+ function isCommandsDefined(content) {
4
+ return !!content.match(/['"]@applitools\/eyes-cypress\/commands['"]\s*/);
5
+ }
6
+
7
+ module.exports = isCommandsDefined;
@@ -1,7 +1,7 @@
1
- 'use strict';
2
-
3
- function isPluginDefined(content) {
4
- return !!content.match(/require\s*\(\s*['"]@applitools\/eyes-cypress['"]\s*\)/);
5
- }
6
-
7
- module.exports = isPluginDefined;
1
+ 'use strict';
2
+
3
+ function isPluginDefined(content) {
4
+ return !!content.match(/require\s*\(\s*['"]@applitools\/eyes-cypress['"]\s*\)/);
5
+ }
6
+
7
+ module.exports = isPluginDefined;
@@ -1,2 +1,2 @@
1
- *
1
+ *
2
2
  !.gitignore