From 22657b66d788e46abff5ebd8b89e172b4dbd8835 Mon Sep 17 00:00:00 2001 From: d11n Date: Tue, 28 Mar 2023 12:36:32 +0200 Subject: [PATCH] NFC finetuning (#4822) --- BTCPayServer.Tests/Checkoutv2Tests.cs | 7 ------- .../Views/Shared/NFC/CheckoutEnd.cshtml | 21 +++++++++++-------- .../Views/UIInvoice/CheckoutV2.cshtml | 2 +- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/BTCPayServer.Tests/Checkoutv2Tests.cs b/BTCPayServer.Tests/Checkoutv2Tests.cs index feda6daac..93f57b177 100644 --- a/BTCPayServer.Tests/Checkoutv2Tests.cs +++ b/BTCPayServer.Tests/Checkoutv2Tests.cs @@ -71,7 +71,6 @@ namespace BTCPayServer.Tests Assert.Equal(address, copyAddress); Assert.Equal($"bitcoin:{address.ToUpperInvariant()}", qrValue); s.Driver.ElementDoesNotExist(By.Id("Lightning_BTC")); - s.Driver.ElementDoesNotExist(By.Id("PayByLNURL")); // Details should show exchange rate s.Driver.ToggleCollapse("PaymentDetails"); @@ -89,7 +88,6 @@ namespace BTCPayServer.Tests Assert.StartsWith("lightning:lnurl", payUrl); Assert.StartsWith("lnurl", s.Driver.WaitForElement(By.Id("Lightning_BTC")).GetAttribute("value")); s.Driver.ElementDoesNotExist(By.Id("Address_BTC")); - s.Driver.FindElement(By.Id("PayByLNURL")); }); // Default payment method @@ -108,7 +106,6 @@ namespace BTCPayServer.Tests Assert.Equal(address, copyAddress); Assert.Equal($"lightning:{address.ToUpperInvariant()}", qrValue); s.Driver.ElementDoesNotExist(By.Id("Address_BTC")); - s.Driver.FindElement(By.Id("PayByLNURL")); // Lightning amount in sats Assert.Contains("BTC", s.Driver.FindElement(By.Id("AmountDue")).Text); @@ -247,7 +244,6 @@ namespace BTCPayServer.Tests Assert.StartsWith("lnbcrt", copyAddressLightning); Assert.StartsWith($"bitcoin:{address.ToUpperInvariant()}?amount=", qrValue); Assert.Contains("&lightning=LNBCRT", qrValue); - s.Driver.FindElement(By.Id("PayByLNURL")); // Check details s.Driver.ToggleCollapse("PaymentDetails"); @@ -284,7 +280,6 @@ namespace BTCPayServer.Tests payUrl = s.Driver.FindElement(By.Id("PayInWallet")).GetAttribute("href"); Assert.StartsWith("bitcoin:", payUrl); Assert.Contains("&lightning=lnbcrt", payUrl); - s.Driver.FindElement(By.Id("PayByLNURL")); // Check details s.Driver.ToggleCollapse("PaymentDetails"); @@ -317,7 +312,6 @@ namespace BTCPayServer.Tests Assert.Equal(address, copyAddressOnchain); Assert.StartsWith("lnurl", copyAddressLightning); Assert.StartsWith($"bitcoin:{address.ToUpperInvariant()}?lightning=LNURL", qrValue); - s.Driver.FindElement(By.Id("PayByLNURL")); // Check details s.Driver.ToggleCollapse("PaymentDetails"); @@ -384,7 +378,6 @@ namespace BTCPayServer.Tests payUrl = s.Driver.FindElement(By.Id("PayInWallet")).GetAttribute("href"); Assert.StartsWith("bitcoin:", payUrl); Assert.Contains("&lightning=lnbcrt", payUrl); - s.Driver.FindElement(By.Id("PayByLNURL")); // Language Switch var languageSelect = new SelectElement(s.Driver.FindElement(By.Id("DefaultLang"))); diff --git a/BTCPayServer/Views/Shared/NFC/CheckoutEnd.cshtml b/BTCPayServer/Views/Shared/NFC/CheckoutEnd.cshtml index e30ea250a..f83b836a7 100644 --- a/BTCPayServer/Views/Shared/NFC/CheckoutEnd.cshtml +++ b/BTCPayServer/Views/Shared/NFC/CheckoutEnd.cshtml @@ -6,13 +6,11 @@

-

-

+