@piwitests/reporter 0.63.0 → 0.65.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/README.md +2 -2
- package/dist/cli/index.js +532 -118
- package/dist/global-setup-module.js +342 -155
- package/dist/index.d.ts +98 -24
- package/dist/index.js +3856 -1286
- package/dist/internal/capture/attachments.d.ts +3 -2
- package/dist/internal/capture/attachments.js +1 -0
- package/dist/internal/capture/capture-fixtures.d.ts +142 -7
- package/dist/internal/capture/capture-fixtures.js +2238 -744
- package/dist/internal/capture/inspect-on-failure.d.ts +3 -5
- package/dist/internal/capture/inspect-on-failure.js +11 -7
- package/dist/internal/capture/locator-healing.d.ts +212 -4
- package/dist/internal/capture/pick-on-failure.d.ts +184 -6
- package/dist/types-CGr9jJZ_.d.ts +87 -0
- package/dist/wire-7zsqlBoY.d.ts +48 -0
- package/package.json +2 -2
- package/templates/skills/setup-piwi/SKILL.md +3 -3
- package/templates/skills/write-the-missing-test/SKILL.md +6 -4
|
@@ -28,7 +28,7 @@ npx @piwitests/reporter init --server-url <dashboard-url> --project <name> --jso
|
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
- Preview first with `--dry-run` if you want to see the plan before anything is written.
|
|
31
|
-
- `--api-key <key>` also writes the key and the URL into `.env` and adds `.env` to `.gitignore`.
|
|
31
|
+
- `--api-key <key>` also writes the key and the URL into `.env` and adds `.env` to `.gitignore`. When git tracks `.env`, or cannot say whether it does, or `.env` is a link, it writes no key and reports the `env` step as `manual`: never put the key into that file yourself. Have the user set `PIWI_API_KEY` in the environment instead (in CI, as a secret): that finishes the step, and `init` run again without `--api-key` leaves nothing `manual` for it.
|
|
32
32
|
- `--skills none` installs no skills; `--skills-dir <path>` installs them where your agent reads skills from.
|
|
33
33
|
- `--json` prints a `steps[]` array and the `nextSteps` to tell the user. Read it. Each step has a `status`:
|
|
34
34
|
- `created` / `updated` / `already` — done, nothing more to do.
|
|
@@ -38,7 +38,7 @@ npx @piwitests/reporter init --server-url <dashboard-url> --project <name> --jso
|
|
|
38
38
|
|
|
39
39
|
### Finishing `manual` steps
|
|
40
40
|
|
|
41
|
-
- **config** marked `manual`: the config is not a plain `export default defineConfig(...)`. Add `import { wrapConfig } from '@piwitests/reporter'` and wrap the exported config: `export default wrapConfig(defineConfig({ ... }), { serverUrl, projectName })`.
|
|
41
|
+
- **config** marked `manual`: the config is not a plain `export default defineConfig(...)`. Add `import { wrapConfig } from '@piwitests/reporter'` and wrap the exported config: `export default wrapConfig(defineConfig({ ... }), { serverUrl, projectName })`. At a workspace root where several packages hold a Playwright config, the `detail` names them instead: run `init` again with `--cwd <package>` for each package to wire.
|
|
42
42
|
- **fixtures** marked `manual`: a fixtures file already exists. Merge Piwi in: `import { piwiFixtures } from '@piwitests/reporter'` and compose them into the existing `base.extend(...)` (or use `extendPiwiFixtures(base)`).
|
|
43
43
|
|
|
44
44
|
### Rewire the specs to the fixtures
|
|
@@ -53,7 +53,7 @@ change it to import from the fixtures file instead, e.g. `import { test, expect
|
|
|
53
53
|
|
|
54
54
|
## Authentication
|
|
55
55
|
|
|
56
|
-
If the dashboard has auth enabled, runs need an API key. Have the user create one in the dashboard (**Settings → Account → API keys**; keys start with `pd_`), then put it in `.env` as `PIWI_API_KEY=pd_...` (or re-run `init` with `--api-key`) and make sure `.env` is git-ignored. The reporter reads `PIWI_DASHBOARD_URL`, `PIWI_API_KEY` and `PIWI_PROJECT_NAME` from the `.env` next to `playwright.config`, so the config needs no dotenv loading; a variable set in the environment wins over the file. Never hardcode a key into `playwright.config.ts` or commit it. In CI, where `.env` is not checked out, pass it as a secret (`PIWI_API_KEY`).
|
|
56
|
+
If the dashboard has auth enabled, runs need an API key. Have the user create one in the dashboard (**Settings → Account → API keys**; keys start with `pd_`), then put it in `.env` as `PIWI_API_KEY=pd_...` (or re-run `init` with `--api-key`) and make sure `.env` is git-ignored and not tracked (`git rm --cached .env` untracks it). The reporter reads `PIWI_DASHBOARD_URL`, `PIWI_API_KEY` and `PIWI_PROJECT_NAME` from the `.env` next to `playwright.config`, so the config needs no dotenv loading; a variable set in the environment wins over the file. Never hardcode a key into `playwright.config.ts` or commit it. In CI, where `.env` is not checked out, pass it as a secret (`PIWI_API_KEY`).
|
|
57
57
|
|
|
58
58
|
## Verify it worked
|
|
59
59
|
|
|
@@ -87,10 +87,12 @@ view, and work from what it shows plus the repo.
|
|
|
87
87
|
|
|
88
88
|
8. **Report back to Piwi.** Tell Piwi what you decided about the gap with
|
|
89
89
|
`triage_gap` (Maintainer role or above on the project): `verb: "accept"` for the gap you
|
|
90
|
-
wrote the test for, `covered-by` with the
|
|
91
|
-
|
|
92
|
-
`
|
|
93
|
-
|
|
90
|
+
wrote the test for, `covered-by` with the test's id once a test written for the gap
|
|
91
|
+
has run, or `dismiss` when the gap needed no new test: `covered-elsewhere` with the id
|
|
92
|
+
of a test that already covered it, `not-worth-testing`, or `wrong` when the evidence did
|
|
93
|
+
not hold. Each verdict counts toward the precision of the detector that raised the gap
|
|
94
|
+
(`accept` and `covered-by` for it, `wrong` and `covered-elsewhere` against it), so a
|
|
95
|
+
detector that keeps being wrong is muted.
|
|
94
96
|
|
|
95
97
|
## Guardrails
|
|
96
98
|
|