summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-01-08 08:52:05 +0000
committerVaadin Code Review <review@vaadin.com>2013-01-08 08:52:05 +0000
commit81a16d4a746dc128073200b52f30851a259281bc (patch)
tree2dfc5c582e5569e993a5844516b4f4fd09866241 /uitest
parent2757ff26ee0a20f95f7a43a8309791a3d2939869 (diff)
parent991dcf9fa63273e15b38abaca5f4ac792ca94b7e (diff)
downloadvaadin-framework-81a16d4a746dc128073200b52f30851a259281bc.tar.gz
vaadin-framework-81a16d4a746dc128073200b52f30851a259281bc.zip
Merge "Fixed ComboBox width problems in all themes (#10484)"
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/uitest/components/SelectsCssTest.java33
1 files changed, 27 insertions, 6 deletions
diff --git a/uitest/src/com/vaadin/tests/components/uitest/components/SelectsCssTest.java b/uitest/src/com/vaadin/tests/components/uitest/components/SelectsCssTest.java
index 4da683788b..af09b1007d 100644
--- a/uitest/src/com/vaadin/tests/components/uitest/components/SelectsCssTest.java
+++ b/uitest/src/com/vaadin/tests/components/uitest/components/SelectsCssTest.java
@@ -4,7 +4,7 @@ import com.vaadin.tests.components.uitest.TestSampler;
import com.vaadin.ui.AbstractSelect;
import com.vaadin.ui.ComboBox;
import com.vaadin.ui.Component;
-import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.GridLayout;
import com.vaadin.ui.ListSelect;
import com.vaadin.ui.NativeSelect;
import com.vaadin.ui.OptionGroup;
@@ -12,12 +12,13 @@ import com.vaadin.ui.Select;
import com.vaadin.ui.TwinColSelect;
import com.vaadin.ui.themes.ChameleonTheme;
-public class SelectsCssTest extends HorizontalLayout {
+public class SelectsCssTest extends GridLayout {
private TestSampler parent;
private int debugIdCounter = 0;
public SelectsCssTest(TestSampler parent) {
+ super(10, 1);
this.parent = parent;
setSpacing(true);
setWidth(null);
@@ -53,18 +54,35 @@ public class SelectsCssTest extends HorizontalLayout {
createDummyData(ns);
addComponent(ns);
- createComboBoxWith(null, null);
- createComboBoxWith("CB Search", ChameleonTheme.COMBOBOX_SEARCH);
+ createComboBoxWith(null, null, null);
+ createComboBoxWith("CB Search", ChameleonTheme.COMBOBOX_SEARCH, null);
createComboBoxWith("SelectButton",
- ChameleonTheme.COMBOBOX_SELECT_BUTTON);
+ ChameleonTheme.COMBOBOX_SELECT_BUTTON, null);
ListSelect ls = new ListSelect();
ls.setId("select" + debugIdCounter++);
createDummyData(ls);
addComponent(ls);
+
+ s = new Select("Basic select");
+ s.setId("select" + debugIdCounter++);
+ s.setWidth("100px");
+ addComponent(s);
+
+ s = new Select("Select with items");
+ s.setWidth("100px");
+ s.setId("select" + debugIdCounter++);
+ createDummyData(s);
+ addComponent(s);
+
+ createComboBoxWith(null, null, "100px");
+ createComboBoxWith("CB Search", ChameleonTheme.COMBOBOX_SEARCH, "100px");
+ createComboBoxWith("SelectButton",
+ ChameleonTheme.COMBOBOX_SELECT_BUTTON, "100px");
}
- private void createComboBoxWith(String caption, String primaryStyleName) {
+ private void createComboBoxWith(String caption, String primaryStyleName,
+ String width) {
ComboBox cb = new ComboBox();
cb.setId("select" + debugIdCounter++);
if (caption != null) {
@@ -74,6 +92,9 @@ public class SelectsCssTest extends HorizontalLayout {
if (primaryStyleName != null) {
cb.addStyleName(primaryStyleName);
}
+ if (width != null) {
+ cb.setWidth(width);
+ }
createDummyData(cb);
addComponent(cb);