refactor(kpi): K13/K15 trend review fixups — per-metric isolation, disable-during-load + logging, loading-flag finally, test coverage

This commit is contained in:
Joseph Doherty
2026-06-17 20:44:34 -04:00
parent 7d7c6cbb05
commit eb4bce3e49
7 changed files with 151 additions and 55 deletions
@@ -237,10 +237,13 @@ public class HealthPageTests : BunitContext
Assert.Contains("data-test=\"site-health-trends\"", cut.Markup);
Assert.Contains("data-test=\"site-health-trends-site\"", cut.Markup);
// The four metric charts render (the shared KpiTrendChart slug hook),
// and the seeded non-empty series draws a polyline.
// and the seeded non-empty series draws a polyline. The "S&F Buffer
// Depth" title slugifies to "s-f-buffer-depth" (the & and the spaces
// each collapse to a dash) — see KpiTrendChart.Slugify.
Assert.Contains("kpi-trend-connections-down", cut.Markup);
Assert.Contains("kpi-trend-dead-letters", cut.Markup);
Assert.Contains("kpi-trend-script-errors", cut.Markup);
Assert.Contains("kpi-trend-s-f-buffer-depth", cut.Markup);
Assert.Contains("<polyline", cut.Markup);
});
}