@piwitests/reporter 0.23.0 → 0.25.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 +20 -0
- package/dist/cli/index.js +469 -83
- package/dist/global-setup-module.js +9 -1
- package/dist/index.d.ts +110 -2
- package/dist/index.js +991 -29
- package/dist/internal/capture/attachments.d.ts +2 -0
- package/dist/internal/capture/attachments.js +3 -1
- package/dist/internal/capture/capture-fixtures.js +109 -24
- package/dist/internal/capture/locator-healing.d.ts +28 -1
- package/dist/internal/capture/locator-healing.js +44 -0
- package/package.json +8 -1
package/README.md
CHANGED
|
@@ -186,6 +186,26 @@ Capture works for the `page` fixture, `browser.newPage()`, `browser.newContext()
|
|
|
186
186
|
|
|
187
187
|
Without the fixtures you still get full run history, statuses, errors, traces, reports, streaming, and clustering — the fixtures add the slow-endpoint, Web Vitals, console, ARIA, and locator-healing layers. See the [capture fixtures guide](https://piwitests.github.io/capture-fixtures) for the full feature matrix and composition patterns.
|
|
188
188
|
|
|
189
|
+
## AI steps
|
|
190
|
+
|
|
191
|
+
Locate elements and drive flows in plain English, without giving up determinism:
|
|
192
|
+
|
|
193
|
+
```typescript
|
|
194
|
+
await page.piwiLocator('the email address field').fill('ada@example.com')
|
|
195
|
+
await page.piwiRun('sign in as {email}', { email: 'ada@example.com' })
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
The LLM is a **compiler, not a runtime**: each prompt is resolved **once** by an agent into a committed, deterministic JSON artifact, and every run after that replays that artifact with plain Playwright — **zero LLM calls and zero network** in the default `replay` mode. Add it by composing `extendPiwiAi` over your test:
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
import { extendPiwiFixtures, extendPiwiAi } from '@piwitests/reporter'
|
|
202
|
+
export const test = extendPiwiAi(extendPiwiFixtures(base))
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Author missing entries once in `resolve` mode (`PIWI_AI=resolve`, pointed at a dashboard with an AI provider configured), commit the artifacts, and CI replays them offline. `{param}` placeholders are type-checked and masked out of everything sent to the model. Manage the committed entries with `piwi ai check | resolve | prune`.
|
|
206
|
+
|
|
207
|
+
See the [AI steps guide](https://piwitests.github.io/ai-steps) for the authoring/replay lifecycle, the safety model (allowlisted, drift-guarded, postcondition-verified), and the full option/env-var reference.
|
|
208
|
+
|
|
189
209
|
## Authentication
|
|
190
210
|
|
|
191
211
|
When the dashboard has authentication enabled, use an API key (recommended for CI):
|