@zohodesk/testinglibrary 3.2.19 → 3.2.21

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/.gitlab-ci.yml CHANGED
@@ -1,4 +1,4 @@
1
- image: repository.desk.csez.zohocorpin.com/base-image/testing-framework-gitlab-runne-base:v3
1
+ image: zdesk-auto13.csez.zohocorpin.com/long-term-storage/node18-npm10:v2
2
2
 
3
3
  workflow:
4
4
  rules:
@@ -188,19 +188,21 @@ uat-data_generator:
188
188
  paths:
189
189
  - examples/uat/playwright-report
190
190
 
191
- # uat-search_indexing:
192
- # stage: uat
193
- # script:
194
- # - cd examples
195
- # - npm install $(npm pack ../../testing-framework | tail -1)
196
- # - output=$(npm run uat-search_indexing)
197
- # - echo "$output"
198
- # - node ../ValidateUATReport.js examples
199
-
200
- # artifacts:
201
- # when: always
202
- # paths:
203
- # - examples/uat/playwright-report
191
+ uat-search_indexing:
192
+ stage: uat
193
+ script:
194
+ - cd examples
195
+ - npm install $(npm pack ../../testing-framework | tail -1)
196
+ - echo "Removing jsonpath from examples/node_modules to avoid conflicts"
197
+ - rm -rf node_modules/jsonpath || true
198
+ - output=$(npm run uat-search_indexing)
199
+ - echo "$output"
200
+ - node ../ValidateUATReport.js examples
201
+
202
+ artifacts:
203
+ when: always
204
+ paths:
205
+ - examples/uat/playwright-report
204
206
 
205
207
 
206
208
 
package/README.md CHANGED
@@ -17,12 +17,41 @@
17
17
 
18
18
  - npm run report
19
19
 
20
+ ### v4.0.6/v3.2.21 - 22-01-2026
20
21
 
21
- ### v3.2.19 - 17-12-2025
22
+ #### Bug fix
23
+ - Retry added for Missing Step Definitions Issue in the Feature Files
24
+
25
+ ### v4.0.4/v3.2.20 - 19-12-2025
26
+
27
+ #### Enhancement
28
+ - New common step provided for search index with the data generated entity
29
+
30
+ ### v4.0.3/v3.2.19 - 17-12-2025
22
31
 
23
32
  #### Enhancement
24
33
  - Cookie storage prefix support is provided in this version.
25
34
 
35
+
36
+ ### v4.0.2 - 16-12-2025
37
+
38
+ #### Bug Fixes
39
+
40
+ - Deprecated the react and react hooks from dependencies
41
+ - @cucumber/cucumber - 10.9.0 version downgraded due to Missing Step Definition Issue
42
+
43
+
44
+ ### v4.0.0 - 04-12-2025
45
+
46
+ #### Features
47
+ - Supported node 20 for the testing-framework
48
+
49
+ - Below package versions are updated in this release.
50
+ - playwright - 1.56.1,
51
+ - playwright-bdd - 8.4.2,
52
+ - @playwright/test - 1.56.1,
53
+ - @cucumber/cucumber - 12.2.0
54
+
26
55
  ### v3.2.15 - 14-11-2025
27
56
 
28
57
  #### Enhancement
@@ -1,6 +1,6 @@
1
- import {createBdd } from '@zohodesk/testinglibrary';
1
+ import {createBdd} from '@zohodesk/testinglibrary';
2
+ import { jsonpath } from '@zohodesk/testinglibrary/thirdPartyHelper';
2
3
  import { executeRpcRequest , entityIdReConstructor } from '../helpers/rpcRequestHelper';
3
- // import jp from 'jsonpath';
4
4
 
5
5
  const { Given } = createBdd();
6
6
 
@@ -54,7 +54,7 @@ Given('a search entity using {string}', async ({page,cacheLayer}, reference,data
54
54
  entityIdValue = searchObj;
55
55
  } else {
56
56
  const jsonPath = searchEntity?.startsWith?.('$') ? searchEntity : `$.${searchEntity}`;
57
- const result = null;//jp.query(searchObj, jsonPath);
57
+ const result = jsonpath.query(searchObj, jsonPath);
58
58
 
59
59
  if (!result || result.length === 0) {
60
60
  throw new Error(`JSONPath query '${jsonPath}' returned no results from cache object for reference: ${reference}`);
@@ -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;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "jsonpath", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return _jsonpath.default;
11
+ }
12
+ });
13
+ var _jsonpath = _interopRequireDefault(require("jsonpath"));
@@ -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)();