diff --git a/tests/test_content.py b/tests/test_content.py index 070e2be..e0f3eb7 100644 --- a/tests/test_content.py +++ b/tests/test_content.py @@ -268,3 +268,24 @@ def test_search_verification_meta(client, monkeypatch): for b in (seo, home): assert '' in b assert '' in b + + +# The brand lockup is the site-wide "go home" affordance. The static tool pages +# and the Jinja pages build their headers separately, so this is easy to add to +# one and forget on the other — assert every page carries it. +BRAND_PAGES = ["/", "/calendar", "/day", "/compare", "/legend", "/alerts", + "/about", "/privacy", "/climate", "/glossary"] + + +@pytest.mark.parametrize("path", BRAND_PAGES) +def test_brand_lockup_links_home(client, path): + html = client.get(f"{B}{path}").text + brand = html.split('
', 1)[1].split("", 1)[0] + head = brand.split("")[0] if "")[0] + # The link must wrap the whole lockup, so clicking the mark works too, not + # just the word. + assert "