Skip to main content

Crate tablo_test

Crate tablo_test 

Source
Expand description

Drives a built Router without a socket, carrying cookies, CSRF token, and tenant, and reads values back out of its responses.

Structs§

EmptyTable
Why a table rendered no rows, and the links it offers out of that state.
FilterOption
One <option> of a filter select, or one checkbox of a filter checklist.
Row
One data row of a rendered table.
RowActions
The action targets of one row.
TestClient
Sends requests carrying cookies and tenant.

Enums§

ErrorKind
Why a field renders an error, as its error slot’s data-error names it.

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.
confirms_first
Whether the button posting to action asks first: a confirming trigger is a plain button that opens the dialog, a direct write is a submit button. None when no button posts there.
cookie_header
One Cookie header value from (name, value) pairs, or None when empty.
empty_table
The zero-rows message of html, or None when the table renders rows.
field_error
Why the field posting name was refused, or None when it renders no error.
field_error_message
The sentence rendered under the field posting name, or None when it renders no error.
filter_options
The options of the select or checklist filter name, or None when name names neither. A checklist offering no option reads as an empty list, since its control still renders.
find_href_with
The first href in html that contains needle, its entities decoded.
form_body
URL-encode (key, value) pairs into an urlencoded form body.
input_value
Reads the value of the named <input> in rendered HTML, in either attribute order or quote style.
mount
panel mounted on a router holding db, beside the app’s own discovered pages and routes: the router an app builds, without its asset bundle.
multipart_body
Builds a multipart body, one part per entry: None is a text part, Some("") the browser’s “no file chosen” part, Some(name) a chosen file.
notification
The flash notification a response set for the next page, decoded.
refusal
The declaration mistakes a panel refused to mount with, for a test to match on their kind.
response_cookies
The (name, value) pairs a response’s Set-Cookie headers carry.
row_actions
The action targets of the row whose checkbox value or action URL carries key, or None when no row matches.
row_keys
The record key of every row in document order, read from its bulk checkbox: a row with no checkbox has none to read.
rows
The data rows of html in document order, excluding group headers.
session_cookie_value
The session cookie value a response set, if any.
set_cookie_header
The full Set-Cookie header for name, so tests can assert attributes.