@zohodesk/testinglibrary 3.2.9 → 3.2.11

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
@@ -188,4 +188,19 @@ 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
204
+
205
+
191
206
 
package/README.md CHANGED
@@ -17,7 +17,28 @@
17
17
 
18
18
  - npm run report
19
19
 
20
- ## Version History
20
+ ### v3.2.11 - 13-10-2025
21
+
22
+ ### Feature
23
+
24
+ - New step a search entity using {string} provided for search indexing, This step will use run time data generation response as input for the indexing
25
+
26
+ ### Issue fix
27
+ - Custom teardown comment provided
28
+
29
+ ### v3.2.10 - 09-10-2025
30
+
31
+ #### Enhancement
32
+ - A teardown option has been introduced in the configuration to manage and clean up login sessions stored in the NFS environment.
33
+
34
+
35
+ ### v3.2.9 - 26-09-2025
36
+
37
+ ### Enhancement
38
+
39
+ - Authentication deatils for data generation can be configured in org level
40
+ - reference link : https://learn.zoho.in/portal/zohocorp/knowledge/manual/client-uat/article/data-generation#_Tocpd3n7yt9ngeg
41
+
21
42
 
22
43
  ### v3.2.8 - 18-09-2025
23
44
 
@@ -30,11 +30,22 @@ async function entityIdReConstructor(payload) {
30
30
  if (typeof payload !== 'object' || payload === null) {
31
31
  throw new Error('Invalid payload. It must be a non-null object.');
32
32
  }
33
- if (!payload.arguments || typeof payload.arguments.entityId !== 'string') {
34
- throw new Error('Invalid payload.arguments.entityId. It must be a non-empty string.');
33
+
34
+ if (!payload.arguments || (!payload.arguments.entityId)) {
35
+ throw new Error('Invalid payload.arguments.entityId. It must be a non-empty string or array of strings.');
36
+ }
37
+
38
+ const entityId = payload.arguments.entityId;
39
+
40
+ // If it's already an array, validate and clean it
41
+ if (Array.isArray(entityId)) {
42
+ payload.arguments.entityId = entityId.map(id => id.trim());
43
+ }
44
+ // If it's a string, split and convert to array
45
+ else if (typeof entityId === 'string') {
46
+ payload.arguments.entityId = entityId.split(',').map(id => id.trim());
35
47
  }
36
48
 
37
- payload.arguments.entityId = payload.arguments.entityId.split(',').map(id => id.trim());
38
49
  return payload;
39
50
  }
40
51
 
@@ -1,8 +1,14 @@
1
1
  import {createBdd } from '@zohodesk/testinglibrary';
2
2
  import { executeRpcRequest , entityIdReConstructor } from '../helpers/rpcRequestHelper';
3
+ import jp from 'jsonpath';
3
4
 
4
5
  const { Given } = createBdd();
5
6
 
7
+
8
+ // Given a search entity
9
+ // | moduleName | entityId | entityName | searchString |
10
+ // | contact | 122000006785675, 122000007141665, 122000006636472 | QA Team | testinguat |
11
+
6
12
  Given('a search entity', async ({page}, dataTable)=>{
7
13
  const data = dataTable.hashes();
8
14
 
@@ -22,5 +28,50 @@ Given('a search entity', async ({page}, dataTable)=>{
22
28
 
23
29
  await executeRpcRequest(page, payload);
24
30
  }
25
-
26
31
  });
32
+
33
+ // Given data generation step
34
+ // Given a search entity using "C1"
35
+ // | moduleName | searchString | searchEntity (response of the previous data generation step) |
36
+ // | contact | testinguat | $.id |
37
+ // | contact | testinguat | $.ids |
38
+ // | contact | testinguat |
39
+
40
+ Given('a search entity using {string}', async ({page,cacheLayer}, reference,dataTable)=>{
41
+ const data = dataTable.hashes();
42
+
43
+ const row = data[0];
44
+ if (!row || !row.moduleName || !row.searchString) {
45
+ throw new Error('Invalid or missing data in dataTable');
46
+ }
47
+
48
+ const { moduleName, searchEntity, searchString } = row;
49
+
50
+ const searchObj = cacheLayer.get(reference);
51
+ let entityIdValue;
52
+
53
+ if (typeof searchObj === 'string') {
54
+ entityIdValue = searchObj;
55
+ } else {
56
+ const jsonPath = searchEntity?.startsWith?.('$') ? searchEntity : `$.${searchEntity}`;
57
+ const result = jp.query(searchObj, jsonPath);
58
+
59
+ if (!result || result.length === 0) {
60
+ throw new Error(`JSONPath query '${jsonPath}' returned no results from cache object for reference: ${reference}`);
61
+ }
62
+
63
+ entityIdValue = result.length === 1 ? result[0] : result;
64
+ }
65
+
66
+ const payload = {
67
+ className: 'applicationDriver.rpc.desk.integrations.search.SearchFakeDataPopulator',
68
+ methodName: 'populateSearchData',
69
+ arguments: {
70
+ module: moduleName,
71
+ searchString: searchString,
72
+ entityId: entityIdValue
73
+ }
74
+ };
75
+ await entityIdReConstructor(payload);
76
+ await executeRpcRequest(page, payload);
77
+ });
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.CUSTOM_COMMANDS = void 0;
7
- const CUSTOM_COMMANDS = exports.CUSTOM_COMMANDS = ['mode', 'tags', 'edition', 'browsers', 'filePath', 'headless', 'modules'];
7
+ const CUSTOM_COMMANDS = exports.CUSTOM_COMMANDS = ['mode', 'tags', 'edition', 'browsers', 'filePath', 'headless', 'modules', 'isTearDown'];
@@ -19,6 +19,7 @@ var _ConfigurationHelper = require("./configuration/ConfigurationHelper");
19
19
  let cachedConfig = null;
20
20
  function getDefaultConfig() {
21
21
  return {
22
+ isTearDown: true,
22
23
  uatDirectory: _path.default.join(process.cwd(), 'uat'),
23
24
  headless: false,
24
25
  browsers: ['Chrome'],
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ class Project {
4
+ constructor(name) {
5
+ this.properties = {};
6
+ this.properties.name = name;
7
+ }
8
+ setTestDir(value) {
9
+ this.properties.testDir = value;
10
+ }
11
+ setTestMatch(value) {
12
+ this.properties.testMatch = value;
13
+ }
14
+ setRetries(value) {
15
+ this.properties.retries = value;
16
+ }
17
+ setUse(value) {
18
+ this.properties.use = value;
19
+ }
20
+ setTearDown(value) {
21
+ this.properties.teardown = value;
22
+ }
23
+ setDependencies(value) {
24
+ this.properties.dependencies = value;
25
+ }
26
+ setProperty(key, value) {
27
+ this.properties[key] = value;
28
+ }
29
+ getProperties() {
30
+ return this.properties;
31
+ }
32
+ }
33
+ module.exports = {
34
+ Project
35
+ };
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.cleanupConfig = cleanupConfig;
8
+ exports.setupConfig = setupConfig;
9
+ exports.smokeTestConfig = smokeTestConfig;
10
+ var _path = _interopRequireDefault(require("path"));
11
+ var _Project = require("./Project");
12
+ var _configUtils = require("./config-utils");
13
+ var _readConfigFile = require("../readConfigFile");
14
+ const uatConfig = (0, _readConfigFile.generateConfigFromFile)();
15
+ const {
16
+ isAuthMode,
17
+ isSmokeTest,
18
+ bddMode,
19
+ authFilePath,
20
+ trace,
21
+ video,
22
+ testIdAttribute,
23
+ viewport
24
+ } = uatConfig;
25
+ function setupConfig() {
26
+ const setupProject = new _Project.Project('setup');
27
+ setupProject.setTestMatch(/.*\.setup\.js/);
28
+ setupProject.setTestDir(_path.default.join(process.cwd(), 'uat'));
29
+ const isTearDown = JSON.parse(process.env.tearDown);
30
+ setupProject.setTearDown(isTearDown ? 'cleanup' : '');
31
+ const setupProjectConfig = [setupProject.getProperties()];
32
+ return setupProjectConfig;
33
+ }
34
+ function smokeTestConfig() {
35
+ const smokeTestProject = new _Project.Project('smokeTest');
36
+ const smokeTestDir = (0, _configUtils.getTestDir)(bddMode, {
37
+ featureFilesFolder: _path.default.join(process.cwd(), 'uat', 'smokeTest', '**', '*.feature'),
38
+ stepDefinitionsFolder: _path.default.join(process.cwd(), 'uat', '**', 'steps', '*.spec.js'),
39
+ outputDir: _path.default.join(process.cwd(), 'uat', '.features-smoke-gen'),
40
+ uatPath: _path.default.join(process.cwd(), 'uat', 'smokeTest')
41
+ });
42
+ const commonConfig = {
43
+ storageState: isAuthMode ? (0, _readConfigFile.getAuthFilePath)(_path.default.resolve(process.cwd(), authFilePath)) : {}
44
+ };
45
+ smokeTestProject.setTestDir(smokeTestDir);
46
+ smokeTestProject.setRetries(0);
47
+ smokeTestProject.setUse({
48
+ ...commonConfig
49
+ });
50
+ smokeTestProject.setDependencies(isAuthMode ? ['setup'] : []);
51
+ const smokeTestProjectConfig = [smokeTestProject.getProperties()];
52
+ return smokeTestProjectConfig;
53
+ }
54
+ function defaultConfig() {
55
+ const defaultProject = new _Project.Project('default');
56
+ const testDir = (0, _configUtils.getTestDir)(bddMode, {
57
+ featureFilesFolder: (0, _configUtils.getPathsForFeatureFiles)(process.cwd()),
58
+ stepDefinitionsFolder: _path.default.join(process.cwd(), 'uat', '**', 'steps', '*.spec.js'),
59
+ outputDir: _path.default.join(process.cwd(), 'uat', '.features-gen'),
60
+ uatPath: _path.default.join(process.cwd(), 'uat')
61
+ });
62
+ const use = {
63
+ trace,
64
+ video,
65
+ viewport,
66
+ testIdAttribute
67
+ };
68
+ defaultProject.setUse(use);
69
+ defaultProject.setTestDir(testDir);
70
+ defaultProject.setDependencies(isSmokeTest ? ['smokeTest'] : []);
71
+ const defaultProjectConfig = [defaultProject.getProperties()];
72
+ return defaultProjectConfig;
73
+ }
74
+ function cleanupConfig() {
75
+ const cleanupProject = new _Project.Project('cleanup');
76
+ cleanupProject.setTestMatch(/.*\.teardown\.js/);
77
+ cleanupProject.setTestDir(_path.default.join(process.cwd(), 'uat'));
78
+ const cleanupProjectConfig = [cleanupProject.getProperties()];
79
+ return cleanupProjectConfig;
80
+ }
@@ -9,25 +9,24 @@ var _test = require("@playwright/test");
9
9
  var _path = _interopRequireDefault(require("path"));
10
10
  var _readConfigFile = require("../readConfigFile");
11
11
  var _configUtils = require("./config-utils");
12
+ var _ProjectConfiguration = require("./ProjectConfiguration");
12
13
  const uatConfig = (0, _readConfigFile.generateConfigFromFile)();
13
14
  const {
15
+ bddMode,
14
16
  browsers,
15
17
  isSmokeTest,
16
- trace,
17
- video,
18
18
  isAuthMode,
19
19
  openReportOn,
20
20
  reportPath,
21
- bddMode,
22
21
  expectTimeout,
23
22
  testTimeout,
24
23
  authFilePath,
25
24
  viewport,
26
- featureFilesFolder,
27
- stepDefinitionsFolder,
28
- testIdAttribute,
29
25
  globalTimeout,
30
- customReporter
26
+ customReporter,
27
+ trace,
28
+ video,
29
+ testIdAttribute
31
30
  } = uatConfig;
32
31
  const projects = (0, _configUtils.getProjects)({
33
32
  browsers,
@@ -38,18 +37,6 @@ const projects = (0, _configUtils.getProjects)({
38
37
  testTimeout,
39
38
  viewport
40
39
  });
41
- const testDir = (0, _configUtils.getTestDir)(bddMode, {
42
- featureFilesFolder: (0, _configUtils.getPathsForFeatureFiles)(process.cwd()),
43
- stepDefinitionsFolder: _path.default.join(process.cwd(), 'uat', '**', 'steps', '*.spec.js'),
44
- outputDir: _path.default.join(process.cwd(), 'uat', '.features-gen'),
45
- uatPath: _path.default.join(process.cwd(), 'uat')
46
- });
47
- const use = {
48
- trace,
49
- video,
50
- viewport,
51
- testIdAttribute
52
- };
53
40
  let reporter = [['html', {
54
41
  outputFolder: reportPath,
55
42
  open: openReportOn
@@ -66,29 +53,23 @@ if (customReporter) {
66
53
  * @returns {import('@playwright/test').PlaywrightTestConfig}
67
54
  */
68
55
 
56
+ const use = {
57
+ trace,
58
+ video,
59
+ viewport,
60
+ testIdAttribute
61
+ };
62
+ const testDir = (0, _configUtils.getTestDir)(bddMode, {
63
+ featureFilesFolder: (0, _configUtils.getPathsForFeatureFiles)(process.cwd()),
64
+ stepDefinitionsFolder: _path.default.join(process.cwd(), 'uat', '**', 'steps', '*.spec.js'),
65
+ outputDir: _path.default.join(process.cwd(), 'uat', '.features-gen'),
66
+ uatPath: _path.default.join(process.cwd(), 'uat')
67
+ });
69
68
  function getPlaywrightConfig() {
70
- const commonConfig = {
71
- storageState: isAuthMode ? (0, _readConfigFile.getAuthFilePath)(_path.default.resolve(process.cwd(), authFilePath)) : {}
72
- };
73
- const dependencies = isAuthMode ? ['setup'] : [];
74
- const smokeTestProject = isSmokeTest ? smokeTestConfig() : [];
75
- function smokeTestConfig() {
76
- const smokeTestDir = (0, _configUtils.getTestDir)(bddMode, {
77
- featureFilesFolder: _path.default.join(process.cwd(), 'uat', 'smokeTest', '**', '*.feature'),
78
- stepDefinitionsFolder: _path.default.join(process.cwd(), 'uat', '**', 'steps', '*.spec.js'),
79
- outputDir: _path.default.join(process.cwd(), 'uat', '.features-smoke-gen'),
80
- uatPath: _path.default.join(process.cwd(), 'uat', 'smokeTest')
81
- });
82
- return [{
83
- name: 'smokeTest',
84
- testDir: smokeTestDir,
85
- use: {
86
- ...commonConfig
87
- },
88
- dependencies: dependencies,
89
- retries: 0
90
- }];
91
- }
69
+ const smokeTestProject = isSmokeTest ? (0, _ProjectConfiguration.smokeTestConfig)() : [];
70
+ const setupProject = isAuthMode ? (0, _ProjectConfiguration.setupConfig)() : [];
71
+ const isTearDown = JSON.parse(process.env.tearDown);
72
+ const cleanupProject = isTearDown ? (0, _ProjectConfiguration.cleanupConfig)() : [];
92
73
  const playwrightConfig = {
93
74
  testDir,
94
75
  globalTimeout: globalTimeout || 3600000,
@@ -100,16 +81,7 @@ function getPlaywrightConfig() {
100
81
  timeout: expectTimeout
101
82
  },
102
83
  use,
103
- projects: isAuthMode ? [{
104
- name: 'setup',
105
- testMatch: /.*\.setup\.js/,
106
- testDir: _path.default.join(process.cwd(), 'uat'),
107
- teardown: 'cleanup'
108
- }, ...smokeTestProject, {
109
- name: 'cleanup',
110
- testMatch: /.*\.teardown\.js/,
111
- testDir: _path.default.join(process.cwd(), 'uat')
112
- }, ...projects] : [...projects, ...smokeTestProject],
84
+ projects: [...setupProject, ...smokeTestProject, ...projects, ...cleanupProject],
113
85
  ...uatConfig
114
86
  };
115
87
  return playwrightConfig;
@@ -90,9 +90,11 @@ function main() {
90
90
  // overriding the user config's from CLI
91
91
  uatConfig.addAll(userArgConfig);
92
92
  const modules = uatConfig.get('modules');
93
+ const tearDown = uatConfig.get('isTearDown');
93
94
 
94
95
  //We need to change this process.env variable to pass the module name in future.
95
96
  process.env.modules = modules;
97
+ process.env.tearDown = tearDown;
96
98
  const {
97
99
  isAuthMode,
98
100
  editionOrder,
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@zohodesk/testinglibrary",
3
- "version": "3.2.9",
3
+ "version": "3.2.11",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@zohodesk/testinglibrary",
9
- "version": "3.2.9",
9
+ "version": "3.2.11",
10
10
  "hasInstallScript": true,
11
11
  "license": "ISC",
12
12
  "dependencies": {
@@ -23,6 +23,7 @@
23
23
  "fast-glob": "3.3.1",
24
24
  "jest": "29.6.2",
25
25
  "jest-environment-jsdom": "29.6.2",
26
+ "jsonpath": "1.1.1",
26
27
  "msw": "1.2.3",
27
28
  "playwright": "1.53.2",
28
29
  "playwright-bdd": "8.3.1",
@@ -2410,9 +2411,9 @@
2410
2411
  }
2411
2412
  },
2412
2413
  "node_modules/@eslint/js": {
2413
- "version": "9.35.0",
2414
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.35.0.tgz",
2415
- "integrity": "sha512-30iXE9whjlILfWobBkNerJo+TXYsgVM5ERQwMcMKCHckHflCmf7wXDAHlARoWnh0s1U72WqlbeyE7iAcCzuCPw==",
2414
+ "version": "9.36.0",
2415
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.36.0.tgz",
2416
+ "integrity": "sha512-uhCbYtYynH30iZErszX78U+nR3pJU3RHGQ57NXy5QupD4SBVwDeU8TNBy+MjMngc1UyIW9noKqsRqfjQTBU2dw==",
2416
2417
  "license": "MIT",
2417
2418
  "peer": true,
2418
2419
  "engines": {
@@ -4048,9 +4049,9 @@
4048
4049
  "license": "MIT"
4049
4050
  },
4050
4051
  "node_modules/@types/node": {
4051
- "version": "24.5.0",
4052
- "resolved": "https://registry.npmjs.org/@types/node/-/node-24.5.0.tgz",
4053
- "integrity": "sha512-y1dMvuvJspJiPSDZUQ+WMBvF7dpnEqN4x9DDC9ie5Fs/HUZJA3wFp7EhHoVaKX/iI0cRoECV8X2jL8zi0xrHCg==",
4052
+ "version": "24.5.2",
4053
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.5.2.tgz",
4054
+ "integrity": "sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ==",
4054
4055
  "license": "MIT",
4055
4056
  "dependencies": {
4056
4057
  "undici-types": "~7.12.0"
@@ -4682,9 +4683,9 @@
4682
4683
  "license": "MIT"
4683
4684
  },
4684
4685
  "node_modules/baseline-browser-mapping": {
4685
- "version": "2.8.4",
4686
- "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.4.tgz",
4687
- "integrity": "sha512-L+YvJwGAgwJBV1p6ffpSTa2KRc69EeeYGYjRVWKs0GKrK+LON0GC0gV+rKSNtALEDvMDqkvCFq9r1r94/Gjwxw==",
4686
+ "version": "2.8.6",
4687
+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.6.tgz",
4688
+ "integrity": "sha512-wrH5NNqren/QMtKUEEJf7z86YjfqW/2uw3IL3/xpqZUC95SSVIFXYQeeGjL6FT/X68IROu6RMehZQS5foy2BXw==",
4688
4689
  "license": "Apache-2.0",
4689
4690
  "bin": {
4690
4691
  "baseline-browser-mapping": "dist/cli.js"
@@ -4736,9 +4737,9 @@
4736
4737
  }
4737
4738
  },
4738
4739
  "node_modules/browserslist": {
4739
- "version": "4.26.0",
4740
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.0.tgz",
4741
- "integrity": "sha512-P9go2WrP9FiPwLv3zqRD/Uoxo0RSHjzFCiQz7d4vbmwNqQFo9T9WCeP/Qn5EbcKQY6DBbkxEXNcpJOmncNrb7A==",
4740
+ "version": "4.26.2",
4741
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.2.tgz",
4742
+ "integrity": "sha512-ECFzp6uFOSB+dcZ5BK/IBaGWssbSYBHvuMeMt3MMFyhI0Z8SqGgEkBLARgpRH3hutIgPVsALcMwbDrJqPxQ65A==",
4742
4743
  "funding": [
4743
4744
  {
4744
4745
  "type": "opencollective",
@@ -4755,7 +4756,7 @@
4755
4756
  ],
4756
4757
  "license": "MIT",
4757
4758
  "dependencies": {
4758
- "baseline-browser-mapping": "^2.8.2",
4759
+ "baseline-browser-mapping": "^2.8.3",
4759
4760
  "caniuse-lite": "^1.0.30001741",
4760
4761
  "electron-to-chromium": "^1.5.218",
4761
4762
  "node-releases": "^2.0.21",
@@ -4873,9 +4874,9 @@
4873
4874
  }
4874
4875
  },
4875
4876
  "node_modules/caniuse-lite": {
4876
- "version": "1.0.30001741",
4877
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001741.tgz",
4878
- "integrity": "sha512-QGUGitqsc8ARjLdgAfxETDhRbJ0REsP6O3I96TAth/mVjh2cYzN2u+3AzPP3aVSm2FehEItaJw1xd+IGBXWeSw==",
4877
+ "version": "1.0.30001745",
4878
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001745.tgz",
4879
+ "integrity": "sha512-ywt6i8FzvdgrrrGbr1jZVObnVv6adj+0if2/omv9cmR2oiZs30zL4DIyaptKcbOrBdOIc74QTMoJvSE2QHh5UQ==",
4879
4880
  "funding": [
4880
4881
  {
4881
4882
  "type": "opencollective",
@@ -5431,8 +5432,7 @@
5431
5432
  "version": "0.1.4",
5432
5433
  "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
5433
5434
  "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
5434
- "license": "MIT",
5435
- "peer": true
5435
+ "license": "MIT"
5436
5436
  },
5437
5437
  "node_modules/deepmerge": {
5438
5438
  "version": "4.3.1",
@@ -5566,9 +5566,9 @@
5566
5566
  "license": "MIT"
5567
5567
  },
5568
5568
  "node_modules/electron-to-chromium": {
5569
- "version": "1.5.218",
5570
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.218.tgz",
5571
- "integrity": "sha512-uwwdN0TUHs8u6iRgN8vKeWZMRll4gBkz+QMqdS7DDe49uiK68/UX92lFb61oiFPrpYZNeZIqa4bA7O6Aiasnzg==",
5569
+ "version": "1.5.223",
5570
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.223.tgz",
5571
+ "integrity": "sha512-qKm55ic6nbEmagFlTFczML33rF90aU+WtrJ9MdTCThrcvDNdUHN4p6QfVN78U06ZmguqXIyMPyYhw2TrbDUwPQ==",
5572
5572
  "license": "ISC"
5573
5573
  },
5574
5574
  "node_modules/emittery": {
@@ -5768,12 +5768,16 @@
5768
5768
  }
5769
5769
  },
5770
5770
  "node_modules/escape-string-regexp": {
5771
- "version": "1.0.5",
5772
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
5773
- "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
5771
+ "version": "4.0.0",
5772
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
5773
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
5774
5774
  "license": "MIT",
5775
+ "peer": true,
5775
5776
  "engines": {
5776
- "node": ">=0.8.0"
5777
+ "node": ">=10"
5778
+ },
5779
+ "funding": {
5780
+ "url": "https://github.com/sponsors/sindresorhus"
5777
5781
  }
5778
5782
  },
5779
5783
  "node_modules/escodegen": {
@@ -5798,9 +5802,9 @@
5798
5802
  }
5799
5803
  },
5800
5804
  "node_modules/eslint": {
5801
- "version": "9.35.0",
5802
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.35.0.tgz",
5803
- "integrity": "sha512-QePbBFMJFjgmlE+cXAlbHZbHpdFVS2E/6vzCy7aKlebddvl1vadiC4JFV5u/wqTkNUwEV8WrQi257jf5f06hrg==",
5805
+ "version": "9.36.0",
5806
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.36.0.tgz",
5807
+ "integrity": "sha512-hB4FIzXovouYzwzECDcUkJ4OcfOEkXTv2zRY6B9bkwjx/cprAq0uvm1nl7zvQ0/TsUk0zQiN4uPfJpB9m+rPMQ==",
5804
5808
  "license": "MIT",
5805
5809
  "peer": true,
5806
5810
  "dependencies": {
@@ -5810,7 +5814,7 @@
5810
5814
  "@eslint/config-helpers": "^0.3.1",
5811
5815
  "@eslint/core": "^0.15.2",
5812
5816
  "@eslint/eslintrc": "^3.3.1",
5813
- "@eslint/js": "9.35.0",
5817
+ "@eslint/js": "9.36.0",
5814
5818
  "@eslint/plugin-kit": "^0.3.5",
5815
5819
  "@humanfs/node": "^0.16.6",
5816
5820
  "@humanwhocodes/module-importer": "^1.0.1",
@@ -5888,19 +5892,6 @@
5888
5892
  "url": "https://opencollective.com/eslint"
5889
5893
  }
5890
5894
  },
5891
- "node_modules/eslint/node_modules/escape-string-regexp": {
5892
- "version": "4.0.0",
5893
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
5894
- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
5895
- "license": "MIT",
5896
- "peer": true,
5897
- "engines": {
5898
- "node": ">=10"
5899
- },
5900
- "funding": {
5901
- "url": "https://github.com/sponsors/sindresorhus"
5902
- }
5903
- },
5904
5895
  "node_modules/eslint/node_modules/find-up": {
5905
5896
  "version": "5.0.0",
5906
5897
  "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
@@ -6208,8 +6199,7 @@
6208
6199
  "version": "2.0.6",
6209
6200
  "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
6210
6201
  "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
6211
- "license": "MIT",
6212
- "peer": true
6202
+ "license": "MIT"
6213
6203
  },
6214
6204
  "node_modules/fastq": {
6215
6205
  "version": "1.19.1",
@@ -6244,6 +6234,15 @@
6244
6234
  "url": "https://github.com/sponsors/sindresorhus"
6245
6235
  }
6246
6236
  },
6237
+ "node_modules/figures/node_modules/escape-string-regexp": {
6238
+ "version": "1.0.5",
6239
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
6240
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
6241
+ "license": "MIT",
6242
+ "engines": {
6243
+ "node": ">=0.8.0"
6244
+ }
6245
+ },
6247
6246
  "node_modules/file-entry-cache": {
6248
6247
  "version": "8.0.0",
6249
6248
  "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
@@ -6990,9 +6989,9 @@
6990
6989
  }
6991
6990
  },
6992
6991
  "node_modules/index-to-position": {
6993
- "version": "1.1.0",
6994
- "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.1.0.tgz",
6995
- "integrity": "sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg==",
6992
+ "version": "1.2.0",
6993
+ "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.2.0.tgz",
6994
+ "integrity": "sha512-Yg7+ztRkqslMAS2iFaU+Oa4KTSidr63OsFGlOrJoW981kIYO3CGCS3wA95P1mUi/IVSJkn0D479KTJpVpvFNuw==",
6996
6995
  "license": "MIT",
6997
6996
  "engines": {
6998
6997
  "node": ">=18"
@@ -9297,6 +9296,29 @@
9297
9296
  "node": ">=6"
9298
9297
  }
9299
9298
  },
9299
+ "node_modules/jsonpath": {
9300
+ "version": "1.1.1",
9301
+ "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz",
9302
+ "integrity": "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==",
9303
+ "license": "MIT",
9304
+ "dependencies": {
9305
+ "esprima": "1.2.2",
9306
+ "static-eval": "2.0.2",
9307
+ "underscore": "1.12.1"
9308
+ }
9309
+ },
9310
+ "node_modules/jsonpath/node_modules/esprima": {
9311
+ "version": "1.2.2",
9312
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz",
9313
+ "integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==",
9314
+ "bin": {
9315
+ "esparse": "bin/esparse.js",
9316
+ "esvalidate": "bin/esvalidate.js"
9317
+ },
9318
+ "engines": {
9319
+ "node": ">=0.4.0"
9320
+ }
9321
+ },
9300
9322
  "node_modules/keyv": {
9301
9323
  "version": "4.5.4",
9302
9324
  "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
@@ -10906,16 +10928,16 @@
10906
10928
  }
10907
10929
  },
10908
10930
  "node_modules/regexpu-core": {
10909
- "version": "6.3.1",
10910
- "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.3.1.tgz",
10911
- "integrity": "sha512-DzcswPr252wEr7Qz8AyAVbfyBDKLoYp6eRA1We2Fa9qirRFSdtkP5sHr3yglDKy2BbA0fd2T+j/CUSKes3FeVQ==",
10931
+ "version": "6.4.0",
10932
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz",
10933
+ "integrity": "sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==",
10912
10934
  "dev": true,
10913
10935
  "license": "MIT",
10914
10936
  "dependencies": {
10915
10937
  "regenerate": "^1.4.2",
10916
10938
  "regenerate-unicode-properties": "^10.2.2",
10917
10939
  "regjsgen": "^0.8.0",
10918
- "regjsparser": "^0.12.0",
10940
+ "regjsparser": "^0.13.0",
10919
10941
  "unicode-match-property-ecmascript": "^2.0.0",
10920
10942
  "unicode-match-property-value-ecmascript": "^2.2.1"
10921
10943
  },
@@ -10931,31 +10953,18 @@
10931
10953
  "license": "MIT"
10932
10954
  },
10933
10955
  "node_modules/regjsparser": {
10934
- "version": "0.12.0",
10935
- "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz",
10936
- "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==",
10956
+ "version": "0.13.0",
10957
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.0.tgz",
10958
+ "integrity": "sha512-NZQZdC5wOE/H3UT28fVGL+ikOZcEzfMGk/c3iN9UGxzWHMa1op7274oyiUVrAG4B2EuFhus8SvkaYnhvW92p9Q==",
10937
10959
  "dev": true,
10938
10960
  "license": "BSD-2-Clause",
10939
10961
  "dependencies": {
10940
- "jsesc": "~3.0.2"
10962
+ "jsesc": "~3.1.0"
10941
10963
  },
10942
10964
  "bin": {
10943
10965
  "regjsparser": "bin/parser"
10944
10966
  }
10945
10967
  },
10946
- "node_modules/regjsparser/node_modules/jsesc": {
10947
- "version": "3.0.2",
10948
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz",
10949
- "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==",
10950
- "dev": true,
10951
- "license": "MIT",
10952
- "bin": {
10953
- "jsesc": "bin/jsesc"
10954
- },
10955
- "engines": {
10956
- "node": ">=6"
10957
- }
10958
- },
10959
10968
  "node_modules/repeat-string": {
10960
10969
  "version": "1.6.1",
10961
10970
  "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
@@ -11489,6 +11498,96 @@
11489
11498
  "integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==",
11490
11499
  "license": "MIT"
11491
11500
  },
11501
+ "node_modules/static-eval": {
11502
+ "version": "2.0.2",
11503
+ "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz",
11504
+ "integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==",
11505
+ "license": "MIT",
11506
+ "dependencies": {
11507
+ "escodegen": "^1.8.1"
11508
+ }
11509
+ },
11510
+ "node_modules/static-eval/node_modules/escodegen": {
11511
+ "version": "1.14.3",
11512
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
11513
+ "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
11514
+ "license": "BSD-2-Clause",
11515
+ "dependencies": {
11516
+ "esprima": "^4.0.1",
11517
+ "estraverse": "^4.2.0",
11518
+ "esutils": "^2.0.2",
11519
+ "optionator": "^0.8.1"
11520
+ },
11521
+ "bin": {
11522
+ "escodegen": "bin/escodegen.js",
11523
+ "esgenerate": "bin/esgenerate.js"
11524
+ },
11525
+ "engines": {
11526
+ "node": ">=4.0"
11527
+ },
11528
+ "optionalDependencies": {
11529
+ "source-map": "~0.6.1"
11530
+ }
11531
+ },
11532
+ "node_modules/static-eval/node_modules/estraverse": {
11533
+ "version": "4.3.0",
11534
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
11535
+ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
11536
+ "license": "BSD-2-Clause",
11537
+ "engines": {
11538
+ "node": ">=4.0"
11539
+ }
11540
+ },
11541
+ "node_modules/static-eval/node_modules/levn": {
11542
+ "version": "0.3.0",
11543
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
11544
+ "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==",
11545
+ "license": "MIT",
11546
+ "dependencies": {
11547
+ "prelude-ls": "~1.1.2",
11548
+ "type-check": "~0.3.2"
11549
+ },
11550
+ "engines": {
11551
+ "node": ">= 0.8.0"
11552
+ }
11553
+ },
11554
+ "node_modules/static-eval/node_modules/optionator": {
11555
+ "version": "0.8.3",
11556
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
11557
+ "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
11558
+ "license": "MIT",
11559
+ "dependencies": {
11560
+ "deep-is": "~0.1.3",
11561
+ "fast-levenshtein": "~2.0.6",
11562
+ "levn": "~0.3.0",
11563
+ "prelude-ls": "~1.1.2",
11564
+ "type-check": "~0.3.2",
11565
+ "word-wrap": "~1.2.3"
11566
+ },
11567
+ "engines": {
11568
+ "node": ">= 0.8.0"
11569
+ }
11570
+ },
11571
+ "node_modules/static-eval/node_modules/prelude-ls": {
11572
+ "version": "1.1.2",
11573
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
11574
+ "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==",
11575
+ "engines": {
11576
+ "node": ">= 0.8.0"
11577
+ }
11578
+ },
11579
+ "node_modules/static-eval/node_modules/type-check": {
11580
+ "version": "0.3.2",
11581
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
11582
+ "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==",
11583
+ "license": "MIT",
11584
+ "dependencies": {
11585
+ "prelude-ls": "~1.1.2"
11586
+ },
11587
+ "engines": {
11588
+ "node": ">= 0.8.0"
11589
+ }
11590
+ },
11492
11591
  "node_modules/stop-iteration-iterator": {
11493
11592
  "version": "1.1.0",
11494
11593
  "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz",
@@ -11996,6 +12095,12 @@
11996
12095
  "url": "https://github.com/sponsors/ljharb"
11997
12096
  }
11998
12097
  },
12098
+ "node_modules/underscore": {
12099
+ "version": "1.12.1",
12100
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz",
12101
+ "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==",
12102
+ "license": "MIT"
12103
+ },
11999
12104
  "node_modules/undici-types": {
12000
12105
  "version": "7.12.0",
12001
12106
  "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.12.0.tgz",
@@ -12418,7 +12523,6 @@
12418
12523
  "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
12419
12524
  "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
12420
12525
  "license": "MIT",
12421
- "peer": true,
12422
12526
  "engines": {
12423
12527
  "node": ">=0.10.0"
12424
12528
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/testinglibrary",
3
- "version": "3.2.9",
3
+ "version": "3.2.11",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {
@@ -35,6 +35,7 @@
35
35
  "fast-glob": "3.3.1",
36
36
  "jest": "29.6.2",
37
37
  "jest-environment-jsdom": "29.6.2",
38
+ "jsonpath": "1.1.1",
38
39
  "msw": "1.2.3",
39
40
  "playwright": "1.53.2",
40
41
  "supports-color": "8.1.1",
@@ -1,13 +0,0 @@
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();