diff options
author | Artur <artur@vaadin.com> | 2017-01-30 15:19:55 +0200 |
---|---|---|
committer | Denis <denis@vaadin.com> | 2017-01-30 15:19:55 +0200 |
commit | 8405496a7a6f6808fe829485c677bb73b4fa670c (patch) | |
tree | 10d4f82c2efe09f8cb2dde070e080d4f83886e0a /uitest | |
parent | 131e4f34bddf99d61a76fcd49890490c78c3efa8 (diff) | |
download | vaadin-framework-8405496a7a6f6808fe829485c677bb73b4fa670c.tar.gz vaadin-framework-8405496a7a6f6808fe829485c677bb73b4fa670c.zip |
Prevent reorder of frozen columns when there are hidden columns (#8278)
* Rename variables to indicate whether they use DOM index or Grid index
Grid indexes include hidden columns, DOM/Escalator indexes do not
* Prevent reorder of frozen columns when there are hidden columns
Fixes #8265
* Merge branch '7.7' into _grid-no-reorder-of-frozen-columns
* Merge branch '7.7' into _grid-no-reorder-of-frozen-columns
* Merge branch '7.7' into _grid-no-reorder-of-frozen-columns
* Merge branch '7.7' into _grid-no-reorder-of-frozen-columns
* Merge branch '7.7' into _grid-no-reorder-of-frozen-columns
* Merge branch '7.7' into _grid-no-reorder-of-frozen-columns
* Merge branch '7.7' into _grid-no-reorder-of-frozen-columns
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnReorderTest.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnReorderTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnReorderTest.java index c6d6f44a00..6e83c2503f 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnReorderTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnReorderTest.java @@ -209,6 +209,29 @@ public class GridColumnReorderTest extends GridBasicFeaturesTest { } @Test + public void testColumnReorder_draggingFrozenColumnsContainingHiddenColumns_impossible() { + // given + openTestURL(); + selectMenuPath("Component", "Size", "Width", "900px"); + toggleColumnReordering(); + setFrozenColumns(4); + toggleColumnHidden(1); + toggleColumnHidden(2); + assertColumnHeaderOrder(0, 3, 4, 5); + + // when + // drag frozen column out between non-frozen columns + dragAndDropDefaultColumnHeader(1, 2, CellSide.RIGHT); + + // then + // everything should be as before + assertColumnHeaderOrder(0, 3, 4, 5); + assertTrue(getGridElement().getHeaderCell(0, 0).isFrozen()); + assertTrue(getGridElement().getHeaderCell(0, 1).isFrozen()); + assertFalse(getGridElement().getHeaderCell(0, 2).isFrozen()); + } + + @Test public void testColumnReorder_draggingColumnOnTopOfFrozenColumn_columnDroppedRightOfFrozenColumns() { // given openTestURL(); |