using Bunit; using Marathon.UI; using Marathon.UI.Tests.Support; namespace Marathon.UI.Tests; public sealed class MainLayoutTests : MarathonTestContext { [Fact] public void Renders_brand_and_navigation() { var cut = RenderComponent(p => p.Add(layout => layout.Body, b => b.AddMarkupContent(0, "

child

"))); // Brand wordmark surfaces from AppBrand.razor → key "App.BrandMark". cut.Markup.Should().Contain("App.BrandMark"); // Navigation labels appear in the drawer. cut.Markup.Should().Contain("Nav.Dashboard"); cut.Markup.Should().Contain("Nav.Settings"); // Body slot renders. cut.Find("[data-test=slot]").TextContent.Should().Be("child"); } [Fact] public async Task Switches_data_theme_when_dark_mode_toggled() { var cut = RenderComponent(); cut.Find(".m-app-frame").GetAttribute("data-theme").Should().Be("light"); await cut.InvokeAsync(() => Theme.Toggle()); cut.Find(".m-app-frame").GetAttribute("data-theme").Should().Be("dark"); } }