refactor : addressed requested changes

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
This commit is contained in:
Abhijay007
2025-11-13 13:12:32 +00:00
parent 1bbb95084e
commit cc0570f0ef

View File

@@ -2546,8 +2546,8 @@ namespace BTCPayServer.Tests
} }
Assert.NotNull(employeeRow); Assert.NotNull(employeeRow);
await employeeRow.Locator("a[data-bs-target='#EditModal']").ClickAsync(); await employeeRow.Locator("a[data-bs-target='#EditModal']").ClickAsync();
Assert.Equal(employee, await s.Page.Locator("#EditUserEmail").InnerTextAsync()); Assert.Equal(employee, await s.Page.InnerTextAsync("#EditUserEmail"));
await s.Page.Locator("#EditUserRole").SelectOptionAsync("Manager"); await s.Page.SelectOptionAsync("#EditUserRole", "Manager");
await s.Page.ClickAsync("#EditContinue"); await s.Page.ClickAsync("#EditContinue");
await s.FindAlertMessage(partialText: $"The role of {employee} has been changed to Manager."); await s.FindAlertMessage(partialText: $"The role of {employee} has been changed to Manager.");
@@ -2561,7 +2561,7 @@ namespace BTCPayServer.Tests
} }
Assert.NotNull(employeeRow); Assert.NotNull(employeeRow);
await employeeRow.Locator("a[data-bs-target='#EditModal']").ClickAsync(); await employeeRow.Locator("a[data-bs-target='#EditModal']").ClickAsync();
Assert.Equal(employee, await s.Page.Locator("#EditUserEmail").InnerTextAsync()); Assert.Equal(employee, await s.Page.InnerTextAsync("#EditUserEmail"));
await s.Page.ClickAsync("#EditContinue"); await s.Page.ClickAsync("#EditContinue");
await s.FindAlertMessage(StatusMessageModel.StatusSeverity.Error, "The user already has the role Manager."); await s.FindAlertMessage(StatusMessageModel.StatusSeverity.Error, "The user already has the role Manager.");
@@ -2575,8 +2575,8 @@ namespace BTCPayServer.Tests
} }
Assert.NotNull(ownerRow); Assert.NotNull(ownerRow);
await ownerRow.Locator("a[data-bs-target='#EditModal']").ClickAsync(); await ownerRow.Locator("a[data-bs-target='#EditModal']").ClickAsync();
Assert.Equal(owner, await s.Page.Locator("#EditUserEmail").InnerTextAsync()); Assert.Equal(owner, await s.Page.InnerTextAsync("#EditUserEmail"));
await s.Page.Locator("#EditUserRole").SelectOptionAsync("Employee"); await s.Page.SelectOptionAsync("#EditUserRole", "Employee");
await s.Page.ClickAsync("#EditContinue"); await s.Page.ClickAsync("#EditContinue");
await s.FindAlertMessage(StatusMessageModel.StatusSeverity.Error, "The user is the last owner. Their role cannot be changed."); await s.FindAlertMessage(StatusMessageModel.StatusSeverity.Error, "The user is the last owner. Their role cannot be changed.");
} }