Raxol.Test.EventHelpers (Raxol v0.5.0)

View Source

Helpers for testing event handling in Raxol components. Provides utilities for simulating and verifying events.

Summary

Functions

Asserts that a child component received an event from parent.

Verifies that error handling works properly between components.

Asserts that a parent component was updated after a child event.

Verifies that state is synchronized between components.

Verifies that a component properly handles system events.

Simulates an event on a component.

Simulates a user action on a component.

Functions

assert_child_received(child, event_name)

Asserts that a child component received an event from parent.

assert_error_contained(parent, child, error_fn)

Verifies that error handling works properly between components.

assert_parent_updated(parent, update_type)

Asserts that a parent component was updated after a child event.

assert_state_synchronized(components, validation_fn)

Verifies that state is synchronized between components.

assert_system_events_handled(component, events)

Verifies that a component properly handles system events.

simulate_event(component, event)

Simulates an event on a component.

simulate_user_action(component, action)

Simulates a user action on a component.