generated from coulomb/repo-seed
Provide access to all scope files
This commit is contained in:
@@ -1209,6 +1209,10 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
"# UI Repo\nReports service status through API and CLI entry points.\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
(source / "SCOPE.md").write_text(
|
||||
"# SCOPE\n\n## One-liner\n\nUI Repo owns the status reporting scope.\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
(source / "requirements.txt").write_text("fastapi\n", encoding="utf-8")
|
||||
(source / "app.py").write_text(
|
||||
"from fastapi import FastAPI\n"
|
||||
@@ -1243,6 +1247,7 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
assert "Explore after registration" in index_response.text
|
||||
assert "Use LLM assistance if configured" in index_response.text
|
||||
assert "Trusted auto-populate after analysis" in index_response.text
|
||||
assert '<a href="/ui/scope">SCOPE</a>' not in index_response.text
|
||||
|
||||
create_response = client.post(
|
||||
"/ui/repos",
|
||||
@@ -1268,6 +1273,19 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
assert "Use LLM assistance if configured" in detail_response.text
|
||||
assert "Trusted auto-populate after analysis" in detail_response.text
|
||||
assert "Repository Metadata" in detail_response.text
|
||||
assert (
|
||||
f'<a class="button secondary" href="/ui/repos/{repository_id}/scope">SCOPE</a>'
|
||||
in detail_response.text
|
||||
)
|
||||
|
||||
repo_scope_response = client.get(f"/ui/repos/{repository_id}/scope")
|
||||
assert repo_scope_response.status_code == 200
|
||||
assert (
|
||||
f'<a class="header-context" href="/ui/repos/{repository_id}">UI Repo</a>'
|
||||
in repo_scope_response.text
|
||||
)
|
||||
assert "Canonical scope summary for the UI Repo repository." in repo_scope_response.text
|
||||
assert "UI Repo owns the status reporting scope." in repo_scope_response.text
|
||||
|
||||
edit_repository_response = client.post(
|
||||
f"{repository_path}/edit",
|
||||
@@ -1305,7 +1323,7 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
assert "1 abilities" in run_detail.text
|
||||
assert "2 capabilities" in run_detail.text
|
||||
assert "2 features" in run_detail.text
|
||||
assert "7 facts" in run_detail.text
|
||||
assert "8 facts" in run_detail.text
|
||||
assert "Content Chunks" in run_detail.text
|
||||
assert "README.md:1-2" in run_detail.text
|
||||
assert "ID " in run_detail.text
|
||||
@@ -1359,7 +1377,10 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
|
||||
approved_detail = client.get(approve_response.headers["location"])
|
||||
assert approved_detail.status_code == 200
|
||||
assert '<span class="header-context">UI Repo Edited</span>' in approved_detail.text
|
||||
assert (
|
||||
f'<a class="header-context" href="/ui/repos/{repository_id}">UI Repo Edited</a>'
|
||||
in approved_detail.text
|
||||
)
|
||||
assert "Approved Characteristics" in approved_detail.text
|
||||
assert "Approved Characteristic Tree" in approved_detail.text
|
||||
assert '<strong><a href="/ui/repos/1">UI Repo</a></strong>' in approved_detail.text
|
||||
@@ -1374,7 +1395,7 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
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 "8 candidate facts" in approved_detail.text
|
||||
assert "Use Approved Registry" in approved_detail.text
|
||||
assert "Search Profile" in approved_detail.text
|
||||
assert "Discovery" in approved_detail.text
|
||||
@@ -1387,7 +1408,10 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
params={"scope": "all", "type": "scopes", "entry_filter": "approved"},
|
||||
)
|
||||
assert scope_listing.status_code == 200
|
||||
assert '<span class="header-context">UI Repo Edited</span>' in scope_listing.text
|
||||
assert (
|
||||
f'<a class="header-context" href="/ui/repos/{repository_id}">UI Repo Edited</a>'
|
||||
in scope_listing.text
|
||||
)
|
||||
assert f'<a href="/ui/repos/{repository_id}">UI Repo</a>' in scope_listing.text
|
||||
assert (
|
||||
f"/ui/repos/{repository_id}/elements?scope=all&entry_filter=approved&type=abilities"
|
||||
@@ -1521,7 +1545,7 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
},
|
||||
)
|
||||
assert filtered_fact_listing.status_code == 200
|
||||
assert "1 of 7 shown" in filtered_fact_listing.text
|
||||
assert "1 of 8 shown" in filtered_fact_listing.text
|
||||
assert "FastAPI" in filtered_fact_listing.text
|
||||
assert "python route decorator" not in filtered_fact_listing.text
|
||||
|
||||
|
||||
Reference in New Issue
Block a user