Expand description
§stratum-test
Test utilities for NexusStratum components.
Provides assertion helpers and test harness utilities for verifying component render output, accessibility attributes, and state transitions.
§Usage
ⓘ
use stratum_test::*;
use stratum_core::aria::AriaRole;
let output = MyComponent::render(&props);
assert!(assert_aria_role(&output, AriaRole::Button));
assert!(assert_has_class(&output, "btn-primary"));Functions§
- assert_
aria_ role - Assert that a
RenderOutputhas the expected ARIA role. - assert_
attr_ value - Assert that a
RenderOutputhas an HTML attribute with the expected string value. - assert_
has_ attr - Assert that a
RenderOutputhas an HTML attribute with the given name. - assert_
has_ class - Assert that a
RenderOutputcontains the specified CSS class. - assert_
has_ data_ attr - Assert that a
RenderOutputhas a data attribute with the given name. - assert_
not_ aria_ hidden - Assert that a
RenderOutputdoes not have thearia-hiddenattribute set to"true", ensuring the element is visible to assistive technology. - assert_
tag - Assert that the render output uses the expected HTML tag.