diff --git a/BTCPayServer.Tests/SeleniumTests.cs b/BTCPayServer.Tests/SeleniumTests.cs index 475b8c0fe..29732a4b1 100644 --- a/BTCPayServer.Tests/SeleniumTests.cs +++ b/BTCPayServer.Tests/SeleniumTests.cs @@ -899,26 +899,6 @@ namespace BTCPayServer.Tests // Validate that the email is updated in the list of email rules Assert.Contains("changedagain@gmail.com", s.Driver.PageSource); Assert.DoesNotContain("statuschanged@gmail.com", s.Driver.PageSource); - - // Delete both email rules - var deleteLinks = s.Driver.FindElements(By.XPath("//a[contains(text(), 'Delete')]")); - Assert.True(deleteLinks.Count == 2, "Expected exactly two delete buttons but found a different number."); - - deleteLinks[0].Click(); - - var confirmDelete = s.Driver.FindElement(By.XPath("//*[@id='deleteConfirmation']//button[contains(text(), 'Delete')]")); - confirmDelete.Click(); - - deleteLinks = s.Driver.FindElements(By.XPath("//a[contains(text(), 'Delete')]")); // Refresh list - Assert.True(deleteLinks.Count == 1, "Expected one delete button remaining."); - - deleteLinks[0].Click(); - - confirmDelete = s.Driver.FindElement(By.XPath("//*[@id='deleteConfirmation']//button[contains(text(), 'Delete')]")); - confirmDelete.Click(); - - // Validate that there are no more rules - Assert.Contains("There are no rules yet.", s.Driver.PageSource); } [Fact(Timeout = TestTimeout)] diff --git a/BTCPayServer/Views/UIStores/StoreEmailRulesList.cshtml b/BTCPayServer/Views/UIStores/StoreEmailRulesList.cshtml index 3f5fa6b57..c12df92ad 100644 --- a/BTCPayServer/Views/UIStores/StoreEmailRulesList.cshtml +++ b/BTCPayServer/Views/UIStores/StoreEmailRulesList.cshtml @@ -1,3 +1,4 @@ +@using BTCPayServer.Abstractions.Models @using BTCPayServer.Client @using BTCPayServer.TagHelpers @using Microsoft.AspNetCore.Mvc.TagHelpers @@ -17,10 +18,12 @@