mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
Fix tests
This commit is contained in:
parent
127afdb5c1
commit
223c71ce8b
@ -427,6 +427,7 @@ namespace BTCPayServer.Tests
|
||||
{
|
||||
if (storeId is null)
|
||||
{
|
||||
var aaa = this.Driver.PageSource;
|
||||
this.Driver.FindElement(By.Id("StoreNav-Invoices")).Click();
|
||||
}
|
||||
else
|
||||
|
@ -150,8 +150,8 @@ namespace BTCPayServer.Tests
|
||||
s.Driver.AssertNoError();
|
||||
Assert.Contains("/login", s.Driver.Url);
|
||||
|
||||
s.GoToUrl("/invoices");
|
||||
Assert.Contains("ReturnUrl=%2Finvoices", s.Driver.Url);
|
||||
s.GoToUrl("/Manage/Index");
|
||||
Assert.Contains("ReturnUrl=%2FManage%2FIndex", s.Driver.Url);
|
||||
|
||||
// We should be redirected to login
|
||||
//Same User Can Log Back In
|
||||
@ -160,7 +160,7 @@ namespace BTCPayServer.Tests
|
||||
s.Driver.FindElement(By.Id("LoginButton")).Click();
|
||||
|
||||
// We should be redirected to invoice
|
||||
Assert.EndsWith("/invoices", s.Driver.Url);
|
||||
Assert.EndsWith("/Manage/Index", s.Driver.Url);
|
||||
|
||||
// Should not be able to reach server settings
|
||||
s.GoToUrl("/server/users");
|
||||
|
@ -746,7 +746,7 @@ namespace BTCPayServer.Controllers
|
||||
|
||||
[HttpGet("/stores/{storeId}/invoices")]
|
||||
[HttpGet("invoices")]
|
||||
[Authorize(AuthenticationSchemes = AuthenticationSchemes.Cookie)]
|
||||
[Authorize(AuthenticationSchemes = AuthenticationSchemes.Cookie, Policy = Policies.CanViewInvoices)]
|
||||
[BitpayAPIConstraint(false)]
|
||||
public async Task<IActionResult> ListInvoices(InvoicesModel? model = null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user