fix(theme): correct sticky rail selector, harden bool attrs/tests, doc LoginCard security contract
- layout.css: fix @media sticky selector from #sidebar-collapse → #theme-rail (Fix 1) - NavRailTests/CommonControlsTests: add TDD tests verifying Blazor omits false bool attrs (Fix 2) - TechButton: rename Extra → AdditionalAttributes, move @attributes splat first (Fix 3) - LoginCard: add security contract XML/comment docs on ReturnUrl and ChildContent (Fix 4) - build/pack.sh, push.sh: fix comment from ZB.MOM.WW.Auth → ZB.MOM.WW.Theme (Fix 5)
This commit is contained in:
@@ -27,6 +27,13 @@ public class CommonControlsTests : TestContext
|
||||
Assert.Equal("save", btn.GetAttribute("id"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TechButton_not_busy_is_not_disabled()
|
||||
{
|
||||
var cut = RenderComponent<TechButton>(p => p.Add(x => x.Busy, false).AddChildContent("Go"));
|
||||
Assert.False(cut.Find("button").HasAttribute("disabled"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TechCard_renders_title_and_body()
|
||||
{
|
||||
|
||||
@@ -24,4 +24,13 @@ public class NavRailTests : TestContext
|
||||
Assert.Contains("Navigation", cut.Find("summary").TextContent);
|
||||
Assert.NotNull(cut.Find(".rail-section-body .rail-link"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void NavRailSection_collapsed_when_not_expanded()
|
||||
{
|
||||
var cut = RenderComponent<NavRailSection>(p => p
|
||||
.Add(x => x.Title, "Nav").Add(x => x.Expanded, false)
|
||||
.AddChildContent("<a class='rail-link'>X</a>"));
|
||||
Assert.False(cut.Find("details.rail-section").HasAttribute("open"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user