UI and Node.js adapter tests fixes
This commit is contained in:
parent
ee41a0450f
commit
191cbca7ad
4 changed files with 16 additions and 4 deletions
|
@ -434,7 +434,8 @@ Although technically they can be run with almost every test in the testsuite, th
|
|||
* **Supported test modules:** `console`, `base-ui`
|
||||
* **Supported version:** 11
|
||||
* **Driver download required:** [Internet Explorer Driver Server](http://www.seleniumhq.org/download/); recommended version [3.5.1 32-bit](http://selenium-release.storage.googleapis.com/3.5/IEDriverServer_Win32_3.5.1.zip)
|
||||
* **Run with:** `-Dbrowser=internetExplorer -Dwebdriver.ie.driver=path/to/IEDriverServer.exe`
|
||||
* **Run with:** `-Dbrowser=internetExplorer -Dwebdriver.ie.driver=path/to/IEDriverServer.exe -Dauth.server.ssl.required=false`
|
||||
Note: We currently do not support SSL in IE.
|
||||
|
||||
#### Apple Safari
|
||||
* **Supported test modules:** `base-ui`
|
||||
|
|
|
@ -54,13 +54,16 @@ public class KeycloakWebDriverConfigurator {
|
|||
updateCapabilityKeys("htmlUnit", webDriverCfg, capabilitiesToAdd);
|
||||
updateCapabilityKeys("appium", webDriverCfg, capabilitiesToAdd);
|
||||
configurePhantomJSDriver(webDriverCfg, capabilitiesToAdd);
|
||||
acceptAllSSLCerts(capabilitiesToAdd);
|
||||
acceptAllSSLCerts(webDriverCfg, capabilitiesToAdd);
|
||||
|
||||
BrowserCapabilities browserCap = registryInstance.get().getEntryFor(webDriverCfg.getBrowser());
|
||||
webDriverCfg.setBrowserInternal(new KcBrowserCapabilities(capabilitiesToAdd, browserCap));
|
||||
}
|
||||
|
||||
private void acceptAllSSLCerts(DesiredCapabilities capabilitiesToAdd) {
|
||||
private void acceptAllSSLCerts(WebDriverConfiguration webDriverCfg, DesiredCapabilities capabilitiesToAdd) {
|
||||
if (webDriverCfg.getBrowser().equals("internetexplorer")) {
|
||||
return; // IE not supported
|
||||
}
|
||||
capabilitiesToAdd.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
|
||||
capabilitiesToAdd.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.keycloak.testsuite.auth.page.login.VerifyEmail;
|
|||
import org.keycloak.testsuite.console.page.realm.LoginSettings;
|
||||
import org.keycloak.testsuite.console.page.realm.LoginSettings.RequireSSLOption;
|
||||
import org.keycloak.testsuite.util.MailServer;
|
||||
import org.keycloak.testsuite.util.URLUtils;
|
||||
import org.openqa.selenium.Cookie;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
@ -284,7 +285,13 @@ public class LoginSettingsTest extends AbstractRealmTest {
|
|||
log.debug("set");
|
||||
|
||||
log.info("check HTTPS required");
|
||||
testAccountPage.navigateTo();
|
||||
String accountPageUri = testAccountPage.toString();
|
||||
if (AUTH_SERVER_SSL_REQUIRED) { // quick and dirty (and hopefully provisional) workaround to force HTTP
|
||||
accountPageUri = accountPageUri
|
||||
.replace("https", "http")
|
||||
.replace(AUTH_SERVER_PORT, System.getProperty("auth.server.http.port"));
|
||||
}
|
||||
URLUtils.navigateToUri(accountPageUri);
|
||||
Assert.assertEquals("HTTPS required", testAccountPage.getErrorMessage());
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
<auth.server.https.port>8443</auth.server.https.port>
|
||||
<auth.server.management.port>9990</auth.server.management.port>
|
||||
<auth.server.management.port.jmx>9999</auth.server.management.port.jmx>
|
||||
<auth.server.ssl.required>false</auth.server.ssl.required>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
|
|
Loading…
Reference in a new issue