]> source.dussan.org Git - archiva.git/commitdiff
Fixing window size issues with selenium driver
authorMartin Stockhammer <martin_s@apache.org>
Sat, 4 Nov 2017 11:04:19 +0000 (12:04 +0100)
committerMartin Stockhammer <martin_s@apache.org>
Sat, 4 Nov 2017 11:04:19 +0000 (12:04 +0100)
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
src/ci/scripts/container_webtest.sh

index f7d9799737dec31622cd0ce99ec095bcad31407f..082c4b3731b5b9b11402f11324889b52e55007ea 100644 (file)
@@ -87,8 +87,8 @@ public abstract class AbstractSeleniumTest
         p.load( this.getClass().getClassLoader().getResourceAsStream( "test.properties" ) );
 
         baseUrl = WebdriverUtility.getBaseUrl()+"/index.html?request_lang=en";
-
         open( baseUrl, browser, seleniumHost, seleniumPort, maxWaitTimeInMs, remoteSelenium );
+        getWebDriver().manage().window().maximize();
         assertAdminCreated();
     }
 
@@ -149,7 +149,6 @@ public abstract class AbstractSeleniumTest
     {
 
         open( baseUrl, browser, seleniumHost, seleniumPort, maxWaitTimeInMs, remoteSelenium);
-
         loadPage(baseUrl, 30);
         WebDriverWait wait = new WebDriverWait(getWebDriver(),30);
         wait.until(ExpectedConditions.presenceOfElementLocated(By.id("topbar-menu")));
index e2268e3010cdec3f376724d2df5487462f0d4044..b808455985865595d9cb66eec48635f136a5a3be 100644 (file)
@@ -61,7 +61,7 @@ function stop_instance() {
 
 function start_instance() {
   echo "Starting container ${INSTANCE_NAME}"
-  docker run -d --net="${NETWORK_TYPE}" -p "${PORT_MAPPING}" --name "${INSTANCE_NAME}" "${TAG}"
+  docker run -d -e "SCREEN_WIDTH=${SCREEN_WIDTH}" -e "SCREEN_HEIGHT=${SCREEN_HEIGHT}" --net="${NETWORK_TYPE}" -p "${PORT_MAPPING}" --name "${INSTANCE_NAME}" "${TAG}"
 }
 
 function print_usage() {