@reportforge/playwright-pdf 0.6.3 → 0.7.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.
- package/README.md +12 -10
- package/dist/cli/index.js +93 -34
- package/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +71 -13
- package/dist/index.mjs +71 -13
- package/dist/templates/layouts/detailed.hbs +2 -8
- package/dist/templates/layouts/executive.hbs +2 -8
- package/dist/templates/layouts/minimal.hbs +2 -8
- package/dist/templates/partials/charts.hbs +13 -7
- package/dist/templates/partials/executive-summary.hbs +18 -4
- package/dist/templates/partials/failure-card.hbs +27 -0
- package/dist/templates/partials/suite-breakdown.hbs +31 -5
- package/dist/templates/styles/base.css +98 -26
- package/dist/templates/styles/detailed.css +1 -44
- package/dist/templates/styles/executive.css +2 -32
- package/dist/templates/styles/minimal.css +1 -46
- package/package.json +1 -1
- package/dist/templates/partials/failure-analysis.hbs +0 -42
- package/dist/templates/partials/failure-deep-dive.hbs +0 -62
- package/dist/templates/partials/slow-tests.hbs +0 -27
|
@@ -130,50 +130,7 @@
|
|
|
130
130
|
|
|
131
131
|
/* ── Suite breakdown · styles live in base.css (shared across templates) ──── */
|
|
132
132
|
|
|
133
|
-
/* ── Failure
|
|
134
|
-
.failure-item {
|
|
135
|
-
background: var(--surface);
|
|
136
|
-
border: 1px solid var(--border-2);
|
|
137
|
-
border-left: 3px solid var(--fail);
|
|
138
|
-
border-radius: 6px; padding: 16px 18px;
|
|
139
|
-
margin-bottom: 12px; page-break-inside: avoid;
|
|
140
|
-
}
|
|
141
|
-
.failure-item__header {
|
|
142
|
-
display: flex; justify-content: space-between;
|
|
143
|
-
align-items: flex-start; margin-bottom: 10px;
|
|
144
|
-
}
|
|
145
|
-
.failure-item__title {
|
|
146
|
-
font-family: 'Inter', system-ui, sans-serif;
|
|
147
|
-
font-weight: 600; font-size: 12px; color: var(--text-1);
|
|
148
|
-
}
|
|
149
|
-
.failure-item__path {
|
|
150
|
-
font-family: 'JetBrains Mono', monospace;
|
|
151
|
-
font-size: 8.5px; color: var(--text-3); margin-bottom: 10px;
|
|
152
|
-
}
|
|
153
|
-
.failure-item__message {
|
|
154
|
-
background: var(--fail-dim);
|
|
155
|
-
border: 1px solid #E5C9BD;
|
|
156
|
-
border-left: 2px solid var(--fail);
|
|
157
|
-
border-radius: 4px; padding: 10px 14px; margin-bottom: 12px;
|
|
158
|
-
font-family: 'JetBrains Mono', monospace;
|
|
159
|
-
font-size: 9.5px; color: #8A2E1E;
|
|
160
|
-
word-break: break-word; line-height: 1.6;
|
|
161
|
-
}
|
|
162
|
-
.retry-history {
|
|
163
|
-
font-size: 9px; color: var(--text-3); margin-top: 10px;
|
|
164
|
-
padding-top: 10px; border-top: 1px solid var(--border);
|
|
165
|
-
font-family: 'Inter', system-ui, sans-serif; font-weight: 600;
|
|
166
|
-
letter-spacing: 0.5px; text-transform: uppercase;
|
|
167
|
-
}
|
|
168
|
-
.retry-attempt {
|
|
169
|
-
display: inline-block; padding: 2px 7px;
|
|
170
|
-
border-radius: 3px; margin-right: 4px;
|
|
171
|
-
font-size: 8.5px; font-family: 'Inter', system-ui, sans-serif; font-weight: 600;
|
|
172
|
-
-webkit-print-color-adjust: exact;
|
|
173
|
-
print-color-adjust: exact;
|
|
174
|
-
}
|
|
175
|
-
.retry-attempt--failed { background: var(--fail-dim); color: var(--fail); border: 1px solid #E5C9BD; }
|
|
176
|
-
.retry-attempt--passed { background: var(--pass-dim); color: var(--pass); border: 1px solid #C5DBC9; }
|
|
133
|
+
/* ── Failure card · styles live in base.css (rendered inside the breakdown) ── */
|
|
177
134
|
|
|
178
135
|
/* ── Defect log, coverage bar, environment table, failure analysis ───────── */
|
|
179
136
|
/* All moved to base.css so executive/minimal can toggle these sections on too. */
|
|
@@ -132,35 +132,5 @@
|
|
|
132
132
|
letter-spacing: 1.3px;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
/*
|
|
136
|
-
.
|
|
137
|
-
display: flex; align-items: center; justify-content: space-between;
|
|
138
|
-
padding: 12px 16px;
|
|
139
|
-
border-bottom: 1px solid var(--border);
|
|
140
|
-
background: var(--surface);
|
|
141
|
-
border-left: 3px solid var(--fail);
|
|
142
|
-
}
|
|
143
|
-
.failure-summary-item:first-child {
|
|
144
|
-
border-radius: 6px 6px 0 0;
|
|
145
|
-
border-top: 1px solid var(--border-2);
|
|
146
|
-
border-right: 1px solid var(--border-2);
|
|
147
|
-
}
|
|
148
|
-
.failure-summary-item:last-child {
|
|
149
|
-
border-radius: 0 0 6px 6px;
|
|
150
|
-
border-bottom: 1px solid var(--border-2);
|
|
151
|
-
border-right: 1px solid var(--border-2);
|
|
152
|
-
}
|
|
153
|
-
.failure-summary-item:only-child {
|
|
154
|
-
border-radius: 6px;
|
|
155
|
-
border: 1px solid var(--border-2);
|
|
156
|
-
border-left: 3px solid var(--fail);
|
|
157
|
-
}
|
|
158
|
-
.failure-summary-item__title {
|
|
159
|
-
font-size: 11px; font-weight: 600; color: var(--text-1);
|
|
160
|
-
padding-left: 6px;
|
|
161
|
-
}
|
|
162
|
-
.failure-summary-item__suite {
|
|
163
|
-
font-size: 9px; color: var(--text-3); margin-top: 3px;
|
|
164
|
-
font-family: 'JetBrains Mono', monospace;
|
|
165
|
-
padding-left: 6px;
|
|
166
|
-
}
|
|
135
|
+
/* Executive failures now render inline in the suite breakdown (compact, no
|
|
136
|
+
screenshots) — card styles live in base.css. */
|
|
@@ -143,49 +143,4 @@
|
|
|
143
143
|
}
|
|
144
144
|
.suite-stats { gap: 6px; }
|
|
145
145
|
|
|
146
|
-
/* ── Failure
|
|
147
|
-
.failure-item {
|
|
148
|
-
background: var(--surface);
|
|
149
|
-
border: 1px solid var(--border-2);
|
|
150
|
-
border-left: 3px solid var(--fail);
|
|
151
|
-
border-radius: 6px;
|
|
152
|
-
padding: 14px 16px; margin-bottom: 10px;
|
|
153
|
-
page-break-inside: avoid;
|
|
154
|
-
}
|
|
155
|
-
.failure-item__header {
|
|
156
|
-
display: flex; justify-content: space-between;
|
|
157
|
-
align-items: flex-start; margin-bottom: 8px;
|
|
158
|
-
}
|
|
159
|
-
.failure-item__title {
|
|
160
|
-
font-family: 'Inter', system-ui, sans-serif;
|
|
161
|
-
font-weight: 600; font-size: 12px;
|
|
162
|
-
color: var(--text-1); margin-bottom: 4px;
|
|
163
|
-
}
|
|
164
|
-
.failure-item__path {
|
|
165
|
-
font-family: 'JetBrains Mono', monospace;
|
|
166
|
-
font-size: 8.5px; color: var(--text-3); margin-bottom: 10px;
|
|
167
|
-
}
|
|
168
|
-
.failure-item__message {
|
|
169
|
-
background: var(--fail-dim);
|
|
170
|
-
border: 1px solid #E5C9BD;
|
|
171
|
-
border-left: 2px solid var(--fail);
|
|
172
|
-
border-radius: 4px;
|
|
173
|
-
padding: 9px 12px; margin-bottom: 10px;
|
|
174
|
-
font-family: 'JetBrains Mono', monospace;
|
|
175
|
-
font-size: 9.5px; color: #8A2E1E;
|
|
176
|
-
word-break: break-word; line-height: 1.6;
|
|
177
|
-
}
|
|
178
|
-
.retry-history {
|
|
179
|
-
font-size: 9px; color: var(--text-3); margin-top: 10px;
|
|
180
|
-
padding-top: 8px; border-top: 1px solid var(--border);
|
|
181
|
-
}
|
|
182
|
-
.retry-attempt {
|
|
183
|
-
display: inline-block; padding: 2px 7px;
|
|
184
|
-
border-radius: 3px; margin-right: 4px; font-size: 8.5px;
|
|
185
|
-
font-family: 'Inter', system-ui, sans-serif; font-weight: 600;
|
|
186
|
-
letter-spacing: 0.4px; text-transform: uppercase;
|
|
187
|
-
-webkit-print-color-adjust: exact;
|
|
188
|
-
print-color-adjust: exact;
|
|
189
|
-
}
|
|
190
|
-
.retry-attempt--failed { background: var(--fail-dim); color: var(--fail); border: 1px solid #E5C9BD; }
|
|
191
|
-
.retry-attempt--passed { background: var(--pass-dim); color: var(--pass); border: 1px solid #C5DBC9; }
|
|
146
|
+
/* ── Failure card · styles live in base.css (rendered inside the breakdown) ── */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reportforge/playwright-pdf",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Enterprise-ready PDF reports for Playwright Test — minimal, detailed, and executive templates with CI/CD integrations",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ReportForge",
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{{#if analysis.clusters.length}}
|
|
2
|
-
<section class="failure-analysis">
|
|
3
|
-
<h2>Failure Analysis</h2>
|
|
4
|
-
<p class="oneliner">{{analysis.oneLiner}}</p>
|
|
5
|
-
|
|
6
|
-
{{#if analysis.truncated}}
|
|
7
|
-
<p class="analysis-truncated">
|
|
8
|
-
Showing analysis of the first {{analysis.analysedCount}} of {{analysis.totalFailures}} failures.
|
|
9
|
-
Raise <code>failureAnalysis.maxFailuresToAnalyse</code> for full coverage.
|
|
10
|
-
</p>
|
|
11
|
-
{{/if}}
|
|
12
|
-
|
|
13
|
-
{{#each analysis.clusters}}
|
|
14
|
-
<div class="cluster cluster--{{category}}">
|
|
15
|
-
<div class="cluster-header">
|
|
16
|
-
<span class="cluster-category">{{categoryLabel category}}</span>
|
|
17
|
-
<span class="cluster-count">{{count}} {{pluralise count "test" "tests"}}</span>
|
|
18
|
-
<span class="cluster-strength cluster-strength--{{strength}}">{{strengthLabel strength}} match</span>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
{{#if stackFrame}}
|
|
22
|
-
<div class="cluster-frame"><code>{{stackFrame}}</code></div>
|
|
23
|
-
{{/if}}
|
|
24
|
-
|
|
25
|
-
<div class="cluster-message">{{representativeMessage}}</div>
|
|
26
|
-
|
|
27
|
-
<ul class="cluster-tests">
|
|
28
|
-
{{#each (take tests 5)}}
|
|
29
|
-
<li>{{this}}</li>
|
|
30
|
-
{{/each}}
|
|
31
|
-
{{#if (gt testsTotal 5)}}
|
|
32
|
-
<li class="more">+{{subtract testsTotal 5}} more</li>
|
|
33
|
-
{{/if}}
|
|
34
|
-
</ul>
|
|
35
|
-
|
|
36
|
-
{{#if (eq strength "weak")}}
|
|
37
|
-
<p class="confidence-warning">* Weak match — manual review recommended</p>
|
|
38
|
-
{{/if}}
|
|
39
|
-
</div>
|
|
40
|
-
{{/each}}
|
|
41
|
-
</section>
|
|
42
|
-
{{/if}}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
{{#if failures.length}}
|
|
2
|
-
<div class="section">
|
|
3
|
-
<h2>Failures ({{failures.length}}{{#if overflowFailureCount}} shown · {{overflowFailureCount}} more in sidecar{{/if}})</h2>
|
|
4
|
-
{{#if overflowFailureCount}}
|
|
5
|
-
<div class="overflow-banner">
|
|
6
|
-
Showing the first {{failures.length}} failures. {{overflowFailureCount}} additional
|
|
7
|
-
failure{{#if (gt overflowFailureCount 1)}}s are{{else}} is{{/if}} available in
|
|
8
|
-
<code>{{overflowSidecarName}}</code> alongside this report.
|
|
9
|
-
</div>
|
|
10
|
-
{{/if}}
|
|
11
|
-
{{#each failures}}
|
|
12
|
-
<div class="failure-item failure-item--{{severity}} no-break">
|
|
13
|
-
{{#if ../options.showFullFailures}}
|
|
14
|
-
|
|
15
|
-
<div class="failure-item__header">
|
|
16
|
-
<div>
|
|
17
|
-
<div class="failure-item__title">{{testTitle}}</div>
|
|
18
|
-
<div class="failure-item__path">{{join suitePath " › "}}</div>
|
|
19
|
-
</div>
|
|
20
|
-
<span class="badge badge--failed severity--{{severity}}" style="white-space:nowrap;">
|
|
21
|
-
{{upperCase severity}}
|
|
22
|
-
</span>
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
{{!-- Playwright's error.stack already begins with the message, so rendering
|
|
26
|
-
both duplicates it. Show the formatted stack when available; otherwise
|
|
27
|
-
fall back to the bare message. --}}
|
|
28
|
-
{{#if (and error.stack ../options.showStackTraces)}}
|
|
29
|
-
<pre>{{error.stack}}</pre>
|
|
30
|
-
{{else}}
|
|
31
|
-
<div class="failure-item__message">{{error.message}}</div>
|
|
32
|
-
{{/if}}
|
|
33
|
-
|
|
34
|
-
{{#if screenshotBase64}}
|
|
35
|
-
<img class="screenshot" src="{{screenshotBase64}}" alt="Screenshot at failure">
|
|
36
|
-
{{/if}}
|
|
37
|
-
|
|
38
|
-
{{#if retryHistory.length}}
|
|
39
|
-
<div class="retry-history">
|
|
40
|
-
Retry history:
|
|
41
|
-
{{#each retryHistory}}
|
|
42
|
-
<span class="retry-attempt retry-attempt--{{status}}">
|
|
43
|
-
#{{addOne attempt}} {{status}} · {{formatDuration duration}}
|
|
44
|
-
</span>
|
|
45
|
-
{{/each}}
|
|
46
|
-
</div>
|
|
47
|
-
{{/if}}
|
|
48
|
-
|
|
49
|
-
{{else}}
|
|
50
|
-
{{!-- Executive: title + suite only --}}
|
|
51
|
-
<div class="failure-summary-item">
|
|
52
|
-
<div>
|
|
53
|
-
<div class="failure-summary-item__title">{{testTitle}}</div>
|
|
54
|
-
<div class="failure-summary-item__suite">{{join suitePath " › "}}</div>
|
|
55
|
-
</div>
|
|
56
|
-
<span class="badge badge--failed">FAILED</span>
|
|
57
|
-
</div>
|
|
58
|
-
{{/if}}
|
|
59
|
-
</div>
|
|
60
|
-
{{/each}}
|
|
61
|
-
</div>
|
|
62
|
-
{{/if}}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{{#if slowTests.length}}
|
|
2
|
-
<div class="section">
|
|
3
|
-
<h2>Slowest Tests</h2>
|
|
4
|
-
<table>
|
|
5
|
-
<thead>
|
|
6
|
-
<tr>
|
|
7
|
-
<th>Test</th>
|
|
8
|
-
<th style="width:130px;">Suite</th>
|
|
9
|
-
{{#if showProject}}<th style="width:80px;">Project</th>{{/if}}
|
|
10
|
-
<th style="width:76px;text-align:right;">Duration</th>
|
|
11
|
-
<th style="width:68px;">Status</th>
|
|
12
|
-
</tr>
|
|
13
|
-
</thead>
|
|
14
|
-
<tbody>
|
|
15
|
-
{{#each (take slowTests limit)}}
|
|
16
|
-
<tr class="no-break">
|
|
17
|
-
<td style="font-weight:500;">{{title}}</td>
|
|
18
|
-
<td style="font-size:9px;color:var(--text-3);font-family:'JetBrains Mono',monospace;">{{suiteTitle}}</td>
|
|
19
|
-
{{#if ../showProject}}<td style="font-size:9px;color:var(--text-3);white-space:nowrap;">{{project}}</td>{{/if}}
|
|
20
|
-
<td style="font-family:'JetBrains Mono',monospace;font-size:9.5px;color:var(--text-2);text-align:right;">{{durationFormatted}}</td>
|
|
21
|
-
<td>{{statusBadge status}}</td>
|
|
22
|
-
</tr>
|
|
23
|
-
{{/each}}
|
|
24
|
-
</tbody>
|
|
25
|
-
</table>
|
|
26
|
-
</div>
|
|
27
|
-
{{/if}}
|