generated from coulomb/repo-seed
Count badges now with navigation
This commit is contained in:
@@ -1100,6 +1100,7 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
)
|
||||
assert create_response.status_code == 303
|
||||
repository_path = create_response.headers["location"]
|
||||
repository_id = int(repository_path.rsplit("/", 1)[-1])
|
||||
|
||||
detail_response = client.get(repository_path)
|
||||
assert detail_response.status_code == 200
|
||||
@@ -1159,12 +1160,61 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
assert "1 abilities" in approved_detail.text
|
||||
assert "2 capabilities" in approved_detail.text
|
||||
assert "2 features" in approved_detail.text
|
||||
assert "Latest Candidate Graph" in approved_detail.text
|
||||
assert "1 candidate abilities" in approved_detail.text
|
||||
assert "2 candidate capabilities" in approved_detail.text
|
||||
assert "2 candidate features" in approved_detail.text
|
||||
assert "7 candidate facts" in approved_detail.text
|
||||
assert (
|
||||
f"/ui/repos/{repository_id}/elements?scope=approved&type=abilities"
|
||||
in approved_detail.text
|
||||
)
|
||||
assert (
|
||||
f"/ui/repos/{repository_id}/elements?scope=candidate&analysis_run_id={first_run_id}&type=features"
|
||||
in approved_detail.text
|
||||
)
|
||||
assert (
|
||||
f"/ui/repos/{repository_id}/elements?scope=facts&analysis_run_id={first_run_id}&type=facts"
|
||||
in approved_detail.text
|
||||
)
|
||||
assert "Review UI Repo Edited Repository Usefulness" in approved_detail.text
|
||||
assert "Language: Python" in approved_detail.text
|
||||
assert "Framework: FastAPI" in approved_detail.text
|
||||
assert "interface:app.py:3" in approved_detail.text
|
||||
assert "approve_candidate_graph" in approved_detail.text
|
||||
|
||||
approved_listing = client.get(
|
||||
f"/ui/repos/{repository_id}/elements",
|
||||
params={"scope": "approved", "type": "capabilities"},
|
||||
)
|
||||
assert approved_listing.status_code == 200
|
||||
assert "Approved Capabilities" in approved_listing.text
|
||||
assert "Expose Repository Interface" in approved_listing.text
|
||||
|
||||
candidate_listing = client.get(
|
||||
f"/ui/repos/{repository_id}/elements",
|
||||
params={
|
||||
"scope": "candidate",
|
||||
"analysis_run_id": first_run_id,
|
||||
"type": "features",
|
||||
},
|
||||
)
|
||||
assert candidate_listing.status_code == 200
|
||||
assert "Candidate Features" in candidate_listing.text
|
||||
assert "GET /status" in candidate_listing.text
|
||||
|
||||
fact_listing = client.get(
|
||||
f"/ui/repos/{repository_id}/elements",
|
||||
params={
|
||||
"scope": "facts",
|
||||
"analysis_run_id": first_run_id,
|
||||
"type": "facts",
|
||||
},
|
||||
)
|
||||
assert fact_listing.status_code == 200
|
||||
assert "Observed Facts" in fact_listing.text
|
||||
assert "python route decorator" in fact_listing.text
|
||||
|
||||
(source / "app.py").write_text(
|
||||
"from fastapi import FastAPI\n"
|
||||
"app = FastAPI()\n"
|
||||
|
||||
Reference in New Issue
Block a user