@reportforge/playwright-pdf 0.10.3 → 0.11.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 CHANGED
@@ -197,7 +197,7 @@ All options are the second element of the reporter tuple.
197
197
  | `notify` | `object` | — | Notification channels: `slack`, `teams`, `discord` (each `{ url, enabled, on }`), `email` (`{ to, enabled, on, attachPdf }`). See the Notifications docs. |
198
198
  | `failureAnalysis` | `object` | `{ enabled: true }` | Offline failure root-cause analysis (embedded Naive Bayes; no runtime network). Fields: `enabled` (default `true`), `maxClusters` (default `10`), `minStrength` (`weak`\|`moderate`\|`strong`, default `weak`), `maxFailuresToAnalyse` (default `500`), `collectUnclassified` (default `true`), `autoUpdateModel` (default `true`). See the Failure Analysis docs. |
199
199
  | `capture` | `object` | `{}` (off) | Opt-in rich execution capture for the defect log (reporter-side; no fixtures, no test-code changes). Fields: `steps` (compacted repro-steps trail from the Playwright step tree, default `false`), `apiSteps` (include granular `pw:api` click/fill/goto actions in the trail; off by default the trail shows only `test.step` intent + `expect` assertions + the failing action, default `false`), `console` (Node stdout/stderr tail, default `false`), `evidence` (trace/video file links, default `false`), `maxSteps` (default `50`), `maxConsoleLines` (default `50`). Renders in the Defect Log section of the `detailed` template. |
200
- | `live` | `object` | `{}` (off) | Opt-in live test-execution streaming. When `enabled`, the reporter prints an unguessable watch link to the CI logs at run start and streams per-test progress to the hosted dashboard while tests run — all shards of one CI run converge on a single live view. Fields: `enabled` (default `false`), `runId` (override the auto-derived run id), `serverUrl` (override the streaming server), `steps` (`none`\|`failed`\|`all`, default `failed`), `console` (stream stdout/stderr tails, default `false`), `flushMs` (batch debounce 500–10000, default `2000`). The PDF at the end of the run is unaffected. Requires an active subscription with the `live` entitlement. See the Live Runs docs. |
200
+ | `live` | `object` | `{}` (off) | Opt-in live test-execution streaming. When `enabled`, the reporter prints an unguessable watch link to the CI logs at run start and streams per-test progress to the hosted dashboard while tests run — all shards of one CI run converge on a single live view. Fields: `enabled` (default `false`), `runId` (override the auto-derived run id), `serverUrl` (override the streaming server), `steps` (`none`\|`failed`\|`intent`\|`all`, default `failed`; `intent` shows only your `test.step` names plus any failing step), `console` (stream stdout/stderr tails, default `false`), `flushMs` (batch debounce 500–10000, default `2000`). The PDF at the end of the run is unaffected. Requires an active subscription with the `live` entitlement. See the Live Runs docs. |
201
201
  | `historyFile` | `string` | `~/.reportforge/{key}/history.json` | Path to the history JSON file. Relative paths resolve from `cwd`. Enables pass-rate trending charts in the `detailed` template. |
202
202
  | `historySize` | `number` | `10` | Maximum number of test runs to keep in the history file (integer ≥ 2). Older runs are pruned on append. |
203
203
  | `showTrend` | `boolean` | `true` | Show the pass-rate sparkline and delta badge in the `detailed` template. Set to `false` to disable history tracking entirely. |
@@ -222,7 +222,7 @@ reporter: [
222
222
  outputFile: 'reports/{date}-report.pdf',
223
223
  live: {
224
224
  enabled: true,
225
- steps: 'failed', // 'none' | 'failed' | 'all'
225
+ steps: 'failed', // 'none' | 'failed' | 'intent' | 'all'
226
226
  // console: false, // stream stdout/stderr tails (off by default — see note)
227
227
  // flushMs: 2000, // batch debounce (500–10000)
228
228
  },
package/dist/cli/index.js CHANGED
@@ -11886,7 +11886,7 @@ var init_schema = __esm({
11886
11886
  serverUrl: external_exports.string().url().optional(),
11887
11887
  // Step verbosity: 'none' skips steps, 'failed' streams intent + assertions +
11888
11888
  // errored steps, 'all' streams every step.
11889
- steps: external_exports.enum(["none", "failed", "all"]).default("failed"),
11889
+ steps: external_exports.enum(["none", "failed", "intent", "all"]).default("failed"),
11890
11890
  // Stream test stdout/stderr tails. Off by default — may leak secrets printed
11891
11891
  // by tests to a token-holder.
11892
11892
  console: external_exports.boolean().default(false),
package/dist/index.d.mts CHANGED
@@ -258,9 +258,11 @@ interface ReporterOptions {
258
258
  serverUrl?: string;
259
259
  /**
260
260
  * Step verbosity: `'none'` skips steps, `'failed'` streams author intent +
261
- * assertions + errored steps, `'all'` streams every step. Default: `'failed'`
261
+ * assertions + errored steps, `'intent'` streams only your `test.step` names
262
+ * (plus any failing step) for the cleanest human-readable trail, `'all'`
263
+ * streams every step and action. Default: `'failed'`
262
264
  */
263
- steps?: 'none' | 'failed' | 'all';
265
+ steps?: 'none' | 'failed' | 'intent' | 'all';
264
266
  /**
265
267
  * Stream test stdout/stderr tails to the watch page. Off by default — may
266
268
  * leak secrets printed by tests to anyone holding the watch link. Default: false
package/dist/index.d.ts CHANGED
@@ -258,9 +258,11 @@ interface ReporterOptions {
258
258
  serverUrl?: string;
259
259
  /**
260
260
  * Step verbosity: `'none'` skips steps, `'failed'` streams author intent +
261
- * assertions + errored steps, `'all'` streams every step. Default: `'failed'`
261
+ * assertions + errored steps, `'intent'` streams only your `test.step` names
262
+ * (plus any failing step) for the cleanest human-readable trail, `'all'`
263
+ * streams every step and action. Default: `'failed'`
262
264
  */
263
- steps?: 'none' | 'failed' | 'all';
265
+ steps?: 'none' | 'failed' | 'intent' | 'all';
264
266
  /**
265
267
  * Stream test stdout/stderr tails to the watch page. Off by default — may
266
268
  * leak secrets printed by tests to anyone holding the watch link. Default: false
package/dist/index.js CHANGED
@@ -10492,7 +10492,7 @@ var liveConfigSchema = external_exports.object({
10492
10492
  serverUrl: external_exports.string().url().optional(),
10493
10493
  // Step verbosity: 'none' skips steps, 'failed' streams intent + assertions +
10494
10494
  // errored steps, 'all' streams every step.
10495
- steps: external_exports.enum(["none", "failed", "all"]).default("failed"),
10495
+ steps: external_exports.enum(["none", "failed", "intent", "all"]).default("failed"),
10496
10496
  // Stream test stdout/stderr tails. Off by default — may leak secrets printed
10497
10497
  // by tests to a token-holder.
10498
10498
  console: external_exports.boolean().default(false),
@@ -13873,6 +13873,7 @@ function shouldEmitStep(step, mode) {
13873
13873
  if (step.error && step.category !== "hook" && step.category !== "fixture") return true;
13874
13874
  if (isLifecycleStep(step)) return false;
13875
13875
  if (mode === "all") return true;
13876
+ if (mode === "intent") return step.category === "test.step";
13876
13877
  return step.category === "test.step" || step.category === "expect";
13877
13878
  }
13878
13879
  function isCurrentStep(step) {
@@ -13886,6 +13887,13 @@ function mapCurrentStep(testId, step, shardKey) {
13886
13887
  currentStep: clampWithEllipsis(step.title ?? "", MAX_STEP_TITLE_CHARS)
13887
13888
  };
13888
13889
  }
13890
+ function testStepDepth(step) {
13891
+ let depth = 0;
13892
+ for (let p = step.parent; p; p = p.parent) {
13893
+ if (p.category === "test.step") depth++;
13894
+ }
13895
+ return depth;
13896
+ }
13889
13897
  function mapStep(testId, step, phase, shardKey) {
13890
13898
  return {
13891
13899
  kind: "step",
@@ -13893,7 +13901,13 @@ function mapStep(testId, step, phase, shardKey) {
13893
13901
  title: clampWithEllipsis(step.title ?? "", MAX_STEP_TITLE_CHARS),
13894
13902
  status: phase === "begin" ? "running" : step.error ? "failed" : "passed",
13895
13903
  shardKey,
13896
- at: Date.now()
13904
+ at: Date.now(),
13905
+ // The step's own start time (not receive time) so the watch page can order a
13906
+ // parent `test.step` before the child actions nested inside it.
13907
+ startedAt: step.startTime?.getTime(),
13908
+ // Nesting depth (test.step ancestors) so the page indents children under their
13909
+ // parent step. 0 → flat, so a test without test.steps renders as a flat trail.
13910
+ depth: testStepDepth(step)
13897
13911
  };
13898
13912
  }
13899
13913
  function mapConsole(kind, chunk, testId, shardKey) {
@@ -13920,7 +13934,7 @@ var PdfReporter = class {
13920
13934
  this.liveConsole = false;
13921
13935
  this.options = parseOptions(rawOptions);
13922
13936
  this.dataCollector = new DataCollector(this.options.capture);
13923
- const version = true ? "0.10.3" : "0.x";
13937
+ const version = true ? "0.11.1" : "0.x";
13924
13938
  logger.info(`@reportforge/playwright-pdf v${version} initialised`);
13925
13939
  this.licenseClient = new LicenseClient({
13926
13940
  licenseKey: this.options.licenseKey,
package/dist/index.mjs CHANGED
@@ -10493,7 +10493,7 @@ var liveConfigSchema = external_exports.object({
10493
10493
  serverUrl: external_exports.string().url().optional(),
10494
10494
  // Step verbosity: 'none' skips steps, 'failed' streams intent + assertions +
10495
10495
  // errored steps, 'all' streams every step.
10496
- steps: external_exports.enum(["none", "failed", "all"]).default("failed"),
10496
+ steps: external_exports.enum(["none", "failed", "intent", "all"]).default("failed"),
10497
10497
  // Stream test stdout/stderr tails. Off by default — may leak secrets printed
10498
10498
  // by tests to a token-holder.
10499
10499
  console: external_exports.boolean().default(false),
@@ -13874,6 +13874,7 @@ function shouldEmitStep(step, mode) {
13874
13874
  if (step.error && step.category !== "hook" && step.category !== "fixture") return true;
13875
13875
  if (isLifecycleStep(step)) return false;
13876
13876
  if (mode === "all") return true;
13877
+ if (mode === "intent") return step.category === "test.step";
13877
13878
  return step.category === "test.step" || step.category === "expect";
13878
13879
  }
13879
13880
  function isCurrentStep(step) {
@@ -13887,6 +13888,13 @@ function mapCurrentStep(testId, step, shardKey) {
13887
13888
  currentStep: clampWithEllipsis(step.title ?? "", MAX_STEP_TITLE_CHARS)
13888
13889
  };
13889
13890
  }
13891
+ function testStepDepth(step) {
13892
+ let depth = 0;
13893
+ for (let p = step.parent; p; p = p.parent) {
13894
+ if (p.category === "test.step") depth++;
13895
+ }
13896
+ return depth;
13897
+ }
13890
13898
  function mapStep(testId, step, phase, shardKey) {
13891
13899
  return {
13892
13900
  kind: "step",
@@ -13894,7 +13902,13 @@ function mapStep(testId, step, phase, shardKey) {
13894
13902
  title: clampWithEllipsis(step.title ?? "", MAX_STEP_TITLE_CHARS),
13895
13903
  status: phase === "begin" ? "running" : step.error ? "failed" : "passed",
13896
13904
  shardKey,
13897
- at: Date.now()
13905
+ at: Date.now(),
13906
+ // The step's own start time (not receive time) so the watch page can order a
13907
+ // parent `test.step` before the child actions nested inside it.
13908
+ startedAt: step.startTime?.getTime(),
13909
+ // Nesting depth (test.step ancestors) so the page indents children under their
13910
+ // parent step. 0 → flat, so a test without test.steps renders as a flat trail.
13911
+ depth: testStepDepth(step)
13898
13912
  };
13899
13913
  }
13900
13914
  function mapConsole(kind, chunk, testId, shardKey) {
@@ -13921,7 +13935,7 @@ var PdfReporter = class {
13921
13935
  this.liveConsole = false;
13922
13936
  this.options = parseOptions(rawOptions);
13923
13937
  this.dataCollector = new DataCollector(this.options.capture);
13924
- const version = true ? "0.10.3" : "0.x";
13938
+ const version = true ? "0.11.1" : "0.x";
13925
13939
  logger.info(`@reportforge/playwright-pdf v${version} initialised`);
13926
13940
  this.licenseClient = new LicenseClient({
13927
13941
  licenseKey: this.options.licenseKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reportforge/playwright-pdf",
3
- "version": "0.10.3",
3
+ "version": "0.11.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",