generated from coulomb/repo-seed
Complete graph explorer projection
This commit is contained in:
@@ -6,6 +6,7 @@ import urllib.request
|
||||
from http.server import ThreadingHTTPServer
|
||||
from pathlib import Path
|
||||
|
||||
from railiance_fabric.cli import main as cli_main
|
||||
from railiance_fabric.graph import build_graph
|
||||
from railiance_fabric.graph_explorer import (
|
||||
fabric_graph_explorer_manifest,
|
||||
@@ -47,7 +48,22 @@ def test_graph_explorer_manifest_and_payload_validate() -> None:
|
||||
assert registered_only["data"]["reviewState"] == "candidate"
|
||||
assert registered_only["data"]["unresolved"] is True
|
||||
assert any(edge["data"]["edgeType"] == "declares" for edge in edges)
|
||||
assert any(node["data"]["sourceReferences"] for node in nodes if node["data"]["kind"] != "Repository")
|
||||
assert payload["metrics"]["registered_repo_count"] == 2
|
||||
assert payload["metrics"]["unresolved_count"] == 0
|
||||
|
||||
|
||||
def test_cli_exports_graph_explorer_payload(capsys) -> None:
|
||||
assert cli_main(["export", "--format", "graph-explorer"]) == 0
|
||||
payload = json.loads(capsys.readouterr().out)
|
||||
|
||||
_validate_schema("graph-explorer-payload.schema.yaml", payload)
|
||||
assert payload["kind"] == "GraphExplorerPayload"
|
||||
assert any(
|
||||
element["data"].get("sourceReferences")
|
||||
for element in payload["elements"]
|
||||
if "source" not in element["data"]
|
||||
)
|
||||
|
||||
|
||||
def test_graph_explorer_payload_accepts_repo_scoping_shape() -> None:
|
||||
|
||||
Reference in New Issue
Block a user