Liking cljdoc? Tell your friends :D

com.blockether.spel.assertions

Playwright test assertions - LocatorAssertions, PageAssertions, APIResponseAssertions.

Entry point is assert-that which returns the appropriate assertions object for the given Playwright type. Chain with assertion functions and use not- variants for negation.

All assertion functions wrap calls in safe to return anomaly maps on assertion failure rather than throwing.

Playwright test assertions - LocatorAssertions, PageAssertions,
APIResponseAssertions.

Entry point is `assert-that` which returns the appropriate assertions
object for the given Playwright type. Chain with assertion functions
and use `not-` variants for negation.

All assertion functions wrap calls in `safe` to return anomaly maps
on assertion failure rather than throwing.
raw docstring

api-notclj

(api-not ara)

Returns negated APIResponseAssertions (expect the opposite).

Params: ara - APIResponseAssertions instance.

Returns: APIResponseAssertions (negated).

Returns negated APIResponseAssertions (expect the opposite).

Params:
`ara` - APIResponseAssertions instance.

Returns:
APIResponseAssertions (negated).
sourceraw docstring

assert-thatclj

(assert-that target)

Creates an assertion object for the given Playwright instance.

Params: target - Locator, Page, or APIResponse instance.

Returns: LocatorAssertions, PageAssertions, or APIResponseAssertions.

Creates an assertion object for the given Playwright instance.

Params:
`target` - Locator, Page, or APIResponse instance.

Returns:
LocatorAssertions, PageAssertions, or APIResponseAssertions.
sourceraw docstring

contains-classclj

(contains-class la class-val)
(contains-class la class-val opts)

Asserts the locator's class attribute contains the specified class.

Params: la - LocatorAssertions instance. class - String or vector of strings. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator's class attribute contains the specified class.

Params:
`la`    - LocatorAssertions instance.
`class` - String or vector of strings.
`opts`  - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

contains-textclj

(contains-text la text)
(contains-text la text opts)

Asserts the locator contains the specified text.

Params: la - LocatorAssertions instance. text - String or Pattern. opts - Map, optional. {:timeout ms, :use-inner-text bool}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator contains the specified text.

Params:
`la`   - LocatorAssertions instance.
`text` - String or Pattern.
`opts` - Map, optional. {:timeout ms, :use-inner-text bool}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-accessible-descriptionclj

(has-accessible-description la desc)

Asserts the locator has the specified accessible description.

Params: la - LocatorAssertions instance. desc - String or Pattern.

Returns: nil or anomaly map on assertion failure.

Asserts the locator has the specified accessible description.

Params:
`la`   - LocatorAssertions instance.
`desc` - String or Pattern.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-accessible-error-messageclj

(has-accessible-error-message la msg)

Asserts the locator has the specified accessible error message.

Params: la - LocatorAssertions instance. msg - String or Pattern.

Returns: nil or anomaly map on assertion failure.

Asserts the locator has the specified accessible error message.

Params:
`la`  - LocatorAssertions instance.
`msg` - String or Pattern.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-accessible-nameclj

(has-accessible-name la name-val)

Asserts the locator has the specified accessible name.

Params: la - LocatorAssertions instance. name - String or Pattern.

Returns: nil or anomaly map on assertion failure.

Asserts the locator has the specified accessible name.

Params:
`la`   - LocatorAssertions instance.
`name` - String or Pattern.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-attributeclj

(has-attribute la name value)
(has-attribute la name value opts)

Asserts the locator has the specified attribute with value.

Params: la - LocatorAssertions instance. name - String. Attribute name. value - String or Pattern. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator has the specified attribute with value.

Params:
`la`    - LocatorAssertions instance.
`name`  - String. Attribute name.
`value` - String or Pattern.
`opts`  - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-classclj

(has-class la class-val)
(has-class la class-val opts)

Asserts the locator has the specified CSS class.

Params: la - LocatorAssertions instance. class - String, Pattern, or vector of strings/patterns. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator has the specified CSS class.

Params:
`la`    - LocatorAssertions instance.
`class` - String, Pattern, or vector of strings/patterns.
`opts`  - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-countclj

(has-count la count)
(has-count la count opts)

Asserts the locator resolves to the expected number of elements.

Params: la - LocatorAssertions instance. count - Long. Expected element count. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator resolves to the expected number of elements.

Params:
`la`    - LocatorAssertions instance.
`count` - Long. Expected element count.
`opts`  - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-cssclj

(has-css la name value)
(has-css la name value opts)

Asserts the locator has the specified CSS property with value.

Params: la - LocatorAssertions instance. name - String. CSS property name. value - String or Pattern. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator has the specified CSS property with value.

Params:
`la`    - LocatorAssertions instance.
`name`  - String. CSS property name.
`value` - String or Pattern.
`opts`  - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-idclj

(has-id la id)
(has-id la id opts)

Asserts the locator has the specified ID.

Params: la - LocatorAssertions instance. id - String or Pattern. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator has the specified ID.

Params:
`la` - LocatorAssertions instance.
`id` - String or Pattern.
`opts` - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-js-propertyclj

(has-js-property la name value)

Asserts the locator has the specified JavaScript property.

Params: la - LocatorAssertions instance. name - String. Property name. value - Object. Expected value.

Returns: nil or anomaly map on assertion failure.

Asserts the locator has the specified JavaScript property.

Params:
`la`    - LocatorAssertions instance.
`name`  - String. Property name.
`value` - Object. Expected value.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-roleclj

(has-role la role)

Asserts the locator has the specified ARIA role.

Params: la - LocatorAssertions instance. role - AriaRole enum value.

Returns: nil or anomaly map on assertion failure.

Asserts the locator has the specified ARIA role.

Params:
`la`   - LocatorAssertions instance.
`role` - AriaRole enum value.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-textclj

(has-text la text)
(has-text la text opts)

Asserts the locator has the specified text.

Params: la - LocatorAssertions instance. text - String or Pattern. opts - Map, optional. {:timeout ms, :use-inner-text bool}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator has the specified text.

Params:
`la`   - LocatorAssertions instance.
`text` - String or Pattern.
`opts` - Map, optional. {:timeout ms, :use-inner-text bool}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-titleclj

(has-title pa title)
(has-title pa title opts)

Asserts the page has the specified title.

Params: pa - PageAssertions instance. title - String or Pattern. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the page has the specified title.

Params:
`pa`    - PageAssertions instance.
`title` - String or Pattern.
`opts`  - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-urlclj

(has-url pa url)
(has-url pa url opts)

Asserts the page has the specified URL.

Params: pa - PageAssertions instance. url - String or Pattern. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the page has the specified URL.

Params:
`pa`  - PageAssertions instance.
`url` - String or Pattern.
`opts` - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-valueclj

(has-value la value)
(has-value la value opts)

Asserts the locator (input) has the specified value.

Params: la - LocatorAssertions instance. value - String or Pattern. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator (input) has the specified value.

Params:
`la`    - LocatorAssertions instance.
`value` - String or Pattern.
`opts`  - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

has-valuesclj

(has-values la values)
(has-values la values opts)

Asserts the locator (multi-select) has the specified values.

Params: la - LocatorAssertions instance. values - Vector of strings or patterns. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator (multi-select) has the specified values.

Params:
`la`     - LocatorAssertions instance.
`values` - Vector of strings or patterns.
`opts`   - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

is-attachedclj

(is-attached la)
(is-attached la opts)

Asserts the locator is attached to the DOM.

Params: la - LocatorAssertions instance. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator is attached to the DOM.

Params:
`la`   - LocatorAssertions instance.
`opts` - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

is-checkedclj

(is-checked la)
(is-checked la opts)

Asserts the locator (checkbox/radio) is checked.

Params: la - LocatorAssertions instance. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator (checkbox/radio) is checked.

Params:
`la`   - LocatorAssertions instance.
`opts` - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

is-disabledclj

(is-disabled la)
(is-disabled la opts)

Asserts the locator is disabled.

Params: la - LocatorAssertions instance. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator is disabled.

Params:
`la`   - LocatorAssertions instance.
`opts` - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

is-editableclj

(is-editable la)
(is-editable la opts)

Asserts the locator is editable.

Params: la - LocatorAssertions instance. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator is editable.

Params:
`la`   - LocatorAssertions instance.
`opts` - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

is-emptyclj

(is-empty la)

Asserts the locator (input) is empty.

Params: la - LocatorAssertions instance.

Returns: nil or anomaly map on assertion failure.

Asserts the locator (input) is empty.

Params:
`la` - LocatorAssertions instance.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

is-enabledclj

(is-enabled la)
(is-enabled la opts)

Asserts the locator is enabled.

Params: la - LocatorAssertions instance. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator is enabled.

Params:
`la`   - LocatorAssertions instance.
`opts` - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

is-focusedclj

(is-focused la)
(is-focused la opts)

Asserts the locator is focused.

Params: la - LocatorAssertions instance. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator is focused.

Params:
`la`   - LocatorAssertions instance.
`opts` - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

is-hiddenclj

(is-hidden la)
(is-hidden la opts)

Asserts the locator is hidden.

Params: la - LocatorAssertions instance. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator is hidden.

Params:
`la`   - LocatorAssertions instance.
`opts` - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

is-in-viewportclj

(is-in-viewport la)
(is-in-viewport la opts)

Asserts the locator is in the viewport.

Params: la - LocatorAssertions instance. opts - Map, optional. {:timeout ms, :ratio double}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator is in the viewport.

Params:
`la`   - LocatorAssertions instance.
`opts` - Map, optional. {:timeout ms, :ratio double}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

is-okclj

(is-ok ara)

Asserts the API response status is 2xx.

Params: ara - APIResponseAssertions instance.

Returns: nil or anomaly map on assertion failure.

Asserts the API response status is 2xx.

Params:
`ara` - APIResponseAssertions instance.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

is-visibleclj

(is-visible la)
(is-visible la opts)

Asserts the locator is visible.

Params: la - LocatorAssertions instance. opts - Map, optional. {:timeout ms}.

Returns: nil or anomaly map on assertion failure.

Asserts the locator is visible.

Params:
`la`   - LocatorAssertions instance.
`opts` - Map, optional. {:timeout ms}.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

loc-notclj

(loc-not la)

Returns negated LocatorAssertions (expect the opposite).

Params: la - LocatorAssertions instance.

Returns: LocatorAssertions (negated).

Returns negated LocatorAssertions (expect the opposite).

Params:
`la` - LocatorAssertions instance.

Returns:
LocatorAssertions (negated).
sourceraw docstring

matches-aria-snapshotclj

(matches-aria-snapshot la snapshot)

Asserts the locator matches the ARIA snapshot.

Params: la - LocatorAssertions instance. snapshot - String. ARIA snapshot to match.

Returns: nil or anomaly map on assertion failure.

Asserts the locator matches the ARIA snapshot.

Params:
`la`       - LocatorAssertions instance.
`snapshot` - String. ARIA snapshot to match.

Returns:
nil or anomaly map on assertion failure.
sourceraw docstring

page-notclj

(page-not pa)

Returns negated PageAssertions (expect the opposite).

Params: pa - PageAssertions instance.

Returns: PageAssertions (negated).

Returns negated PageAssertions (expect the opposite).

Params:
`pa` - PageAssertions instance.

Returns:
PageAssertions (negated).
sourceraw docstring

set-default-assertion-timeout!clj

(set-default-assertion-timeout! timeout)

Sets the default timeout for all assertions.

Params: timeout - Double. Timeout in milliseconds.

Sets the default timeout for all assertions.

Params:
`timeout` - Double. Timeout in milliseconds.
sourceraw 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