feat(19.4-03): tide captures a named input of an HTML response

- capture rule from: response.form reads the value of the <input> with
  the rule's name (a server-rendered form's one-shot token), so a parity
  flow can post a consent form back
- README and parity docs list the capture sources
This commit is contained in:
2026-10-19 19:59:24 +02:00
parent 1e37926ee9
commit bb4b8d448d
4 changed files with 79 additions and 3 deletions

View File

@@ -109,7 +109,7 @@ summer parity:replay --fixtures testdata/parity --target http://127.0.0.1:8080 -
`parity:proxy` records a real client instead: it runs a reverse proxy in front of the reference backend, and each named session of traffic becomes one fixture. Point the existing frontend at the proxy and click through a feature. The proxy binds to and forwards to loopback addresses only.
Values captured during a flow, such as tokens and created IDs, live in a variables file (`--vars`) readable only by its owner, and fixtures refer to them as `{{name}}` placeholders. Recording refuses to write a fixture that still holds a token- or password-shaped value, so credentials do not end up in committed fixtures. Keep the variables file outside the repository.
A step captures values with `capture` rules: `from: response.json` with a `path`, `response.header`, `response.location.query`, `request.form`, `request.header` and `request.query` with a `name`, and `response.form` for the `value` of the `<input>` with that `name` in an HTML response, such as the one-shot token a server-rendered consent form posts back. Values captured during a flow, such as tokens and created IDs, live in a variables file (`--vars`) readable only by its owner, and fixtures refer to them as `{{name}}` placeholders. Recording refuses to write a fixture that still holds a token- or password-shaped value, so credentials do not end up in committed fixtures. Keep the variables file outside the repository.
A route manifest (`tide.Manifest`) lists a plugin's routes with their auth groups, status and cases; `parity:record --manifest` records the missing cases in batches, and `parity:replay --manifest` reports coverage. The [Console utilities](../console/utilities.md) page lists every flag.