From 97a75f1abcbd1c9001a7ff5b75713e3a913748cb Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 19 Oct 2016 22:50:22 +0300 Subject: Make Grid isWorkPending wait for scroll events to complete (#20417) Change-Id: I3cfdac539111ff2e88c7ff81e6d6b9a579160423 --- .../grid/basicfeatures/server/GridScrollTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'uitest/src/test') 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); + } + } -- cgit v1.2.3