Add missing test

This commit is contained in:
Steve Sanderson 2017-12-06 16:01:13 +00:00
parent 5aaed3d75a
commit 2c6156a149
1 changed files with 11 additions and 0 deletions

View File

@ -45,6 +45,17 @@ namespace Microsoft.Blazor.E2ETest.Tests
Assert.Equal("TestTestTestTestTest", GetValue(Browser, "repeatStringResult"));
}
[Fact]
public void CanTriggerException()
{
Navigate("/", noReload: true);
SetValue(Browser, "triggerExceptionMessage", "Hello from test");
Browser.FindElement(By.CssSelector("#triggerException button")).Click();
Assert.Contains("Hello from test", GetValue(Browser, "triggerExceptionMessageStackTrace"));
}
private static string GetValue(IWebDriver webDriver, string elementId)
{
var element = webDriver.FindElement(By.Id(elementId));