Skip to content

Commit 911c5da

Browse files
committed
test: 增加单元测试
1 parent d69cdc5 commit 911c5da

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/UnitTest/Components/AutoCompleteTest.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ public void Value_Ok()
5454
Assert.Equal(2, menus.Count);
5555
}
5656

57+
[Fact]
58+
public void IsClearable_Ok()
59+
{
60+
var cut = Context.RenderComponent<AutoComplete>();
61+
Assert.DoesNotContain("clear-icon", cut.Markup);
62+
63+
cut.SetParametersAndRender(pb => pb.Add(a => a.IsClearable, true));
64+
cut.Contains("clear-icon");
65+
}
66+
5767
[Fact]
5868
public void Debounce_Ok()
5969
{

0 commit comments

Comments
 (0)