generated from coulomb/repo-seed
Classification for abilities, capabilities, features and filters for list view
This commit is contained in:
@@ -1202,8 +1202,25 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
)
|
||||
assert candidate_listing.status_code == 200
|
||||
assert "Candidate Features" in candidate_listing.text
|
||||
assert "Search" in candidate_listing.text
|
||||
assert "Class" in candidate_listing.text
|
||||
assert "GET /status" in candidate_listing.text
|
||||
|
||||
filtered_candidate_listing = client.get(
|
||||
f"/ui/repos/{repository_id}/elements",
|
||||
params={
|
||||
"scope": "candidate",
|
||||
"analysis_run_id": first_run_id,
|
||||
"type": "features",
|
||||
"q": "status",
|
||||
"class_filter": "API",
|
||||
},
|
||||
)
|
||||
assert filtered_candidate_listing.status_code == 200
|
||||
assert "1 of 2 shown" in filtered_candidate_listing.text
|
||||
assert "GET /status" in filtered_candidate_listing.text
|
||||
assert "CLI command status" not in filtered_candidate_listing.text
|
||||
|
||||
fact_listing = client.get(
|
||||
f"/ui/repos/{repository_id}/elements",
|
||||
params={
|
||||
@@ -1216,6 +1233,20 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
assert "Observed Facts" in fact_listing.text
|
||||
assert "python route decorator" in fact_listing.text
|
||||
|
||||
filtered_fact_listing = client.get(
|
||||
f"/ui/repos/{repository_id}/elements",
|
||||
params={
|
||||
"scope": "facts",
|
||||
"analysis_run_id": first_run_id,
|
||||
"type": "facts",
|
||||
"class_filter": "framework",
|
||||
},
|
||||
)
|
||||
assert filtered_fact_listing.status_code == 200
|
||||
assert "1 of 7 shown" in filtered_fact_listing.text
|
||||
assert "FastAPI" in filtered_fact_listing.text
|
||||
assert "python route decorator" not in filtered_fact_listing.text
|
||||
|
||||
(source / "app.py").write_text(
|
||||
"from fastapi import FastAPI\n"
|
||||
"app = FastAPI()\n"
|
||||
|
||||
Reference in New Issue
Block a user