search filters and inspection polish

This commit is contained in:
2026-04-26 00:04:19 +02:00
parent b8627c0e1d
commit 8d1e1ff583
6 changed files with 209 additions and 22 deletions

View File

@@ -213,6 +213,13 @@ def test_api_analysis_run_loop(tmp_path):
assert search_response.json()
assert "matched_field" in search_response.json()[0]
filtered_search_response = client.get(
"/search",
params={"q": "frontend", "status": "indexed"},
)
assert filtered_search_response.status_code == 200
assert filtered_search_response.json()
abilities_response = client.get("/abilities")
assert abilities_response.status_code == 200
assert abilities_response.json()[0]["name"] == "Frontend Delivery"
@@ -240,6 +247,7 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
source = tmp_path / "repo"
source.mkdir()
(source / "README.md").write_text("# UI Repo\n", encoding="utf-8")
(source / "requirements.txt").write_text("fastapi\n", encoding="utf-8")
(source / "app.py").write_text(
"from fastapi import FastAPI\n"
"app = FastAPI()\n"
@@ -300,11 +308,20 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
assert approved_detail.status_code == 200
assert "Approved Ability Map" in approved_detail.text
assert "Review UI Repo Repository Usefulness" in approved_detail.text
assert "Language: Python" in approved_detail.text
assert "Framework: FastAPI" in approved_detail.text
search_response = client.get("/ui/search", params={"q": "repository"})
assert search_response.status_code == 200
assert "UI Repo" in search_response.text
assert "Field" in search_response.text
filtered_search_response = client.get(
"/ui/search",
params={"q": "repository", "status": "indexed", "language": "Python"},
)
assert filtered_search_response.status_code == 200
assert "UI Repo" in filtered_search_response.text
finally:
app.dependency_overrides.clear()