2026-07-27 10:44:38 +02:00
|
|
|
"""Unit tests for backlog vocabulary resolution."""
|
|
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
|
|
from steering.backlog_vocabulary import resolve_backlog_vocabulary
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_resolve_agile_from_steering_element():
|
|
|
|
|
vocab = resolve_backlog_vocabulary(
|
|
|
|
|
data_slices=["backlog", "actions", "work_cycles"],
|
|
|
|
|
method_key="continuous_product",
|
|
|
|
|
steering_elements=frozenset(
|
|
|
|
|
{"work_cycle_scope", "backlog_epic_hierarchy", "next_action_primary"}
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
assert vocab["profile_key"] == "agile_intake"
|
|
|
|
|
assert vocab["capabilities"]["epic_hierarchy"] is True
|
|
|
|
|
assert vocab["capabilities"]["sprint_commit"] is True
|
|
|
|
|
assert "epic" in vocab["kinds"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_resolve_continuous_without_epic_element():
|
|
|
|
|
vocab = resolve_backlog_vocabulary(
|
|
|
|
|
data_slices=["backlog", "actions"],
|
|
|
|
|
method_key="continuous_product",
|
|
|
|
|
steering_elements=frozenset({"next_action_primary"}),
|
|
|
|
|
)
|
|
|
|
|
assert vocab["profile_key"] == "continuous_intake"
|
|
|
|
|
assert vocab["labels"]["story"] == "Idee"
|
|
|
|
|
assert vocab["capabilities"]["epic_hierarchy"] is False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_resolve_standard_for_generic_backlog():
|
|
|
|
|
vocab = resolve_backlog_vocabulary(
|
|
|
|
|
data_slices=["backlog", "actions"],
|
|
|
|
|
method_key="sequential_dependency",
|
|
|
|
|
steering_elements=frozenset({"critical_path", "next_action_primary"}),
|
|
|
|
|
)
|
|
|
|
|
assert vocab["profile_key"] == "standard_intake"
|
|
|
|
|
assert vocab["labels"]["story"] == "Story"
|
2026-07-27 13:06:20 +02:00
|
|
|
assert "tech_debt" in vocab["kinds"]
|
2026-07-27 10:44:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_resolve_empty_without_backlog_slice():
|
|
|
|
|
vocab = resolve_backlog_vocabulary(
|
|
|
|
|
data_slices=["actions", "roadmap"],
|
|
|
|
|
method_key="maturity_progression",
|
|
|
|
|
steering_elements=frozenset({"next_action_primary"}),
|
|
|
|
|
)
|
|
|
|
|
assert vocab["kinds"] == []
|