diff --git a/backend/tests/test_ap23a_operating_context.py b/backend/tests/test_ap23a_operating_context.py index e37736b..7b1d79f 100644 --- a/backend/tests/test_ap23a_operating_context.py +++ b/backend/tests/test_ap23a_operating_context.py @@ -103,7 +103,7 @@ def test_operating_context_program(client): assert body["ui_profile"]["planOutlineKeys"] is not None -def test_operating_context_generic_fallback(client): +def test_operating_context_dispute_case(client): user = provision_user_in_tenant(tenant_role="member") token = _login(client, user) @@ -121,6 +121,30 @@ def test_operating_context_generic_fallback(client): ) assert res.status_code == 200 body = res.json() + assert body["method_key"] == "dispute_procedure" + assert body["ui_profile"]["planDefaultRoute"] == "/plan/profile" + assert {s["key"] for s in body["ui_profile"]["processSteps"]} == {"work", "control"} + + +def test_operating_context_generic_fallback(client): + user = provision_user_in_tenant(tenant_role="member") + token = _login(client, user) + + created = _create_initiative( + client, + token, + title="Generic", + archetype_key="initiative.generic", + ) + initiative_id = created.json()["id"] + + res = client.get( + f"/api/initiatives/{initiative_id}/operating-context", + headers=_auth(token), + ) + assert res.status_code == 200 + body = res.json() + assert body["method_key"] == "generic_operating" assert body["ui_profile"]["planDefaultRoute"] == "/plan/profile" assert body["ui_profile"]["processSteps"] == []