Add tests

This commit is contained in:
Umar Bolatov
2021-08-31 20:21:44 -07:00
committed by Andrew Camilleri
parent 5cba59932b
commit b2f9353be1
3 changed files with 56 additions and 1 deletions

View File

@@ -332,7 +332,13 @@ namespace BTCPayServer.Tests
Driver.Navigate().GoToUrl(new Uri(Server.PayTester.ServerUri, "/login"));
}
public string CreateInvoice(string storeName, decimal? amount = 100, string currency = "USD", string refundEmail = "")
public string CreateInvoice(
string storeName,
decimal? amount = 100,
string currency = "USD",
string refundEmail = "",
string defaultPaymentMethod = "BTC"
)
{
GoToInvoices();
Driver.FindElement(By.Id("CreateNewInvoice")).Click();
@@ -343,6 +349,7 @@ namespace BTCPayServer.Tests
currencyEl.SendKeys(currency);
Driver.FindElement(By.Id("BuyerEmail")).SendKeys(refundEmail);
Driver.FindElement(By.Name("StoreId")).SendKeys(storeName);
Driver.FindElement(By.Name("DefaultPaymentMethod")).SendKeys(defaultPaymentMethod);
Driver.FindElement(By.Id("Create")).Click();
var statusElement = FindAlertMessage();