Skip to main content

Module testing

Module testing 

Source
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:

§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§

ChangeOriginProbe
Records values written through a Binding together with their ChangeOrigin.
CommitOrderProbe
Records the relative order of a widget commit and its containing submit handler.
FocusRoundTripProbe
Records focus callbacks reached through a widget’s resolved crate::FocusRequest.
OverridableMetaFlags
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.