18 lines
577 B
Python
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
|