@piwitests/reporter 0.67.0 → 0.69.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/cli/index.js +1903 -640
- package/dist/global-setup-module.js +458 -135
- package/dist/index.d.ts +39 -4
- package/dist/index.js +10174 -4441
- package/dist/internal/capture/attachments.d.ts +1 -0
- package/dist/internal/capture/attachments.js +2 -1
- package/dist/internal/capture/capture-fixtures.d.ts +176 -21
- package/dist/internal/capture/capture-fixtures.js +6932 -2926
- package/package.json +1 -1
- package/templates/skills/fix-a-reported-bug/SKILL.md +3 -1
- package/templates/skills/investigate-failure/SKILL.md +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,9 @@ interface PiwiDashboardOptions {
|
|
|
27
27
|
* `'prefer'` uses it whenever it is running and the run is not on CI, even
|
|
28
28
|
* with `serverUrl` set, so local runs land in the app while CI runs, and
|
|
29
29
|
* local runs with the app closed, go to `serverUrl` with its credentials.
|
|
30
|
-
* `'off'` never
|
|
30
|
+
* `'off'` never sends it results; a run started in a terminal in a folder it
|
|
31
|
+
* links still follows its window, unless `PIWI_EDITOR=off`. Defaults to
|
|
32
|
+
* `'fallback'`. `PIWI_DESKTOP_APP`
|
|
31
33
|
* overrides this option, so setting it to `off` for one run sends that
|
|
32
34
|
* local run to `serverUrl`.
|
|
33
35
|
*/
|
|
@@ -61,6 +63,13 @@ interface PiwiDashboardOptions {
|
|
|
61
63
|
collectScmInfo?: boolean;
|
|
62
64
|
/** Auto-collect CI environment info. Defaults to `true`. */
|
|
63
65
|
collectCiInfo?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Record where the run executed: the runner's time zone, locale, OS, Node.js version and CI image, each browser as
|
|
68
|
+
* its page reports itself (with the capture fixtures), and each instrumented server under test. The dashboard
|
|
69
|
+
* shows when they change between runs or shards. Defaults to `true`. Can also be forced off with
|
|
70
|
+
* `PIWI_COLLECT_ENVIRONMENT_INFO=false`.
|
|
71
|
+
*/
|
|
72
|
+
collectEnvironmentInfo?: boolean;
|
|
64
73
|
/** Collect step timings, network requests and web vitals. Defaults to `true`. */
|
|
65
74
|
collectPerformanceMetrics?: boolean;
|
|
66
75
|
/**
|
|
@@ -352,7 +361,7 @@ interface PiwiDashboardOptions {
|
|
|
352
361
|
* set with `PIWI_FAIL_ON_FLAKY_TESTS`.
|
|
353
362
|
*/
|
|
354
363
|
failOnFlakyTests?: boolean;
|
|
355
|
-
/** Username for dashboard login (use `apiKey` instead when possible) */
|
|
364
|
+
/** Username or email address for dashboard login (use `apiKey` instead when possible) */
|
|
356
365
|
username?: string | null;
|
|
357
366
|
/** Password for dashboard login (used with `username`) */
|
|
358
367
|
password?: string | null;
|
|
@@ -540,8 +549,16 @@ declare class PiwiDashboardReporter {
|
|
|
540
549
|
private uncapturedSpecs;
|
|
541
550
|
/** Whether the run is a CI run whose workers stream to the instance's live view, set in `onBegin`. */
|
|
542
551
|
private liveViewOn;
|
|
552
|
+
/** The run's own connection to the hub its workers reach, from `onBegin` to `onEnd`; null for a run without one. */
|
|
553
|
+
private hubLink;
|
|
543
554
|
/** The live steps begun and not ended, by step, sent again when someone opens the run (`onWatched`). */
|
|
544
555
|
private openSteps;
|
|
556
|
+
/** The attempts running now, by test id, for the stops their workers note (`heardStop`). */
|
|
557
|
+
private runningTests;
|
|
558
|
+
/** Reads the stops the workers note (`readStopNotes`). */
|
|
559
|
+
private stopNotes;
|
|
560
|
+
/** The run's progress in its terminal's tab or taskbar, for a run outside CI that reports to the dashboard. */
|
|
561
|
+
private terminalProgress;
|
|
545
562
|
/**
|
|
546
563
|
* The failed attempts with retries left, by `test.id`: each is its test's last failure when no later attempt has a
|
|
547
564
|
* say in its outcome (`decidesOutcome`), the run stopping before the retry or the retry not running.
|
|
@@ -572,6 +589,8 @@ declare class PiwiDashboardReporter {
|
|
|
572
589
|
private readonly mergingReports;
|
|
573
590
|
/** True when the server URL and API key came from the desktop app, not from config. */
|
|
574
591
|
private viaDesktopApp;
|
|
592
|
+
/** The team instance a requested run uploads to, or why it uploads nowhere. */
|
|
593
|
+
private requestedRun;
|
|
575
594
|
/** The configured server `desktopApp: 'prefer'` set aside for the desktop app, if any. */
|
|
576
595
|
private readonly desktopReplaced;
|
|
577
596
|
/** The config folder's `.env` file and the connection variables taken from it, if any. */
|
|
@@ -588,6 +607,8 @@ declare class PiwiDashboardReporter {
|
|
|
588
607
|
private resourceCensuses;
|
|
589
608
|
/** Lifecycle steps of the tests that ran without the fixtures. */
|
|
590
609
|
private lifecycleTallies;
|
|
610
|
+
/** The spec and helper files those steps point at, read once each. */
|
|
611
|
+
private readonly sourceLines;
|
|
591
612
|
/** The user fixtures set up by the tests that left a page unused, by test id. */
|
|
592
613
|
private fixturesByTest;
|
|
593
614
|
/** The file workers append their shutdown census to, set in `onBegin`. */
|
|
@@ -608,6 +629,8 @@ declare class PiwiDashboardReporter {
|
|
|
608
629
|
private lastTestWatch;
|
|
609
630
|
/** The manifests of the instrumented origins the run reaches beyond its base URLs. */
|
|
610
631
|
private manifests;
|
|
632
|
+
/** Where the run executes: the runner, each project's browser and each server under test; null when off. */
|
|
633
|
+
private environments;
|
|
611
634
|
/** Result events that stream once their test's server coverage is in. */
|
|
612
635
|
private coverageSends;
|
|
613
636
|
/** The errors Playwright reported outside any test (`onError`), the first `MAX_RUN_ERRORS` of them. */
|
|
@@ -649,8 +672,18 @@ declare class PiwiDashboardReporter {
|
|
|
649
672
|
* the run so the dashboard lists them too.
|
|
650
673
|
*/
|
|
651
674
|
private planExternalIds;
|
|
675
|
+
/**
|
|
676
|
+
* Name the planned tests whose tags are cut at the limit, once, and record them on the run so the dashboard shows
|
|
677
|
+
* them too. A planned test whose properties cannot be read is left out.
|
|
678
|
+
*/
|
|
679
|
+
private noteTagsTruncated;
|
|
652
680
|
/** The external ID fields of a test's payload: `null` tells the dashboard the test has none to match on. */
|
|
653
681
|
private externalIdFields;
|
|
682
|
+
/**
|
|
683
|
+
* A stop a worker noted (`stop-notes.ts`), of an attempt running now: a `test-stopped` event as it shows and a
|
|
684
|
+
* `test-resumed` as it ends, named as its `begin` named the attempt, sent whoever watches.
|
|
685
|
+
*/
|
|
686
|
+
private heardStop;
|
|
654
687
|
/** Playwright reporter hook: called when an individual test begins */
|
|
655
688
|
onTestBegin(test: TestCase, result: TestResult): void;
|
|
656
689
|
/**
|
|
@@ -702,8 +735,8 @@ declare class PiwiDashboardReporter {
|
|
|
702
735
|
onTestEnd(test: TestCase, result: TestResult): void;
|
|
703
736
|
/**
|
|
704
737
|
* Add up the files a test attached, and keep its resource census; for a test
|
|
705
|
-
* that ran without the capture fixtures, tally the browsers
|
|
706
|
-
* steps opened and closed.
|
|
738
|
+
* that ran without the capture fixtures, tally the browsers, contexts and
|
|
739
|
+
* pages its steps opened and closed.
|
|
707
740
|
*/
|
|
708
741
|
private collectResources;
|
|
709
742
|
/**
|
|
@@ -738,6 +771,8 @@ declare class PiwiDashboardReporter {
|
|
|
738
771
|
onEnd(result: FullResult): Promise<{
|
|
739
772
|
status?: FullResult['status'];
|
|
740
773
|
} | void>;
|
|
774
|
+
/** Every environment snapshot of the run; none when collection is off or reading them failed. */
|
|
775
|
+
private readEnvironments;
|
|
741
776
|
private finishRun;
|
|
742
777
|
}
|
|
743
778
|
|