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
This commit is contained in:
parent
b2fe5dd4b1
commit
c0c0a26000
|
|
@ -46,7 +46,8 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests
|
|||
public void CanRenderTextOnlyComponent()
|
||||
{
|
||||
var appElement = Browser.MountTestComponent<TextOnlyComponent>();
|
||||
Assert.Equal("Hello from TextOnlyComponent", appElement.Text);
|
||||
|
||||
Browser.Exists(By.XPath("//*[contains(., 'Hello from TextOnlyComponent')]"));
|
||||
}
|
||||
|
||||
// This verifies that we've correctly configured the Razor language version via MSBuild.
|
||||
|
|
|
|||
Loading…
Reference in New Issue