fix tests

This commit is contained in:
nicolas.dorier
2022-01-07 21:12:31 +09:00
parent 0d657fc646
commit 84bd8a6e98
4 changed files with 6 additions and 6 deletions

View File

@@ -33,8 +33,7 @@ namespace BTCPayServer.Tests
foreach (var dangerAlert in driver.FindElements(By.ClassName("alert-danger"))) 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.False(dangerAlert.Displayed, $"No alert should be displayed, but found this on {driver.Url}: {dangerAlert.Text}");
} }
Assert.DoesNotContain("- Denied</h", driver.PageSource); Assert.DoesNotContain("ErrorPage", driver.PageSource);
Assert.DoesNotContain("Page not found</h", driver.PageSource);
} }
public static T AssertViewModel<T>(this IActionResult result) public static T AssertViewModel<T>(this IActionResult result)

View File

@@ -327,7 +327,7 @@ namespace BTCPayServer.Tests
internal void AssertAccessDenied() internal void AssertAccessDenied()
{ {
Assert.DoesNotContain("- Denied</h", Driver.PageSource); Assert.Contains("- Denied</h", Driver.PageSource);
} }
public void GoToHome() public void GoToHome()

View File

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

View File

@@ -1,4 +1,4 @@
@inject BTCPayServer.Services.BTCPayServerEnvironment env @inject BTCPayServer.Services.BTCPayServerEnvironment env
@{ @{
Layout = null; Layout = null;
} }
@@ -10,7 +10,7 @@
</head> </head>
<body> <body>
<section class="content-wrapper"> <section class="content-wrapper">
<!-- Dummy navbar-brand, hackish way to keep test AssertNoError passing --> @*Dummy navbar-brand, hackish way to keep test AssertNoError passing*@
<div class="navbar-brand d-none"></div> <div class="navbar-brand d-none"></div>
<div class="container"> <div class="container">
@RenderBody() @RenderBody()