Expand description
Drives a built Router without a socket, carrying cookies, CSRF token, and
tenant, and reads values back out of its responses.
Structs§
- Bell
- The bell a panel page renders in its topbar.
- Bell
Notification - One notification the bell’s sheet lists.
- Empty
Table - Why a table rendered no rows, and the links it offers out of that state.
- Filter
Option - One
<option>of a filter select, or one checkbox of a filter checklist. - Group
- One group of a grouped table: its header’s label and the rows under it on this page.
- Ignored
Filter - A requested filter the table did not apply.
- Import
Error - One value an import refused.
- Picker
Column - One toggleable column the column picker offers.
- Reply
- A response with its body read, keyed by the form’s field enum
Kfor the queries over its form. - Resource
Client - Requests to
Rin the panelTestClient::panelnames, built byTestClient::resource. - Row
- One data row of a rendered table.
- RowActions
- The action targets of one row.
- Search
Group - One resource’s results.
- Search
Result - One record a global search lists.
- Submission
- A form post being built: the pairs it sends, keyed by the form’s field enum
K. - Tab
- One tab of a
Tabsblock. - Test
Client - Sends requests carrying cookies and tenant.
Enums§
- Empty
Reason - What emptied a table, as its zero-rows message’s
data-emptynames it. - Error
Kind - Why a field renders an error, as its error slot’s
data-errornames it. - Ignored
Reason - Why a table ignored a requested filter, as the banner’s
data-ignorednames it. - Import
Refusal - Why an import refused a whole file, as its alert’s
data-import-refusalnames it.
Constants§
- SESSION_
COOKIE - Names the session cookie Topcoat’s default token store writes.
- TEST_
DATABASE_ URL - The variable naming the database
test_dbconnects to.
Functions§
- authenticator_
code - The code an authenticator app holding
secretshows now. - authenticator_
code_ at - The six-digit code an authenticator app holding the base32
secretshows atunix_secs. - bell
- The bell
htmlrenders, orNonewhen the page shows none. - body_
bytes - Collect a response body as bytes.
- body_
string - Collect a response body as a lossy UTF-8 string.
- column_
picker - The toggleable columns the column picker offers, in order, or
Nonewhen the table renders no picker. - columns
- The names of the columns the table’s header shows, in order, without the bulk and actions columns.
- confirms_
first - Whether the button posting to
actionasks first: a confirming trigger is a plain button that opens the dialog, a direct write is a submit button.Nonewhen no button posts there. - cookie_
header - One
Cookieheader value from(name, value)pairs, orNonewhen empty. - empty_
table - The zero-rows message of
html, orNonewhen the table renders rows. - field_
error - Why the field posting
namewas refused, orNonewhen it renders no error. - field_
error_ message - The sentence rendered under the field posting
name, orNonewhen it renders no error. - filter_
options - The options of the select or checklist filter
name, orNonewhennamenames neither. A checklist offering no option reads as an empty list, since its control still renders. - find_
href_ with - The first
hrefinhtmlthat containsneedle, its entities decoded. - form_
body - URL-encode
(key, value)pairs into an urlencoded form body. - groups
- The groups of
htmlin document order, empty when the table renders ungrouped. A group holds the rows from its header to the next one. - ignored_
filters - The filters the banner of
htmllists as ignored, in its order; empty without a banner. - import_
columns - The form keys the import page of
htmllists as the columns a file may name, in order. - import_
errors - The values the import page of
htmllists as refused, in its order; empty when it lists none. - import_
refusal - Why the import page of
htmlrefused the whole file, orNonewhen it did not. - input_
value - Reads the value the named
<input>s post when the form submits untouched, in either attribute order or quote style: the last one’svalue, skipping a radio or checkbox left unchecked. A toggle readstrueor its hiddenfalse, and a radio choice its checked option, or the hidden blank before them when none is checked. - mount
panelmounted on a router holdingdb, beside the app’s own discovered pages and routes: the router an app builds, without its asset bundle.- mount_
with_ handle mount’s router and the mounted panel’s handle, whichTestClient::panelresolvesTestClient::resource’s URLs in.- 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. - nav_
badge - The badge text of the sidebar entry linking to
href, orNonewhen that entry shows no badge or no entry links there. - notification
- The flash notification a response set for the next page, decoded.
- now
- Seconds since the Unix epoch.
- page_
direction - The direction the page’s text runs in,
ltrorrtl, as its<html dir>names it. - page_
language - The language the page reads in, as its
<html lang>names it. - recovery_
codes - The recovery codes the page shows, once, after a set-up or a regeneration; empty when it shows none.
- 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’sSet-Cookieheaders carry. - rich_
text_ values - The HTML of each rich text value
htmlrenders, in document order. - row_
actions - The action targets of the row whose checkbox value or action URL carries
key, orNonewhen 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
htmlin document order, excluding group headers. - search_
box - Where the topbar’s search box submits its term, or
Nonewhen the page shows no box. - search_
results - The results
htmllists, by resource in document order: the results page’s, or the topbar box’s. - 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. - stale_
form - Whether the edit form refuses the save because another save changed the record since the form
opened: it renders an element carrying
data-stale. - tabs
- The tabs of every
Tabsblockhtmlrenders, in document order: a nested block’s after the tab holding it, whosekeyshold the nested block’s too. - test_db
- A
Dbholding the tables ofmodelsand no rows. - two_
factor_ secret - The authenticator key a set-up shows, in base32, or
Nonewhen the page shows no set-up. - two_
factor_ state - Which view of the settings page renders:
off,setuporon, as its form’sdata-two-factornames it;Nonewhen the page shows recovery codes instead.
Type Aliases§
- FieldOf
- The field enum of
R’s record form, e.g.PostFormField.