@reportforge/playwright-pdf 0.14.3 → 0.15.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
+ ## [0.15.0] - 2026-07-07
7
+
8
+ ### Changed
9
+
10
+ - **Suite Breakdown now always opens on a fresh page** in every template (`minimal`, `detailed`, `executive`), instead of starting mid-page after whatever section precedes it.
11
+ - **Watermark now stamps from the Suite Breakdown page to the end of the report.** The cover, summary, and chart pages stay clean — a diagonal stamp behind the doughnut/trend charts hurt readability on exactly the pages built to be glanced at. The copies anchor inside the suite-breakdown section (its forced page break makes the section's top edge an exact page boundary), so every copy stays page-centred without estimating print pagination; custom templates and `sections` overrides without that section fall back to whole-document stamping. Also fixes a latent overshoot where the page-count pad could paint a blank trailing page containing only a watermark.
12
+ - **Watermark opacity raised from 4% to 10%** — visible as a stamp rather than barely-there, still light enough to keep text underneath legible.
13
+ - **Release Recommendation no longer says "fix before shipping."** A failure isn't necessarily a product defect, so the HOLD banner now reads: "Review each failure — it may be a product defect or an automation script issue — and verify manually before shipping." The timed-out variant matches ("often an environment or automation issue").
14
+
15
+ ---
16
+
6
17
  ## [0.14.3] - 2026-07-06
7
18
 
8
19
  ### Fixed
package/README.md CHANGED
@@ -183,7 +183,7 @@ All options are the second element of the reporter tuple.
183
183
  | `logo` | `string` | n/a | Path to a logo image (PNG, JPG, or SVG) to embed in the report header. Supports absolute and relative paths. |
184
184
  | `primaryColor` | `string` | `'#CC785C'` | Primary brand colour (3-, 6-, or 8-digit hex). Used for headers and accent bars. |
185
185
  | `accentColor` | `string` | `'#3F7D58'` | Accent brand colour (hex). Used for highlights and badges. |
186
- | `watermark` | `string` | n/a | Text to render as a diagonal watermark overlay on every page, e.g. `'CONFIDENTIAL'` or `'DRAFT'`. |
186
+ | `watermark` | `string` | n/a | Text to render as a diagonal watermark overlay from the Suite Breakdown page onward (summary/chart pages stay clean), e.g. `'CONFIDENTIAL'` or `'DRAFT'`. |
187
187
  | `pdfPassword` | `string` | n/a | Password-protect the generated PDF. Requires `qpdf` installed on the system. |
188
188
  | `reportTitle` | `string` | `'Playwright Test Report'` | Custom title for the report cover page and running header. |
189
189
  | `projectName` | `string` | from `package.json` | Project or application name. Inferred from the `package.json` `name` field if absent. |
@@ -668,7 +668,7 @@ Full documentation at [reportforge.org/docs](https://reportforge.org/docs):
668
668
  - [Report Sections](https://reportforge.org/docs/configuration#report-sections): add or remove sections per template
669
669
  - [License & offline behaviour](https://reportforge.org/docs/licensing): JWT cache, machine cap, cancellation
670
670
  - [Troubleshooting](https://reportforge.org/docs/troubleshooting): common issues and debug flags
671
- - **Changelog**: [CHANGELOG.md](./CHANGELOG.md)
671
+ - [Changelog](https://reportforge.org/changelog): version history and release notes
672
672
 
673
673
  ---
674
674
 
package/dist/index.d.mts CHANGED
@@ -67,7 +67,8 @@ interface ReporterOptions {
67
67
  */
68
68
  accentColor?: string;
69
69
  /**
70
- * Text to render as a diagonal watermark overlay on every page.
70
+ * Text to render as a diagonal watermark overlay, stamped from the Suite
71
+ * Breakdown page to the end of the report (summary and chart pages stay clean).
71
72
  * Example: 'CONFIDENTIAL', 'DRAFT'
72
73
  */
73
74
  watermark?: string;
package/dist/index.d.ts CHANGED
@@ -67,7 +67,8 @@ interface ReporterOptions {
67
67
  */
68
68
  accentColor?: string;
69
69
  /**
70
- * Text to render as a diagonal watermark overlay on every page.
70
+ * Text to render as a diagonal watermark overlay, stamped from the Suite
71
+ * Breakdown page to the end of the report (summary and chart pages stay clean).
71
72
  * Example: 'CONFIDENTIAL', 'DRAFT'
72
73
  */
73
74
  watermark?: string;
package/dist/index.js CHANGED
@@ -14062,7 +14062,7 @@ var PdfReporter = class {
14062
14062
  this.liveConsole = false;
14063
14063
  this.options = parseOptions(rawOptions);
14064
14064
  this.dataCollector = new DataCollector(this.options.capture);
14065
- const version = true ? "0.14.3" : "0.x";
14065
+ const version = true ? "0.15.0" : "0.x";
14066
14066
  logger.info(`@reportforge/playwright-pdf v${version} initialised`);
14067
14067
  this.licenseClient = new LicenseClient({
14068
14068
  licenseKey: this.options.licenseKey,
package/dist/index.mjs CHANGED
@@ -14063,7 +14063,7 @@ var PdfReporter = class {
14063
14063
  this.liveConsole = false;
14064
14064
  this.options = parseOptions(rawOptions);
14065
14065
  this.dataCollector = new DataCollector(this.options.capture);
14066
- const version = true ? "0.14.3" : "0.x";
14066
+ const version = true ? "0.15.0" : "0.x";
14067
14067
  logger.info(`@reportforge/playwright-pdf v${version} initialised`);
14068
14068
  this.licenseClient = new LicenseClient({
14069
14069
  licenseKey: this.options.licenseKey,
@@ -7,7 +7,8 @@
7
7
  HOLD — {{stats.failed}} FAILURE{{#if (gt stats.failed 1)}}S{{/if}}
8
8
  </div>
9
9
  <div class="release-gate__detail">
10
- {{stats.failed}} of {{stats.total}} tests failed. Review and fix before shipping.
10
+ {{stats.failed}} of {{stats.total}} tests failed. Review each failure &mdash; it may be a
11
+ product defect or an automation script issue &mdash; and verify manually before shipping.
11
12
  {{#if stats.flaky}} &nbsp;&middot;&nbsp; {{stats.flaky}} flaky (additional risk).{{/if}}
12
13
  </div>
13
14
  </div>
@@ -26,7 +27,8 @@
26
27
  HOLD &mdash; {{stats.timedOut}} TIMED OUT
27
28
  </div>
28
29
  <div class="release-gate__detail">
29
- {{stats.timedOut}} tests exceeded timeout. Investigate before shipping.
30
+ {{stats.timedOut}} tests exceeded timeout &mdash; often an environment or automation
31
+ issue. Review and verify manually before shipping.
30
32
  </div>
31
33
  </div>
32
34
  <div class="release-gate__meta">
@@ -1,4 +1,4 @@
1
- <div class="section">
1
+ <div class="section section--suite-breakdown">
2
2
  <h2>Suite Breakdown</h2>
3
3
  {{#if (and overflowFailureCount sections.failureDeepDive)}}
4
4
  <div class="overflow-banner">
@@ -5,19 +5,37 @@ document.addEventListener('DOMContentLoaded', function() {
5
5
  // single watermark div only ever prints on one page. Instead, measure the fully
6
6
  // parsed document (this listener fires after all content above is in the DOM)
7
7
  // and stamp one absolutely-positioned copy per page slot.
8
+ //
9
+ // Copies start at the suite breakdown, not page 1, so the summary/chart pages
10
+ // stay clean. That section opens on a forced page break (.section--suite-breakdown
11
+ // in base.css), which makes its top edge an exact page boundary — appending the
12
+ // copies INSIDE it keeps each one page-centred even when print pagination pushes
13
+ // in-flow content down, because the copies travel with the section rather than
14
+ // being estimated against shifted content. When the section is absent (sections
15
+ // override, custom templates), fall back to stamping the whole document.
8
16
  var text = {{{safeJsonData meta.branding.watermark}}};
9
17
  var pageHeightPx = {{watermarkPageHeightPx}};
10
- // +1: print pagination avoids breaking cards/rows mid-way, so each physical
11
- // page is often a little under pageHeightPx of raw content — that nudges the
12
- // real page count above what scrollHeight / pageHeightPx alone predicts.
13
- var pageCount = Math.min(500, Math.max(1, Math.ceil(document.body.scrollHeight / pageHeightPx) + 1));
18
+ var anchor = document.querySelector('.section--suite-breakdown');
19
+ var host = anchor || document.body;
20
+ var startPx = anchor ? anchor.offsetTop : 0;
21
+ // Copy count: ceil() of the measured span, NEVER padded in the anchor case — the
22
+ // anchor origin is page-aligned, so ceil is exact for unshifted content and every
23
+ // copy lands inside it (a padded copy would paint a blank trailing page with a
24
+ // lone watermark). Print pagination can still push content one page further than
25
+ // the screen measurement predicts (cards/rows refuse to split mid-way); in the
26
+ // anchor case that at worst leaves the final spill-over page unstamped, which is
27
+ // the cheaper failure. The body fallback keeps the +1: whole-document slack
28
+ // (cover break + every section) reliably exceeds a page, so there the pad fills
29
+ // a real page instead of minting an empty one.
30
+ var extra = anchor ? 0 : 1;
31
+ var pageCount = Math.min(500, Math.max(1, Math.ceil((document.body.scrollHeight - startPx) / pageHeightPx) + extra));
14
32
  for (var i = 0; i < pageCount; i++) {
15
33
  var el = document.createElement('div');
16
34
  el.className = 'watermark';
17
35
  el.setAttribute('aria-hidden', 'true');
18
36
  el.style.top = (i * pageHeightPx + pageHeightPx / 2) + 'px';
19
37
  el.textContent = text;
20
- document.body.appendChild(el);
38
+ host.appendChild(el);
21
39
  }
22
40
  });
23
41
  </script>
@@ -44,7 +44,8 @@ html, body {
44
44
  background: var(--bg);
45
45
  }
46
46
  /* Positioned so it's the containing block for the watermark's `position: absolute`
47
- copies (see below) — without this they'd position relative to the document root. */
47
+ fallback copies (see watermark.hbs) — without this they'd position relative to
48
+ the document root. */
48
49
  body { position: relative; z-index: 0; }
49
50
 
50
51
  /* ── Typography ─────────────────────────────────────────────────────────── */
@@ -145,20 +146,34 @@ tr:last-child td { border-bottom: none; }
145
146
  /* `top` is set inline per copy (see watermark.hbs) — Chromium's print-to-PDF
146
147
  doesn't repeat `position: fixed` elements per page, so one copy is stamped
147
148
  at each page's vertical centre in document-flow coordinates instead.
149
+ Copies live inside .section--suite-breakdown (its forced page break makes its
150
+ top edge a page boundary) and run from there to the end of the report — the
151
+ summary/chart pages stay unstamped. body hosts the copies only as a fallback
152
+ when that section is absent.
148
153
  z-index is high (not negative) so it paints over cards/badges too — at
149
- 4% opacity it doesn't hurt legibility, and a negative z-index made it
150
- invisible on any page dense enough to have no gaps in the content. */
154
+ 10% opacity it stays light enough not to hurt legibility, and a negative
155
+ z-index made it invisible on any page dense enough to have no gaps in the
156
+ content. */
151
157
  .watermark {
152
158
  position: absolute; left: 50%;
153
159
  transform: translate(-50%, -50%) rotate(-30deg);
154
160
  font-family: 'Source Serif Pro', Georgia, serif; font-size: 60px; font-weight: 700;
155
- color: rgba(31,31,28,0.04); pointer-events: none; z-index: 999;
161
+ color: rgba(31,31,28,0.10); pointer-events: none; z-index: 999;
156
162
  white-space: nowrap; letter-spacing: 8px; text-transform: uppercase;
157
163
  user-select: none;
158
164
  }
159
165
 
160
166
  /* ── Page breaks ────────────────────────────────────────────────────────── */
161
167
  .no-break { page-break-inside: avoid; }
168
+ /* Suite breakdown always opens on a fresh page (every template) — and the forced
169
+ break puts its top edge exactly on a page boundary, which watermark.hbs relies
170
+ on to start the per-page watermark copies here. position:relative makes it
171
+ their containing block; no z-index, so the copies keep painting in the body
172
+ stacking context (above the sections that follow this one too). */
173
+ .section--suite-breakdown {
174
+ break-before: page; page-break-before: always;
175
+ position: relative;
176
+ }
162
177
  /* Keep a failed test row glued to the START of its inline failure detail so the
163
178
  title never orphans above it. The detail card itself may break internally (its
164
179
  small pieces are individually break-protected), so a tall screenshot flows to the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reportforge/playwright-pdf",
3
- "version": "0.14.3",
3
+ "version": "0.15.0",
4
4
  "description": "Playwright Test reporter that generates designed PDF reports: minimal, detailed, and executive templates with CI/CD integrations",
5
5
  "license": "MIT",
6
6
  "author": "ReportForge",