mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 05:54:26 +01:00
refactor : addressed requested changes
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
This commit is contained in:
@@ -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.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user