mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-23 01:31:09 -05:00
Add test utilities and state machine diagrams for FSM models
- 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.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from django.urls import path
|
||||
from . import views
|
||||
from apps.core.views.views import FSMTransitionView
|
||||
|
||||
app_name = "rides"
|
||||
|
||||
@@ -83,4 +84,12 @@ urlpatterns = [
|
||||
views.RideUpdateView.as_view(),
|
||||
name="ride_update",
|
||||
),
|
||||
# FSM transition endpoint for rides
|
||||
# URL: /rides/<ride_slug>/transition/<transition_name>/
|
||||
path(
|
||||
"<slug:slug>/transition/<str:transition_name>/",
|
||||
FSMTransitionView.as_view(),
|
||||
{"app_label": "rides", "model_name": "ride"},
|
||||
name="ride_transition",
|
||||
),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user