aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/test/java')
-rw-r--r--server/src/test/java/com/vaadin/tests/components/TreeTest.java5
-rw-r--r--server/src/test/java/com/vaadin/tests/components/treegrid/TreeGridTest.java2
2 files changed, 5 insertions, 2 deletions
diff --git a/server/src/test/java/com/vaadin/tests/components/TreeTest.java b/server/src/test/java/com/vaadin/tests/components/TreeTest.java
index 9224934a4c..c4ee9ae3d5 100644
--- a/server/src/test/java/com/vaadin/tests/components/TreeTest.java
+++ b/server/src/test/java/com/vaadin/tests/components/TreeTest.java
@@ -56,8 +56,7 @@ public class TreeTest {
treeData.addItem(null, "Foo");
treeData.addItem("Foo", "Bar");
treeData.addItem("Foo", "Baz");
- tree.setDataProvider(
- new TreeDataProvider<>(treeData));
+ tree.setDataProvider(new TreeDataProvider<>(treeData));
TreeCollapseExpandListener listener = new TreeCollapseExpandListener(
tree);
@@ -66,9 +65,11 @@ public class TreeTest {
Assert.assertFalse(listener.isExpanded());
tree.expand("Foo");
+ Assert.assertTrue("Item not expanded", tree.isExpanded("Foo"));
Assert.assertTrue("Expand event not fired", listener.isExpanded());
Assert.assertFalse(listener.isCollapsed());
tree.collapse("Foo");
+ Assert.assertFalse("Item not collapsed", tree.isExpanded("Foo"));
Assert.assertTrue("Collapse event not fired", listener.isCollapsed());
}
diff --git a/server/src/test/java/com/vaadin/tests/components/treegrid/TreeGridTest.java b/server/src/test/java/com/vaadin/tests/components/treegrid/TreeGridTest.java
index 1f900688c4..fdaacae48b 100644
--- a/server/src/test/java/com/vaadin/tests/components/treegrid/TreeGridTest.java
+++ b/server/src/test/java/com/vaadin/tests/components/treegrid/TreeGridTest.java
@@ -35,11 +35,13 @@ public class TreeGridTest {
// Test expand event
Assert.assertFalse(expandEventFired);
treeGrid.expand("Foo");
+ Assert.assertTrue("Item not expanded", treeGrid.isExpanded("Foo"));
Assert.assertTrue("Expand event not fired", expandEventFired);
// Test collapse event
Assert.assertFalse(collapseEventFired);
treeGrid.collapse("Foo");
+ Assert.assertFalse("Item not collapsed", treeGrid.isExpanded("Foo"));
Assert.assertTrue("Collapse event not fired", collapseEventFired);
}
}