diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebComponentUtil.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebComponentUtil.java index 75bb72fa1c2..7eda7963aa7 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebComponentUtil.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebComponentUtil.java @@ -1365,7 +1365,7 @@ public static String getDisplayNameOrName(ObjectReferenceType ref, boolean trans return null; } String displayName = getDisplayName(ref, translate); - return displayName != null ? displayName : getName(ref); + return StringUtils.isNotEmpty(displayName) ? displayName : getName(ref,translate); } // () OR simply if there's no display name diff --git a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/CaseTests.java b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/CaseTests.java index 4df0e7f7b93..46b5c5a7138 100644 --- a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/CaseTests.java +++ b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/CaseTests.java @@ -115,7 +115,7 @@ public void test110isCaseCreated(){ @Test (dependsOnMethods = {"test110isCaseCreated"}) public void test120approveCaseAction() { AllRequestsPage allRequestsPage = basicPage.listAllRequests(); - allRequestsPage + ChildrenCaseTable childrenCaseTable = allRequestsPage .table() .search() .byName() @@ -124,7 +124,12 @@ public void test120approveCaseAction() { .and() .clickByPartialName(REQUEST_CASE_NAME + CASE_CREATION_TEST_USER_NAME) .selectTabChildren() - .table() + .table(); + childrenCaseTable.search() + .byName() + .inputValue(ASSIGNING_ROLE_CASE_NAME + CASE_CREATION_TEST_USER_NAME) + .updateSearch(); + childrenCaseTable .clickByPartialName(ASSIGNING_ROLE_CASE_NAME + CASE_CREATION_TEST_USER_NAME) .selectTabWorkitems() .table() @@ -155,7 +160,7 @@ public void test130rejectCaseAction() { createUserAndAssignRoleWithApprovement(REJECT_WORKITEM_TEST_USER_NAME); AllRequestsPage allRequestsPage = basicPage.listAllRequests(); - allRequestsPage + ChildrenCaseTable childrenCaseTable = allRequestsPage .table() .search() .byName() @@ -164,8 +169,12 @@ public void test130rejectCaseAction() { .and() .clickByPartialName(REQUEST_CASE_NAME + REJECT_WORKITEM_TEST_USER_NAME) .selectTabChildren() - .table() - .clickByPartialName(ASSIGNING_ROLE_CASE_NAME + REJECT_WORKITEM_TEST_USER_NAME) + .table(); + childrenCaseTable.search() + .byName() + .inputValue(ASSIGNING_ROLE_CASE_NAME + REJECT_WORKITEM_TEST_USER_NAME) + .updateSearch(); + childrenCaseTable.clickByPartialName(ASSIGNING_ROLE_CASE_NAME + REJECT_WORKITEM_TEST_USER_NAME) .selectTabWorkitems() .table() .clickByName(ASSIGNING_ROLE_CASE_NAME + REJECT_WORKITEM_TEST_USER_NAME) @@ -205,7 +214,7 @@ public void test140forwardCaseAction() { Selenide.sleep(MidPoint.TIMEOUT_MEDIUM_6_S); AllRequestsPage allRequestsPage = basicPage.listAllRequests(); - WorkitemDetailsPanel workitemDetailsPanel = allRequestsPage + ChildrenCaseTable childrenCaseTable = allRequestsPage .table() .search() .byName() @@ -214,7 +223,12 @@ public void test140forwardCaseAction() { .and() .clickByPartialName(REQUEST_CASE_NAME + FORWARD_WORKITEM_TEST_USER_NAME) .selectTabChildren() - .table() + .table(); + childrenCaseTable.search() + .byName() + .inputValue(ASSIGNING_ROLE_CASE_NAME + FORWARD_WORKITEM_TEST_USER_NAME) + .updateSearch(); + WorkitemDetailsPanel workitemDetailsPanel = childrenCaseTable .clickByPartialName(ASSIGNING_ROLE_CASE_NAME + FORWARD_WORKITEM_TEST_USER_NAME) .selectTabWorkitems() .table()