mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Fix default payment bug (#2975)
* Fix default payment bug This attempts to fix the default payment bug described in #2963. Update to complete #2986 This takes into account #2986 and @NicolasDorier 's suggestion to add a default payment type as an empty (valueless) option that is selected by default. * Fix tests Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
This commit is contained in:
@@ -21,6 +21,7 @@ using OpenQA.Selenium;
|
||||
using OpenQA.Selenium.Chrome;
|
||||
using OpenQA.Selenium.Support.Extensions;
|
||||
using Xunit;
|
||||
using OpenQA.Selenium.Support.UI;
|
||||
|
||||
namespace BTCPayServer.Tests
|
||||
{
|
||||
@@ -352,7 +353,7 @@ namespace BTCPayServer.Tests
|
||||
decimal? amount = 100,
|
||||
string currency = "USD",
|
||||
string refundEmail = "",
|
||||
string defaultPaymentMethod = "BTC"
|
||||
string defaultPaymentMethod = null
|
||||
)
|
||||
{
|
||||
GoToInvoices();
|
||||
@@ -364,7 +365,8 @@ 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);
|
||||
if (defaultPaymentMethod is string)
|
||||
new SelectElement(Driver.FindElement(By.Name("DefaultPaymentMethod"))).SelectByValue(defaultPaymentMethod);
|
||||
Driver.FindElement(By.Id("Create")).Click();
|
||||
|
||||
var statusElement = FindAlertMessage();
|
||||
|
||||
Reference in New Issue
Block a user