bugfix: testUnlockUser blocked by popup dialog

Popup dialog replaced with toast notification for success. Although the
reason behind this bug is yet not understood because the dialog should
have been accepted by the corresponding method in the PO, as it has done
before, replacing it with a toast notification should nevertheless
remove the possibility of it happening again.
This commit is contained in:
Sohaib Baig committed 2025-11-25 17:44:07 +01:00
1 parent 6c85a688a1
commit 499713d04d
2 files changed
+5 -5

No files matched your search

@@ -187,8 +187,6 @@ public class UserManagementPanelPO extends PageArea {
final WebElement action = ActionsHelper.findUnlockAction(entry.getWebElement());
action.click();
}
waitUntilAlertIsPresent();
driver.switchTo().alert().accept();
}
public void waitUntilUserFound(String userName) {
@@ -32,6 +32,8 @@ import com.sap.sse.common.Util;
import com.sap.sse.common.util.NaturalComparator;
import com.sap.sse.gwt.client.DateAndTimeFormatterUtil;
import com.sap.sse.gwt.client.ErrorReporter;
import com.sap.sse.gwt.client.Notification;
import com.sap.sse.gwt.client.Notification.NotificationType;
import com.sap.sse.gwt.client.celltable.AbstractSortableTextColumn;
import com.sap.sse.gwt.client.celltable.CellTableWithCheckboxResources;
import com.sap.sse.gwt.client.celltable.EntityIdentityComparator;
@@ -259,7 +261,7 @@ extends TableWrapper<UserDTO, S, StringMessages, TR> {
getUserManagementWriteService().unlockUser(userName, new AsyncCallback<SuccessInfo>() {
@Override
public void onSuccess(SuccessInfo result) {
Window.alert(stringMessages.unlockSucceededForUser(userName));
Notification.notify(stringMessages.unlockSucceededForUser(userName), NotificationType.SUCCESS);
final List<UserDTO> usersWithUpdatedEntry = new ArrayList<UserDTO>();
for (UserDTO user : getAllUsers()) {
if (user.getFullName() == selectedUser.getFullName()) {
@@ -273,13 +275,13 @@ extends TableWrapper<UserDTO, S, StringMessages, TR> {
@Override
public void onFailure(Throwable caught) {
Window.alert(stringMessages.unlockFailedForUser(userName));
Notification.notify(stringMessages.unlockFailedForUser(userName), NotificationType.ERROR);
errorReporter.reportError(caught.getMessage());
}
});
}
} else {
Window.alert(stringMessages.userIsAlreadyUnlocked());
Notification.notify(stringMessages.userIsAlreadyUnlocked(), NotificationType.INFO);
}
};
}