Add Retry
This commit is contained in:
parent
fca65ac644
commit
e126969f82
1 changed files with 8 additions and 4 deletions
|
@ -16,11 +16,12 @@
|
|||
*/
|
||||
package org.keycloak.testsuite.console.authorization;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.keycloak.common.util.Retry;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
|
||||
|
@ -34,11 +35,14 @@ public class DisableAuthorizationSettingsTest extends AbstractAuthorizationSetti
|
|||
clientSettingsPage.navigateTo();
|
||||
clientSettingsPage.form().setAuthorizationSettingsEnabled(false);
|
||||
waitUntilElement(modalDialog.getMessage()).text().contains(WARNING_MESSAGE);
|
||||
|
||||
clientSettingsPage.form().confirmDisableAuthorizationSettings();
|
||||
Thread.sleep(1000);
|
||||
clientSettingsPage.form().save();
|
||||
Retry.execute(() -> {
|
||||
clientSettingsPage.form().save();
|
||||
}, 10, 300);
|
||||
|
||||
clientSettingsPage.form().confirmDisableAuthorizationSettings();
|
||||
assertAlertSuccess();
|
||||
Retry.execute(this::assertAlertSuccess, 10, 300);
|
||||
|
||||
clientSettingsPage.navigateTo();
|
||||
assertFalse(clientSettingsPage.form().isAuthorizationSettingsEnabled());
|
||||
|
|
Loading…
Reference in a new issue