@zohodesk/testinglibrary 2.9.5 → 2.9.6
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 +6 -1
- package/build/core/playwright/builtInFixtures/page.js +44 -44
- package/build/core/playwright/helpers/auth/loginSteps.js +13 -13
- package/build/core/playwright/tagProcessor.js +7 -5
- package/build/core/playwright/test-runner.js +1 -1
- package/build/test/core/playwright/__tests__/tagProcessor.test.js +19 -18
- package/npm-shrinkwrap.json +36 -13
- package/package.json +4 -4
- package/unit_reports/unit-report.html +1 -1
package/.gitlab-ci.yml
CHANGED
|
@@ -14,18 +14,23 @@ stages:
|
|
|
14
14
|
|
|
15
15
|
default:
|
|
16
16
|
cache:
|
|
17
|
-
key: build-cache
|
|
17
|
+
key: node14-build-cache
|
|
18
18
|
paths:
|
|
19
19
|
- node_modules
|
|
20
20
|
- build
|
|
21
|
+
- npm-shrinkwrap.json
|
|
21
22
|
|
|
22
23
|
# Install dependencies stage
|
|
23
24
|
build:
|
|
24
25
|
stage: build
|
|
25
26
|
script:
|
|
27
|
+
- npm -v
|
|
28
|
+
- node -v
|
|
26
29
|
- npm install --ignore-scripts
|
|
27
30
|
- npm run build
|
|
28
31
|
- npm install
|
|
32
|
+
- npm shrinkwrap
|
|
33
|
+
- npm run build
|
|
29
34
|
|
|
30
35
|
# Unit tests stage
|
|
31
36
|
unit:
|
|
@@ -34,6 +34,16 @@ function getCustomAccountDetails(tags) {
|
|
|
34
34
|
const {
|
|
35
35
|
testSetup
|
|
36
36
|
} = (0, _readConfigFile.generateConfigFromFile)();
|
|
37
|
+
async function loginSteps(pageDetail) {
|
|
38
|
+
const {
|
|
39
|
+
page
|
|
40
|
+
} = pageDetail;
|
|
41
|
+
if (testSetup.loginSteps && typeof testSetup.loginSteps === 'function') {
|
|
42
|
+
return await testSetup.loginSteps(pageDetail);
|
|
43
|
+
} else {
|
|
44
|
+
await page.goto(process.env.domain);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
37
47
|
async function performDefaultPageSteps({
|
|
38
48
|
context,
|
|
39
49
|
$tags,
|
|
@@ -49,13 +59,11 @@ async function performDefaultPageSteps({
|
|
|
49
59
|
await page.goto(process.env.domain);
|
|
50
60
|
}
|
|
51
61
|
}
|
|
52
|
-
async function verifyPageIsLoaded(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (urlOrigin === domainOrigin) {
|
|
56
|
-
return true;
|
|
62
|
+
async function verifyPageIsLoaded(testInfo) {
|
|
63
|
+
if (testSetup.validateLogin && typeof testSetup.validateLogin === 'function') {
|
|
64
|
+
return await testSetup.validateLogin(testInfo);
|
|
57
65
|
}
|
|
58
|
-
return
|
|
66
|
+
return true;
|
|
59
67
|
}
|
|
60
68
|
var _default = exports.default = {
|
|
61
69
|
page: async ({
|
|
@@ -63,45 +71,37 @@ var _default = exports.default = {
|
|
|
63
71
|
$tags,
|
|
64
72
|
page
|
|
65
73
|
}, use) => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
//This block is used to skip the login process if the @unauthenticated tag is added to the script
|
|
75
|
-
if ($tags.includes('@unauthenticated')) {
|
|
76
|
-
await context.clearCookies();
|
|
77
|
-
await use(page);
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
const testPortalDetails = getCustomAccountDetails($tags);
|
|
81
|
-
if (testPortalDetails === null) {
|
|
82
|
-
await performDefaultPageSteps({
|
|
83
|
-
context,
|
|
84
|
-
$tags,
|
|
85
|
-
page
|
|
86
|
-
});
|
|
87
|
-
const user = (0, _auth.getDefaultActor)();
|
|
88
|
-
process.env.actorInfo = JSON.stringify(user);
|
|
89
|
-
await use(page);
|
|
90
|
-
} else {
|
|
91
|
-
await context.clearCookies();
|
|
74
|
+
try {
|
|
75
|
+
//This block is used to skip the login process if the @unauthenticated tag is added to the script
|
|
76
|
+
if ($tags.includes('@unauthenticated')) {
|
|
77
|
+
await context.clearCookies();
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
92
80
|
const {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
81
|
+
isAuthMode
|
|
82
|
+
} = (0, _readConfigFile.generateConfigFromFile)();
|
|
83
|
+
if (!isAuthMode) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const testPortalDetails = getCustomAccountDetails($tags);
|
|
87
|
+
if (testPortalDetails) {
|
|
88
|
+
await context.clearCookies();
|
|
89
|
+
const {
|
|
90
|
+
email
|
|
91
|
+
} = testPortalDetails;
|
|
92
|
+
await (0, _auth.performLoginSteps)({
|
|
93
|
+
page,
|
|
94
|
+
$tags,
|
|
95
|
+
context,
|
|
96
|
+
...testPortalDetails
|
|
97
|
+
}, async testInfo => {
|
|
98
|
+
return await verifyPageIsLoaded(testInfo);
|
|
99
|
+
}, loginSteps);
|
|
100
|
+
process.env.actorInfo = JSON.stringify(testPortalDetails);
|
|
101
|
+
}
|
|
102
|
+
} catch (e) {
|
|
103
|
+
console.error('Error during page', e);
|
|
104
|
+
} finally {
|
|
105
105
|
await performDefaultPageSteps({
|
|
106
106
|
context,
|
|
107
107
|
$tags,
|
|
@@ -8,41 +8,41 @@ exports.default = void 0;
|
|
|
8
8
|
var _path = _interopRequireDefault(require("path"));
|
|
9
9
|
var _fileMutex = _interopRequireDefault(require("../fileMutex"));
|
|
10
10
|
var _fileMutexConfig = require("../../constants/fileMutexConfig");
|
|
11
|
-
var _accountLogin = _interopRequireDefault(require("./accountLogin"));
|
|
12
11
|
var _checkAuthCookies = require("./checkAuthCookies");
|
|
13
12
|
var _checkAuthDirectory = require("../checkAuthDirectory");
|
|
14
13
|
/* eslint-disable no-console */
|
|
15
14
|
|
|
16
|
-
async function performLoginSteps({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
15
|
+
async function performLoginSteps(testInfo, isLoggedIn, loginSteps) {
|
|
16
|
+
let {
|
|
17
|
+
page,
|
|
18
|
+
authFilePrefix,
|
|
19
|
+
email
|
|
20
|
+
} = testInfo;
|
|
21
|
+
authFilePrefix = authFilePrefix || email;
|
|
22
22
|
const authFile = _path.default.resolve(_path.default.join((0, _checkAuthCookies.getAuthFileDirectory)(), `${authFilePrefix}-cookies.json`));
|
|
23
|
-
const lockFileName =
|
|
23
|
+
const lockFileName = email.replace(/[@.]/g, '_');
|
|
24
24
|
const fileMutex = new _fileMutex.default((0, _checkAuthDirectory.getLockDirectoryPath)(), lockFileName, _fileMutexConfig.LOGIN_MUTEX_TIMEOUT);
|
|
25
25
|
try {
|
|
26
26
|
await fileMutex.acquire();
|
|
27
27
|
await (0, _checkAuthCookies.loadCookiesIfPresent)(page, authFile);
|
|
28
28
|
await page.goto(process.env.domain);
|
|
29
29
|
await Promise.race([page.waitForNavigation(), page.waitForLoadState('networkidle'), page.waitForTimeout(5000)]);
|
|
30
|
-
const isAlreadyLoggedIn = await isLoggedIn(
|
|
30
|
+
const isAlreadyLoggedIn = await isLoggedIn(testInfo);
|
|
31
31
|
if (!isAlreadyLoggedIn) {
|
|
32
|
-
await (
|
|
32
|
+
await loginSteps(testInfo);
|
|
33
33
|
await page.goto(process.env.domain);
|
|
34
|
-
await isLoggedIn(
|
|
34
|
+
await isLoggedIn(testInfo);
|
|
35
35
|
await page.context().storageState({
|
|
36
36
|
path: authFile
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
} catch (error) {
|
|
40
|
-
console.error(`Error during login for ${
|
|
40
|
+
console.error(`Error during login for ${email}:`, error);
|
|
41
41
|
} finally {
|
|
42
42
|
try {
|
|
43
43
|
await fileMutex.release();
|
|
44
44
|
} catch (releaseError) {
|
|
45
|
-
console.error(`Error releasing lock for ${
|
|
45
|
+
console.error(`Error releasing lock for ${email}:`, releaseError);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -10,12 +10,14 @@ class TagProcessor {
|
|
|
10
10
|
_classPrivateMethodInitSpec(this, _TagProcessor_brand);
|
|
11
11
|
this.editionOrder = editionOrder;
|
|
12
12
|
}
|
|
13
|
-
processTags(
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
processTags(config) {
|
|
14
|
+
const {
|
|
15
|
+
tags,
|
|
16
|
+
edition
|
|
17
|
+
} = config.getAll();
|
|
18
|
+
if (!edition) return tags;
|
|
17
19
|
const editionsArray = edition.split(',');
|
|
18
|
-
const editionTags = editionsArray.length === 1 ? _assertClassBrand(_TagProcessor_brand, this, _processSingleEdition).call(this, editionsArray[0],
|
|
20
|
+
const editionTags = editionsArray.length === 1 ? _assertClassBrand(_TagProcessor_brand, this, _processSingleEdition).call(this, editionsArray[0], tags) : _assertClassBrand(_TagProcessor_brand, this, _processMultipleEditions).call(this, editionsArray, tags);
|
|
19
21
|
return editionTags;
|
|
20
22
|
}
|
|
21
23
|
}
|
|
@@ -104,7 +104,7 @@ function main() {
|
|
|
104
104
|
//This is only used for pass the user arguments to need places in legacy code. We need to rewamp that also.
|
|
105
105
|
const userArgsObject = userArgConfig.getAll();
|
|
106
106
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
107
|
-
const tagArgs = tagProcessor.processTags(
|
|
107
|
+
const tagArgs = tagProcessor.processTags(uatConfig);
|
|
108
108
|
const runnerObj = new _Runner.default();
|
|
109
109
|
runnerObj.setTagArgs(tagArgs);
|
|
110
110
|
runnerObj.setUserArgs(userArgsObject);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
var _tagProcessor = _interopRequireDefault(require("../../../../../src/core/playwright/tagProcessor"));
|
|
5
|
+
var _Configuration = _interopRequireDefault(require("../../../../../src/core/playwright/configuration/Configuration.js"));
|
|
5
6
|
var _logger = require("../../../../utils/logger");
|
|
6
7
|
jest.mock('../../../../utils/logger');
|
|
7
8
|
describe('TagProcessor', () => {
|
|
@@ -11,83 +12,83 @@ describe('TagProcessor', () => {
|
|
|
11
12
|
});
|
|
12
13
|
test('should return tagArgs if no edition is provided', () => {
|
|
13
14
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
14
|
-
const userArgs = {
|
|
15
|
+
const userArgs = new _Configuration.default({
|
|
15
16
|
tags: 'tag1',
|
|
16
17
|
edition: null
|
|
17
|
-
};
|
|
18
|
+
});
|
|
18
19
|
const result = tagProcessor.processTags(userArgs);
|
|
19
20
|
expect(result).toBe('tag1');
|
|
20
21
|
});
|
|
21
22
|
test('should handle a single edition with <= operator', () => {
|
|
22
23
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
23
|
-
const userArgs = {
|
|
24
|
+
const userArgs = new _Configuration.default({
|
|
24
25
|
tags: 'tag1',
|
|
25
26
|
edition: '<=edition2'
|
|
26
|
-
};
|
|
27
|
+
});
|
|
27
28
|
const result = tagProcessor.processTags(userArgs);
|
|
28
29
|
expect(result).toBe('tag1 and not (@edition_edition3 or @edition_edition4)');
|
|
29
30
|
});
|
|
30
31
|
test('should handle a single edition with >= operator', () => {
|
|
31
32
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
32
|
-
const userArgs = {
|
|
33
|
+
const userArgs = new _Configuration.default({
|
|
33
34
|
tags: 'tag1',
|
|
34
35
|
edition: '>=edition2'
|
|
35
|
-
};
|
|
36
|
+
});
|
|
36
37
|
const result = tagProcessor.processTags(userArgs);
|
|
37
38
|
expect(result).toBe('tag1 and not (@edition_edition1)');
|
|
38
39
|
});
|
|
39
40
|
test('should handle a single edition with < operator', () => {
|
|
40
41
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
41
|
-
const userArgs = {
|
|
42
|
+
const userArgs = new _Configuration.default({
|
|
42
43
|
tags: 'tag1',
|
|
43
44
|
edition: '<edition3'
|
|
44
|
-
};
|
|
45
|
+
});
|
|
45
46
|
const result = tagProcessor.processTags(userArgs);
|
|
46
47
|
expect(result).toBe('tag1 and not (@edition_edition3 or @edition_edition4)');
|
|
47
48
|
});
|
|
48
49
|
test('should handle a single edition with > operator', () => {
|
|
49
50
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
50
|
-
const userArgs = {
|
|
51
|
+
const userArgs = new _Configuration.default({
|
|
51
52
|
tags: 'tag1',
|
|
52
53
|
edition: '>edition1'
|
|
53
|
-
};
|
|
54
|
+
});
|
|
54
55
|
const result = tagProcessor.processTags(userArgs);
|
|
55
56
|
expect(result).toBe('tag1 and not (@edition_edition1)');
|
|
56
57
|
});
|
|
57
58
|
test('should handle a single edition with no operator', () => {
|
|
58
59
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
59
|
-
const userArgs = {
|
|
60
|
+
const userArgs = new _Configuration.default({
|
|
60
61
|
tags: 'tag1',
|
|
61
62
|
edition: 'edition2'
|
|
62
|
-
};
|
|
63
|
+
});
|
|
63
64
|
const result = tagProcessor.processTags(userArgs);
|
|
64
65
|
expect(result).toBe('tag1 and not (@edition_edition1 or @edition_edition3 or @edition_edition4)');
|
|
65
66
|
});
|
|
66
67
|
test('should log a message if edition is not found', () => {
|
|
67
68
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
68
|
-
const userArgs = {
|
|
69
|
+
const userArgs = new _Configuration.default({
|
|
69
70
|
tags: 'tag1',
|
|
70
71
|
edition: 'nonexistentEdition'
|
|
71
|
-
};
|
|
72
|
+
});
|
|
72
73
|
const result = tagProcessor.processTags(userArgs);
|
|
73
74
|
expect(result).toBe('tag1');
|
|
74
75
|
expect(_logger.Logger.log).toHaveBeenCalledWith(_logger.Logger.INFO_TYPE, expect.stringContaining('No matching editions for nonexistentEdition found.'));
|
|
75
76
|
});
|
|
76
77
|
test('should handle multiple editions', () => {
|
|
77
78
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
78
|
-
const userArgs = {
|
|
79
|
+
const userArgs = new _Configuration.default({
|
|
79
80
|
tags: 'tag1',
|
|
80
81
|
edition: 'edition1,edition3'
|
|
81
|
-
};
|
|
82
|
+
});
|
|
82
83
|
const result = tagProcessor.processTags(userArgs);
|
|
83
84
|
expect(result).toBe('tag1 and not (@edition_edition2 or @edition_edition4)');
|
|
84
85
|
});
|
|
85
86
|
test('should build tags correctly when tags are empty', () => {
|
|
86
87
|
const tagProcessor = new _tagProcessor.default(editionOrder);
|
|
87
|
-
const userArgs = {
|
|
88
|
+
const userArgs = new _Configuration.default({
|
|
88
89
|
tags: '',
|
|
89
90
|
edition: 'edition1'
|
|
90
|
-
};
|
|
91
|
+
});
|
|
91
92
|
const result = tagProcessor.processTags(userArgs);
|
|
92
93
|
expect(result).toBe('not (@edition_edition2 or @edition_edition3 or @edition_edition4)');
|
|
93
94
|
});
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/testinglibrary",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.6",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -2866,9 +2866,9 @@
|
|
|
2866
2866
|
}
|
|
2867
2867
|
},
|
|
2868
2868
|
"commander": {
|
|
2869
|
-
"version": "11.
|
|
2870
|
-
"resolved": "https://registry.npmjs.org/commander/-/commander-11.
|
|
2871
|
-
"integrity": "sha512-
|
|
2869
|
+
"version": "11.0.0",
|
|
2870
|
+
"resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz",
|
|
2871
|
+
"integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==",
|
|
2872
2872
|
"dev": true
|
|
2873
2873
|
},
|
|
2874
2874
|
"commondir": {
|
|
@@ -3131,9 +3131,9 @@
|
|
|
3131
3131
|
}
|
|
3132
3132
|
},
|
|
3133
3133
|
"electron-to-chromium": {
|
|
3134
|
-
"version": "1.5.
|
|
3135
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.
|
|
3136
|
-
"integrity": "sha512-
|
|
3134
|
+
"version": "1.5.76",
|
|
3135
|
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.76.tgz",
|
|
3136
|
+
"integrity": "sha512-CjVQyG7n7Sr+eBXE86HIulnL5N8xZY1sgmOPGuq/F0Rr0FJq63lg0kEtOIDfZBk44FnDLf6FUJ+dsJcuiUDdDQ=="
|
|
3137
3137
|
},
|
|
3138
3138
|
"emittery": {
|
|
3139
3139
|
"version": "0.13.1",
|
|
@@ -3167,9 +3167,9 @@
|
|
|
3167
3167
|
}
|
|
3168
3168
|
},
|
|
3169
3169
|
"es-abstract": {
|
|
3170
|
-
"version": "1.23.
|
|
3171
|
-
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.
|
|
3172
|
-
"integrity": "sha512-
|
|
3170
|
+
"version": "1.23.8",
|
|
3171
|
+
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.8.tgz",
|
|
3172
|
+
"integrity": "sha512-lfab8IzDn6EpI1ibZakcgS6WsfEBiB+43cuJo+wgylx1xKXf+Sp+YR3vFuQwC/u3sxYwV8Cxe3B0DpVUu/WiJQ==",
|
|
3173
3173
|
"dev": true,
|
|
3174
3174
|
"requires": {
|
|
3175
3175
|
"array-buffer-byte-length": "^1.0.2",
|
|
@@ -3207,8 +3207,10 @@
|
|
|
3207
3207
|
"object-inspect": "^1.13.3",
|
|
3208
3208
|
"object-keys": "^1.1.1",
|
|
3209
3209
|
"object.assign": "^4.1.7",
|
|
3210
|
+
"own-keys": "^1.0.0",
|
|
3210
3211
|
"regexp.prototype.flags": "^1.5.3",
|
|
3211
3212
|
"safe-array-concat": "^1.1.3",
|
|
3213
|
+
"safe-push-apply": "^1.0.0",
|
|
3212
3214
|
"safe-regex-test": "^1.1.0",
|
|
3213
3215
|
"string.prototype.trim": "^1.2.10",
|
|
3214
3216
|
"string.prototype.trimend": "^1.0.9",
|
|
@@ -5319,6 +5321,17 @@
|
|
|
5319
5321
|
"resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz",
|
|
5320
5322
|
"integrity": "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA=="
|
|
5321
5323
|
},
|
|
5324
|
+
"own-keys": {
|
|
5325
|
+
"version": "1.0.1",
|
|
5326
|
+
"resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz",
|
|
5327
|
+
"integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==",
|
|
5328
|
+
"dev": true,
|
|
5329
|
+
"requires": {
|
|
5330
|
+
"get-intrinsic": "^1.2.6",
|
|
5331
|
+
"object-keys": "^1.1.1",
|
|
5332
|
+
"safe-push-apply": "^1.0.0"
|
|
5333
|
+
}
|
|
5334
|
+
},
|
|
5322
5335
|
"p-limit": {
|
|
5323
5336
|
"version": "2.3.0",
|
|
5324
5337
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
|
@@ -5791,6 +5804,16 @@
|
|
|
5791
5804
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
|
5792
5805
|
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
|
5793
5806
|
},
|
|
5807
|
+
"safe-push-apply": {
|
|
5808
|
+
"version": "1.0.0",
|
|
5809
|
+
"resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz",
|
|
5810
|
+
"integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==",
|
|
5811
|
+
"dev": true,
|
|
5812
|
+
"requires": {
|
|
5813
|
+
"es-errors": "^1.3.0",
|
|
5814
|
+
"isarray": "^2.0.5"
|
|
5815
|
+
}
|
|
5816
|
+
},
|
|
5794
5817
|
"safe-regex-test": {
|
|
5795
5818
|
"version": "1.1.0",
|
|
5796
5819
|
"resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz",
|
|
@@ -6257,9 +6280,9 @@
|
|
|
6257
6280
|
}
|
|
6258
6281
|
},
|
|
6259
6282
|
"typescript": {
|
|
6260
|
-
"version": "5.
|
|
6261
|
-
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.
|
|
6262
|
-
"integrity": "sha512
|
|
6283
|
+
"version": "5.4.2",
|
|
6284
|
+
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
|
|
6285
|
+
"integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
|
|
6263
6286
|
"dev": true
|
|
6264
6287
|
},
|
|
6265
6288
|
"unbox-primitive": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/testinglibrary",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"@babel/polyfill": "7.12.1",
|
|
54
54
|
"@babel/preset-env": "7.22.15",
|
|
55
55
|
"@babel/runtime": "7.22.15",
|
|
56
|
-
"commander": "
|
|
57
|
-
"jest-html-reporter": "
|
|
58
|
-
"typescript": "
|
|
56
|
+
"commander": "11.0.0",
|
|
57
|
+
"jest-html-reporter": "3.10.2",
|
|
58
|
+
"typescript": "5.4.2"
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -257,4 +257,4 @@ header {
|
|
|
257
257
|
font-size: 1rem;
|
|
258
258
|
padding: 0 0.5rem;
|
|
259
259
|
}
|
|
260
|
-
</style></head><body><div class="jesthtml-content"><header><h1 id="title">Unit Report</h1></header><div id="metadata-container"><div id="timestamp">Started: 2024-12-19 14:00:35</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (9)</div><div class="summary-passed ">9 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (33)</div><div class="summary-passed ">33 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div></div></div><div id="suite-1" class="suite-container"><input id="collapsible-0" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-0"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/examples/src/__tests__/App.test.js</div><div class="suite-time">2.097s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">example functions</div><div class="test-title">add function adds two numbers correctly</div><div class="test-status">passed</div><div class="test-duration">0.01s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">example functions</div><div class="test-title">greet function greets a person with their name</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></div><div id="suite-2" class="suite-container"><input id="collapsible-1" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-1"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/configuration/__tests__/Configuration.test.js</div><div class="suite-time">2.21s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Configuration Class</div><div class="test-title">should add new key-value pair to the configuration</div><div class="test-status">passed</div><div class="test-duration">0.012s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Configuration Class</div><div class="test-title">should combine configurations correctly using addAll</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Configuration Class</div><div class="test-title">should return correct value for a given key</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></div><div id="suite-3" class="suite-container"><input id="collapsible-2" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-2"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/__tests__/tagProcessor.test.js</div><div class="suite-time">2.19s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should return tagArgs if no edition is provided</div><div class="test-status">passed</div><div class="test-duration">0.018s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with <= operator</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with >= operator</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with < operator</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with > operator</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with no operator</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should log a message if edition is not found</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle multiple editions</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should build tags correctly when tags are empty</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></div><div id="suite-4" class="suite-container"><input id="collapsible-3" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-3"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/helpers/__tests__/getUsers_ListOfActors.test.js</div><div class="suite-time">2.336s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">getListOfActors</div><div class="test-title">throws an error when config file cannot be loaded</div><div class="test-status">passed</div><div class="test-duration">0.055s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getListOfActors</div><div class="test-title">throws an error when beta feature config does not exist</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getListOfActors</div><div class="test-title">loads main configuration when betaFeature is not provided and main config file exists</div><div class="test-status">passed</div><div class="test-duration">0.004s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getListOfActors</div><div class="test-title">falls back to default configuration if main config file does not exist</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getListOfActors</div><div class="test-title">loads beta feature configuration when betaFeature is provided</div><div class="test-status">passed</div><div class="test-duration">0.012s</div></div></div></div></div><div id="suite-5" class="suite-container"><input id="collapsible-4" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-4"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/helpers/__tests__/configFileNameProvider.test.js</div><div class="suite-time">2.834s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUATFileName</div><div class="test-title">return the pipeline matched config files for pipeline matched files exists</div><div class="test-status">passed</div><div class="test-duration">0.011s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUATFileName</div><div class="test-title">return the default config files for pipeline matched files not exists</div><div class="test-status">passed</div><div class="test-duration">0.005s</div></div></div></div></div><div id="suite-6" class="suite-container"><input id="collapsible-5" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-5"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/helpers/__tests__/fileMutex.test.js</div><div class="suite-time">2.877s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">FileMutex > acquire</div><div class="test-title">should create the directory if it does not exist</div><div class="test-status">passed</div><div class="test-duration">0.017s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">FileMutex > acquire</div><div class="test-title">should create the lock file if it does not exist</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">FileMutex > acquire</div><div class="test-title">should acquire the lock using proper-lockfile</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">FileMutex > acquire</div><div class="test-title">should throw an error if lock acquisition fails</div><div class="test-status">passed</div><div class="test-duration">0.022s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">FileMutex > release</div><div class="test-title">should release the lock using proper-lockfile</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">FileMutex > release</div><div class="test-title">should throw an error if lock release fails</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></div><div id="suite-7" class="suite-container"><input id="collapsible-6" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-6"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/runner/__tests__/RunnerHelper.test.js</div><div class="suite-time">1.951s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">RunnerHelper > createRunner</div><div class="test-title">should throw error on invalid runner type</div><div class="test-status">passed</div><div class="test-duration">0.005s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">RunnerHelper > createRunner</div><div class="test-title">should create a valid runner class</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></div><div id="suite-8" class="suite-container"><input id="collapsible-7" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-7"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/runner/__tests__/SpawnRunner.test.js</div><div class="suite-time">4.2s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">SpawnRunner > run</div><div class="test-title">should call runPreprocessing when bddMode is true</div><div class="test-status">passed</div><div class="test-duration">0.006s</div></div></div></div></div><div id="suite-9" class="suite-container"><input id="collapsible-8" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-8"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/__tests__/validateFeature.test.js</div><div class="suite-time">2.052s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">validateFeatureFiles</div><div class="test-title">runPreprocessing with correct arguments and log success</div><div class="test-status">passed</div><div class="test-duration">0.004s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">validateFeatureFiles</div><div class="test-title">runPreprocessing with playwright conf</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">validateFeatureFiles</div><div class="test-title">error when runPreprocessing fails</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></div></div></body></html>
|
|
260
|
+
</style></head><body><div class="jesthtml-content"><header><h1 id="title">Unit Report</h1></header><div id="metadata-container"><div id="timestamp">Started: 2024-12-18 15:33:53</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (1)</div><div class="summary-passed ">1 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (9)</div><div class="summary-passed ">9 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div></div></div><div id="suite-1" class="suite-container"><input id="collapsible-0" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-0"><div class="suite-info"><div class="suite-path">/Users/durai-19814/Documents/Git/testing-framework/src/test/core/playwright/__tests__/tagProcessor.test.js</div><div class="suite-time">1.168s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should return tagArgs if no edition is provided</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with <= operator</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with >= operator</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with < operator</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with > operator</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with no operator</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should log a message if edition is not found</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle multiple editions</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should build tags correctly when tags are empty</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></div></div></body></html>
|