Skip to content

Commit d0a3d50

Browse files
committed
Defensive wait in test
1 parent 06a7208 commit d0a3d50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/LinkDotNet.Blog.IntegrationTests/Web/Features/Archive/ArchivePageTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public async Task ShouldDisplayAllBlogPosts()
2121

2222
var cut = ctx.RenderComponent<ArchivePage>();
2323

24-
cut.WaitForElements("h2");
24+
cut.WaitForState(() => cut.FindAll("h2").Count == 2);
2525
var yearHeader = cut.FindAll("h2");
2626
yearHeader.Should().HaveCount(2);
2727
yearHeader[0].TextContent.Should().Be("2022");

0 commit comments

Comments
 (0)