From: Leif Åstrand Date: Fri, 4 Jan 2013 13:34:01 +0000 (+0200) Subject: Fix some small issues in LayoutTesterApplication X-Git-Tag: 7.0.0.rc1~85 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f9bb88a3cd7c424126d96ba24e315569aec8bce9;p=vaadin-framework.git Fix some small issues in LayoutTesterApplication Change-Id: I996c62309072102a284622fcda6090b447282bdf --- diff --git a/uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java b/uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java index 28f6dfdbc4..76fa8c6cc9 100644 --- a/uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java +++ b/uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java @@ -9,6 +9,7 @@ import com.vaadin.server.ThemeResource; import com.vaadin.server.UserError; import com.vaadin.ui.AbstractComponent; import com.vaadin.ui.AbstractField; +import com.vaadin.ui.AbstractOrderedLayout; import com.vaadin.ui.Alignment; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; @@ -402,6 +403,9 @@ public class GridLayoutTests extends AbstractLayoutTests { baseLayout.addComponent(button3); baseLayout.addComponent(button4); baseLayout.addComponent(glo); + // Don't expand the buttons + ((AbstractOrderedLayout) baseLayout).setExpandRatio(glo, 1); + button1.setEnabled(true); button2.setEnabled(false); button3.setEnabled(false); @@ -474,6 +478,9 @@ public class GridLayoutTests extends AbstractLayoutTests { baseLayout.addComponent(glo); + // Don't expand the buttons + ((AbstractOrderedLayout) baseLayout).setExpandRatio(glo, 1); + button1.addListener(new Button.ClickListener() { private static final long serialVersionUID = 7716267156088629379L; diff --git a/uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java b/uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java index 113106a40b..7a53a6583e 100644 --- a/uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java +++ b/uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java @@ -289,7 +289,9 @@ public class HorizontalLayoutTests extends AbstractLayoutTests { @Override public void buttonClick(ClickEvent event) { vlo.setSizeUndefined(); - vlo.addComponent(new Label("--- NEW LABEL ---")); + Label label = new Label("--- NEW LABEL ---"); + label.setWidth(null); + vlo.addComponent(label); button2.setEnabled(false); button3.setEnabled(true); } diff --git a/uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java b/uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java index 654a282bb4..7764589ff7 100644 --- a/uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java +++ b/uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java @@ -110,6 +110,9 @@ public class VerticalLayoutTests extends AbstractLayoutTests { final VerticalLayout vlo = getTestLaytout(); final VerticalLayout vlo2 = getTestLaytout(); + // Set undefined height to avoid expanding + vlo2.setHeight(null); + final HorizontalLayout source = new HorizontalLayout(); source.addComponent(new Label("OTHER LABEL 1")); source.addComponent(new Label("OTHER LABEL 2"));