mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
- 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:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user