diff options
author | Markus Koivisto <markus@vaadin.com> | 2014-04-25 16:58:53 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-05-16 16:31:21 +0000 |
commit | dd7bcd16def9d8f7fb4e6f16f36966640fa271da (patch) | |
tree | 77c96a87c077c9a58154a9b83a322d3f36d4768c | |
parent | 3ecad007706be76bcd2183dd128259b94fdeb67a (diff) | |
download | vaadin-framework-dd7bcd16def9d8f7fb4e6f16f36966640fa271da.tar.gz vaadin-framework-dd7bcd16def9d8f7fb4e6f16f36966640fa271da.zip |
Change forceUpdate flag to always force recalculation of width. Fix tests. (#13444)
Change-Id: Ie666e2867908160b1544d3bf8251802ea771660f
-rw-r--r-- | client/src/com/vaadin/client/ui/VFilterSelect.java | 3 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/ui/ComboboxStyleChangeWidthTest.java | 9 |
2 files changed, 6 insertions, 6 deletions
diff --git a/client/src/com/vaadin/client/ui/VFilterSelect.java b/client/src/com/vaadin/client/ui/VFilterSelect.java index d21d5d2090..cfa128fb15 100644 --- a/client/src/com/vaadin/client/ui/VFilterSelect.java +++ b/client/src/com/vaadin/client/ui/VFilterSelect.java @@ -1950,7 +1950,8 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, * wide. */ int w = Util.getRequiredWidth(this); - if ((forceUpdate || !initDone || currentPage + 1 < 0) + + if (forceUpdate || (!initDone || currentPage + 1 < 0) && suggestionPopupMinWidth > w) { /* * We want to compensate for the paddings just to preserve the diff --git a/uitest/src/com/vaadin/tests/components/ui/ComboboxStyleChangeWidthTest.java b/uitest/src/com/vaadin/tests/components/ui/ComboboxStyleChangeWidthTest.java index c0845cabb0..c8299c110e 100644 --- a/uitest/src/com/vaadin/tests/components/ui/ComboboxStyleChangeWidthTest.java +++ b/uitest/src/com/vaadin/tests/components/ui/ComboboxStyleChangeWidthTest.java @@ -18,9 +18,9 @@ package com.vaadin.tests.components.ui; import static org.junit.Assert.assertEquals; import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.ComboBoxElement; import com.vaadin.tests.tb3.MultiBrowserTest; /** @@ -36,11 +36,10 @@ public class ComboboxStyleChangeWidthTest extends MultiBrowserTest { public void testWidthRetained() { openTestURL(); - WebElement comboBox = driver - .findElement(By.className("v-filterselect")); + ComboBoxElement comboBox = $(ComboBoxElement.class).first(); String oldStyle = comboBox.getAttribute("style"); - WebElement button = driver.findElement(By.className("v-button")); + ButtonElement button = $(ButtonElement.class).first(); button.click(); String newStyle = comboBox.getAttribute("style"); |