Skip to content

Commit 22eb0fc

Browse files
committed
test: 更新单元测试
1 parent f997414 commit 22eb0fc

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/UnitTest/Components/TabTest.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,29 @@ public void ToolbarTemplate_Ok()
4949
cut.Contains("test-toolbar-template");
5050
}
5151

52+
[Fact]
53+
public void ToolbarTooltipText_Ok()
54+
{
55+
var cut = Context.RenderComponent<Tab>(pb =>
56+
{
57+
pb.AddChildContent<TabItem>(pb =>
58+
{
59+
pb.Add(a => a.Text, "Tab1");
60+
pb.Add(a => a.Url, "/Index");
61+
pb.Add(a => a.Closable, true);
62+
pb.Add(a => a.Icon, "fa-solid fa-font-awesome");
63+
pb.Add(a => a.ChildContent, "Tab1-Content");
64+
});
65+
pb.Add(a => a.ShowToolbar, true);
66+
pb.Add(a => a.RefreshToolbarButtonIcon, "test-refresh-icon");
67+
pb.Add(a => a.RefreshToolbarTooltipText, "test-refresh-tooltip-text");
68+
pb.Add(a => a.FullscreenToolbarButtonIcon, "test-fullscreen-icon");
69+
pb.Add(a => a.FullscreenToolbarTooltipText, "test-fullscreen-tooltip-text");
70+
});
71+
cut.Contains("test-refresh-icon");
72+
cut.Contains("test-refresh-tooltip-text");
73+
}
74+
5275
[Fact]
5376
public void TabItem_Ok()
5477
{

0 commit comments

Comments
 (0)