diff options
author | Marco Collovati <mcollovati@gmail.com> | 2018-01-09 14:42:49 +0100 |
---|---|---|
committer | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-01-09 15:42:49 +0200 |
commit | 44d4eab3535e89410e4fe4aa54c1912f701769ff (patch) | |
tree | ca6379f3afafe94dbba6311772c8c6edc733e5d1 /uitest | |
parent | 4a58876ee5bd0f599db343bf40ffef06c2e5eaba (diff) | |
download | vaadin-framework-44d4eab3535e89410e4fe4aa54c1912f701769ff.tar.gz vaadin-framework-44d4eab3535e89410e4fe4aa54c1912f701769ff.zip |
Fix space key on selection checkbox to select grid row (#10388)
Fixes #10221
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectionTest.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectionTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectionTest.java index ba29ec807f..87a29085fa 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectionTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectionTest.java @@ -445,6 +445,24 @@ public class GridSelectionTest extends GridBasicsTest { } + @Test + public void spaceKeyOnSelectionCheckboxShouldToggleRowSelection() { + openTestURL(); + setSelectionModelMulti(); + + getSelectionCheckbox(1).sendKeys(Keys.SPACE); + assertSelected(1); + + getSelectionCheckbox(2).sendKeys(Keys.SPACE); + assertSelected(1, 2); + + getSelectionCheckbox(2).sendKeys(Keys.SPACE); + assertSelected(1); + + getSelectionCheckbox(1).sendKeys(Keys.SPACE); + assertSelected(); + } + private void assertSelected(Integer... selected) { GridElement grid = getGridElement(); HashSet<Integer> expected = new HashSet<Integer>( |