fix: graph-state Test beruecksichtigt Methodenprofil AP1.4e.
All checks were successful
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 2m16s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 12s

generic_operating liefert would_block statt blocked; harte Blockade erst unter product_milestone_driven pruefen.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Lars 2026-07-11 08:14:34 +02:00
parent 064779e187
commit 2843d8775a

View File

@ -233,12 +233,29 @@ def test_initiative_roadmap_graph_state(client):
headers=_auth(token),
)
generic = client.get(
f"/api/initiatives/{initiative_id}/roadmap/graph-state",
headers=_auth(token),
)
assert generic.status_code == 200
generic_body = generic.json()
assert generic_body["graph_profile"]["enforce_gate_blocking"] is False
assert generic_body["items"][gate_a["id"]]["would_block"] is True
assert generic_body["items"][gate_a["id"]]["blocked"] is False
client.patch(
f"/api/steering/initiatives/{initiative_id}/context",
json={"method_key": "product_milestone_driven"},
headers=_auth(token),
)
state = client.get(
f"/api/initiatives/{initiative_id}/roadmap/graph-state",
headers=_auth(token),
)
assert state.status_code == 200
body = state.json()
assert body["graph_profile"]["enforce_gate_blocking"] is True
assert body["items"][gate_a["id"]]["blocked"] is True
assert gate_b["id"] in body["items"][gate_a["id"]]["blocked_by"]
assert gate_a["id"] not in body["ready_items"]