Liking cljdoc? Tell your friends :D

web.primitives.testing.el-id

Resolves an :el-id value into the id string rendered into the DOM.

Callers never build strings themselves. Components and the SDK both call el-id, so a view and a test using the same value always agree:

:first-name -> "first-name" :app.person/first-name -> "app.person/first-name" [:person "Bla" "ble"] -> "person--bla--ble" [some-element-fn "Bla"] -> whatever (some-element-fn "Bla") resolves to "already-built" -> "already-built"

Suffixes are joined with "--" so scanned ids can be split back into a nested path.

Resolves an :el-id value into the id string rendered into the DOM.

Callers never build strings themselves. Components and the SDK both call
`el-id`, so a view and a test using the same value always agree:

  :first-name                     -> "first-name"
  :app.person/first-name          -> "app.person/first-name"
  [:person "Bla" "ble"]           -> "person--bla--ble"
  [some-element-fn "Bla"]         -> whatever (some-element-fn "Bla") resolves to
  "already-built"                 -> "already-built"

Suffixes are joined with "--" so scanned ids can be split back into a
nested path.
raw docstring

el-idclj/s

(el-id value)
(el-id base & suffixes)

Resolve an el-id value (keyword, vector, fn vector or string) to its id. With extra arguments, base is combined with each suffix: (el-id :row 1 :amount).

Resolve an el-id value (keyword, vector, fn vector or string) to its id.
With extra arguments, `base` is combined with each suffix: (el-id :row 1 :amount).
raw docstring

el-id-selclj/s

(el-id-sel f & args)

selclj/s

(sel f & args)

Selector that matches an element by el-id regardless of whether the primitive exposed it as :id (inputs) or :data-testid (containers/buttons). Prefer this in tests so callers do not need to know the per-primitive attribute mapping.

Selector that matches an element by el-id regardless of whether the
primitive exposed it as :id (inputs) or :data-testid (containers/buttons).
Prefer this in tests so callers do not need to know the per-primitive
attribute mapping.
raw docstring

separatorclj/s


testid-prefix-selclj/s

(testid-prefix-sel f & args)

testid-selclj/s

(testid-sel f & args)

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