test(dashboard): count Hosts header cells, not bare <th> tags (#5214)
CI / lint (push) Successful in 3s
CI / integration (push) Successful in 57s
CI / unit (push) Successful in 1m24s
CI / publish (push) Successful in 1m58s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 14:56:58 -04:00
co-authored by Claude Opus 5.5
parent 8eedae365b
commit 97c864bf42
+2 -1
View File
@@ -1,5 +1,6 @@
"""The dashboard starts from a curated layout, the duplicate widgets are gone,
and the Overview says what each number counts (#5213)."""
import re
from datetime import datetime, timedelta, timezone
from types import SimpleNamespace
@@ -127,7 +128,7 @@ async def test_the_hosts_widget_gives_a_verdict_and_load_against_cores(app):
assert page.index("VDNT-Util01") < page.index("VDNT-Docker02")
assert "16.8 / 8 cores" in page and "0.9 / 4 cores" in page
assert "agent last reported" in page
assert page.count("<th>") == 5 and ">ping<" not in page and "24h" not in page
assert len(re.findall(r"<th[ >]", page)) == 5 and ">ping<" not in page and "24h" not in page
assert not hex_colours(page), hex_colours(page)