"""The header wears the design's wordmark (task 23). The design's answer to "what is the bench logo" is that there isn't a drawn one: the word *is* the logo — "bench", lowercase, set in Zilla Slab SemiBold and tracked -.015em, with the b lifted out of the same face as the icon. The board cannot fetch that face (the page adds no network requests for a logo), so the mark ships as outlines instead, and the b's outline is reused verbatim as the tab icon. board.html has no frontend test runner, so this is checked the way task 22's browser half is: as source-level invariants — the ones that, if broken, would put the mark back on a font, bake a colour into it, let the two copies of the b drift apart, or shove the header's neighbours around. python3 -m unittest discover -s tests -v """ from __future__ import annotations import re import unittest from pathlib import Path REPO = Path(__file__).resolve().parents[1] BOARD = REPO / "manager" / "core" / "board.html" # What the page was already allowed to fetch before the logo landed. The list # is the point: a logo that needed a font would have to grow it. KNOWN_EXTERNALS = { "https://fonts.googleapis.com", "https://fonts.gstatic.com", "https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500" "&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap", } # Colour only ever means state, so none of these may appear in the mark. STATE_TOKENS = ("var(--accent)", "var(--calm)", "var(--alarm)", "var(--idle)") class Fixture(unittest.TestCase): @classmethod def setUpClass(cls): cls.html = BOARD.read_text(encoding="utf-8") def mark(self) -> str: """The inline wordmark, markup and all.""" found = re.search(r'', self.html, re.DOTALL) self.assertIsNotNone(found, "board.html lost the inline wordmark") return found.group(0) def icon_href(self) -> str: found = re.search(r'