@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 +13 -13
- package/build/common/data-generator/steps/DataGeneratorStepsHelper.js +3 -1
- package/build/core/dataGenerator/DataGenerator.js +0 -9
- package/build/core/playwright/helpers/auth/getUsers.js +2 -1
- package/build/test/Test.js +13 -0
- package/npm-shrinkwrap.json +382 -486
- package/package.json +1 -4
- package/zohodesk-testinglibrary-0.4.94-n18-experimental.tgz +0 -0
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
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
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
|
-
|
|
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;
|
|
@@ -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();
|