@reportforge/playwright-pdf 0.25.0 → 0.27.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.
@@ -24,6 +24,8 @@
24
24
 
25
25
  {{#if sections.charts}}{{> charts options=(obj showCharts=true showTrend=sections.trend) }}{{/if}}
26
26
 
27
+ {{#if sections.runDiff}}{{> run-diff variant='full'}}{{/if}}
28
+
27
29
  {{#if sections.requirementsMatrix}}{{> requirements-matrix }}{{/if}}
28
30
 
29
31
  {{#if sections.ciEnvironment}}{{> ci-environment options=(obj showFullEnvironment=sections.fullEnvironment) }}{{/if}}
@@ -20,6 +20,8 @@
20
20
 
21
21
  {{#if sections.briefBand}}{{> brief-band}}{{/if}}
22
22
 
23
+ {{#if sections.runDiff}}{{> run-diff variant='compact'}}{{/if}}
24
+
23
25
  {{#if sections.summary}}{{> executive-hero-summary options=(obj showPassRate=sections.passRate releaseGateShown=sections.releaseGate) }}{{/if}}
24
26
 
25
27
  {{#if sections.charts}}{{> charts options=(obj showCharts=true showTrend=sections.trend heroTrend=true) }}{{/if}}
@@ -22,6 +22,8 @@
22
22
 
23
23
  {{#if sections.summary}}{{> executive-summary options=(obj showPassRate=sections.passRate releaseGateShown=sections.releaseGate) }}{{/if}}
24
24
 
25
+ {{#if sections.runDiff}}{{> run-diff variant='strip'}}{{/if}}
26
+
25
27
  {{#if sections.charts}}{{> charts options=(obj showCharts=true showTrend=sections.trend) }}{{/if}}
26
28
 
27
29
  {{#if sections.requirementsMatrix}}{{> requirements-matrix }}{{/if}}
@@ -0,0 +1,41 @@
1
+ {{#if runDiff}}
2
+ <div class="section section--run-diff">
3
+ <h2>Since Last Run</h2>
4
+ <div class="run-diff__head">
5
+ <div class="run-diff__strip">
6
+ <span class="run-diff__count run-diff__count--new"><strong>{{runDiff.newFailures.length}}</strong> {{pluralise runDiff.newFailures.length "new failure" "new failures"}}</span>&nbsp;&middot;&nbsp;<span class="run-diff__count run-diff__count--fixed"><strong>{{runDiff.fixed.length}}</strong> fixed</span>&nbsp;&middot;&nbsp;<span class="run-diff__count run-diff__count--still"><strong>{{runDiff.stillFailing.length}}</strong> still failing</span>{{#if runDiff.noLongerRun.length}}&nbsp;&middot;&nbsp;<span class="run-diff__count run-diff__count--neutral"><strong>{{runDiff.noLongerRun.length}}</strong> no longer run</span>{{/if}}
7
+ </div>
8
+ <div class="run-diff__baseline">vs. previous run on {{formatDate runDiff.baselineTimestamp}}</div>
9
+ {{#if runDiff.baselineTruncated}}
10
+ <div class="overflow-banner run-diff__caveat">Baseline list was capped; fixed and no-longer-run may be incomplete.</div>
11
+ {{/if}}
12
+ </div>
13
+
14
+ {{#if (eq variant 'full')}}
15
+ {{> run-diff-list items=runDiff.newFailures label="New Failures" }}
16
+ {{> run-diff-list items=runDiff.fixed label="Fixed" }}
17
+ {{> run-diff-list items=runDiff.stillFailing label="Still Failing" }}
18
+ {{#if runDiff.noLongerRun.length}}
19
+ <div class="run-diff__footnote">No longer run: {{#each (take runDiff.noLongerRun 5)}}{{title}}{{#unless @last}} &middot; {{/unless}}{{/each}}{{#if (gt runDiff.noLongerRun.length 5)}} &middot; + {{subtract runDiff.noLongerRun.length 5}} more{{/if}}</div>
20
+ {{/if}}
21
+ {{/if}}
22
+
23
+ {{#if (eq variant 'compact')}}
24
+ {{> run-diff-list items=runDiff.newFailures label="New Failures" }}
25
+ {{/if}}
26
+ </div>
27
+ {{/if}}
28
+
29
+ {{#*inline "run-diff-list"}}
30
+ {{#if items.length}}
31
+ <div class="run-diff__list">
32
+ <div class="run-diff__list-label">{{label}}</div>
33
+ {{#each (take items 20)}}
34
+ <div class="run-diff__list-item">- {{title}}</div>
35
+ {{/each}}
36
+ {{#if (gt items.length 20)}}
37
+ <div class="run-diff__list-more">+ {{subtract items.length 20}} more</div>
38
+ {{/if}}
39
+ </div>
40
+ {{/if}}
41
+ {{/inline}}
@@ -188,7 +188,7 @@ tr:last-child td { border-bottom: none; }
188
188
  blocks below stay glued together, and headings stick to the content beneath. */
189
189
  .section { margin-bottom: 24px; }
190
190
  .kpi-strip, .summary-row, .charts-grid, .release-gate, .flaky-callout,
191
- .trend-card, .flakiness-card, .env-grid {
191
+ .trend-card, .flakiness-card, .env-grid, .run-diff__head {
192
192
  page-break-inside: avoid; break-inside: avoid;
193
193
  }
194
194
  h2, h3 { page-break-after: avoid; break-after: avoid; }
@@ -684,6 +684,24 @@ code {
684
684
  color: var(--text-1); line-height: 1.55;
685
685
  }
686
686
 
687
+ /* ── Run diff — since-last-run counts + optional lists (sections.runDiff) ── */
688
+ .run-diff__strip { font-size: 10.5px; }
689
+ .run-diff__count strong { font-weight: 700; }
690
+ .run-diff__count--new strong { color: var(--fail); }
691
+ .run-diff__count--fixed strong { color: var(--pass); }
692
+ .run-diff__count--still strong,
693
+ .run-diff__count--neutral strong { color: var(--text-3); }
694
+ .run-diff__baseline { font-size: 9.5px; color: var(--text-3); margin-top: 4px; }
695
+ .run-diff__caveat { margin-top: 8px; }
696
+ .run-diff__list { margin-top: 10px; }
697
+ .run-diff__list-label {
698
+ font-size: 9px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase;
699
+ color: var(--text-2); margin-bottom: 4px;
700
+ }
701
+ .run-diff__list-item { font-size: 10px; color: var(--text-1); padding: 1px 0; }
702
+ .run-diff__list-more { font-size: 9.5px; color: var(--text-3); padding: 1px 0; }
703
+ .run-diff__footnote { font-size: 9.5px; color: var(--text-3); margin-top: 8px; }
704
+
687
705
  /* Charts grid + cards (available to any template via sections.charts) */
688
706
  .charts-grid {
689
707
  display: grid; grid-template-columns: 210px 1fr;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reportforge/playwright-pdf",
3
- "version": "0.25.0",
3
+ "version": "0.27.0",
4
4
  "description": "Playwright Test reporter that generates designed PDF reports: minimal, detailed, and executive templates with CI/CD integrations",
5
5
  "license": "Elastic-2.0",
6
6
  "author": "ReportForge",
@@ -49,6 +49,7 @@
49
49
  },
50
50
  "files": [
51
51
  "dist",
52
+ "!dist/engine",
52
53
  "ci-templates",
53
54
  "README.md",
54
55
  "LICENSE",
@@ -57,7 +58,9 @@
57
58
  "scripts": {
58
59
  "prebuild": "npm run bundle-chartjs && npm run bundle-fonts && npm run bundle-pubkey && npm run bundle-model && npm run precompile-templates",
59
60
  "build": "tsup && npm run copy-templates",
60
- "copy-templates": "node -e \"const fs=require('fs');const path=require('path');fs.cpSync('src/templates',path.join('dist','templates'),{recursive:true,filter:p=>!p.endsWith('.ts')});\"",
61
+ "build:test-engine": "tsup --config tsup.test-engine.config.ts && node scripts/build/copy-templates.mjs test-dist",
62
+ "stage:bindings": "tsx scripts/build/stage-bindings.ts",
63
+ "copy-templates": "node scripts/build/copy-templates.mjs",
61
64
  "bundle-chartjs": "tsx scripts/build/bundle-chartjs.ts",
62
65
  "bundle-fonts": "tsx scripts/build/bundle-fonts.ts",
63
66
  "bundle-pubkey": "tsx scripts/build/bundle-license-pubkey.ts",