generated from coulomb/repo-seed
Improved datamodel and deterministic generation
This commit is contained in:
@@ -1723,6 +1723,8 @@ def test_ui_manual_registry_entry_loop(tmp_path):
|
||||
data={
|
||||
"name": "Manual Ability",
|
||||
"description": "Curated by hand.",
|
||||
"primary_class": "repository-intelligence",
|
||||
"attributes": "review, curation",
|
||||
"confidence": "0.95",
|
||||
},
|
||||
follow_redirects=False,
|
||||
@@ -1740,6 +1742,8 @@ def test_ui_manual_registry_entry_loop(tmp_path):
|
||||
"description": "Curated capability.",
|
||||
"inputs": "request, context",
|
||||
"outputs": "response",
|
||||
"primary_class": "review",
|
||||
"attributes": "ui, workflow",
|
||||
"confidence": "0.9",
|
||||
},
|
||||
follow_redirects=False,
|
||||
@@ -1755,6 +1759,8 @@ def test_ui_manual_registry_entry_loop(tmp_path):
|
||||
"capability_id": str(capability_id),
|
||||
"name": "Manual API",
|
||||
"type": "REST endpoint",
|
||||
"primary_class": "api",
|
||||
"attributes": "integration, review",
|
||||
"location": "src/manual.py",
|
||||
"confidence": "0.88",
|
||||
},
|
||||
@@ -1807,6 +1813,8 @@ def test_ui_manual_registry_entry_loop(tmp_path):
|
||||
data={
|
||||
"name": "Edited Manual Ability",
|
||||
"description": "Edited by hand.",
|
||||
"primary_class": "workflow-automation",
|
||||
"attributes": "manual, curation",
|
||||
"confidence": "0.8",
|
||||
},
|
||||
follow_redirects=False,
|
||||
@@ -1820,6 +1828,8 @@ def test_ui_manual_registry_entry_loop(tmp_path):
|
||||
"description": "Edited capability.",
|
||||
"inputs": "ticket",
|
||||
"outputs": "decision",
|
||||
"primary_class": "decisioning",
|
||||
"attributes": "workflow, review",
|
||||
"confidence": "0.75",
|
||||
},
|
||||
follow_redirects=False,
|
||||
@@ -1835,6 +1845,8 @@ def test_ui_manual_registry_entry_loop(tmp_path):
|
||||
data={
|
||||
"name": "Edited Manual API",
|
||||
"type": "HTTP endpoint",
|
||||
"primary_class": "ui",
|
||||
"attributes": "api, review",
|
||||
"location": "src/edited.py",
|
||||
"confidence": "0.7",
|
||||
},
|
||||
@@ -1865,6 +1877,32 @@ def test_ui_manual_registry_entry_loop(tmp_path):
|
||||
assert f"references feature #{feature_id}" in detail_response.text
|
||||
assert "downward support" in detail_response.text
|
||||
|
||||
ability_map = client.get(f"/repos/{repository_id}/ability-map").json()
|
||||
edited_ability = ability_map["abilities"][0]
|
||||
edited_capability = edited_ability["capabilities"][0]
|
||||
edited_feature = edited_capability["features"][0]
|
||||
assert edited_ability["primary_class"] == "workflow-automation"
|
||||
assert edited_ability["attributes"] == ["manual", "curation"]
|
||||
assert edited_capability["primary_class"] == "decisioning"
|
||||
assert edited_capability["attributes"] == ["workflow", "review"]
|
||||
assert edited_feature["primary_class"] == "ui"
|
||||
assert edited_feature["attributes"] == ["api", "review"]
|
||||
|
||||
filtered_feature_listing = client.get(
|
||||
f"/ui/repos/{repository_id}/elements",
|
||||
params={
|
||||
"scope": "all",
|
||||
"entry_filter": "approved",
|
||||
"type": "features",
|
||||
"class_filter": "ui",
|
||||
"attribute_filter": "api",
|
||||
},
|
||||
)
|
||||
assert filtered_feature_listing.status_code == 200
|
||||
assert "Attribute" in filtered_feature_listing.text
|
||||
assert "Edited Manual API" in filtered_feature_listing.text
|
||||
assert "1 of 1 shown" in filtered_feature_listing.text
|
||||
|
||||
upward_support_listing = client.get(
|
||||
f"/ui/repos/{repository_id}/elements",
|
||||
params={
|
||||
|
||||
Reference in New Issue
Block a user