Skip to content

Commit 583a6dc

Browse files
committed
test: 更新单元测试
1 parent b4aa730 commit 583a6dc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/UnitTest/Components/CollapseTest.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public void Collapse_Ok()
3333
}
3434

3535
[Fact]
36-
public void Accordion_Ok()
36+
public async Task Accordion_Ok()
3737
{
3838
var cut = Context.RenderComponent<Collapse>(pb =>
3939
{
@@ -53,8 +53,11 @@ public void Accordion_Ok()
5353
});
5454
cut.Contains("is-accordion");
5555

56-
var btn = cut.Find(".accordion-button");
57-
cut.InvokeAsync(() => btn.Click());
56+
var buttons = cut.FindAll(".accordion-button");
57+
await cut.InvokeAsync(() => buttons[0].Click());
58+
59+
buttons = cut.FindAll(".accordion-button");
60+
await cut.InvokeAsync(() => buttons[1].Click());
5861
}
5962

6063
[Fact]

0 commit comments

Comments
 (0)