@zohodesk/testinglibrary 0.5.11-n18-experimental → 0.5.13-n18-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.
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
 
@@ -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,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"));
package/build/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import {
3
3
  test,
4
4
  createBdd
5
5
  } from './core/playwright/index';
6
+ import { fireEvent, render } from '@testing-library/react';
6
7
  import {
7
8
  PlaywrightTestArgs,
8
9
  PlaywrightTestOptions,
package/build/index.js CHANGED
@@ -89,6 +89,8 @@ Object.defineProperty(exports, "verifyIfCookieFileExists", {
89
89
  }
90
90
  });
91
91
  var _index = require("./core/playwright/index");
92
+ // import { fireEvent, render } from '@testing-library/react';
93
+
92
94
  const {
93
95
  Given,
94
96
  Then,
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ delete require.cache[require.resolve('../core/playwright/runner/Runner')];
4
+ function test() {
5
+ const inputString = "@hc";
6
+ const selectedTag = ["@hc_1234"].reverse().find(tag => tag.startsWith(inputString));
7
+ let tagInput = null;
8
+ if (selectedTag) {
9
+ tagInput = selectedTag.split(`${inputString}_`).pop().toLowerCase();
10
+ }
11
+ console.log(tagInput);
12
+ }
13
+ test();