summaryrefslogtreecommitdiffstats
path: root/uitest/src/test
diff options
context:
space:
mode:
authorAdam Wagner <wbadam@users.noreply.github.com>2018-02-06 11:10:33 +0200
committerIlia Motornyi <elmot@vaadin.com>2018-02-06 11:10:33 +0200
commitd9dd40d0e444224b734dccb98d6075aef4dd6b3e (patch)
tree4a6afe85ead6050774c41423752eb73730d250cd /uitest/src/test
parentd1749cbaf92f1a2dccd22ca15c3f785e0019ff9e (diff)
downloadvaadin-framework-d9dd40d0e444224b734dccb98d6075aef4dd6b3e.tar.gz
vaadin-framework-d9dd40d0e444224b734dccb98d6075aef4dd6b3e.zip
Fix Grid details height calculation issue (#10343)
Diffstat (limited to 'uitest/src/test')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridBasicDetailsTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridBasicDetailsTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridBasicDetailsTest.java
index 3cc1906dcc..68542268d5 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridBasicDetailsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridBasicDetailsTest.java
@@ -319,4 +319,21 @@ public class GridBasicDetailsTest extends GridBasicsTest {
getGridElement().getDetails(0).getText().contains("One"));
}
+ @Test
+ public void detailsSizeCorrectAfterScrolling() {
+ selectMenuPath(DETAILS_GENERATOR_PERSISTING);
+ selectMenuPath(OPEN_FIRST_ITEM_DETAILS);
+
+ // Scroll to request next range
+ getGridElement().scrollToRow(21);
+ getGridElement().scrollToRow(0);
+ assertGreater("Details row should have correct height",
+ getGridElement().getDetails(0).getSize().getHeight(), 30);
+
+ // Scroll outside of cached rows
+ getGridElement().scrollToRow(101);
+ getGridElement().scrollToRow(0);
+ assertGreater("Details row should have correct height",
+ getGridElement().getDetails(0).getSize().getHeight(), 30);
+ }
}