MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / test_toggle_control_and_persistence

Function test_toggle_control_and_persistence

tests/test_html_theme.py:66–74  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

64
65
66def test_toggle_control_and_persistence(tmp_path):
67 html = _render(tmp_path)
68 for choice in ("light", "dark", "system"):
69 assert f'data-theme-choice="{choice}"' in html
70 assert "graphify-theme" in html
71 assert "try { pref = localStorage.getItem('graphify-theme'); } catch (e) {}" in html
72 assert "try { localStorage.setItem(THEME_KEY, pref); } catch (e) {}" in html
73 assert "prefers-color-scheme: light" in html
74 assert "addEventListener('change'" in html
75
76
77def test_theme_applied_in_head_before_first_paint(tmp_path):

Callers

nothing calls this directly

Calls 1

_renderFunction · 0.85

Tested by

no test coverage detected