diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2015-04-30 13:40:45 +0300 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2015-04-30 13:40:52 +0300 |
commit | ef9fb276a93d1a7967ef0e6405dee56c8aa2a148 (patch) | |
tree | 622280f6e6e2904fef61c3483fe36e14ab6b924d /server/tests | |
parent | a9bc160aee00b93340ac3f047505e032d4a696b0 (diff) | |
parent | bbf30fff168fd4a9552d23c8341e27aa1821884b (diff) | |
download | vaadin-framework-ef9fb276a93d1a7967ef0e6405dee56c8aa2a148.tar.gz vaadin-framework-ef9fb276a93d1a7967ef0e6405dee56c8aa2a148.zip |
Merge branch 'grid-7.5'
Change-Id: Ifa976fa4be1258fd35999de17775da70afedb2a8
Diffstat (limited to 'server/tests')
3 files changed, 16 insertions, 2 deletions
diff --git a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java index 1c22a69571..6cf9ef55ad 100644 --- a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridColumnDeclarativeTest.java @@ -28,6 +28,8 @@ public class GridColumnDeclarativeTest extends GridDeclarativeTestBase { + " <col sortable=true width='100' property-id='Column1'>" + " <col sortable=false max-width='200' expand='2' property-id='Column2'>" + " <col sortable=true editable=false min-width='15' expand='1' property-id='Column3'>" + + " <col sortable=true hidable=true hiding-toggle-caption='col 4' property-id='Column4'>" + + " <col sortable=true hidden=true property-id='Column5'>" + "</colgroup>" // + "<thead />" // + "</table></v-grid>"; @@ -37,6 +39,9 @@ public class GridColumnDeclarativeTest extends GridDeclarativeTestBase { .setExpandRatio(2).setSortable(false); grid.addColumn("Column3", String.class).setMinimumWidth(15) .setExpandRatio(1).setEditable(false); + grid.addColumn("Column4", String.class).setHidable(true) + .setHidingToggleCaption("col 4"); + grid.addColumn("Column5", String.class).setHidden(true); // Remove the default header grid.removeHeaderRow(grid.getDefaultHeaderRow()); @@ -53,6 +58,7 @@ public class GridColumnDeclarativeTest extends GridDeclarativeTestBase { + " <col sortable=true width='100' property-id='Column1'>" + " <col sortable=true max-width='200' expand='2'>" // property-id="property-1" + " <col sortable=true min-width='15' expand='1' property-id='Column3'>" + + " <col sortable=true hidden=true hidable=true hiding-toggle-caption='col 4'>" // property-id="property-3" + "</colgroup>" // + "</table></v-grid>"; Grid grid = new Grid(); @@ -61,6 +67,8 @@ public class GridColumnDeclarativeTest extends GridDeclarativeTestBase { .setExpandRatio(2); grid.addColumn("Column3", String.class).setMinimumWidth(15) .setExpandRatio(1); + grid.addColumn("property-3", String.class).setHidable(true) + .setHidden(true).setHidingToggleCaption("col 4"); testRead(design, grid); } diff --git a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java index b8268b1ae3..8ffe749f6f 100644 --- a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java +++ b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeAttributeTest.java @@ -38,7 +38,7 @@ public class GridDeclarativeAttributeTest extends DeclarativeTestBase<Grid> { public void testBasicAttributes() { String design = "<v-grid editable='true' rows=20 frozen-columns=-1 " - + "editor-save-caption='Tallenna' editor-cancel-caption='Peruuta'>"; + + "editor-save-caption='Tallenna' editor-cancel-caption='Peruuta' column-reordering-allowed=true>"; Grid grid = new Grid(); grid.setEditorEnabled(true); @@ -47,6 +47,7 @@ public class GridDeclarativeAttributeTest extends DeclarativeTestBase<Grid> { grid.setFrozenColumnCount(-1); grid.setEditorSaveCaption("Tallenna"); grid.setEditorCancelCaption("Peruuta"); + grid.setColumnReorderingAllowed(true); testRead(design, grid); testWrite(design, grid); diff --git a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeTestBase.java b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeTestBase.java index 2a4b3f01fc..9424d89ecf 100644 --- a/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeTestBase.java +++ b/server/tests/src/com/vaadin/tests/server/component/grid/declarative/GridDeclarativeTestBase.java @@ -147,7 +147,12 @@ public class GridDeclarativeTestBase extends DeclarativeTestBase<Grid> { col2.isSortable()); assertEquals(baseError + "Editable", col1.isEditable(), col2.isEditable()); - + assertEquals(baseError + "Hidable", col1.isHidable(), + col2.isHidable()); + assertEquals(baseError + "Hidden", col1.isHidden(), col2.isHidden()); + assertEquals(baseError + "HidingToggleCaption", + col1.getHidingToggleCaption(), + col2.getHidingToggleCaption()); } } } |