@zohodesk/testinglibrary 4.0.4 → 4.0.6

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/README.md CHANGED
@@ -17,6 +17,17 @@
17
17
 
18
18
  - npm run report
19
19
 
20
+ ### v4.0.6/v3.2.21 - 22-01-2026
21
+
22
+ #### Bug fix
23
+ - Retry added for Missing Step Definitions Issue in the Feature Files
24
+
25
+ ### v4.0.5 - 08-01-2026
26
+
27
+ #### Bug fix
28
+ - @cucumber/cucumber depedency removed from testing-framework package.json
29
+
30
+
20
31
  ### v4.0.4/v3.2.20 - 19-12-2025
21
32
 
22
33
  #### Enhancement
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
 
3
- require("@testing-library/jest-dom/extend-expect");
3
+ require("@testing-library/jest-dom");
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PREPROCESSING_RETRY_MAX_ATTEMPTS = exports.PREPROCESSING_RETRY_DELAY_MS = void 0;
7
+ const PREPROCESSING_RETRY_MAX_ATTEMPTS = exports.PREPROCESSING_RETRY_MAX_ATTEMPTS = 1;
8
+ const PREPROCESSING_RETRY_DELAY_MS = exports.PREPROCESSING_RETRY_DELAY_MS = 2000;
@@ -9,6 +9,7 @@ var _child_process = require("child_process");
9
9
  var _RunnerHelper = _interopRequireDefault(require("./RunnerHelper"));
10
10
  var _Runner = _interopRequireDefault(require("./Runner"));
11
11
  var _commonUtils = require("../../../utils/commonUtils");
12
+ var _retryConstants = require("../../playwright/constants/retryConstants");
12
13
  class SpawnRunner extends _Runner.default {
13
14
  constructor(runnerObj) {
14
15
  super(runnerObj);
@@ -23,13 +24,31 @@ class SpawnRunner extends _Runner.default {
23
24
  bddMode
24
25
  } = config.getAll();
25
26
  if (bddMode) {
26
- promises.push(this.runPreprocessing());
27
+ promises.push(this.runPreprocessingWithRetry());
27
28
  }
28
29
  Promise.all(promises).then(() => this.runPlaywright()).catch(err => {
29
30
  _logger.Logger.error(err);
30
31
  process.exit();
31
32
  });
32
33
  }
34
+
35
+ // This below Retry wrapper function for preprocessing the feature files Missing Step Definitions Issue
36
+
37
+ async runPreprocessingWithRetry(maxRetries = _retryConstants.PREPROCESSING_RETRY_MAX_ATTEMPTS, delayMs = _retryConstants.PREPROCESSING_RETRY_DELAY_MS) {
38
+ for (let attempt = 1; attempt <= maxRetries + 1; attempt++) {
39
+ try {
40
+ await this.runPreprocessing();
41
+ return;
42
+ } catch (err) {
43
+ if (attempt > maxRetries) {
44
+ _logger.Logger.log(_logger.Logger.FAILURE_TYPE, `Preprocessing failed after ${attempt} attempts`);
45
+ throw err;
46
+ }
47
+ _logger.Logger.log(_logger.Logger.INFO_TYPE, `Preprocessing failed (attempt ${attempt} of ${maxRetries + 1}). Retrying in ${delayMs}ms...`);
48
+ await new Promise(resolve => setTimeout(resolve, delayMs));
49
+ }
50
+ }
51
+ }
33
52
  runPreprocessing() {
34
53
  //This below functoin is called to copy the data generator spec files to the current project
35
54
  (0, _commonUtils.copyCommonSpecs)();
@@ -65,7 +65,7 @@ function deleteFile(filePath) {
65
65
  function deleteFolder(folderPath) {
66
66
  if (_fs.default.existsSync(folderPath)) {
67
67
  try {
68
- _fs.default.rmdirSync(folderPath, {
68
+ _fs.default.rmSync(folderPath, {
69
69
  recursive: true
70
70
  });
71
71
  } catch (err) {