Fix AssertNoError to detect page exception

This commit is contained in:
nicolas.dorier 2022-01-16 12:38:47 +09:00
parent d1f567eade
commit 961769ebd0
No known key found for this signature in database
GPG key ID: 6618763EF09186FE
2 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,8 @@ namespace BTCPayServer.Tests
foreach (var dangerAlert in driver.FindElements(By.ClassName("alert-danger")))
Assert.False(dangerAlert.Displayed, $"No alert should be displayed, but found this on {driver.Url}: {dangerAlert.Text}");
}
Assert.DoesNotContain("ErrorPage", driver.PageSource);
Assert.DoesNotContain("errors", driver.Url);
Assert.DoesNotContain("Error", driver.Title, StringComparison.OrdinalIgnoreCase);
}
public static T AssertViewModel<T>(this IActionResult result)

View file

@ -13,8 +13,7 @@
</div>
<center>
@*Marker for tests*@
<hr id="ErrorPage" class="primary" />
<hr class="primary" />
</center>
<p class="lead text-center">