fix tests

This commit is contained in:
nicolas.dorier 2022-01-07 21:12:31 +09:00
parent 0d657fc646
commit 84bd8a6e98
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE
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")))
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("Page not found</h", driver.PageSource);
Assert.DoesNotContain("ErrorPage", driver.PageSource);
}
public static T AssertViewModel<T>(this IActionResult result)

View File

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

View File

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

View File

@ -1,4 +1,4 @@
@inject BTCPayServer.Services.BTCPayServerEnvironment env
@inject BTCPayServer.Services.BTCPayServerEnvironment env
@{
Layout = null;
}
@ -10,7 +10,7 @@
</head>
<body>
<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="container">
@RenderBody()