Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAL-1937 Console.waitNoNotification fails with multiple notifications (Manatoko with local mode) #131

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions ui/src/main/java/org/jboss/hal/testsuite/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,14 @@ public void verify(PlaceRequest placeRequest) {
*/
public void waitNoNotification() {
List<WebElement> dismissibleNotifications = By.cssSelector(DOT + alertDismissable).findElements(browser);
for (WebElement notification : dismissibleNotifications) {
WebElement button = notification.findElement(By.cssSelector("button.close"));
for (int remainingExpected = dismissibleNotifications.size(); !dismissibleNotifications.isEmpty()
&& remainingExpected > 0; remainingExpected--) {

WebElement button = dismissibleNotifications.get(0).findElement(By.cssSelector("button.close"));
if (button != null) {
button.click();
}
dismissibleNotifications = By.cssSelector(DOT + alertDismissable).findElements(browser);
}
waitModel().until().element(By.cssSelector(DOT + toastNotificationsListPf + ":empty")).is().present();
}
Expand Down