From 2c6156a149bb7ef0e6f9ea6c68ead7b0c8145340 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Wed, 6 Dec 2017 16:01:13 +0000 Subject: [PATCH] Add missing test --- test/Microsoft.Blazor.E2ETest/Tests/MonoSanityTest.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/Microsoft.Blazor.E2ETest/Tests/MonoSanityTest.cs b/test/Microsoft.Blazor.E2ETest/Tests/MonoSanityTest.cs index 90c7c7121e..7b52c973fa 100644 --- a/test/Microsoft.Blazor.E2ETest/Tests/MonoSanityTest.cs +++ b/test/Microsoft.Blazor.E2ETest/Tests/MonoSanityTest.cs @@ -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));