svrnty-hermes-webui-plugin/tests/unit/test_brand_skin.py
Svrnty 4ad595506a
Some checks failed
plugin-tests / test (push) Failing after 5s
upstream-drift / drift (push) Failing after 5s
Validate umbrella graph WebUI proof
2026-05-25 12:57:39 -04:00

31 lines
982 B
Python

"""Assert the brand-skin assets are present + wired (P3.B, minimal feature test)."""
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
STATIC = ROOT / "static"
def test_brand_css_present():
assert (STATIC / "app.css").is_file()
def test_brand_js_present():
assert (STATIC / "app.js").is_file()
def test_montserrat_fonts_present():
fonts = list((STATIC / "fonts").glob("montserrat-*.woff2"))
assert len(fonts) >= 4, f"expected ≥4 Montserrat weights, got {len(fonts)}"
def test_plugin_registers_static_and_injects_assets():
"""plugin.register() must call register_static + inject_stylesheet + inject_script."""
from unittest.mock import MagicMock
import plugin as plg
api = MagicMock()
api.logger.return_value = MagicMock()
plg.register(api)
api.register_static.assert_called()
api.inject_stylesheet.assert_any_call("/plugins/svrnty/app.css")
api.inject_script.assert_any_call("/plugins/svrnty/app.js")