From a8fa4735466c4c4e52efd2baff3f77c106143eed Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Tue, 9 Dec 2014 15:57:48 +0200 Subject: Introduce GridClickEvents and handlers (#13334) This patch also adds body cell click selecting to single selection model to test this feature. Change-Id: I06819799c97457dc0e7bd38dd5855eb33ba91943 --- .../grid/basicfeatures/server/GridSelectionTest.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'uitest/src') diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java index a242ad1dd1..3933099835 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java @@ -114,13 +114,13 @@ public class GridSelectionTest extends GridBasicFeaturesTest { grid.getCell(5, 0).click(); assertTrue("Fifth row was not selected.", getRow(5).isSelected()); assertFalse("First row was still selected.", getRow(0).isSelected()); - grid.getCell(0, 0).click(); + grid.getCell(0, 6).click(); toggleFirstRowSelection(); assertFalse("First row was still selected.", getRow(0).isSelected()); assertFalse("Fifth row was still selected.", getRow(5).isSelected()); grid.scrollToRow(600); - grid.getCell(595, 0).click(); + grid.getCell(595, 3).click(); assertTrue("Row 595 was not selected.", getRow(595).isSelected()); toggleFirstRowSelection(); assertFalse("Row 595 was still selected.", getRow(595).isSelected()); @@ -159,21 +159,25 @@ public class GridSelectionTest extends GridBasicFeaturesTest { GridElement grid = getGridElement(); grid.getCell(3, 1).click(); + + assertTrue("Grid row 3 was not selected with clicking.", grid.getRow(3) + .isSelected()); + new Actions(getDriver()).sendKeys(Keys.SPACE).perform(); - assertTrue("Grid row 3 was not selected with space key.", grid + assertTrue("Grid row 3 was not deselected with space key.", !grid .getRow(3).isSelected()); new Actions(getDriver()).sendKeys(Keys.SPACE).perform(); - assertTrue("Grid row 3 was not deselected with space key.", !grid + assertTrue("Grid row 3 was not selected with space key.", grid .getRow(3).isSelected()); grid.scrollToRow(500); new Actions(getDriver()).sendKeys(Keys.SPACE).perform(); - assertTrue("Grid row 3 was not selected with space key.", grid + assertTrue("Grid row 3 was not deselected with space key.", !grid .getRow(3).isSelected()); } -- cgit v1.2.3