@piwitests/reporter 0.40.0 → 0.41.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 +3794 -511
- package/dist/global-setup-module.js +5 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +3426 -2294
- package/dist/internal/capture/attachments.d.ts +1 -0
- package/dist/internal/capture/attachments.js +1 -0
- package/dist/internal/capture/capture-fixtures.d.ts +29 -2
- package/dist/internal/capture/capture-fixtures.js +1175 -102
- package/dist/internal/capture/locator-healing.js +2 -1
- package/dist/internal/capture/pick-on-failure.js +8 -1
- package/package.json +1 -1
- package/templates/skills/fix-a-reported-bug/SKILL.md +47 -0
- package/templates/skills/run-the-right-tests/SKILL.md +13 -1
|
@@ -80,6 +80,8 @@ var DEFAULTS = {
|
|
|
80
80
|
// Off by default: the page inventory reads control and link names from every
|
|
81
81
|
// visited page, so it stays opt-in until a project turns it on.
|
|
82
82
|
capturePageInventory: false,
|
|
83
|
+
// Off by default: JavaScript coverage slows the page, so a scheduled job opts in.
|
|
84
|
+
captureCodeReach: false,
|
|
83
85
|
captureServerTraces: true,
|
|
84
86
|
sampleAriaOnPass: true,
|
|
85
87
|
uploadManifest: true,
|
|
@@ -116,6 +118,8 @@ var PIWI_ENV_KEYS = {
|
|
|
116
118
|
captureLocators: "PIWI_CAPTURE_LOCATORS",
|
|
117
119
|
capturePageState: "PIWI_CAPTURE_PAGE_STATE",
|
|
118
120
|
capturePageInventory: "PIWI_CAPTURE_PAGE_INVENTORY",
|
|
121
|
+
captureCodeReach: "PIWI_CAPTURE_CODE_REACH",
|
|
122
|
+
codeReachRoots: "PIWI_CODE_REACH_ROOTS",
|
|
119
123
|
captureServerTraces: "PIWI_CAPTURE_SERVER_TRACES",
|
|
120
124
|
sampleAriaOnPass: "PIWI_SAMPLE_ARIA_ON_PASS",
|
|
121
125
|
uploadManifest: "PIWI_UPLOAD_MANIFEST",
|
|
@@ -158,6 +162,7 @@ var ENV_FALLBACK_SPECS = [
|
|
|
158
162
|
{ option: "captureLocators", env: PIWI_ENV_KEYS.captureLocators, kind: "bool" },
|
|
159
163
|
{ option: "capturePageState", env: PIWI_ENV_KEYS.capturePageState, kind: "bool" },
|
|
160
164
|
{ option: "capturePageInventory", env: PIWI_ENV_KEYS.capturePageInventory, kind: "bool" },
|
|
165
|
+
{ option: "captureCodeReach", env: PIWI_ENV_KEYS.captureCodeReach, kind: "bool" },
|
|
161
166
|
{ option: "captureServerTraces", env: PIWI_ENV_KEYS.captureServerTraces, kind: "bool" },
|
|
162
167
|
{ option: "sampleAriaOnPass", env: PIWI_ENV_KEYS.sampleAriaOnPass, kind: "bool" },
|
|
163
168
|
{ option: "uploadManifest", env: PIWI_ENV_KEYS.uploadManifest, kind: "bool" },
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { PlaywrightTestConfig } from '@playwright/test';
|
|
|
4
4
|
export { PiwiFixtures, extendPiwiFixtures, piwiFixtures } from './internal/capture/capture-fixtures.js';
|
|
5
5
|
import '@piwitests/picker-dom';
|
|
6
6
|
import '@piwitests/core/wire';
|
|
7
|
+
import '@piwitests/core/code-reach';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Options for configuring the Piwi Dashboard reporter.
|
|
@@ -60,6 +61,26 @@ interface PiwiDashboardOptions {
|
|
|
60
61
|
* Automatically disabled when `collectPerformanceMetrics` is `false`.
|
|
61
62
|
*/
|
|
62
63
|
capturePageInventory?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Record which application source files each test executes: the files whose
|
|
66
|
+
* functions ran, from Chromium's JavaScript coverage, resolved through the
|
|
67
|
+
* dev server's module URLs or the bundle's source maps. It answers "which
|
|
68
|
+
* tests reach this file?" for test selection, change coverage and
|
|
69
|
+
* `piwi preflight`. Only repository-relative file paths are sent. Chromium only;
|
|
70
|
+
* other browsers record nothing. It slows the page's JavaScript, so run it on
|
|
71
|
+
* one scheduled job rather than every run. **Defaults to `false`** — opt in
|
|
72
|
+
* with `captureCodeReach: true` (or `PIWI_CAPTURE_CODE_REACH=true`).
|
|
73
|
+
* Automatically disabled when `collectPerformanceMetrics` is `false`.
|
|
74
|
+
*/
|
|
75
|
+
captureCodeReach?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* The directories module paths and source-map sources are resolved against
|
|
78
|
+
* for `captureCodeReach`, relative to the Playwright config, before the
|
|
79
|
+
* repository root, which is always tried last. Defaults to the Playwright
|
|
80
|
+
* config's directory. Set it to the dev server's root when that is not the
|
|
81
|
+
* config's directory (Nuxt: `['app']`).
|
|
82
|
+
*/
|
|
83
|
+
codeReachRoots?: string[];
|
|
63
84
|
/**
|
|
64
85
|
* Capture server-side spans for each API/document request the test makes,
|
|
65
86
|
* read from the `X-Piwi-Trace` response header emitted by a Piwi
|