Remove payment methods not currently configured when creating invoice (#3394)

* Add error message when wallet is not configured

* Adjust payment methods based on available ones

* Disable "Create invoice" page if there is an error

* Add test

* update HasErrorMessage

* Add method for checking if payment methods are available

* small pr fixes

Co-authored-by: Kukks <evilkukka@gmail.com>
This commit is contained in:
Umar Bolatov
2022-02-17 01:22:09 -08:00
committed by GitHub
parent 9a3a7a3444
commit a3b748ffe3
4 changed files with 38 additions and 6 deletions

View File

@@ -386,6 +386,10 @@ namespace BTCPayServer.Tests
await s.StartAsync();
s.RegisterNewUser(true);
s.CreateNewStore();
s.GoToInvoices();
s.Driver.FindElement(By.Id("CreateNewInvoice")).Click();
// Should give us an error message if we try to create an invoice before adding a wallet
Assert.Contains("To create an invoice, you need to", s.Driver.PageSource);
s.AddDerivationScheme();
s.GoToInvoices();
s.CreateInvoice();