aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/test
diff options
context:
space:
mode:
authorArtur <artur@vaadin.com>2017-03-09 11:35:45 +0200
committerPekka Hyvönen <pekka@vaadin.com>2017-03-09 11:35:45 +0200
commit610c6522da483b7b05cba1a71d7451642e916dc5 (patch)
treed50b416813c3975638a0751ba21a09a7bf6b9a04 /server/src/test
parent761c94ab2e1019f7d83d4e8d63254de1ee591d75 (diff)
downloadvaadin-framework-610c6522da483b7b05cba1a71d7451642e916dc5.tar.gz
vaadin-framework-610c6522da483b7b05cba1a71d7451642e916dc5.zip
Correctly detach components in merged cells (#8773)
* Correctly detach components in merged cells This was already once fixed in 7.7 in #8142
Diffstat (limited to 'server/src/test')
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/grid/GridChildrenTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/server/src/test/java/com/vaadin/tests/server/component/grid/GridChildrenTest.java b/server/src/test/java/com/vaadin/tests/server/component/grid/GridChildrenTest.java
index 4959169cf8..97cfe6ebc7 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/grid/GridChildrenTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/grid/GridChildrenTest.java
@@ -64,6 +64,17 @@ public class GridChildrenTest {
}
@Test
+ public void removeHeaderWithComponentInMergedHeaderCell() {
+ HeaderCell merged = grid.getDefaultHeaderRow().join("foo", "bar",
+ "baz");
+ Label label = new Label();
+ merged.setComponent(label);
+ Assert.assertEquals(grid, label.getParent());
+ grid.removeHeaderRow(0);
+ Assert.assertNull(label.getParent());
+ }
+
+ @Test
public void removeComponentInMergedFooterCell() {
FooterCell merged = grid.addFooterRowAt(0).join("foo", "bar", "baz");
Label label = new Label();
@@ -74,6 +85,16 @@ public class GridChildrenTest {
}
@Test
+ public void removeFooterWithComponentInMergedFooterCell() {
+ FooterCell merged = grid.addFooterRowAt(0).join("foo", "bar", "baz");
+ Label label = new Label();
+ merged.setComponent(label);
+ Assert.assertEquals(grid, label.getParent());
+ grid.removeFooterRow(0);
+ Assert.assertNull(label.getParent());
+ }
+
+ @Test
public void componentsInMergedFooter() {
FooterCell merged = grid.addFooterRowAt(0).join("foo", "bar", "baz");
Label label = new Label();