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. Body and HTML helpers live in tablo_core::protocol and are re-exported here.

Structs§

FilterOption
One <option> of a filter select.
Row
One data row of a rendered table.
RowActions
The action targets of one row.
TestClient
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 Cookie header value from (name, value) pairs, or None when empty.
field_error
The validation message rendered for name, or None when the field renders no error.
filter_options
The options of the select filter name, or None when name has no select control.
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.
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.
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.
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.