Liking cljdoc? Tell your friends :D

web.primitives.sdk.accordion

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.
raw docstring

web.primitives.sdk.autocomplete

RawAutocomplete. el-id lands as id on the combobox <input>.

RawAutocomplete. el-id lands as id on the combobox <input>.
raw docstring

web.primitives.sdk.button

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>.
raw docstring

web.primitives.sdk.checkbox

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.
raw docstring

web.primitives.sdk.console

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))))
raw docstring

web.primitives.sdk.date-picker

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.
raw docstring

web.primitives.sdk.dialog

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.
raw docstring

web.primitives.sdk.display

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.
raw docstring

web.primitives.sdk.drawer

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.
raw docstring

web.primitives.sdk.menu

RawMenu / RawMenuItem. Items carry their own el-id.

RawMenu / RawMenuItem. Items carry their own el-id.
raw docstring

web.primitives.sdk.radio

RawRadioGroup. el-id lands as data-testid on the radiogroup.

RawRadioGroup. el-id lands as data-testid on the radiogroup.
raw docstring

web.primitives.sdk.select

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".
raw docstring

web.primitives.sdk.slider

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.
raw docstring

web.primitives.sdk.snackbar

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.
raw docstring

web.primitives.sdk.switch

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.
raw docstring

web.primitives.sdk.tabs

RawTabs. el-id lands as data-testid on the tabs root.

RawTabs. el-id lands as data-testid on the tabs root.
raw docstring

web.primitives.sdk.text-editor

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.
raw docstring

web.primitives.sdk.text-field

RawTextField, RawNumberField, RawPercentField. el-id lands as id on the native <input>.

RawTextField, RawNumberField, RawPercentField.
el-id lands as id on the native <input>.
raw docstring

web.primitives.sdk.toggle-button

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.
raw docstring

web.primitives.sdk.tooltip

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.
raw docstring

web.primitives.sdk.values

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.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close