Skip to content

Commit ff68ad3

Browse files
committed
test: 增加单元测试
1 parent 0ab572a commit ff68ad3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/UnitTest/Components/ScrollTest.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,17 @@ public void ChildContent_Ok()
5959

6060
Assert.Contains("I am scroll", cut.Markup);
6161
}
62+
63+
[Fact]
64+
public async Task ScrollToBottom_Ok()
65+
{
66+
var cut = Context.RenderComponent<Scroll>(builder => builder.Add(a => a.ChildContent, r =>
67+
{
68+
r.OpenElement(0, "div");
69+
r.AddContent(1, "I am scroll");
70+
r.CloseComponent();
71+
}));
72+
73+
await cut.InvokeAsync(() => cut.Instance.ScrollToBottom());
74+
}
6275
}

0 commit comments

Comments
 (0)