Expand description
Drives a built Router without a socket, carrying cookies, CSRF token, and
tenant; helpers write form and multipart bodies and read values back out of
rendered HTML.
Structs§
- Filter
Option - One
<option>of a filter select. - Row
- One data row of a rendered table.
- RowActions
- The action targets of one row.
- Test
Client - Sends requests carrying cookies and tenant.
Constants§
- SESSION_
COOKIE - Names the session cookie Topcoat’s default token store writes.
Functions§
- body_
bytes - Collect a response body as bytes.
- body_
string - Collect a response body as a lossy UTF-8 string.
- cookie_
header - One
Cookieheader value from(name, value)pairs, orNonewhen empty. - field_
error - The validation message rendered for
name, orNonewhen the field renders no error. - filter_
options - The options of the select filter
name, orNonewhennamehas no select control. - form_
body - URL-encode
(key, value)pairs into an urlencoded form body. - input_
value - Reads the
valueof the named<input>in rendered HTML, in either attribute order or quote style. - multipart_
body - Builds a multipart body, one part per entry:
Noneis a text part,Some("")the browser’s “no file chosen” part,Some(name)a chosen file. - response_
cookies - The
(name, value)pairs a response’sSet-Cookieheaders carry. - row_
actions - The action targets of the row whose checkbox value or action URL carries
key, orNonewhen no row matches. - rows
- The data rows of
htmlin document order, excluding group headers. - session_
cookie_ value - The session cookie value a response set, if any.
- set_
cookie_ header - The full
Set-Cookieheader forname, so tests can assert attributes.