23 lines
706 B
Python
23 lines
706 B
Python
"""Snapshot of the shared design tokens extracted from the donor UIs."""
|
|
|
|
import re
|
|
from pathlib import Path
|
|
|
|
REPO = Path(__file__).resolve().parents[2]
|
|
TOKENS = REPO / "frontend" / "css" / "tokens.css"
|
|
|
|
EXPECTED = {
|
|
"--bg", "--surface", "--surface-2", "--border", "--text", "--muted",
|
|
"--accent", "--danger", "--ok", "--warn", "--radius",
|
|
}
|
|
|
|
|
|
def test_token_set_matches_snapshot():
|
|
names = set(re.findall(r"(--[a-z0-9-]+):", TOKENS.read_text()))
|
|
assert names == EXPECTED # changing tokens is intentional; update this snapshot
|
|
|
|
|
|
def test_app_css_imports_the_shared_tokens():
|
|
app_css = (REPO / "frontend" / "css" / "app.css").read_text()
|
|
assert '@import "./tokens.css";' in app_css
|