summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorJonatan Kronqvist <jonatan@vaadin.com>2014-03-18 15:32:42 +0200
committerJonatan Kronqvist <jonatan@vaadin.com>2014-03-25 14:57:51 +0200
commit40ad7734266c447222907bc37c2c2719aed674ed (patch)
treeceac3614ad859c9c1f1ccfde8c33fcffaa6558d0 /uitest
parenta9845c9c10ec891800e4a9bc57fbb95d1275de32 (diff)
downloadvaadin-framework-40ad7734266c447222907bc37c2c2719aed674ed.tar.gz
vaadin-framework-40ad7734266c447222907bc37c2c2719aed674ed.zip
Update sizes when the IE8 window is resized #12323
Change-Id: I5ee2e0d7e4b4bc11df78e24c2a29e94e4c379e25
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/extensions/ResponsiveUITest.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/extensions/ResponsiveUITest.java b/uitest/src/com/vaadin/tests/extensions/ResponsiveUITest.java
index 76babed333..9b86350ebc 100644
--- a/uitest/src/com/vaadin/tests/extensions/ResponsiveUITest.java
+++ b/uitest/src/com/vaadin/tests/extensions/ResponsiveUITest.java
@@ -22,6 +22,8 @@ import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
import com.vaadin.testbench.By;
import com.vaadin.tests.tb3.MultiBrowserTest;
@@ -44,6 +46,11 @@ public class ResponsiveUITest extends MultiBrowserTest {
public void testResizingSplitPanelReflowsLayout() throws Exception {
openTestURL();
+ // IE sometimes has trouble waiting long enough.
+ new WebDriverWait(getDriver(), 30).until(ExpectedConditions
+ .presenceOfElementLocated(By
+ .cssSelector(".v-csslayout-grid.first")));
+
assertEquals("401px-600px",
$(".v-csslayout-grid.first").getAttribute("width-range"));
assertEquals("501px-",
@@ -75,4 +82,28 @@ public class ResponsiveUITest extends MultiBrowserTest {
new Actions(getDriver()).clickAndHold($(".v-splitpanel-hsplitter"))
.moveByOffset(xOffset, 0).release().build().perform();
}
+
+ @Test
+ public void testResizingWindowReflowsLayout() throws Exception {
+ openTestURL();
+
+ assertEquals("401px-600px",
+ $(".v-csslayout-grid.first").getAttribute("width-range"));
+ assertEquals("501px-",
+ $(".v-csslayout-grid.second").getAttribute("width-range"));
+
+ testBench().resizeViewPortTo(1224, 768);
+
+ assertEquals("601-800",
+ $(".v-csslayout-grid.first").getAttribute("width-range"));
+ assertEquals("501px-",
+ $(".v-csslayout-grid.second").getAttribute("width-range"));
+
+ testBench().resizeViewPortTo(674, 768);
+
+ assertEquals("201px-400px",
+ $(".v-csslayout-grid.first").getAttribute("width-range"));
+ assertEquals("301px-400px",
+ $(".v-csslayout-grid.second").getAttribute("width-range"));
+ }
}