23 lines
743 B
C#
23 lines
743 B
C#
namespace ZB.MOM.WW.Theme.Tests;
|
|
|
|
public class BrandBarTests : TestContext
|
|
{
|
|
[Fact]
|
|
public void Renders_product_with_default_mark()
|
|
{
|
|
var cut = RenderComponent<BrandBar>(p => p.Add(x => x.Product, "OtOpcUa"));
|
|
Assert.Contains("OtOpcUa", cut.Markup);
|
|
Assert.NotNull(cut.Find(".brand .mark")); // default glyph when no Logo
|
|
}
|
|
|
|
[Fact]
|
|
public void Custom_logo_replaces_default_mark()
|
|
{
|
|
var cut = RenderComponent<BrandBar>(p => p
|
|
.Add(x => x.Product, "ScadaBridge")
|
|
.Add(x => x.Logo, (RenderFragment)(b => b.AddMarkupContent(0, "<img class='logo'/>"))));
|
|
Assert.NotNull(cut.Find(".brand .logo"));
|
|
Assert.Empty(cut.FindAll(".brand .mark"));
|
|
}
|
|
}
|