summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2015-12-15 15:59:55 +0200
committerHenri Sara <hesara@vaadin.com>2015-12-16 14:45:45 +0000
commit3514c57b34f4906ad76fde9b26a34c9818b5d083 (patch)
tree7a4d45b63d567423bb05ef109cd23494c0216307 /uitest
parentbbe732791e4f99331b6f93b89244a5f2e2b05b52 (diff)
downloadvaadin-framework-3514c57b34f4906ad76fde9b26a34c9818b5d083.tar.gz
vaadin-framework-3514c57b34f4906ad76fde9b26a34c9818b5d083.zip
Fix Grid column resize to take account min width for cells (#16597)
Use Escalator cell size calculation without content to determine the absolute minimum size for cells. This is used in Grid when drag resizing or sorting columns to prevent cells from overflowing to the next row. Change-Id: I2d598232d7d2b8729b11fe190b68ca3e42ee3652
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java
index a2417bb02f..5253e0fff9 100644
--- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java
+++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridColumnResizeTest.java
@@ -121,4 +121,14 @@ public class GridColumnResizeTest extends GridBasicFeaturesTest {
cell.isElementPresent(By
.cssSelector("div.v-grid-column-resize-handle")));
}
+
+ @Test
+ public void testShrinkColumnToZero() {
+ openTestURL();
+ GridCellElement cell = getGridElement().getCell(0, 1);
+ dragResizeColumn(1, 0, cell.getSize().getWidth());
+
+ assertGreaterOrEqual("Cell got too small.", cell.getSize().getWidth(),
+ 10);
+ }
}