summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2016-10-19 22:50:22 +0300
committerPekka Hyvönen <pekka@vaadin.com>2016-12-09 09:39:00 +0200
commit97a75f1abcbd1c9001a7ff5b75713e3a913748cb (patch)
tree2b235993e96a42f63c2bfa989d8cc3a2d05776cc /uitest
parenta30c614552d22f1b5817e0c2757fa05ab0df8736 (diff)
downloadvaadin-framework-97a75f1abcbd1c9001a7ff5b75713e3a913748cb.tar.gz
vaadin-framework-97a75f1abcbd1c9001a7ff5b75713e3a913748cb.zip
Make Grid isWorkPending wait for scroll events to complete (#20417)
Change-Id: I3cfdac539111ff2e88c7ff81e6d6b9a579160423
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridScrollTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridScrollTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridScrollTest.java
index 4f10c5b72a..1c6ae8b44e 100644
--- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridScrollTest.java
+++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridScrollTest.java
@@ -54,4 +54,18 @@ public class GridScrollTest extends GridBasicFeaturesTest {
"0. Requested items 247 - 346", getLogRow(0));
assertEquals("There should be only one log row", " ", getLogRow(1));
}
+
+ @Test
+ public void workPendingWhileScrolling() {
+ openTestURL("theme=valo");
+ String script = "var c = window.vaadin.clients.runcomvaadintestscomponentsgridbasicfeaturesGridBasicFeatures;\n"
+ // Scroll down and cause lazy loading
+ + "c.getElementByPath(\"//Grid[0]#cell[21]\"); \n"
+ + "return c.isActive();";
+
+ Boolean active = (Boolean) executeScript(script);
+ assertTrue("Grid should be marked to have workPending while scrolling",
+ active);
+ }
+
}