Clarify campaign review interventions
This commit is contained in:
@@ -54,6 +54,30 @@ def test_campaign_runtime_documentation_provider_is_registered() -> None:
|
||||
assert documentation_topics in get_manifest().documentation_providers
|
||||
|
||||
|
||||
def test_complete_review_workflow_documents_each_attention_class() -> None:
|
||||
from govoplan_campaign.backend.manifest import get_manifest
|
||||
|
||||
topic = next(
|
||||
item
|
||||
for item in get_manifest().documentation
|
||||
if item.id == "campaigns.workflow.complete-review"
|
||||
)
|
||||
|
||||
rendered = "\n".join(
|
||||
(
|
||||
topic.summary,
|
||||
topic.body,
|
||||
*topic.metadata["steps"],
|
||||
topic.metadata["verification"],
|
||||
)
|
||||
)
|
||||
assert "Critical blockers" in rendered
|
||||
assert "Individual review" in rendered
|
||||
assert "Group review" in rendered
|
||||
assert "Remaining is zero" in rendered
|
||||
assert topic.metadata["help_contexts"] == ["campaign.review-send"]
|
||||
|
||||
|
||||
def test_runtime_documentation_is_user_only_and_requires_a_campaign_task() -> None:
|
||||
assert _topics({"docs:documentation:read"}) == ()
|
||||
assert _topics({"campaigns:campaign:read"}, documentation_type="admin") == ()
|
||||
|
||||
Reference in New Issue
Block a user