mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-15 14:56:41 +00:00
Bug 5239: Implemented proper wait when adding roles or permissions to a
user / removed Thread.sleep that is now obsolete
This commit is contained in:
1 parent
1efe7be458
commit
fb6fda6bd4
3 files changed
+2
-10
No files matched your search
+1
@@ -48,6 +48,7 @@ public class UserRoleDefinitionPanelPO extends PageArea {
|
||||
public void addRole(String rolename, String groupname, String username) {
|
||||
enterNewRoleValues(rolename, groupname, username);
|
||||
clickAddButtonOrThrow();
|
||||
waitUntil(() -> findRole(rolename + ":" + groupname + ":" + username) != null);
|
||||
}
|
||||
|
||||
public void enterNewRoleValues(String rolename, String groupname, String username) {
|
||||
|
||||
+1
@@ -43,6 +43,7 @@ public class WildcardPermissionPanelPO extends PageArea {
|
||||
public void addPermission(String permissionName) {
|
||||
enterNewPermissionValue(permissionName);
|
||||
clickAddButtonOrThrow();
|
||||
waitUntil(() -> findPermission(permissionName) != null);
|
||||
}
|
||||
|
||||
public void enterNewPermissionValue(String permissionName) {
|
||||
|
||||
-10
@@ -53,16 +53,6 @@ public class TestNegativeAcls extends AbstractSeleniumTest {
|
||||
// user1 may only add other users' tenants to an ACL if this group is readable
|
||||
// adding permission USER_GROUP:READ:* just makes all groups readable to user 1
|
||||
userManagementPanel.grantPermissionToUser(USER1_NAME, USER_GROUP_READ_PERMISSION);
|
||||
|
||||
// FIXME hack to wait until the permission is saved -> please implement proper wait
|
||||
// at the moment, user management panel loses selection when saving a permission
|
||||
// this in fact prevents to wait for the permission to appear in the permission CellTable
|
||||
// after the UI is changed to keep selection, we could easily implement this using a FluentWait
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user