svrnty-hermes-webui-plugin/tests/unit/test_svrnty_nav_js.py
Svrnty 4b1f2075ae
Some checks failed
plugin-tests / test (push) Failing after 5s
Add Project Graph nav link
2026-05-26 05:26:15 -04:00

18 lines
577 B
Python

"""Static checks for the Svrnty sidebar navigation injection."""
from pathlib import Path
NAV_JS = Path(__file__).resolve().parents[2] / "static" / "svrnty_nav.js"
def test_project_graph_nav_opens_umbrella_page_in_new_tab():
src = NAV_JS.read_text()
assert "Project Graph" in src
assert "/plugins/svrnty/umbrella.html" in src
assert 'window.open(t.href, "_blank", "noopener,noreferrer")' in src
def test_project_graph_does_not_participate_in_panel_switching():
src = NAV_JS.read_text()
assert "TABS.filter((t) => !t.href).map((t) => t.id)" in src