Expand description
Reusable assertions for widget registry conformance tests.
Registry tests wire these probes into their real components, drive the component through its normal interaction path, then call the corresponding assertion. The probes deliberately do not prescribe a rendered element or DOM event because those details belong to each widget.
§Conformance levels
The convention has two levels, and the kit certifies each:
- Trio-conformant (no dependency on this crate): the widget honors the
value/on_change/on_commitprop trio plus attribute spread. Applicable tests:CommitOrderProbeandChangeOriginProbe(trio-only widgets implyChangeOrigin::User). - Field-aware: the widget additionally resolves the Field Context. Applicable tests: the
three resolution-precedence assertions,
FocusRoundTripProbe, andassert_field_part_ids.
§Example
The runnable interaction-probe adapter demonstrates how callbacks created during rendering reach a registry-owned driver. The complete conformance test exercises all five required tests against a minimal field-aware widget.
Structs§
- Change
Origin Probe - Records values written through a
Bindingtogether with theirChangeOrigin. - Commit
Order Probe - Records the relative order of a widget commit and its containing submit handler.
- Focus
Round Trip Probe - Records focus callbacks reached through a widget’s resolved
crate::FocusRequest. - Overridable
Meta Flags - The two independently overridable metadata flags required by the convention.
Functions§
- assert_
binding_ resolution_ precedence - Asserts explicit binding, context binding, then internal-state resolution precedence.
- assert_
field_ part_ ids - Asserts the description and error ids currently registered in field metadata.
- assert_
meta_ flag_ precedence - Asserts the invalid and disabled flags observed after applying explicit per-flag props.
- assert_
meta_ resolution_ precedence - Asserts explicit metadata, context metadata, then standalone metadata resolution precedence.