@zohodesk/testinglibrary 0.0.7-exp.1 → 0.0.7-n20-experimental

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 (160) hide show
  1. package/.babelrc +7 -2
  2. package/.eslintrc.js +5 -1
  3. package/.gitlab-ci.yml +206 -0
  4. package/README.md +172 -1
  5. package/build/common/data-generator/steps/DataGenerator.spec.js +19 -0
  6. package/build/common/data-generator/steps/DataGeneratorStepsHelper.js +19 -0
  7. package/build/common/multi-actor/steps/multiActorHandling.spec.js +26 -0
  8. package/build/common/searchFake/helpers/rpcRequestHelper.js +52 -0
  9. package/build/common/searchFake/steps/searchFake.spec.js +77 -0
  10. package/build/core/dataGenerator/DataGenerator.js +108 -0
  11. package/build/core/dataGenerator/DataGeneratorError.js +50 -0
  12. package/build/core/dataGenerator/DataGeneratorHelper.js +49 -0
  13. package/build/core/jest/preprocessor/jsPreprocessor.js +3 -9
  14. package/build/core/jest/setup/index.js +1 -7
  15. package/build/core/playwright/builtInFixtures/actorContext.js +75 -0
  16. package/build/core/playwright/builtInFixtures/addTags.js +19 -0
  17. package/build/core/playwright/builtInFixtures/cacheLayer.js +13 -0
  18. package/build/core/playwright/builtInFixtures/context.js +32 -0
  19. package/build/core/playwright/builtInFixtures/executionContext.js +17 -0
  20. package/build/core/playwright/builtInFixtures/i18N.js +41 -0
  21. package/build/core/playwright/builtInFixtures/index.js +46 -0
  22. package/build/core/playwright/builtInFixtures/page.js +38 -0
  23. package/build/core/playwright/builtInFixtures/unauthenticatedPage.js +18 -0
  24. package/build/core/playwright/clear-caches.js +49 -0
  25. package/build/core/playwright/codegen.js +4 -4
  26. package/build/core/playwright/configuration/Configuration.js +25 -0
  27. package/build/core/playwright/configuration/ConfigurationHelper.js +43 -0
  28. package/build/core/playwright/configuration/UserArgs.js +12 -0
  29. package/build/core/playwright/constants/browserTypes.js +12 -0
  30. package/build/core/playwright/constants/fileMutexConfig.js +9 -0
  31. package/build/core/playwright/custom-commands.js +1 -2
  32. package/build/core/playwright/env-initializer.js +28 -6
  33. package/build/core/playwright/fixtures.js +24 -0
  34. package/build/core/playwright/helpers/additionalProfiles.js +25 -0
  35. package/build/core/playwright/helpers/auth/accountLogin.js +21 -0
  36. package/build/core/playwright/helpers/auth/checkAuthCookies.js +41 -0
  37. package/build/core/playwright/helpers/auth/getUrlOrigin.js +13 -0
  38. package/build/core/playwright/helpers/auth/getUsers.js +118 -0
  39. package/build/core/playwright/helpers/auth/index.js +76 -0
  40. package/build/core/playwright/helpers/auth/loginDefaultStepsHelper.js +54 -0
  41. package/build/core/playwright/helpers/auth/loginSteps.js +51 -0
  42. package/build/core/playwright/helpers/checkAuthDirectory.js +27 -0
  43. package/build/core/playwright/helpers/configFileNameProvider.js +31 -0
  44. package/build/core/playwright/helpers/customFixturesHelper.js +58 -0
  45. package/build/core/playwright/helpers/fileMutex.js +72 -0
  46. package/build/core/playwright/helpers/getUserFixtures.js +23 -0
  47. package/build/core/playwright/helpers/mergeObjects.js +13 -0
  48. package/build/core/playwright/helpers/parseUserArgs.js +10 -0
  49. package/build/core/playwright/index.js +10 -98
  50. package/build/core/playwright/readConfigFile.js +71 -25
  51. package/build/core/playwright/report-generator.js +9 -8
  52. package/build/core/playwright/runner/Runner.js +22 -0
  53. package/build/core/playwright/runner/RunnerHelper.js +43 -0
  54. package/build/core/playwright/runner/RunnerTypes.js +17 -0
  55. package/build/core/playwright/runner/SpawnRunner.js +113 -0
  56. package/build/core/playwright/setup/Project.js +35 -0
  57. package/build/core/playwright/setup/ProjectConfiguration.js +80 -0
  58. package/build/core/playwright/setup/config-creator.js +54 -33
  59. package/build/core/playwright/setup/config-utils.js +99 -16
  60. package/build/core/playwright/setup/custom-reporter.js +136 -0
  61. package/build/core/playwright/setup/qc-custom-reporter.js +291 -0
  62. package/build/core/playwright/tagProcessor.js +69 -0
  63. package/build/core/playwright/test-runner.js +57 -43
  64. package/build/core/playwright/types.js +44 -0
  65. package/build/core/playwright/validateFeature.js +28 -0
  66. package/build/decorators.d.ts +1 -1
  67. package/build/decorators.js +1 -1
  68. package/build/index.d.ts +76 -3
  69. package/build/index.js +63 -17
  70. package/build/lib/cli.js +28 -4
  71. package/build/lib/post-install.js +19 -11
  72. package/build/parser/parser.js +0 -1
  73. package/build/setup-folder-structure/helper.js +37 -0
  74. package/build/setup-folder-structure/reportEnhancement/addonScript.html +25 -0
  75. package/build/setup-folder-structure/reportEnhancement/reportAlteration.js +25 -0
  76. package/build/setup-folder-structure/samples/accountLogin-sample.js +19 -0
  77. package/build/setup-folder-structure/samples/actors-index.js +2 -0
  78. package/build/setup-folder-structure/samples/auth-setup-sample.js +10 -67
  79. package/build/setup-folder-structure/samples/editions-index.js +3 -0
  80. package/build/setup-folder-structure/samples/free-sample.json +25 -0
  81. package/build/setup-folder-structure/samples/git-ignore.sample.js +8 -4
  82. package/build/setup-folder-structure/samples/settings.json +7 -0
  83. package/build/setup-folder-structure/samples/testSetup-sample.js +14 -0
  84. package/build/setup-folder-structure/samples/uat-config-sample.js +7 -3
  85. package/build/setup-folder-structure/setupProject.js +34 -12
  86. package/build/test/core/playwright/__tests__/tagProcessor.test.js +94 -0
  87. package/build/test/core/playwright/__tests__/validateFeature.test.js +69 -0
  88. package/build/test/core/playwright/buildInFixtures/__tests__/executionContext.test.js +27 -0
  89. package/build/test/core/playwright/configuration/__tests__/Configuration.test.js +53 -0
  90. package/build/test/core/playwright/helpers/__tests__/additionalProfiles.test.js +45 -0
  91. package/build/test/core/playwright/helpers/__tests__/configFileNameProvider.test.js +34 -0
  92. package/build/test/core/playwright/helpers/__tests__/customFixturesHelper.test.js +51 -0
  93. package/build/test/core/playwright/helpers/__tests__/fileMutex.test.js +79 -0
  94. package/build/test/core/playwright/helpers/__tests__/getUsers_ListOfActors.test.js +80 -0
  95. package/build/test/core/playwright/runner/__tests__/RunnerHelper.test.js +16 -0
  96. package/build/test/core/playwright/runner/__tests__/SpawnRunner.test.js +27 -0
  97. package/build/utils/cliArgsToObject.js +8 -1
  98. package/build/utils/commonUtils.js +17 -0
  99. package/build/utils/fileUtils.js +60 -4
  100. package/build/utils/logger.js +1 -31
  101. package/build/utils/rootPath.js +16 -9
  102. package/build/utils/stepDefinitionsFormatter.js +1 -2
  103. package/changelog.md +167 -0
  104. package/jest.config.js +29 -11
  105. package/npm-shrinkwrap.json +9731 -6645
  106. package/package.json +34 -27
  107. package/playwright.config.js +0 -50
  108. package/test-results/.last-run.json +4 -0
  109. package/unit_reports/unit-report.html +260 -0
  110. package/Changelog.md +0 -49
  111. package/build/bdd-framework/cli/commands/env.js +0 -43
  112. package/build/bdd-framework/cli/commands/export.js +0 -48
  113. package/build/bdd-framework/cli/commands/test.js +0 -59
  114. package/build/bdd-framework/cli/index.js +0 -11
  115. package/build/bdd-framework/cli/options.js +0 -20
  116. package/build/bdd-framework/cli/worker.js +0 -13
  117. package/build/bdd-framework/config/dir.js +0 -27
  118. package/build/bdd-framework/config/env.js +0 -49
  119. package/build/bdd-framework/config/index.js +0 -91
  120. package/build/bdd-framework/cucumber/buildStepDefinition.js +0 -43
  121. package/build/bdd-framework/cucumber/gherkin.d.js +0 -5
  122. package/build/bdd-framework/cucumber/gherkin.d.ts +0 -45
  123. package/build/bdd-framework/cucumber/loadConfig.js +0 -17
  124. package/build/bdd-framework/cucumber/loadFeatures.js +0 -39
  125. package/build/bdd-framework/cucumber/loadSnippetBuilder.js +0 -20
  126. package/build/bdd-framework/cucumber/loadSources.js +0 -57
  127. package/build/bdd-framework/cucumber/loadSteps.js +0 -35
  128. package/build/bdd-framework/decorators.js +0 -22
  129. package/build/bdd-framework/gen/formatter.js +0 -88
  130. package/build/bdd-framework/gen/i18n.js +0 -35
  131. package/build/bdd-framework/gen/index.js +0 -160
  132. package/build/bdd-framework/gen/poms.js +0 -46
  133. package/build/bdd-framework/gen/testFile.js +0 -356
  134. package/build/bdd-framework/gen/testNode.js +0 -48
  135. package/build/bdd-framework/gen/testPoms.js +0 -123
  136. package/build/bdd-framework/index.js +0 -45
  137. package/build/bdd-framework/playwright/fixtureParameterNames.js +0 -77
  138. package/build/bdd-framework/playwright/getLocationInFile.js +0 -46
  139. package/build/bdd-framework/playwright/loadConfig.js +0 -42
  140. package/build/bdd-framework/playwright/testTypeImpl.js +0 -41
  141. package/build/bdd-framework/playwright/transform.js +0 -80
  142. package/build/bdd-framework/playwright/types.js +0 -5
  143. package/build/bdd-framework/playwright/utils.js +0 -34
  144. package/build/bdd-framework/run/bddFixtures.js +0 -108
  145. package/build/bdd-framework/run/bddWorld.js +0 -87
  146. package/build/bdd-framework/snippets/index.js +0 -131
  147. package/build/bdd-framework/snippets/snippetSyntax.js +0 -41
  148. package/build/bdd-framework/snippets/snippetSyntaxDecorators.js +0 -26
  149. package/build/bdd-framework/snippets/snippetSyntaxTs.js +0 -18
  150. package/build/bdd-framework/stepDefinitions/createBdd.js +0 -49
  151. package/build/bdd-framework/stepDefinitions/createDecorators.js +0 -109
  152. package/build/bdd-framework/stepDefinitions/decorators/poms.js +0 -50
  153. package/build/bdd-framework/stepDefinitions/decorators/steps.js +0 -94
  154. package/build/bdd-framework/stepDefinitions/defineStep.js +0 -61
  155. package/build/bdd-framework/stepDefinitions/stepConfig.js +0 -24
  156. package/build/bdd-framework/utils/index.js +0 -50
  157. package/build/bdd-framework/utils/jsStringWrap.js +0 -44
  158. package/build/bdd-framework/utils/logger.js +0 -29
  159. package/build/setup-folder-structure/samples/authUsers-sample.json +0 -9
  160. package/build/setup-folder-structure/samples/env-config-sample.json +0 -21
@@ -5,15 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.checkIfFileExists = checkIfFileExists;
8
+ exports.checkIfFolderExistsWithPattern = checkIfFolderExistsWithPattern;
9
+ exports.copyDirectory = copyDirectory;
8
10
  exports.deleteFile = deleteFile;
11
+ exports.deleteFolder = deleteFolder;
9
12
  exports.readFileContents = readFileContents;
10
13
  exports.writeFileContents = writeFileContents;
11
14
  var _fs = _interopRequireDefault(require("fs"));
15
+ var _path = _interopRequireDefault(require("path"));
16
+ var _logger = require("./logger");
17
+ var glob = _interopRequireWildcard(require("glob"));
18
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
19
  function checkIfFileExists(file) {
13
20
  try {
14
21
  _fs.default.accessSync(file, _fs.default.constants.F_OK);
15
22
  return true;
16
23
  } catch (err) {
24
+ _logger.Logger.error(err);
17
25
  return false;
18
26
  }
19
27
  }
@@ -22,13 +30,12 @@ function readFileContents(filePath) {
22
30
  let fileContents = _fs.default.readFileSync(filePath, 'utf-8');
23
31
  return fileContents;
24
32
  } catch (err) {
33
+ _logger.Logger.error(err);
25
34
  return null;
26
35
  }
27
36
  }
28
37
  function writeFileContents(filePath, content, writeOptions = {}) {
29
- let filePaths = filePath.split('/');
30
- let fileName = filePaths.pop();
31
- let directoryPath = filePaths.join('/');
38
+ const directoryPath = _path.default.dirname(filePath);
32
39
 
33
40
  // Check if the directory exists
34
41
  if (!_fs.default.existsSync(directoryPath)) {
@@ -37,8 +44,9 @@ function writeFileContents(filePath, content, writeOptions = {}) {
37
44
  });
38
45
  }
39
46
  try {
40
- _fs.default.writeFileSync(`${directoryPath}/${fileName}`, content, writeOptions);
47
+ _fs.default.writeFileSync(`${filePath}`, content, writeOptions);
41
48
  } catch (err) {
49
+ _logger.Logger.error(err);
42
50
  throw new Error(err);
43
51
  }
44
52
  }
@@ -47,7 +55,55 @@ function deleteFile(filePath) {
47
55
  try {
48
56
  _fs.default.unlinkSync(filePath);
49
57
  } catch (err) {
58
+ _logger.Logger.error(err);
50
59
  throw new Error(`Error while deleting the test data file: ${filePath}`);
51
60
  }
61
+ } else {
62
+ _logger.Logger.log(_logger.Logger.INFO_TYPE, `File Does not Exist in the path ${filePath}`);
63
+ }
64
+ }
65
+ function deleteFolder(folderPath) {
66
+ if (_fs.default.existsSync(folderPath)) {
67
+ try {
68
+ _fs.default.rmdirSync(folderPath, {
69
+ recursive: true
70
+ });
71
+ } catch (err) {
72
+ _logger.Logger.error(err);
73
+ throw new Error(`Error while deleting the test data file: ${folderPath}`);
74
+ }
75
+ }
76
+ }
77
+
78
+ // This function uses glob to check if a folder exists with a specific pattern
79
+ // Glob is define patterns for matching file and directory names based on wildcards
80
+ function checkIfFolderExistsWithPattern(folderPath) {
81
+ try {
82
+ if (glob.sync(folderPath).length > 0) {
83
+ return true;
84
+ }
85
+ return false;
86
+ } catch (err) {
87
+ _logger.Logger.error(err);
88
+ return false;
89
+ }
90
+ }
91
+ function copyDirectory(src, dest) {
92
+ if (!_fs.default.existsSync(dest)) {
93
+ _fs.default.mkdirSync(dest, {
94
+ recursive: true
95
+ });
96
+ }
97
+ const entries = _fs.default.readdirSync(src, {
98
+ withFileTypes: true
99
+ });
100
+ for (const entry of entries) {
101
+ const srcPath = _path.default.join(src, entry.name);
102
+ const destPath = _path.default.join(dest, entry.name);
103
+ if (entry.isDirectory()) {
104
+ copyDirectory(srcPath, destPath);
105
+ } else {
106
+ _fs.default.copyFileSync(srcPath, destPath);
107
+ }
52
108
  }
53
109
  }
@@ -4,35 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Logger = void 0;
7
- // const SUCCESS_TYPE = 'success';
8
- // const FAILURE_TYPE = 'failure';
9
- // const INFO_TYPE = 'info';
10
-
11
- // function logger() {
12
- // this.colors = {
13
- // 'success': ['\x1b[36m', '\x1b[0m'],
14
- // 'failure': ['\x1b[31m', '\x1b[0m'],
15
- // 'info': ['\x1b[33m', '\x1b[0m']
16
- // }
17
- // this.consoleLogger = console;
18
- // return {
19
- // SUCCESS_TYPE,
20
- // FAILURE_TYPE,
21
- // INFO_TYPE,
22
- // error: () => { },
23
- // info: () => { },
24
- // log: (type, message) => {
25
- // const color = this.colors[type];
26
- // console.log(type, color)
27
- // this.consoleLogger.log(`${color[0]}${message}${color[1]}`)
28
- // }
29
- // }
30
- // }
31
-
32
- // module.exports = {
33
- // Logger: logger()
34
- // }
35
-
36
7
  class LoggerImpl {
37
8
  constructor() {
38
9
  this.SUCCESS_TYPE = 'success';
@@ -54,5 +25,4 @@ class LoggerImpl {
54
25
  this.consoleLogger.log(`${color[0]}${message}${color[1]}`);
55
26
  }
56
27
  }
57
- const Logger = new LoggerImpl();
58
- exports.Logger = Logger;
28
+ const Logger = exports.Logger = new LoggerImpl();
@@ -12,24 +12,31 @@ var _path = _interopRequireDefault(require("path"));
12
12
  var _fs = _interopRequireDefault(require("fs"));
13
13
  var _logger = require("./logger");
14
14
  var _getFilePath = _interopRequireDefault(require("./getFilePath"));
15
- function findBinaryPath(directory, command) {
16
- const binaryPath = _path.default.join(directory, '.bin', (0, _getFilePath.default)(command));
17
- if (_fs.default.existsSync(binaryPath)) {
18
- return binaryPath;
15
+ // TODO: Publish and check this change of finding package.json working fine.
16
+ function findPath(directory, pathToFind) {
17
+ const filePath = _path.default.join(directory, pathToFind);
18
+ if (_fs.default.existsSync(filePath)) {
19
+ return filePath;
19
20
  }
20
-
21
- // Recursively search parent directories. Might be time-consuming ?? Can we look for npm module like which?
22
21
  const parentDir = _path.default.dirname(directory);
23
22
  if (parentDir === directory) {
24
23
  return null;
25
24
  }
26
- return findBinaryPath(parentDir, command);
25
+ return findPath(parentDir, pathToFind);
26
+ }
27
+ function findPackageJSON(startDir) {
28
+ return findPath(startDir, 'package.json');
29
+ }
30
+ function findBinaryPath(directory, command) {
31
+ const binaryPath = _path.default.join('.bin', (0, _getFilePath.default)(command));
32
+ return findPath(directory, binaryPath);
27
33
  }
28
34
  function getRootPath() {
29
- return _path.default.resolve(__dirname, '../', '../');
35
+ return findPackageJSON(_path.default.resolve(__dirname));
30
36
  }
31
37
  function getRootNodeModulesPath() {
32
- return _path.default.resolve(getRootPath(), 'node_modules');
38
+ const rootPath = getRootPath();
39
+ return _path.default.resolve(_path.default.dirname(rootPath), 'node_modules');
33
40
  }
34
41
  function getBinPath(command) {
35
42
  const packageNodeModulesPath = getRootNodeModulesPath();
@@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.delimiters = void 0;
7
7
  exports.findDelimiterFromStep = findDelimiterFromStep;
8
- const delimiters = ["Given", "When", "Then", "And"];
9
- exports.delimiters = delimiters;
8
+ const delimiters = exports.delimiters = ["Given", "When", "Then", "And"];
10
9
  function findDelimiterFromStep(step) {
11
10
  return delimiters.find(delimiter => step.includes(delimiter));
12
11
  }
package/changelog.md ADDED
@@ -0,0 +1,167 @@
1
+ # Testing Framework
2
+
3
+ ## Framework that abstracts the configuration for playwright and Jest
4
+ # 0.2.4
5
+ - Issue fixes on custom fixtures
6
+ - Page Fixture
7
+ - i18n Fixture
8
+
9
+ # 0.2.1
10
+ **Issue Fixes**
11
+ - Fixes issue in actors configuration
12
+ - Added Error Logger
13
+
14
+ # 0.2.0
15
+ **Major Breaking Change**
16
+ - Removed Env-config.json in favour of conf/*/settings.json
17
+ - Mode in uat.config.js is deprecated. Use command args instead
18
+
19
+ **Enhancements**
20
+ - Playwright version updated to 1.42.1
21
+ - Playwright-bdd version updated to 6.1.1
22
+ - Tags Support
23
+ - Added getMetaInfo fixture to get the actors Info data
24
+
25
+ **Issue Fixes**
26
+ - Fixes #10- Mode config not working properly
27
+
28
+ # 0.1.9
29
+ **Enhancements**
30
+ - Added option to specify browsers in command line.
31
+ - npm run uat -- --browsers='chrome,firefox'
32
+ - Playwright version updated to 1.41.1
33
+ - Added option to Skip Browser download
34
+ - Added New Command re-run-failed to run only the failed cases
35
+ **Major Change**
36
+ - Default fixtures moved inside the library.(Page, Context, i18N, unauthenticatedPage)
37
+ **Internal Library Change**
38
+ Examples folder updated to latest testing library version.
39
+
40
+ # 0.1.8
41
+ **Issue Fixes**
42
+ - Fix #9 Custom report generate Error on Windows
43
+ - Add Tags annotations only on bddMode
44
+
45
+ **Enhancements**
46
+ - Added Failed steps in test summary
47
+
48
+ # 0.1.7
49
+ **Enhancements**
50
+ - Added option to run teardown logic.
51
+ - Added support for tag based filtering.
52
+ - Playwright-bdd version updated to 5.6.0.
53
+ - New fixture added to add tag as annotations in test report
54
+
55
+ **Issue Fixes**
56
+ - Edition command option. Fixed the edition tags not generated properly
57
+
58
+ # 0.1.6
59
+
60
+ **Enhancements**
61
+ - New Command option Added `--edition`.
62
+ - New Configuration Added `editionOrder`.
63
+ `In uat.config.js, editionOrder: ['Free', 'Express']`
64
+ - Cache Layer added
65
+
66
+ **USAGE**
67
+ - npm run uat --edition="Free"
68
+
69
+
70
+
71
+ # 0.1.5
72
+
73
+ **Enhancements**
74
+
75
+ - Playwright version updated to `1.40.1`
76
+ - And and But Support added
77
+ - Added Code Suggestions support
78
+ - Custom Reporter added. Now the report will be available in json format.
79
+ - New Commands added.
80
+
81
+ `- help: npx ZDTestingFramework help`
82
+
83
+ - Will list down the commands available in the tool
84
+
85
+ `- clearCaches: npx ZDTestingFramework clearCaches`
86
+
87
+ - Will clear the exisiting cookies in the authentication setup
88
+
89
+ **Issue Fixes**
90
+
91
+ - Fixed Issue that occurs while quitting node process.
92
+
93
+ # 0.1.4
94
+
95
+ - `testIdAttribute` config added
96
+ - Fixed issue while reading boolean configuration values
97
+
98
+ # 0.1.3
99
+
100
+ - uat config sample file updated with `bddMode` and `viewport` values
101
+ - user configuration issue fix when the value is undefined
102
+
103
+ # 0.1.2
104
+
105
+ - Bdd version updated to `5.4.0`
106
+ - Playwright version updated to `1.39.0`
107
+
108
+ # 0.1.1
109
+
110
+ - Fixed post install script error
111
+ - Fixed error `@cucumber/gherkin` not found. Cause of this issue is updating @cucumber/cucumber to 9.5.0. Reverting this version to 9.2.0
112
+ - Removed testing library exports
113
+
114
+ # 0.1.0
115
+
116
+ - Removed eslint as dev dependencies as it causes `npm aliases not supported error` for npm version < 6
117
+
118
+ # 0.0.9
119
+
120
+ - Video sized in report adjusted to viewport size
121
+ - Changes in package.json scripts while setting up project
122
+
123
+ # 0.0.8
124
+
125
+ - Tags Support
126
+ - Enable running without bddmode feature
127
+ - viewport configuration
128
+ - Internal Change - Code refactoring
129
+
130
+ # 0.0.7
131
+
132
+ - Removed react and react-dom as dependencies. Added this as peer dependency
133
+
134
+ # 0.0.6
135
+
136
+ ## Provided Initial Support for cucumber feature files
137
+
138
+ - Playwright-bdd and cucumber added as dependencies
139
+ - Added config bddMode which toggles the feature files processing
140
+ - Added expect timeout and test timeout as an option
141
+ - Decorators support for given, when and then. Typescript support needed to use this feature
142
+
143
+ ## Internal Library change
144
+
145
+ - Provided support for import/export statements
146
+
147
+ # 0.0.5
148
+
149
+ - Added Init command to initialize the folder structure and configuration for testing
150
+ - Renamed config.json to env-config.json
151
+ - Configured report file path directory and Handled Edge case in Cookies Handling
152
+
153
+ # 0.0.4
154
+
155
+ - Issue Fixes while loading the storage state
156
+
157
+ # 0.0.3
158
+
159
+ - Added Support for custom config generator based on user preferences
160
+
161
+ # 0.0.2
162
+
163
+ - Fix for Finding directories inside node_modules folder
164
+
165
+ # 0.0.1
166
+
167
+ - test and report command support
package/jest.config.js CHANGED
@@ -5,8 +5,18 @@ const appPath = process.cwd();
5
5
  const appGlobals = path.resolve(appPath, '__testUtils__', 'globals.js');
6
6
 
7
7
  module.exports = {
8
+ reporters: [
9
+ "default",
10
+ [
11
+ "jest-html-reporter",
12
+ {
13
+ outputPath: "unit_reports/unit-report.html",
14
+ pageTitle: "Unit Report"
15
+ }
16
+ ]
17
+ ],
8
18
  rootDir: process.cwd(),
9
- testEnvironment: 'jsdom',
19
+ testEnvironment: 'node',
10
20
 
11
21
  setupFilesAfterEnv: [
12
22
  existsSync(appGlobals) && appGlobals,
@@ -21,13 +31,21 @@ module.exports = {
21
31
  'jest',
22
32
  'preprocessor',
23
33
  'jsPreprocessor.js'
24
- )
34
+ ),
35
+ '^.+\\.jsx?$': 'babel-jest'
25
36
  },
37
+
38
+ testMatch: ['**/__tests__/**/*.test.js'],
26
39
 
27
40
  modulePathIgnorePatterns: ['/build/'],
28
41
 
29
42
  transformIgnorePatterns: [
30
- '/node_modules/(?!(@zohodesk)/)'
43
+ '/node_modules/',
44
+ '/src/setup-folder-structure/samples/'
45
+ ],
46
+
47
+ coveragePathIgnorePatterns:[
48
+ '/src/setup-folder-structure/samples/'
31
49
  ],
32
50
 
33
51
  testPathIgnorePatterns: [
@@ -48,14 +66,14 @@ module.exports = {
48
66
  collectCoverageFrom: ['src/**/*.js'],
49
67
  coverageDirectory: './build/cov',
50
68
  coverageReporters: ['lcov', 'json', 'html', 'json-summary', 'text'],
51
- coverageThreshold: {
52
- global: {
53
- branches: 100,
54
- functions: 100,
55
- lines: 100,
56
- statements: 100
57
- }
58
- },
69
+ // coverageThreshold: {
70
+ // global: {
71
+ // branches: 100,
72
+ // functions: 100,
73
+ // lines: 100,
74
+ // statements: 100
75
+ // }
76
+ // },
59
77
  globals: {
60
78
  __DEVELOPMENT__: true,
61
79
  __DOCS__: false,