Typed locator, active-page, and captured-result assertion values executed by
Fluffy.expect/2.
Active page expectations live on Fluffy.Page.
The module intentionally keeps a flat Elixir API while preserving Playwright's target and matcher concepts internally.
Every expectation constructor accepts the shared timeout option:
:timeout(non_neg_integer/0) - Maximum time in milliseconds to wait for the operation.
checked/2 additionally accepts:
:timeout(non_neg_integer/0) - Maximum time in milliseconds to wait for the operation.:checked(boolean/0) - Set to false to expect an unchecked control.:indeterminate(boolean/0) - Expect the browser-owned indeterminate state.
Summary
Locator assertions
Expects a checkbox or radio to have Playwright's checked state.
Locator assertions
@spec checked(Fluffy.Locator.t(), [checked_option()]) :: t()
Expects a checkbox or radio to have Playwright's checked state.
The default is checked. Pass checked: false for unchecked, or
indeterminate: true for the browser-owned mixed state. The indeterminate
state requires Playwright because it is a DOM property rather than HTML
state available to the Static or LiveView drivers.
@spec count(Fluffy.Locator.t(), non_neg_integer(), [option()]) :: t()
@spec disabled(Fluffy.Locator.t(), [option()]) :: t()
@spec editable(Fluffy.Locator.t(), [option()]) :: t()
@spec enabled(Fluffy.Locator.t(), [option()]) :: t()
@spec focused(Fluffy.Locator.t(), [option()]) :: t()
@spec value(Fluffy.Locator.t(), String.t(), [option()]) :: t()
@spec values(Fluffy.Locator.t(), [term()], [option()]) :: t()
@spec visible(Fluffy.Locator.t(), [option()]) :: t()
Downloads
Dialogs
Requests
Responses
Types
@type checked_option() :: {:timeout, non_neg_integer()} | {:checked, boolean()} | {:indeterminate, boolean()}
@type kind() ::
:checked
| :count
| :disabled
| :editable
| :enabled
| :focused
| :opener
| :status
| :title
| :url
| :value
| :values
| :visible
| :download_content
| :download_content_type
| :download_size
| :download_suggested_filename
| :download_url
| :dialog_action
| :dialog_default_value
| :dialog_message
| :dialog_prompt_text
| :dialog_type
| :navigation_from_url
| :navigation_status
| :navigation_url
| :request_headers
| :request_method
| :request_page
| :request_post_data
| :request_resource_type
| :request_url
| :response_headers
| :response_method
| :response_page
| :response_post_data
| :response_resource_type
| :response_status
| :response_status_text
| :response_url
@type option() :: {:timeout, non_neg_integer()}