1
0
Fork 0
Code Issues Pull requests Projects Releases 2 Packages Wiki Activity Actions Pages

Fix graph node activation

This commit is contained in:
Andraxion 2026-07-24 21:14:30 -04:00
parent 4c82e1643d
commit 8ac4fe2a67
13 changed files with 65 additions and 21 deletions

View file

@ -88,7 +88,7 @@ class DocForgeMcpTests(unittest.IsolatedAsyncioTestCase):
visualization = results[11].structuredContent["visualization"]
self.assertTrue(visualization["read_only"])
self.assertTrue(visualization["project_bound"])
self.assertEqual("graph-browser@3", visualization["template"])
self.assertEqual("graph-browser@4", visualization["template"])
self.assertTrue(visualization["url"].startswith("http://127.0.0.1:"))
context = results[8].structuredContent
self.assertLessEqual(context["estimated_tokens"], 180)

View file

@ -103,11 +103,20 @@ class VisualizationTests(unittest.TestCase):
self.assertIn('id="reset-view"', html)
self.assertIn('id="node-dialog"', html)
self.assertIn('id="explore-node"', html)
self.assertIn(".empty[hidden] { display: none; }", html)
self.assertIn('addEventListener("wheel"', html)
self.assertIn('addEventListener("pointermove"', html)
self.assertIn("inspectNode(node.node_id)", html)
self.assertIn('dialog.showModal()', html)
self.assertIn("dialog.showModal()", html)
self.assertIn("await loadNode(nodeId)", html)
pointerdown = html.split('$("graph").addEventListener("pointerdown"', 1)[1].split(
'$("graph").addEventListener("pointermove"', 1
)[0]
pointermove = html.split('$("graph").addEventListener("pointermove"', 1)[1].split(
"function endPan", 1
)[0]
self.assertNotIn("setPointerCapture", pointerdown)
self.assertIn("setPointerCapture", pointermove)
self.assertIn("left-drag to pan", html)
self.assertIn("default-src 'none'", headers["Content-Security-Policy"])
self.assertEqual("no-store", headers["Cache-Control"])