From adce1dffb135b58853e33b74b1353dc1ae947d23 Mon Sep 17 00:00:00 2001 From: d11n Date: Mon, 23 Dec 2024 01:45:36 +0100 Subject: [PATCH] Checkout: Add support link to footer (#6511) Closes #6495. --- BTCPayServer.Tests/CheckoutUITests.cs | 10 +++++----- BTCPayServer/Views/UIInvoice/Checkout.cshtml | 2 +- BTCPayServer/Views/UIStores/CheckoutAppearance.cshtml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/BTCPayServer.Tests/CheckoutUITests.cs b/BTCPayServer.Tests/CheckoutUITests.cs index 7d07e9898..65703420b 100644 --- a/BTCPayServer.Tests/CheckoutUITests.cs +++ b/BTCPayServer.Tests/CheckoutUITests.cs @@ -65,6 +65,11 @@ namespace BTCPayServer.Tests Assert.Equal($"bitcoin:{address}", clipboard); Assert.Equal($"bitcoin:{address.ToUpperInvariant()}", qrValue); s.Driver.ElementDoesNotExist(By.Id("Lightning_BTC-CHAIN")); + + // Contact option + var contactLink = s.Driver.FindElement(By.Id("ContactLink")); + Assert.Equal("Contact us", contactLink.Text); + Assert.Matches(supportUrl.Replace("{InvoiceId}", invoiceId), contactLink.GetAttribute("href")); // Details should show exchange rate s.Driver.ToggleCollapse("PaymentDetails"); @@ -138,7 +143,6 @@ namespace BTCPayServer.Tests Assert.Contains("resubmit a payment", expiredSection.Text); Assert.DoesNotContain("This invoice expired with partial payment", expiredSection.Text); }); - Assert.True(s.Driver.ElementDoesNotExist(By.Id("ContactLink"))); Assert.True(s.Driver.ElementDoesNotExist(By.Id("ReceiptLink"))); Assert.Equal(storeUrl, s.Driver.FindElement(By.Id("StoreLink")).GetAttribute("href")); @@ -172,9 +176,6 @@ namespace BTCPayServer.Tests Assert.Contains("This invoice expired with partial payment", expiredSection.Text); Assert.DoesNotContain("resubmit a payment", expiredSection.Text); }); - var contactLink = s.Driver.FindElement(By.Id("ContactLink")); - Assert.Equal("Contact us", contactLink.Text); - Assert.Matches(supportUrl.Replace("{InvoiceId}", invoiceId), contactLink.GetAttribute("href")); Assert.True(s.Driver.ElementDoesNotExist(By.Id("ReceiptLink"))); Assert.Equal(storeUrl, s.Driver.FindElement(By.Id("StoreLink")).GetAttribute("href")); @@ -243,7 +244,6 @@ namespace BTCPayServer.Tests }); s.Driver.FindElement(By.Id("confetti")); s.Driver.FindElement(By.Id("ReceiptLink")); - Assert.True(s.Driver.ElementDoesNotExist(By.Id("ContactLink"))); Assert.Equal(storeUrl, s.Driver.FindElement(By.Id("StoreLink")).GetAttribute("href")); // BIP21 diff --git a/BTCPayServer/Views/UIInvoice/Checkout.cshtml b/BTCPayServer/Views/UIInvoice/Checkout.cshtml index d1db54958..bc83e14ca 100644 --- a/BTCPayServer/Views/UIInvoice/Checkout.cshtml +++ b/BTCPayServer/Views/UIInvoice/Checkout.cshtml @@ -219,7 +219,6 @@

-
@@ -231,6 +230,7 @@ }