RawAccordion / EddAccordion. el-id lands as data-testid on the accordion root. The expand toggle is the icon button inside the summary.
RawAccordion / EddAccordion. el-id lands as data-testid on the accordion root. The expand toggle is the icon button inside the summary.
RawAutocomplete. el-id lands as id on the combobox <input>.
RawAutocomplete. el-id lands as id on the combobox <input>.
RawButton, RawFab, RawIconButton, RawChoiceButton. el-id lands as data-testid on the <button>.
RawButton, RawFab, RawIconButton, RawChoiceButton. el-id lands as data-testid on the <button>.
RawCheckbox and RawSwitch. el-id lands as id on the native <input type=checkbox>, so checked state is read from the input itself.
RawCheckbox and RawSwitch. el-id lands as id on the native <input type=checkbox>, so checked state is read from the input itself.
Collect browser errors while a test runs, e.g. to fail a smoke test when a page throws or logs an error.
(let [errors (console/watch-errors!)] ... drive the UI ... (is (empty? (console/page-errors errors))))
Collect browser errors while a test runs, e.g. to fail a smoke test when
a page throws or logs an error.
(let [errors (console/watch-errors!)]
... drive the UI ...
(is (empty? (console/page-errors errors))))EddDatePicker / RawDatePicker.
MUI v9 renders a sectioned field: el-id lands on a hidden input and the visible value lives in Day / Month / Year spinbutton sections. These functions hide that so tests only deal with "dd.MM.yyyy" strings.
EddDatePicker / RawDatePicker. MUI v9 renders a sectioned field: el-id lands on a hidden input and the visible value lives in Day / Month / Year spinbutton sections. These functions hide that so tests only deal with "dd.MM.yyyy" strings.
RawDialog. MUI renders the dialog in a portal; el-id lands as data-testid on the dialog root, so it is found wherever it is mounted.
RawDialog. MUI renders the dialog in a portal; el-id lands as data-testid on the dialog root, so it is found wherever it is mounted.
Read-only queries for display components: typography, badge, chip, avatar, alert, list, table, tree view, card, backdrop, progress, skeleton.
Read-only queries for display components: typography, badge, chip, avatar, alert, list, table, tree view, card, backdrop, progress, skeleton.
RawDrawer / RawSwipeableDrawer. el-id lands as data-testid on the drawer root, which is portalled and only present while open.
RawDrawer / RawSwipeableDrawer. el-id lands as data-testid on the drawer root, which is portalled and only present while open.
RawMenu / RawMenuItem. Items carry their own el-id.
RawMenu / RawMenuItem. Items carry their own el-id.
RawRadioGroup. el-id lands as data-testid on the radiogroup.
RawRadioGroup. el-id lands as data-testid on the radiogroup.
RawSelect and RawFormSelect. RawSelect: el-id is the combobox itself. RawFormSelect: the combobox is el-id + "-select".
RawSelect and RawFormSelect. RawSelect: el-id is the combobox itself. RawFormSelect: the combobox is el-id + "-select".
RawSlider. el-id lands on the slider root <span>; the value lives on the inner <input type=range>, which is driven with the keyboard.
RawSlider. el-id lands on the slider root <span>; the value lives on the inner <input type=range>, which is driven with the keyboard.
RawSnackbar. el-id lands as data-testid on the snackbar root, which only exists while it is open.
RawSnackbar. el-id lands as data-testid on the snackbar root, which only exists while it is open.
RawSwitch. Behaves like a checkbox (el-id lands on the native input,
role=switch). For two-value switches on? means the right value.
RawSwitch. Behaves like a checkbox (el-id lands on the native input, role=switch). For two-value switches `on?` means the right value.
RawTabs. el-id lands as data-testid on the tabs root.
RawTabs. el-id lands as data-testid on the tabs root.
EddTextEditor / RawTextEditor. The editor uses el-id as its id and derives the editable area and the edit / save / discard buttons from it.
EddTextEditor / RawTextEditor. The editor uses el-id as its id and derives the editable area and the edit / save / discard buttons from it.
RawTextField, RawNumberField, RawPercentField. el-id lands as id on the native <input>.
RawTextField, RawNumberField, RawPercentField. el-id lands as id on the native <input>.
RawToggleButtonGroup / RawToggleButton. el-id lands as data-testid on the group; buttons are found by their value.
RawToggleButtonGroup / RawToggleButton. el-id lands as data-testid on the group; buttons are found by their value.
RawTooltip. el-id lands as data-testid on the wrapping Grid; the tooltip popup is portalled with role=tooltip.
RawTooltip. el-id lands as data-testid on the wrapping Grid; the tooltip popup is portalled with role=tooltip.
Read the current state of any primitive by el-id, and scan a whole page into a nested map keyed by el-id segments.
reading-of detects the primitive type from the rendered DOM and returns a
reading map:
text / number / percent field -> {:type :input :value ".." :label ".."}
checkbox -> {:type :checkbox :value true :label ".."}
switch -> {:type :switch :value true :label ".."}
select -> {:type :select :value "selected label"}
radio group -> {:type :radio :value "selected value"}
slider -> {:type :slider :value 30.0}
autocomplete -> {:type :autocomplete :value ".." or ["chip" ..]}
anything else -> {:type :text :text "visible text"}
scan returns the same reading maps as its leaves. The detection and
nesting logic lives in web.primitives.testing.scan, shared with the
gallery's in-browser snapshot button.
Read the current state of any primitive by el-id, and scan a whole page
into a nested map keyed by el-id segments.
`reading-of` detects the primitive type from the rendered DOM and returns a
reading map:
text / number / percent field -> {:type :input :value ".." :label ".."}
checkbox -> {:type :checkbox :value true :label ".."}
switch -> {:type :switch :value true :label ".."}
select -> {:type :select :value "selected label"}
radio group -> {:type :radio :value "selected value"}
slider -> {:type :slider :value 30.0}
autocomplete -> {:type :autocomplete :value ".." or ["chip" ..]}
anything else -> {:type :text :text "visible text"}
`scan` returns the same reading maps as its leaves. The detection and
nesting logic lives in web.primitives.testing.scan, shared with the
gallery's in-browser snapshot button.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |