@arghajit/playwright-pulse-report 0.2.5 → 0.2.8
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/README.md +4 -4
- package/dist/reporter/playwright-pulse-reporter.js +5 -4
- package/dist/types/index.d.ts +2 -1
- package/package.json +6 -3
- package/scripts/generate-report.mjs +705 -303
- package/scripts/generate-static-report.mjs +1415 -843
- package/scripts/sendReport.mjs +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Playwright Pluse Report
|
|
2
2
|
|
|
3
|
-

|
|
4
|
+
|
|
4
5
|
_The ultimate Playwright reporter — Interactive dashboard with historical trend analytics, CI/CD-ready standalone HTML reports, and sharding support for scalable test execution._
|
|
5
6
|
|
|
6
7
|
## [Live Demo](https://pulse-report.netlify.app/)
|
|
@@ -16,7 +17,7 @@ The project provides these utility commands:
|
|
|
16
17
|
| Command | Description |
|
|
17
18
|
|------------------------|-----------------------------------------------------------------------------|
|
|
18
19
|
| `generate-report` | Generates playwright-pulse-report.html, Loads screenshots and images dynamically from the attachments/ directory, Produces a lighter HTML file with faster initial load, Requires attachments/ directory to be present when viewing the report |
|
|
19
|
-
| `generate-pulse-report`| Generates `playwright-pulse-static-report.html`, Self-contained, no server required, Preserves all dashboard functionality
|
|
20
|
+
| `generate-pulse-report`| Generates `playwright-pulse-static-report.html`, Self-contained, no server required, Preserves all dashboard functionality, all the attachments are embadded in the report, no need to have attachments/ directory when viewing the report, with a dark theme and better initial load handling |
|
|
20
21
|
| `merge-pulse-report` | Combines multiple parallel test json reports, basically used in sharding |
|
|
21
22
|
| `generate-trend` | Analyzes historical trends in test results |
|
|
22
23
|
| `generate-email-report`| Generates email-friendly report versions |
|
|
@@ -272,8 +273,7 @@ export default defineConfig({
|
|
|
272
273
|
|
|
273
274
|
---
|
|
274
275
|
|
|
275
|
-
|
|
276
|
-
<h2>Pulse Dashboard</h2>
|
|
276
|
+

|
|
277
277
|
|
|
278
278
|
**Real-time Playwright Test Monitoring & Analysis**
|
|
279
279
|
|
|
@@ -197,7 +197,7 @@ class PlaywrightPulseReporter {
|
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
199
|
async onTestEnd(test, result) {
|
|
200
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
200
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
201
201
|
const project = (_a = test.parent) === null || _a === void 0 ? void 0 : _a.project();
|
|
202
202
|
const browserDetails = this.getBrowserDetails(test);
|
|
203
203
|
const testStatus = convertStatus(result.status, test);
|
|
@@ -252,6 +252,7 @@ class PlaywrightPulseReporter {
|
|
|
252
252
|
steps: ((_f = result.steps) === null || _f === void 0 ? void 0 : _f.length) ? await processAllSteps(result.steps) : [],
|
|
253
253
|
errorMessage: (_g = result.error) === null || _g === void 0 ? void 0 : _g.message,
|
|
254
254
|
stackTrace: (_h = result.error) === null || _h === void 0 ? void 0 : _h.stack,
|
|
255
|
+
snippet: (_j = result.error) === null || _j === void 0 ? void 0 : _j.snippet,
|
|
255
256
|
codeSnippet: codeSnippet,
|
|
256
257
|
tags: test.tags.map((tag) => tag.startsWith("@") ? tag.substring(1) : tag),
|
|
257
258
|
screenshots: [],
|
|
@@ -276,16 +277,16 @@ class PlaywrightPulseReporter {
|
|
|
276
277
|
await this._ensureDirExists(path.dirname(absoluteDestPath));
|
|
277
278
|
await fs.copyFile(attachment.path, absoluteDestPath);
|
|
278
279
|
if (attachment.contentType.startsWith("image/")) {
|
|
279
|
-
(
|
|
280
|
+
(_k = pulseResult.screenshots) === null || _k === void 0 ? void 0 : _k.push(relativeDestPath);
|
|
280
281
|
}
|
|
281
282
|
else if (attachment.contentType.startsWith("video/")) {
|
|
282
|
-
(
|
|
283
|
+
(_l = pulseResult.videoPath) === null || _l === void 0 ? void 0 : _l.push(relativeDestPath);
|
|
283
284
|
}
|
|
284
285
|
else if (attachment.name === "trace") {
|
|
285
286
|
pulseResult.tracePath = relativeDestPath;
|
|
286
287
|
}
|
|
287
288
|
else {
|
|
288
|
-
(
|
|
289
|
+
(_m = pulseResult.attachments) === null || _m === void 0 ? void 0 : _m.push({
|
|
289
290
|
name: attachment.name,
|
|
290
291
|
path: relativeDestPath,
|
|
291
292
|
contentType: attachment.contentType,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LucideIcon } from
|
|
1
|
+
import type { LucideIcon } from "lucide-react";
|
|
2
2
|
export type TestStatus = "passed" | "failed" | "skipped" | "expected-failure" | "unexpected-success" | "explicitly-skipped";
|
|
3
3
|
export interface TestStep {
|
|
4
4
|
id: string;
|
|
@@ -26,6 +26,7 @@ export interface TestResult {
|
|
|
26
26
|
steps: TestStep[];
|
|
27
27
|
errorMessage?: string;
|
|
28
28
|
stackTrace?: string;
|
|
29
|
+
snippet?: string;
|
|
29
30
|
codeSnippet?: string;
|
|
30
31
|
tags?: string[];
|
|
31
32
|
suiteName?: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arghajit/playwright-pulse-report",
|
|
3
3
|
"author": "Arghajit Singha",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.8",
|
|
5
5
|
"description": "A Playwright reporter and dashboard for visualizing test results.",
|
|
6
6
|
"homepage": "https://playwright-pulse-report.netlify.app/",
|
|
7
7
|
"keywords": [
|
|
@@ -73,13 +73,16 @@
|
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@types/node": "^20",
|
|
75
75
|
"@types/ua-parser-js": "^0.7.39",
|
|
76
|
-
"eslint": "9.
|
|
76
|
+
"eslint": "^9.39.1",
|
|
77
77
|
"typescript": "^5"
|
|
78
78
|
},
|
|
79
79
|
"engines": {
|
|
80
|
-
"node": ">=
|
|
80
|
+
"node": ">=18"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"@playwright/test": ">=1.40.0"
|
|
84
|
+
},
|
|
85
|
+
"overrides": {
|
|
86
|
+
"glob": "^13.0.0"
|
|
84
87
|
}
|
|
85
88
|
}
|