From 97c864bf423d90712410cc0a47882aaec20d56ac Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 7 Oct 2026 14:56:58 -0400 Subject: [PATCH] test(dashboard): count Hosts header cells, not bare tags (#5214) Co-Authored-By: Claude Opus 5.5 --- tests/core/test_dashboard_defaults.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/core/test_dashboard_defaults.py b/tests/core/test_dashboard_defaults.py index 9a2cdb5..5f11fe3 100644 --- a/tests/core/test_dashboard_defaults.py +++ b/tests/core/test_dashboard_defaults.py @@ -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("") == 5 and ">ping<" not in page and "24h" not in page + assert len(re.findall(r"]", page)) == 5 and ">ping<" not in page and "24h" not in page assert not hex_colours(page), hex_colours(page)