mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
fix tests
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
@@ -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">
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user