diff options
3 files changed, 33 insertions, 1 deletions
diff --git a/client/src/main/java/com/vaadin/client/widgets/Escalator.java b/client/src/main/java/com/vaadin/client/widgets/Escalator.java index d85dd7054b..7d2ca986a7 100644 --- a/client/src/main/java/com/vaadin/client/widgets/Escalator.java +++ b/client/src/main/java/com/vaadin/client/widgets/Escalator.java @@ -6461,7 +6461,7 @@ public class Escalator extends Widget * @see #setHeightMode(HeightMode) */ public void setHeightByRows(double rows) throws IllegalArgumentException { - if (rows <= 0) { + if (rows < 0) { throw new IllegalArgumentException( "The number of rows must be a positive number."); } else if (Double.isInfinite(rows)) { diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/TreeDefaultConstructor.java b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeDefaultConstructor.java new file mode 100644 index 0000000000..831f80e521 --- /dev/null +++ b/uitest/src/main/java/com/vaadin/tests/components/tree/TreeDefaultConstructor.java @@ -0,0 +1,13 @@ +package com.vaadin.tests.components.tree; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Tree; + +public class TreeDefaultConstructor extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + addComponent(new Tree<>()); + } +} diff --git a/uitest/src/test/java/com/vaadin/tests/components/tree/TreeDefaultConstructorTest.java b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeDefaultConstructorTest.java new file mode 100644 index 0000000000..8f55f800e9 --- /dev/null +++ b/uitest/src/test/java/com/vaadin/tests/components/tree/TreeDefaultConstructorTest.java @@ -0,0 +1,19 @@ +package com.vaadin.tests.components.tree; + +import static org.junit.Assert.assertFalse; + +import org.junit.Test; +import org.openqa.selenium.By; + +import com.vaadin.tests.tb3.SingleBrowserTest; + +public class TreeDefaultConstructorTest extends SingleBrowserTest { + + @Test + public void default_constructor_no_exceptions() { + setDebug(true); + openTestURL(); + assertNoErrorNotifications(); + assertFalse(isElementPresent(By.className("v-errorindicator"))); + } +} |