@zohodesk/testinglibrary 3.2.12 → 3.2.14

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,19 +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
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
204
 
205
205
 
206
206
 
@@ -1,5 +1,6 @@
1
1
  import { test } from '@zohodesk/testinglibrary';
2
2
  import DataGenerator from '@zohodesk/testinglibrary/DataGenerator';
3
+ import {getUserForSelectedEditionAndProfile} from '@zohodesk/testinglibrary/helpers'
3
4
 
4
5
  const dataGenerator = new DataGenerator();
5
6
 
@@ -9,7 +10,8 @@ export async function generateAndCacheTestData(executionContext, type, identifie
9
10
  const scenarioName = testInfo.title.split('/').pop() || 'Unknown Scenario';
10
11
 
11
12
  if (profile) {
12
- actorInfo = await dataGenerator.getDataGenUserExecutionContext(executionContext.actorInfo.edition, profile);
13
+ const { edition, orgName: portal, beta } = executionContext.actorInfo;
14
+ actorInfo = await getUserForSelectedEditionAndProfile(edition, profile, beta, portal);
13
15
  } else {
14
16
  actorInfo = executionContext.actorInfo;
15
17
  }
@@ -47,15 +47,6 @@ class DataGenerator {
47
47
  throw error;
48
48
  }
49
49
  }
50
- async getDataGenUserExecutionContext(edition, profile) {
51
- try {
52
- const dataGenUserDetails = await (0, _helpers.getUserForSelectedEditionAndProfile)(edition, profile);
53
- return dataGenUserDetails;
54
- } catch (error) {
55
- console.error('Error occurred while fetching data generation user details: ', error);
56
- throw error;
57
- }
58
- }
59
50
  }
60
51
  async function _getGenerator(testInfo, generatorName) {
61
52
  let generator = null;
@@ -113,6 +113,7 @@ function getUserForSelectedEditionAndProfile(preferedEdition, preferredProfile,
113
113
  }
114
114
  return {
115
115
  ...editionData,
116
- ...selectedProfile
116
+ ...selectedProfile,
117
+ 'beta': betaFeature
117
118
  };
118
119
  }
@@ -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();