KEYCLOAK-10361 Fix instabilities on windows
This commit is contained in:
parent
e739344556
commit
b3d3d5b59d
2 changed files with 12 additions and 1 deletions
|
@ -56,9 +56,11 @@ import org.keycloak.testsuite.util.DroneUtils;
|
||||||
import org.keycloak.testsuite.util.JavascriptBrowser;
|
import org.keycloak.testsuite.util.JavascriptBrowser;
|
||||||
import org.keycloak.testsuite.util.javascript.JavascriptTestExecutorWithAuthorization;
|
import org.keycloak.testsuite.util.javascript.JavascriptTestExecutorWithAuthorization;
|
||||||
import org.keycloak.util.JsonSerialization;
|
import org.keycloak.util.JsonSerialization;
|
||||||
|
import org.openqa.selenium.JavascriptExecutor;
|
||||||
import org.openqa.selenium.WebDriver;
|
import org.openqa.selenium.WebDriver;
|
||||||
import org.openqa.selenium.WebElement;
|
import org.openqa.selenium.WebElement;
|
||||||
import org.openqa.selenium.support.FindBy;
|
import org.openqa.selenium.support.FindBy;
|
||||||
|
import org.openqa.selenium.support.ui.WebDriverWait;
|
||||||
import org.wildfly.extras.creaper.core.online.CliException;
|
import org.wildfly.extras.creaper.core.online.CliException;
|
||||||
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
|
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
|
||||||
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;
|
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;
|
||||||
|
@ -757,6 +759,16 @@ public abstract class AbstractPhotozExampleAdapterTest extends AbstractPhotozJav
|
||||||
.login(this::assertOnLoginPage)
|
.login(this::assertOnLoginPage)
|
||||||
.loginFormWithScopesWithPossibleConsentPage(user, this::assertOnTestAppUrl, oAuthGrantPage, scopes)
|
.loginFormWithScopesWithPossibleConsentPage(user, this::assertOnTestAppUrl, oAuthGrantPage, scopes)
|
||||||
.init(defaultArguments(), this::assertSuccessfullyLoggedIn);
|
.init(defaultArguments(), this::assertSuccessfullyLoggedIn);
|
||||||
|
|
||||||
|
new WebDriverWait(jsDriver, 10).until(this::isLoaded);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLoaded(WebDriver w) {
|
||||||
|
JavascriptExecutor jsExecutor = (JavascriptExecutor) w;
|
||||||
|
|
||||||
|
Map<String, Object> o = (Map<String, Object>) jsExecutor.executeScript("return window.authorization.config");
|
||||||
|
|
||||||
|
return o != null && o.containsKey("token_endpoint");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setManageAlbumScopeRequired() {
|
private void setManageAlbumScopeRequired() {
|
||||||
|
|
|
@ -115,7 +115,6 @@ public class CorsExampleAdapterTest extends AbstractExampleAdapterTest {
|
||||||
@Before
|
@Before
|
||||||
public void onBefore() {
|
public void onBefore() {
|
||||||
DroneUtils.addWebDriver(jsDriver);
|
DroneUtils.addWebDriver(jsDriver);
|
||||||
Assume.assumeFalse(System.getProperty("os.name").startsWith("Windows"));
|
|
||||||
deployer.deploy(CorsDatabaseServiceTestApp.DEPLOYMENT_NAME);
|
deployer.deploy(CorsDatabaseServiceTestApp.DEPLOYMENT_NAME);
|
||||||
deployer.deploy(AngularCorsProductTestApp.DEPLOYMENT_NAME);
|
deployer.deploy(AngularCorsProductTestApp.DEPLOYMENT_NAME);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue