Skip to main content

Crate icedwright_probe

Crate icedwright_probe 

Source
Expand description

What an iced app links so icedwright can see and steer it.

  • semantic, test_id and SemanticExt::semantic describe what iced cannot infer: a role, a name, states, a typed TestId. Widget authors call report from their own operate.
  • task_name! declares a TaskName, and SaveNote::task(future) names a future so a test can hold, release, fail or replace it with a value of the right type.
  • time is the clock components should read, which a harness can move.
  • #[derive(TestId)] and #[derive(Messages)] come from icedwright-probe-macros.

With no features everything here is pass-through: semantic(el) converts back into el, the builder methods do nothing, and SaveNote::task(future) returns the future itself. The semantics feature sends annotations to the recorder, control lets a harness control named tasks, and remote adds the endpoint and both of the others. Turn them on from dev-dependencies so release builds never see them.

Modules§

role
Roles: the runtime Role enum, one zero-sized marker type per role, and the sealed capability traits that say what each role can do.
time
The clock components should read instead of Instant::now(), so a harness can move it.

Macros§

task_name
Declares task names: a unit struct for each, implementing TaskName.

Structs§

Annotation
What an annotation says about a node: its role, name, states and relations.
Semantic
An element with an annotation. Convert it into an Element to use it.
TestIdRef
A test id as the tree and the locators carry it.
VariantPath
A message variant’s path, such as Save or, for a nested enum, Editor::Bold.

Enums§

CaretClock
Whether a widget’s caret blinks on the virtual clock or the real one. Written as the caret-clock prop.
Checked
The checked state of a checkable role.
ClickClock
Whether a widget counts multiple clicks on the virtual clock or through iced’s mouse::Click, which reads the real one. Written as the click-clock prop.
CursorSeen
The kind of mouse cursor a widget was handed for its last mouse event this frame.
Key
A key one annotation uses to name another in a relation such as labelled_by or owns.
Role
The runtime role of a node, carried by trees, YAML, selector strings and the wire.

Traits§

Fallible
A name whose output is a Result, so a test can fail it with the error type. Implemented for every such name; asking to fail any other name does not compile.
IntoTestId
What .test_id(..), test_id and get_by_test_id(..) accept: a TestId value, or a string for an id built at run time.
Messages
Every variant of a message type, known at compile time.
NamedTask
What a named task offers beyond being a future. Bring it into scope to call detail or external.
SemanticExt
.semantic() on anything that converts into an Element, for builder chains.
TaskName
A task name. Declare one with task_name!, never by hand.
TestId
A test id the view and the tests name with the same value, so a typo does not compile.

Functions§

report
Reports an annotation for a widget at bounds to whatever operation is running.
semantic
Wraps an element so it can be described: semantic(button("Delete")).role(role::Button).
test_id
Wraps an element with only a test id.

Derive Macros§

Messages
Implements icedwright_probe::Messages for an enum: the table of every variant and the index of a value’s variant.
TestId
Implements icedwright_probe::TestId for an enum.