Remove retry in LoginPage.resetPassword due the more universal fix exists in UIUtils.clickLink

closes #33492

Signed-off-by: mposolda <mposolda@gmail.com>
(cherry picked from commit 88c94c28b0092df3f44277a5cc47e1d5026fe3af)
This commit is contained in:
mposolda 2024-10-04 12:08:38 +02:00 committed by Marek Posolda
parent 61c6bd5ace
commit 95c529104e

View file

@ -19,16 +19,13 @@ package org.keycloak.testsuite.pages;
import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.arquillian.test.api.ArquillianResource;
import org.junit.Assert; import org.junit.Assert;
import org.keycloak.common.util.Retry;
import org.keycloak.testsuite.util.DroneUtils; import org.keycloak.testsuite.util.DroneUtils;
import org.keycloak.testsuite.util.OAuthClient; import org.keycloak.testsuite.util.OAuthClient;
import org.keycloak.testsuite.util.UIUtils; import org.keycloak.testsuite.util.UIUtils;
import org.keycloak.testsuite.util.WaitUtils; import org.keycloak.testsuite.util.WaitUtils;
import org.openqa.selenium.By; import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebElement; import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.FindBy;
import static org.keycloak.testsuite.util.UIUtils.clickLink; import static org.keycloak.testsuite.util.UIUtils.clickLink;
@ -237,14 +234,7 @@ public class LoginPage extends LanguageComboboxAwarePage {
} }
public void resetPassword() { public void resetPassword() {
// Since Chrome 128, the user can be still kept on the "Login page" after click to "Forget Password" link. Clicking the "Forget Password" link another
// time usually helps. Limit to 4 attempts for now.
Retry.execute(() -> {
clickLink(resetPasswordLink); clickLink(resetPasswordLink);
if (driver instanceof ChromeDriver) {
Assert.assertEquals("Forgot Your Password?", PageUtils.getPageTitle(driver));
}
}, 4, 0);
} }
public void setRememberMe(boolean enable) { public void setRememberMe(boolean enable) {