summaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-12-10 16:35:50 +0200
committerJohn Ahlroos <john@vaadin.com>2013-12-10 16:35:50 +0200
commiteb75c09574249687d9ea3899791c8daa3fcec314 (patch)
tree867b3fb40d55533a8d7cde2effd137cbe4b8bd1b /server/tests
parentb7dddff607f70d6f27104d98a086e7541a32aded (diff)
downloadvaadin-framework-eb75c09574249687d9ea3899791c8daa3fcec314.tar.gz
vaadin-framework-eb75c09574249687d9ea3899791c8daa3fcec314.zip
Validate column group boundaries #12907
Change-Id: I5078d97c5a6bc92f59d0d04eca2a2cfc27c973b4
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/grid/GridColumnGroups.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/server/tests/src/com/vaadin/tests/server/component/grid/GridColumnGroups.java b/server/tests/src/com/vaadin/tests/server/component/grid/GridColumnGroups.java
index 11dc48f7d5..4350bf1a7b 100644
--- a/server/tests/src/com/vaadin/tests/server/component/grid/GridColumnGroups.java
+++ b/server/tests/src/com/vaadin/tests/server/component/grid/GridColumnGroups.java
@@ -233,4 +233,33 @@ public class GridColumnGroups {
}
}
+
+ @Test
+ public void testColumnGroupLimits() throws Exception {
+
+ ColumnGroupRow row = grid.addColumnGroupRow();
+ row.addGroup("column1", "column2");
+ row.addGroup("column3", "column4");
+
+ try {
+ row.addGroup("column2", "column3");
+ fail("Adding a group with already grouped properties should throw exception");
+ } catch (IllegalArgumentException iae) {
+
+ }
+
+ ColumnGroupRow row2 = grid.addColumnGroupRow();
+
+ try {
+ row2.addGroup("column2", "column3");
+ fail("Adding a group that breaks previous grouping boundaries should throw exception");
+ } catch (IllegalArgumentException iae) {
+
+ }
+
+ // This however should not throw an exception as it spans completely
+ // over the parent rows groups
+ row2.addGroup("column1", "column2", "column3", "column4");
+
+ }
}