Skip to content

Commit 60c94a4

Browse files
captainsafiaHaoK
authored andcommitted
Wait for component to mount before checking for output (#24451)
* Wait for component to mount before checking for output * Use Exists to check for element with timeout * Update ComponentRenderingTest.cs
1 parent ec22d3e commit 60c94a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Components/test/E2ETest/Tests/ComponentRenderingTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public void BasicTestAppCanBeServed()
4646
public void CanRenderTextOnlyComponent()
4747
{
4848
var appElement = Browser.MountTestComponent<TextOnlyComponent>();
49-
Assert.Equal("Hello from TextOnlyComponent", appElement.Text);
49+
50+
Browser.Exists(By.XPath("//*[contains(., 'Hello from TextOnlyComponent')]"));
5051
}
5152

5253
// This verifies that we've correctly configured the Razor language version via MSBuild.

0 commit comments

Comments
 (0)