mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-22 14:51:09 -05:00
- Introduced reusable test utilities in `backend/tests/utils` for FSM transitions, HTMX interactions, and common scenarios. - Added factory functions for creating test submissions, parks, rides, and photo submissions. - Implemented assertion helpers for verifying state changes, toast notifications, and transition logs. - Created comprehensive state machine diagrams for all FSM-enabled models in `docs/STATE_DIAGRAMS.md`, detailing states, transitions, and guard conditions.
29 lines
691 B
Python
29 lines
691 B
Python
"""
|
|
Test utilities for ThrillWiki.
|
|
|
|
This package provides reusable test utilities, helpers, and fixtures
|
|
for testing FSM transitions, HTMX interactions, and other common scenarios.
|
|
"""
|
|
|
|
from .fsm_test_helpers import (
|
|
create_test_submission,
|
|
create_test_park,
|
|
create_test_ride,
|
|
assert_status_changed,
|
|
assert_state_log_created,
|
|
assert_toast_triggered,
|
|
wait_for_htmx_swap,
|
|
verify_transition_buttons_visible,
|
|
)
|
|
|
|
__all__ = [
|
|
"create_test_submission",
|
|
"create_test_park",
|
|
"create_test_ride",
|
|
"assert_status_changed",
|
|
"assert_state_log_created",
|
|
"assert_toast_triggered",
|
|
"wait_for_htmx_swap",
|
|
"verify_transition_buttons_visible",
|
|
]
|