refactor(ui): unify semantic presentation and table hierarchy

This commit is contained in:
Joseph Doherty
2026-11-13 19:06:18 -05:00
parent 2d30323ae8
commit 0c41b613ac
97 changed files with 13829 additions and 167 deletions
@@ -150,6 +150,26 @@ public class TopologyPageTests : BunitContext
});
}
/// <summary>Every load state keeps one semantic page title.</summary>
[Theory]
[InlineData("loading")]
[InlineData("loaded")]
[InlineData("error")]
public async Task PageTitle_RemainsOneH1AcrossLoadStates(string state)
{
SeedRepos();
var pending = new TaskCompletionSource<IReadOnlyList<Site>>(TaskCreationOptions.RunContinuationsAsynchronously);
if (state == "loading") _siteRepo.GetAllSitesAsync().Returns(pending.Task);
if (state == "error") _siteRepo.GetAllSitesAsync().Returns(Task.FromException<IReadOnlyList<Site>>(new Exception("local failure")));
var cut = Render<TopologyPage>();
try
{
Assert.Single(cut.FindAll("h1"));
Assert.Equal("Topology", cut.Find("h1").TextContent.Trim());
}
finally { await cut.InvokeAsync(() => pending.TrySetResult([])); }
}
private IRenderedComponent<TopologyPage> RenderLoadedTopology()
{
var cut = Render<TopologyPage>();