]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix some small issues in LayoutTesterApplication 75/575/1
authorLeif Åstrand <leif@vaadin.com>
Fri, 4 Jan 2013 13:34:01 +0000 (15:34 +0200)
committerLeif Åstrand <leif@vaadin.com>
Fri, 4 Jan 2013 13:34:01 +0000 (15:34 +0200)
Change-Id: I996c62309072102a284622fcda6090b447282bdf

uitest/src/com/vaadin/tests/layouts/layouttester/GridLayoutTests.java
uitest/src/com/vaadin/tests/layouts/layouttester/HorizontalLayoutTests.java
uitest/src/com/vaadin/tests/layouts/layouttester/VerticalLayoutTests.java

index 28f6dfdbc4a2b921622230218d3f5297b89aaa10..76fa8c6cc9ed0ea3d9fbf921adb4333f8d2a1788 100644 (file)
@@ -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;
 
index 113106a40b712dba744bad2033f0bc62622275ef..7a53a6583ea3751fb360823ac8ea66125275c685 100644 (file)
@@ -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);
             }
index 654a282bb453494dfbaba596156d7bb4565dd9c5..7764589ff712390b168b5f17f4a49a9da7a3a968 100644 (file)
@@ -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"));