You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by ro...@apache.org on 2015/07/03 10:01:23 UTC
falcon git commit: FALCON-1306 Custom window dimensions for UI tests.
Contributed by Ruslan Ostafiychuk
Repository: falcon
Updated Branches:
refs/heads/master 867a24a6a -> 9a2992551
FALCON-1306 Custom window dimensions for UI tests. Contributed by Ruslan Ostafiychuk
Project: http://git-wip-us.apache.org/repos/asf/falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/9a299255
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/9a299255
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/9a299255
Branch: refs/heads/master
Commit: 9a2992551bb68b11c01bdb4fc7058e50b8707c99
Parents: 867a24a
Author: Ruslan Ostafiychuk <ro...@apache.org>
Authored: Thu Jul 2 19:36:38 2015 +0300
Committer: Ruslan Ostafiychuk <ro...@apache.org>
Committed: Fri Jul 3 10:59:40 2015 +0300
----------------------------------------------------------------------
falcon-regression/CHANGES.txt | 2 ++
.../apache/falcon/regression/core/util/Config.java | 4 ++++
.../falcon/regression/testHelper/BaseUITestClass.java | 14 +++++++++++++-
3 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/falcon/blob/9a299255/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index 8c65450..b062872 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -93,6 +93,8 @@ Trunk (Unreleased)
via Samarth Gupta)
IMPROVEMENTS
+ FALCON-1306 Custom window dimensions for UI tests (Ruslan Ostafiychuk)
+
FALCON-1284 Fix entity cleanup when is_depracate=true (Ruslan Ostafiychuk via Paul Isaychuk)
FALCON-1283 Save screenshots to log.capture.location (Ruslan Ostafiychuk via Paul Isaychuk)
http://git-wip-us.apache.org/repos/asf/falcon/blob/9a299255/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/Config.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/Config.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/Config.java
index ba32d11..ba509e4 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/Config.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/Config.java
@@ -74,4 +74,8 @@ public final class Config {
public static boolean getBoolean(String key, boolean defaultValue) {
return INSTANCE.confObj.getBoolean(key, defaultValue);
}
+
+ public static int getInt(String key, int defaultValue) {
+ return INSTANCE.confObj.getInt(key, defaultValue);
+ }
}
http://git-wip-us.apache.org/repos/asf/falcon/blob/9a299255/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseUITestClass.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseUITestClass.java b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseUITestClass.java
index 205aad6..ba66851 100644
--- a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseUITestClass.java
+++ b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/testHelper/BaseUITestClass.java
@@ -18,6 +18,9 @@
package org.apache.falcon.regression.testHelper;
+import org.apache.falcon.regression.core.util.Config;
+import org.openqa.selenium.Dimension;
+import org.openqa.selenium.Point;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
@@ -42,7 +45,16 @@ public class BaseUITestClass extends BaseTestClass{
driver = new FirefoxDriver(profile);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
- driver.manage().window().maximize();
+
+ int width = Config.getInt("browser.window.width", 0);
+ int height = Config.getInt("browser.window.height", 0);
+
+ if (width * height == 0) {
+ driver.manage().window().maximize();
+ } else {
+ driver.manage().window().setPosition(new Point(0, 0));
+ driver.manage().window().setSize(new Dimension(width, height));
+ }
}