@uuv/playwright 3.3.0 → 3.3.1
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.
|
@@ -15,7 +15,7 @@ const chalk_table_1 = __importDefault(require("chalk-table"));
|
|
|
15
15
|
const uuv_custom_formatter_1 = require("./uuv-custom-formatter");
|
|
16
16
|
const tag_expressions_1 = __importDefault(require("@cucumber/tag-expressions"));
|
|
17
17
|
const path_1 = __importDefault(require("path"));
|
|
18
|
-
const
|
|
18
|
+
const event_1 = require("@uuv/runner-commons/runner/event");
|
|
19
19
|
const NANOS_IN_SECOND = 1000000000;
|
|
20
20
|
const NANOS_IN_MILLISSECOND = 1000000;
|
|
21
21
|
var GeneratedReportType;
|
|
@@ -101,7 +101,7 @@ class UuvPlaywrightReporterHelper {
|
|
|
101
101
|
this.testCasesAndTestCasesStartedIdMap.set(test.id, testCaseStartedId);
|
|
102
102
|
this.initConsoleReportIfNotExists(featureFile);
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
event_1.UUVEventEmitter.getInstance().emitTestStarted({
|
|
105
105
|
testName: test.title,
|
|
106
106
|
testSuiteName: this.getTestSuiteName(featureFile),
|
|
107
107
|
testSuitelocation: featureFile
|
|
@@ -224,21 +224,21 @@ class UuvPlaywrightReporterHelper {
|
|
|
224
224
|
handleTestEnd(result, test, featureFile) {
|
|
225
225
|
switch (result.status) {
|
|
226
226
|
case "passed":
|
|
227
|
-
|
|
227
|
+
event_1.UUVEventEmitter.getInstance().emitTestFinished({
|
|
228
228
|
testName: test.title,
|
|
229
229
|
testSuiteName: this.getTestSuiteName(featureFile),
|
|
230
230
|
duration: result.duration
|
|
231
231
|
});
|
|
232
232
|
break;
|
|
233
233
|
case "failed":
|
|
234
|
-
|
|
234
|
+
event_1.UUVEventEmitter.getInstance().emitTestFailed({
|
|
235
235
|
testName: test.title,
|
|
236
236
|
testSuiteName: this.getTestSuiteName(featureFile),
|
|
237
237
|
duration: result.duration
|
|
238
238
|
});
|
|
239
239
|
break;
|
|
240
240
|
default:
|
|
241
|
-
|
|
241
|
+
event_1.UUVEventEmitter.getInstance().emitTestIgnored({
|
|
242
242
|
testName: test.title,
|
|
243
243
|
testSuiteName: this.getTestSuiteName(featureFile)
|
|
244
244
|
});
|
|
@@ -248,7 +248,7 @@ class UuvPlaywrightReporterHelper {
|
|
|
248
248
|
const featureTestCaseStatus = this.featureFileAndTestCaseStatusMap.get(featureFile);
|
|
249
249
|
if (featureTestCaseStatus) {
|
|
250
250
|
if (Object.entries(featureTestCaseStatus).find(([, value]) => value === "todo") === undefined) {
|
|
251
|
-
|
|
251
|
+
event_1.UUVEventEmitter.getInstance().emitTestSuiteFinished({
|
|
252
252
|
testSuiteName: this.getTestSuiteName(featureFile)
|
|
253
253
|
});
|
|
254
254
|
}
|
|
@@ -285,7 +285,7 @@ class UuvPlaywrightReporterHelper {
|
|
|
285
285
|
}
|
|
286
286
|
initConsoleReportIfNotExists(featureFile) {
|
|
287
287
|
if (!this.consoleReportMap.get(featureFile)) {
|
|
288
|
-
|
|
288
|
+
event_1.UUVEventEmitter.getInstance().emitTestSuiteStarted({
|
|
289
289
|
testSuiteName: this.getTestSuiteName(featureFile),
|
|
290
290
|
testSuitelocation: featureFile
|
|
291
291
|
});
|
|
@@ -5,17 +5,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const uuv_playwright_reporter_helper_1 = __importDefault(require("./uuv-playwright-reporter-helper"));
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const
|
|
8
|
+
const event_1 = require("@uuv/runner-commons/runner/event");
|
|
9
9
|
class UuvPlawrightReporter {
|
|
10
10
|
helper = new uuv_playwright_reporter_helper_1.default();
|
|
11
11
|
constructor() {
|
|
12
|
-
|
|
12
|
+
event_1.UUVListenerHelper.build();
|
|
13
13
|
}
|
|
14
14
|
onBegin(config, suite) {
|
|
15
15
|
const startTimestamp = this.helper.getTimestamp();
|
|
16
16
|
// console.log(`Starting the run with ${suite.allTests().length} tests`);
|
|
17
17
|
this.helper.createTestRunStartedEnvelope(config, suite, startTimestamp);
|
|
18
|
-
|
|
18
|
+
event_1.UUVEventEmitter.getInstance().emitProgressStart();
|
|
19
19
|
console.info(chalk_1.default.yellow(`Starting the run with ${suite.allTests().length} tests`));
|
|
20
20
|
}
|
|
21
21
|
onError(error) {
|
|
@@ -70,7 +70,7 @@ class UuvPlawrightReporter {
|
|
|
70
70
|
else {
|
|
71
71
|
console.error(chalk_1.default.red(`Tests executed with status: ${result.status}`));
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
event_1.UUVEventEmitter.getInstance().emitProgressFinish();
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
exports.default = UuvPlawrightReporter;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uuv/playwright",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "Louis Fredice NJAKO MOLOM (https://github.com/luifr10) & Stanley SERVICAL (https://github.com/stanlee974)",
|
|
6
6
|
"description": "A solution to facilitate the writing and execution of E2E tests understandable by any human being using cucumber(BDD) and playwright",
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"generate:step-definitions": "ts-node generate-step-definitions.ts",
|
|
37
37
|
"package": "npm pack --pack-destination=\"../../dist/packages\"",
|
|
38
38
|
"postinstall": "node postinstall.js",
|
|
39
|
-
"unit-tests": "jest --runInBand --coverage --config=./jest.config.ts",
|
|
39
|
+
"unit-tests": "jest --runInBand --coverage --config=./jest.config.ts --testPathIgnorePatterns=src/tests/report",
|
|
40
|
+
"verify-report": "jest --runInBand --coverage --config=./jest.config.ts --testPathPattern=src/tests/report",
|
|
40
41
|
"e2e-test:run": "ts-node test.ts e2e",
|
|
41
42
|
"e2e-test:open": "ts-node test.ts open --",
|
|
42
43
|
"test": "npm run unit-test && npm run e2e-test:run"
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
"dependencies": {
|
|
45
46
|
"@cucumber/tag-expressions": "^6.0.0",
|
|
46
47
|
"@playwright/test": "^1.44.1",
|
|
47
|
-
"@uuv/runner-commons": "2.18.
|
|
48
|
+
"@uuv/runner-commons": "2.18.1",
|
|
48
49
|
"axe-core": "4.9.1",
|
|
49
50
|
"axe-playwright": "2.0.1",
|
|
50
51
|
"chalk-table": "^1.0.2",
|