aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2014-12-09 15:57:48 +0200
committerTeemu Suo-Anttila <teemusa@vaadin.com>2014-12-10 11:23:54 +0200
commita8fa4735466c4c4e52efd2baff3f77c106143eed (patch)
treeaf19949060b86d6e90a99a24a3f58ee3ef537fe5 /uitest/src
parent8f52c9801589824a18a80ad6c03ae1312dbfd7fd (diff)
downloadvaadin-framework-a8fa4735466c4c4e52efd2baff3f77c106143eed.tar.gz
vaadin-framework-a8fa4735466c4c4e52efd2baff3f77c106143eed.zip
Introduce GridClickEvents and handlers (#13334)
This patch also adds body cell click selecting to single selection model to test this feature. Change-Id: I06819799c97457dc0e7bd38dd5855eb33ba91943
Diffstat (limited to 'uitest/src')
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridSelectionTest.java14
1 files changed, 9 insertions, 5 deletions
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());
}