summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorAdam Wagner <wbadam@users.noreply.github.com>2017-12-19 11:08:18 +0200
committerOlli Tietäväinen <ollit@vaadin.com>2017-12-19 11:08:18 +0200
commit31fb84fc6f23ac2bd47bb2e9dfe95399bbee5ec4 (patch)
tree66a39a5af01c39cd4ed4e9c521ccd1078f38c0f9 /uitest
parented7059e48523d4fea7056e55faa1d2ad2c5ba614 (diff)
downloadvaadin-framework-31fb84fc6f23ac2bd47bb2e9dfe95399bbee5ec4.tar.gz
vaadin-framework-31fb84fc6f23ac2bd47bb2e9dfe95399bbee5ec4.zip
Fix column width resize event firing when mode is SIMPLE (#10452)
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnResizeModeTest.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnResizeModeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnResizeModeTest.java
index d24fe19639..ac9a505f07 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnResizeModeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basicfeatures/GridColumnResizeModeTest.java
@@ -23,6 +23,7 @@ import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import com.vaadin.testbench.By;
+import com.vaadin.testbench.elements.GridElement.GridCellElement;
import com.vaadin.testbench.parallel.TestCategory;
import com.vaadin.tests.components.grid.basicfeatures.element.CustomGridElement;
@@ -74,4 +75,33 @@ public class GridColumnResizeModeTest extends GridBasicFeaturesTest {
}
+
+ @Test
+ public void testSimpleResizeModeMultipleDrag() throws Exception {
+ CustomGridElement grid = getGridElement();
+
+ List<WebElement> handles = grid
+ .findElements(By.className("v-grid-column-resize-handle"));
+ WebElement handle = handles.get(1);
+
+ GridCellElement cell = grid.getHeaderCell(0, 1);
+
+ int initialWidth = cell.getSize().getWidth();
+
+ selectMenuPath("Component", "Columns", "Simple resize mode");
+ sleep(250);
+
+ drag(handle, 100);
+ sleep(500);
+ Assert.assertEquals(initialWidth + 100, cell.getSize().getWidth());
+
+ drag(handle, -100);
+ sleep(500);
+ Assert.assertEquals(initialWidth, cell.getSize().getWidth());
+ }
+
+ private void drag(WebElement handle, int xOffset) {
+ new Actions(getDriver()).moveToElement(handle).clickAndHold()
+ .moveByOffset(xOffset, 0).release().perform();
+ }
}