@piwitests/reporter 0.35.0 → 0.38.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/dist/index.d.ts CHANGED
@@ -48,6 +48,17 @@ interface PiwiDashboardOptions {
48
48
  * also be forced off with `PIWI_CAPTURE_PAGE_STATE=false`.
49
49
  */
50
50
  capturePageState?: boolean;
51
+ /**
52
+ * Capture a lightweight inventory of each visited page on *passing* runs — the
53
+ * interactive controls (role + accessible name) and links (name, with the query
54
+ * and hash stripped from the href) present as the test navigates — so the
55
+ * dashboard can tell which controls and links the suite exposes but never
56
+ * exercises. Only names and hrefs are captured, never field values; a page's
57
+ * controls are read at most once per worker per run. **Defaults to `false`** —
58
+ * opt in with `capturePageInventory: true` (or `PIWI_CAPTURE_PAGE_INVENTORY=true`).
59
+ * Automatically disabled when `collectPerformanceMetrics` is `false`.
60
+ */
61
+ capturePageInventory?: boolean;
51
62
  /**
52
63
  * Capture server-side spans for each API/document request the test makes,
53
64
  * read from the `X-Piwi-Trace` response header emitted by a Piwi
@@ -68,6 +79,15 @@ interface PiwiDashboardOptions {
68
79
  * Set to `false` (or `PIWI_SAMPLE_ARIA_ON_PASS=false`) to never sample on pass.
69
80
  */
70
81
  sampleAriaOnPass?: boolean;
82
+ /**
83
+ * Upload the application's declared surface at run start: a committed
84
+ * `piwi.manifest.json` next to the Playwright config, and — when the base URL's
85
+ * first response carries an instrumentation header — the instrumentation
86
+ * package's `/__piwi/manifest`. A route or page the manifest declares that no
87
+ * test reaches becomes a "declared, never hit" gap. Defaults to `true`; set to
88
+ * `false` (or `PIWI_UPLOAD_MANIFEST=false`) to never upload.
89
+ */
90
+ uploadManifest?: boolean;
71
91
  /**
72
92
  * When installed via `wrapConfig`, default Playwright's own `screenshot` and
73
93
  * `trace` options on the top-level `use` block so a failing test keeps a
@@ -153,6 +173,12 @@ interface PiwiDashboardOptions {
153
173
  environment?: string;
154
174
  /** Optional display label for the test run (e.g. "v2.3.1 release") */
155
175
  label?: string;
176
+ /**
177
+ * Keep this run forever: the dashboard's retention never deletes it. Set it
178
+ * for the runs worth keeping, such as release or tag builds. Can also be set
179
+ * with `PIWI_KEEP=true`.
180
+ */
181
+ keep?: boolean;
156
182
  /** Related issue reference, e.g. `"JIRA-123"` */
157
183
  relatedIssue?: string;
158
184
  /** CI job information */
@@ -332,12 +358,15 @@ declare class PiwiDashboardReporter {
332
358
  onTestBegin(test: TestCase, result: TestResult): void;
333
359
  /** Track suite-level setup steps (beforeAll/afterAll) not tied to any test */
334
360
  private setupSteps;
361
+ /** Step categories streamed live while the run executes. */
362
+ private static readonly LIVE_STEP_CATEGORIES;
335
363
  /**
336
- * Step categories streamed live while the run executes. `pw:assert` is
337
- * excluded: it is the polling noise of `expect()`, not a step a human
338
- * watches; the meaningful readout is the `pw:expect` wrapper around it.
364
+ * Whether a step streams live: its category is in `LIVE_STEP_CATEGORIES`
365
+ * and no ancestor is an `expect` step. The steps inside an assertion are its
366
+ * polling — every `expect.poll` attempt and `toPass` retry — not a step a
367
+ * human watches; the meaningful readout is the assertion around them.
339
368
  */
340
- private static readonly LIVE_STEP_CATEGORIES;
369
+ private static isLiveStep;
341
370
  /** Playwright reporter hook: called when a step (including hook/fixture) begins */
342
371
  onStepBegin(test: TestCase | undefined, _result: TestResult | undefined, step: any): void;
343
372
  /** Playwright reporter hook: called when a step (including hook/fixture) ends */