@zohodesk/testinglibrary 0.0.71-n20-experimental → 0.0.73-n20-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.
|
@@ -12,5 +12,9 @@ class ReporterConstants {
|
|
|
12
12
|
static DEFAULT_REPORTER_PATH = `${_configConstants.default.TEST_SLICE_FOLDER}/${stage}/test-results/playwright-test-results.json`;
|
|
13
13
|
static LAST_RUN_REPORTER_PATH = `${_configConstants.default.TEST_SLICE_FOLDER}/${stage}/test-results/.last-run.json`;
|
|
14
14
|
static DEFAULT_UNIT_TEST_REPORTER_PATH = `${_configConstants.default.TEST_SLICE_FOLDER}/unit-test/unit_reports/report.html`;
|
|
15
|
+
static PROJECT_FAILURE_REASON_MAP = {
|
|
16
|
+
'setup': 'Login case failure',
|
|
17
|
+
'smokeTest': 'Smoke test failure'
|
|
18
|
+
};
|
|
15
19
|
}
|
|
16
20
|
exports.default = ReporterConstants;
|
|
@@ -53,6 +53,7 @@ function getDefaultConfig() {
|
|
|
53
53
|
testIdAttribute: 'data-testid',
|
|
54
54
|
additionalPages: {},
|
|
55
55
|
featureFilesFolder: 'feature-files',
|
|
56
|
+
stepDefinitionsFolder: 'steps',
|
|
56
57
|
testSetup: {},
|
|
57
58
|
editionOrder: ['Free', 'Express', 'Standard', 'Professional', 'Enterprise']
|
|
58
59
|
};
|
|
@@ -12,6 +12,18 @@ var _readConfigFile = require("../readConfigFile");
|
|
|
12
12
|
var _logger = require("../../../utils/logger");
|
|
13
13
|
var _configFileNameProvider = require("../helpers/configFileNameProvider");
|
|
14
14
|
var _mergeAbortedTests = _interopRequireDefault(require("../reporter/helpers/mergeAbortedTests"));
|
|
15
|
+
var _reporterConstants = _interopRequireDefault(require("../constants/reporterConstants"));
|
|
16
|
+
// Traverse the suite tree upward until we reach the project-level suite
|
|
17
|
+
function getProjectName(test) {
|
|
18
|
+
let suite = test.parent;
|
|
19
|
+
while (suite) {
|
|
20
|
+
var _suite$project, _suite;
|
|
21
|
+
const name = (_suite$project = (_suite = suite).project) === null || _suite$project === void 0 || (_suite$project = _suite$project.call(_suite)) === null || _suite$project === void 0 ? void 0 : _suite$project.name;
|
|
22
|
+
if (name) return name;
|
|
23
|
+
suite = suite.parent;
|
|
24
|
+
}
|
|
25
|
+
return '';
|
|
26
|
+
}
|
|
15
27
|
class JSONSummaryReporter {
|
|
16
28
|
constructor() {
|
|
17
29
|
this.durationInMS = -1;
|
|
@@ -27,6 +39,7 @@ class JSONSummaryReporter {
|
|
|
27
39
|
this.status = 'unknown';
|
|
28
40
|
this.startedAt = 0;
|
|
29
41
|
this._open = (0, _readConfigFile.generateConfigFromFile)().openReportOn;
|
|
42
|
+
this.failedProject = null;
|
|
30
43
|
}
|
|
31
44
|
onBegin() {
|
|
32
45
|
this.startedAt = Date.now();
|
|
@@ -76,6 +89,13 @@ class JSONSummaryReporter {
|
|
|
76
89
|
this[status].push(fileName);
|
|
77
90
|
}
|
|
78
91
|
this[status].push(fileName);
|
|
92
|
+
const isFailure = result.status !== 'passed' && result.status !== 'skipped';
|
|
93
|
+
if (isFailure && !this.failedProject) {
|
|
94
|
+
const projectName = getProjectName(test);
|
|
95
|
+
if (projectName) {
|
|
96
|
+
this.failedProject = projectName;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
79
99
|
}
|
|
80
100
|
onError(error) {
|
|
81
101
|
this.errored.push({
|
|
@@ -116,6 +136,9 @@ class JSONSummaryReporter {
|
|
|
116
136
|
// Reflect setup failures in the final report status
|
|
117
137
|
this.status = "failed";
|
|
118
138
|
}
|
|
139
|
+
if (this.failedProject && _reporterConstants.default.PROJECT_FAILURE_REASON_MAP[this.failedProject]) {
|
|
140
|
+
this.failureReason = _reporterConstants.default.PROJECT_FAILURE_REASON_MAP[this.failedProject];
|
|
141
|
+
}
|
|
119
142
|
|
|
120
143
|
// fs.writeFileSync('./summary.json', JSON.stringify(this, null, ' '));
|
|
121
144
|
let {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/testinglibrary",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.73-n20-experimental",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@zohodesk/testinglibrary",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.73-n20-experimental",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
@@ -5297,9 +5297,9 @@
|
|
|
5297
5297
|
}
|
|
5298
5298
|
},
|
|
5299
5299
|
"node_modules/axios": {
|
|
5300
|
-
"version": "1.
|
|
5301
|
-
"resolved": "https://registry.npmjs.org/axios/-/axios-1.
|
|
5302
|
-
"integrity": "sha512-
|
|
5300
|
+
"version": "1.18.0",
|
|
5301
|
+
"resolved": "https://registry.npmjs.org/axios/-/axios-1.18.0.tgz",
|
|
5302
|
+
"integrity": "sha512-E32NzpYKp++W7XRe52rHiXV2ehxmh3wbdgO7MHeFM+vqxLBYHzt0ElkiImtOBxtOmyp0yoC8C6uESVV84Y2/hw==",
|
|
5303
5303
|
"license": "MIT",
|
|
5304
5304
|
"dependencies": {
|
|
5305
5305
|
"follow-redirects": "^1.16.0",
|
|
@@ -5518,9 +5518,9 @@
|
|
|
5518
5518
|
}
|
|
5519
5519
|
},
|
|
5520
5520
|
"node_modules/baseline-browser-mapping": {
|
|
5521
|
-
"version": "2.10.
|
|
5522
|
-
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.
|
|
5523
|
-
"integrity": "sha512-
|
|
5521
|
+
"version": "2.10.37",
|
|
5522
|
+
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.37.tgz",
|
|
5523
|
+
"integrity": "sha512-girxaJ7WZssDOFhzCGZTDKoTa1gk6A1TbflaYTpykLJ4UU9Fz9kx1aREM8JCuoVHbL8X8T/mJg7w2oYSq72Oig==",
|
|
5524
5524
|
"license": "Apache-2.0",
|
|
5525
5525
|
"bin": {
|
|
5526
5526
|
"baseline-browser-mapping": "dist/cli.cjs"
|
|
@@ -6996,9 +6996,9 @@
|
|
|
6996
6996
|
}
|
|
6997
6997
|
},
|
|
6998
6998
|
"node_modules/electron-to-chromium": {
|
|
6999
|
-
"version": "1.5.
|
|
7000
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.
|
|
7001
|
-
"integrity": "sha512-
|
|
6999
|
+
"version": "1.5.373",
|
|
7000
|
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.373.tgz",
|
|
7001
|
+
"integrity": "sha512-G2Hym8JIf/QreuseqkDibgH8Ci8KfJzqGDKdakbhSx9UltwRBH2cBLAWU/lBX0sCdv0TlhyxQyDCnSfxgMWsjA==",
|
|
7002
7002
|
"license": "ISC"
|
|
7003
7003
|
},
|
|
7004
7004
|
"node_modules/emittery": {
|
|
@@ -7109,6 +7109,25 @@
|
|
|
7109
7109
|
"url": "https://github.com/sponsors/ljharb"
|
|
7110
7110
|
}
|
|
7111
7111
|
},
|
|
7112
|
+
"node_modules/es-abstract-get": {
|
|
7113
|
+
"version": "1.0.0",
|
|
7114
|
+
"resolved": "https://registry.npmjs.org/es-abstract-get/-/es-abstract-get-1.0.0.tgz",
|
|
7115
|
+
"integrity": "sha512-6PMWXpdhshVvFp+FoWYs1EvG1Nj0tvk0dZM+XcK0xMEM1czRVcP6ohqPWHy6qPagSpC8j4+p89WXlT+xXJs/fg==",
|
|
7116
|
+
"dev": true,
|
|
7117
|
+
"license": "MIT",
|
|
7118
|
+
"dependencies": {
|
|
7119
|
+
"es-errors": "^1.3.0",
|
|
7120
|
+
"es-object-atoms": "^1.1.2",
|
|
7121
|
+
"is-callable": "^1.2.7",
|
|
7122
|
+
"object-inspect": "^1.13.4"
|
|
7123
|
+
},
|
|
7124
|
+
"engines": {
|
|
7125
|
+
"node": ">= 0.4"
|
|
7126
|
+
},
|
|
7127
|
+
"funding": {
|
|
7128
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
7129
|
+
}
|
|
7130
|
+
},
|
|
7112
7131
|
"node_modules/es-array-method-boxes-properly": {
|
|
7113
7132
|
"version": "1.0.0",
|
|
7114
7133
|
"resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz",
|
|
@@ -7182,15 +7201,17 @@
|
|
|
7182
7201
|
}
|
|
7183
7202
|
},
|
|
7184
7203
|
"node_modules/es-to-primitive": {
|
|
7185
|
-
"version": "1.3.
|
|
7186
|
-
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.
|
|
7187
|
-
"integrity": "sha512-
|
|
7204
|
+
"version": "1.3.1",
|
|
7205
|
+
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.1.tgz",
|
|
7206
|
+
"integrity": "sha512-CxN9N56HYfd2m/acc/NOFrZQsN9kU4eh+2kk6A707Kz1krH8tKmfrs5RnftB8WNX80T0NS7vSQsDOlg23diR2g==",
|
|
7188
7207
|
"dev": true,
|
|
7189
7208
|
"license": "MIT",
|
|
7190
7209
|
"dependencies": {
|
|
7210
|
+
"es-abstract-get": "^1.0.0",
|
|
7211
|
+
"es-errors": "^1.3.0",
|
|
7191
7212
|
"is-callable": "^1.2.7",
|
|
7192
|
-
"is-date-object": "^1.0
|
|
7193
|
-
"is-symbol": "^1.
|
|
7213
|
+
"is-date-object": "^1.1.0",
|
|
7214
|
+
"is-symbol": "^1.1.1"
|
|
7194
7215
|
},
|
|
7195
7216
|
"engines": {
|
|
7196
7217
|
"node": ">= 0.4"
|
|
@@ -7243,11 +7264,14 @@
|
|
|
7243
7264
|
}
|
|
7244
7265
|
},
|
|
7245
7266
|
"node_modules/eslint": {
|
|
7246
|
-
"version": "10.
|
|
7247
|
-
"resolved": "https://registry.npmjs.org/eslint/-/eslint-10.
|
|
7248
|
-
"integrity": "sha512-
|
|
7267
|
+
"version": "10.5.0",
|
|
7268
|
+
"resolved": "https://registry.npmjs.org/eslint/-/eslint-10.5.0.tgz",
|
|
7269
|
+
"integrity": "sha512-1y+7C+vi12bUK1IpZeaV3gsH9fHLBmPvYmPx42pvT/E9yG0IC8g3PUZZgp0+JLJl7ZDK0flc2gc+Aw9dpCvIsQ==",
|
|
7249
7270
|
"license": "MIT",
|
|
7250
7271
|
"peer": true,
|
|
7272
|
+
"workspaces": [
|
|
7273
|
+
"packages/*"
|
|
7274
|
+
],
|
|
7251
7275
|
"dependencies": {
|
|
7252
7276
|
"@eslint-community/eslint-utils": "^4.8.0",
|
|
7253
7277
|
"@eslint-community/regexpp": "^4.12.2",
|
|
@@ -7865,16 +7889,16 @@
|
|
|
7865
7889
|
}
|
|
7866
7890
|
},
|
|
7867
7891
|
"node_modules/form-data": {
|
|
7868
|
-
"version": "4.0.
|
|
7869
|
-
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.
|
|
7870
|
-
"integrity": "sha512-
|
|
7892
|
+
"version": "4.0.6",
|
|
7893
|
+
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz",
|
|
7894
|
+
"integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==",
|
|
7871
7895
|
"license": "MIT",
|
|
7872
7896
|
"dependencies": {
|
|
7873
7897
|
"asynckit": "^0.4.0",
|
|
7874
7898
|
"combined-stream": "^1.0.8",
|
|
7875
7899
|
"es-set-tostringtag": "^2.1.0",
|
|
7876
|
-
"hasown": "^2.0.
|
|
7877
|
-
"mime-types": "^2.1.
|
|
7900
|
+
"hasown": "^2.0.4",
|
|
7901
|
+
"mime-types": "^2.1.35"
|
|
7878
7902
|
},
|
|
7879
7903
|
"engines": {
|
|
7880
7904
|
"node": ">= 6"
|
|
@@ -9451,32 +9475,32 @@
|
|
|
9451
9475
|
"@babel/core": "^7.11.0 || ^8.0.0-0"
|
|
9452
9476
|
}
|
|
9453
9477
|
},
|
|
9454
|
-
"node_modules/jest-config/node_modules/babel-
|
|
9478
|
+
"node_modules/jest-config/node_modules/babel-jest/node_modules/babel-preset-jest": {
|
|
9455
9479
|
"version": "30.2.0",
|
|
9456
|
-
"resolved": "https://registry.npmjs.org/babel-
|
|
9457
|
-
"integrity": "sha512-
|
|
9480
|
+
"resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.2.0.tgz",
|
|
9481
|
+
"integrity": "sha512-US4Z3NOieAQumwFnYdUWKvUKh8+YSnS/gB3t6YBiz0bskpu7Pine8pPCheNxlPEW4wnUkma2a94YuW2q3guvCQ==",
|
|
9458
9482
|
"license": "MIT",
|
|
9459
9483
|
"dependencies": {
|
|
9460
|
-
"
|
|
9484
|
+
"babel-plugin-jest-hoist": "30.2.0",
|
|
9485
|
+
"babel-preset-current-node-syntax": "^1.2.0"
|
|
9461
9486
|
},
|
|
9462
9487
|
"engines": {
|
|
9463
9488
|
"node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
|
|
9489
|
+
},
|
|
9490
|
+
"peerDependencies": {
|
|
9491
|
+
"@babel/core": "^7.11.0 || ^8.0.0-beta.1"
|
|
9464
9492
|
}
|
|
9465
9493
|
},
|
|
9466
|
-
"node_modules/jest-config/node_modules/babel-
|
|
9494
|
+
"node_modules/jest-config/node_modules/babel-plugin-jest-hoist": {
|
|
9467
9495
|
"version": "30.2.0",
|
|
9468
|
-
"resolved": "https://registry.npmjs.org/babel-
|
|
9469
|
-
"integrity": "sha512-
|
|
9496
|
+
"resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.2.0.tgz",
|
|
9497
|
+
"integrity": "sha512-ftzhzSGMUnOzcCXd6WHdBGMyuwy15Wnn0iyyWGKgBDLxf9/s5ABuraCSpBX2uG0jUg4rqJnxsLc5+oYBqoxVaA==",
|
|
9470
9498
|
"license": "MIT",
|
|
9471
9499
|
"dependencies": {
|
|
9472
|
-
"
|
|
9473
|
-
"babel-preset-current-node-syntax": "^1.2.0"
|
|
9500
|
+
"@types/babel__core": "^7.20.5"
|
|
9474
9501
|
},
|
|
9475
9502
|
"engines": {
|
|
9476
9503
|
"node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
|
|
9477
|
-
},
|
|
9478
|
-
"peerDependencies": {
|
|
9479
|
-
"@babel/core": "^7.11.0 || ^8.0.0-beta.1"
|
|
9480
9504
|
}
|
|
9481
9505
|
},
|
|
9482
9506
|
"node_modules/jest-config/node_modules/balanced-match": {
|
|
@@ -12360,21 +12384,21 @@
|
|
|
12360
12384
|
}
|
|
12361
12385
|
},
|
|
12362
12386
|
"node_modules/msw/node_modules/tldts": {
|
|
12363
|
-
"version": "7.4.
|
|
12364
|
-
"resolved": "https://registry.npmjs.org/tldts/-/tldts-7.4.
|
|
12365
|
-
"integrity": "sha512-
|
|
12387
|
+
"version": "7.4.3",
|
|
12388
|
+
"resolved": "https://registry.npmjs.org/tldts/-/tldts-7.4.3.tgz",
|
|
12389
|
+
"integrity": "sha512-A3BDQBeeukYPzB4QdQ1DtdlUmp4x2OCH8n5UVhEWbyANxNep8GavottKzd1xYKFJKjUgMyPT7EzOfnBO55s8Sg==",
|
|
12366
12390
|
"license": "MIT",
|
|
12367
12391
|
"dependencies": {
|
|
12368
|
-
"tldts-core": "^7.4.
|
|
12392
|
+
"tldts-core": "^7.4.3"
|
|
12369
12393
|
},
|
|
12370
12394
|
"bin": {
|
|
12371
12395
|
"tldts": "bin/cli.js"
|
|
12372
12396
|
}
|
|
12373
12397
|
},
|
|
12374
12398
|
"node_modules/msw/node_modules/tldts-core": {
|
|
12375
|
-
"version": "7.4.
|
|
12376
|
-
"resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.4.
|
|
12377
|
-
"integrity": "sha512-
|
|
12399
|
+
"version": "7.4.3",
|
|
12400
|
+
"resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.4.3.tgz",
|
|
12401
|
+
"integrity": "sha512-27ep5H9PzdBrNd5OFM/j3WCU8F3kPwM9D0BOaOf7uYfxMJfyr0K5Tjj69Gri+sZlh2WXd5buIm47NuPF29CDiw==",
|
|
12378
12402
|
"license": "MIT"
|
|
12379
12403
|
},
|
|
12380
12404
|
"node_modules/msw/node_modules/tough-cookie": {
|
|
@@ -13373,9 +13397,9 @@
|
|
|
13373
13397
|
"license": "MIT"
|
|
13374
13398
|
},
|
|
13375
13399
|
"node_modules/regjsparser": {
|
|
13376
|
-
"version": "0.13.
|
|
13377
|
-
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.
|
|
13378
|
-
"integrity": "sha512-
|
|
13400
|
+
"version": "0.13.2",
|
|
13401
|
+
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.2.tgz",
|
|
13402
|
+
"integrity": "sha512-NgRBy2Nx/bE+9F27nVHnqcN5HjyLmecqsqx2PJHu3/IEtADD4WuxuXIVExD5PoSDFVrl78dOonfcOe5O+5nbzQ==",
|
|
13379
13403
|
"license": "BSD-2-Clause",
|
|
13380
13404
|
"dependencies": {
|
|
13381
13405
|
"jsesc": "~3.1.0"
|