diff options
author | Artur Signell <artur.signell@itmill.com> | 2010-08-27 13:39:43 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2010-08-27 13:39:43 +0000 |
commit | e2ef5b56c7eabde95b568555293a45225c7205cb (patch) | |
tree | 8f00d05fbecbfbafa324c5d6a53ac28b931706b2 | |
parent | d229d531f9b52fd7b79e1fff4b3bc8736b4abec4 (diff) | |
download | vaadin-framework-e2ef5b56c7eabde95b568555293a45225c7205cb.tar.gz vaadin-framework-e2ef5b56c7eabde95b568555293a45225c7205cb.zip |
Test HorizontalLayout also as it behaves differently than VerticalLayout
Added another TextField to cover more cases
svn changeset:14645/svn branch:6.4
-rw-r--r-- | tests/src/com/vaadin/tests/layouts/CaptionsInLayouts.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/src/com/vaadin/tests/layouts/CaptionsInLayouts.java b/tests/src/com/vaadin/tests/layouts/CaptionsInLayouts.java index 6e02666f62..131c724f27 100644 --- a/tests/src/com/vaadin/tests/layouts/CaptionsInLayouts.java +++ b/tests/src/com/vaadin/tests/layouts/CaptionsInLayouts.java @@ -34,6 +34,7 @@ public class CaptionsInLayouts extends TestBase { private NativeSelect layoutSelect;
private Layout layout;
private VerticalLayout verticalLayout;
+ private HorizontalLayout horizontalLayout;
private GridLayout gridLayout;
private FormLayout formLayout;
private List<AbstractField> components = new ArrayList<AbstractField>();
@@ -145,13 +146,18 @@ public class CaptionsInLayouts extends TestBase { private void createComponents() {
TextField tfUndefWide = new TextField(
- "Undefined wide text field with a very long caption, longer than the field and the layout.");
+ "Undefined wide text field with a very long caption, longer than the field and the layout. Lorem ipsum dolor sit amet.");
TextField tf100pxWide = new TextField(
"100 px wide text field with a very long caption, longer than 100px.");
tf100pxWide.setWidth("100px");
+ TextField tf500pxWide = new TextField(
+ "500 px wide text field with a very long caption, longer than 500px. Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
+ tf500pxWide.setWidth("500px");
+
components.add(tfUndefWide);
components.add(tf100pxWide);
+ components.add(tf500pxWide);
}
@@ -179,6 +185,12 @@ public class CaptionsInLayouts extends TestBase { verticalLayout.setStyleName("borders");
}
l = verticalLayout;
+ } else if (layoutClass == HorizontalLayout.class) {
+ if (horizontalLayout == null) {
+ horizontalLayout = new HorizontalLayout();
+ horizontalLayout.setStyleName("borders");
+ }
+ l = horizontalLayout;
} else if (layoutClass == GridLayout.class) {
if (gridLayout == null) {
gridLayout = new GridLayout();
@@ -221,8 +233,9 @@ public class CaptionsInLayouts extends TestBase { layoutSelect.setItemCaptionPropertyId(CAPTION);
layoutSelect.setNullSelectionAllowed(false);
- for (Class cls : new Class[] { VerticalLayout.class, GridLayout.class,
- CssLayout.class, FormLayout.class }) {
+ for (Class<?> cls : new Class[] { HorizontalLayout.class,
+ VerticalLayout.class, GridLayout.class, CssLayout.class,
+ FormLayout.class }) {
for (String width : new String[] { "400px", "auto" }) {
Object id = layoutSelect.addItem();
Item i = layoutSelect.getItem(id);
|