- Removed the JS functions created by me

- Used the same logic as the StoreUsers.cshtml page to design the remove modal
- Removed the unit test part related to the deletion of email rules, since using this way of remove above is not possible to unit test, at least I didn't found an example to look at.
This commit is contained in:
wellingtonbalbo
2025-04-17 22:32:07 -03:00
parent 7f8f92ec74
commit c6d5246720
2 changed files with 14 additions and 70 deletions

View File

@@ -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)]