All checks were successful
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 43s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m21s
- Updated `PROJECT_STATUS.md` to reflect the implementation of F15 features, including the unified slot review and handling of `findings_stale`. - Enhanced `PROGRESSION_GRAPH_SLOT_EDITOR_SPEC.md` with detailed descriptions of new functionalities related to the match dialog and path quality assessments. - Introduced new functions in `exercise_progression_graphs.py` to validate exercise visibility against progression graph settings, ensuring proper governance. - Improved frontend components to support new governance parameters (visibility and club_id) in exercise creation workflows. - Updated documentation in `HANDOVER.md` and `PLANNING_KI_ROADMAP.md` to outline the latest developments and validation results for the F15 features. - Enhanced utility functions for exercise creation to incorporate governance settings, improving the overall user experience in the path builder and editor.
60 lines
1.8 KiB
Python
60 lines
1.8 KiB
Python
"""Sichtbarkeit: Progressionsgraph ↔ Übungen (Promotion, Kanten, Match)."""
|
|
from routers.exercise_progression_graphs import _exercise_allowed_in_progression_graph
|
|
|
|
|
|
def test_club_graph_rejects_private_exercise():
|
|
assert not _exercise_allowed_in_progression_graph(
|
|
{"visibility": "private", "club_id": None, "created_by": 1},
|
|
graph_visibility="club",
|
|
graph_club_id=5,
|
|
profile_id=1,
|
|
role="trainer",
|
|
)
|
|
|
|
|
|
def test_club_graph_accepts_matching_club_exercise():
|
|
assert _exercise_allowed_in_progression_graph(
|
|
{"visibility": "club", "club_id": 5, "created_by": 2},
|
|
graph_visibility="club",
|
|
graph_club_id=5,
|
|
profile_id=1,
|
|
role="trainer",
|
|
)
|
|
|
|
|
|
def test_club_graph_accepts_official_exercise():
|
|
assert _exercise_allowed_in_progression_graph(
|
|
{"visibility": "official", "club_id": None, "created_by": 99},
|
|
graph_visibility="club",
|
|
graph_club_id=5,
|
|
profile_id=1,
|
|
role="trainer",
|
|
)
|
|
|
|
|
|
def test_private_graph_accepts_own_private_exercise():
|
|
assert _exercise_allowed_in_progression_graph(
|
|
{"visibility": "private", "club_id": None, "created_by": 7},
|
|
graph_visibility="private",
|
|
graph_club_id=None,
|
|
profile_id=7,
|
|
role="trainer",
|
|
)
|
|
|
|
|
|
def test_official_graph_requires_official_exercise():
|
|
assert not _exercise_allowed_in_progression_graph(
|
|
{"visibility": "club", "club_id": 5, "created_by": 2},
|
|
graph_visibility="official",
|
|
graph_club_id=None,
|
|
profile_id=1,
|
|
role="trainer",
|
|
)
|
|
assert _exercise_allowed_in_progression_graph(
|
|
{"visibility": "official", "club_id": None, "created_by": 2},
|
|
graph_visibility="official",
|
|
graph_club_id=None,
|
|
profile_id=1,
|
|
role="trainer",
|
|
)
|