diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2015-09-14 12:05:46 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-09-15 13:18:13 +0000 |
commit | c522410a1404015bcd4c0278b7e7a71c43a68266 (patch) | |
tree | b26dbae7022c53a14335a29efc214f49f3cf6d8c /uitest | |
parent | 17184829f3b825e31cf926c23f2bb216ac1eca09 (diff) | |
download | vaadin-framework-c522410a1404015bcd4c0278b7e7a71c43a68266.tar.gz vaadin-framework-c522410a1404015bcd4c0278b7e7a71c43a68266.zip |
Fix scrolling bug when moving Grid editor upsnapshot/7.6
Change-Id: I005e17ec8ce7927e5fc36975b1e784444d5904b7
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java index 0b84d3470f..4fe88c6eac 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java @@ -66,7 +66,7 @@ public class GridEditorUnbufferedTest extends GridEditorTest { } @Test - public void testEditorMove() { + public void testEditorMoveWithMouse() { selectMenuPath(EDIT_ITEM_5); assertEditorOpen(); @@ -82,6 +82,27 @@ public class GridEditorUnbufferedTest extends GridEditorTest { } @Test + public void testEditorMoveWithKeyboard() { + selectMenuPath(EDIT_ITEM_100); + + assertEditorOpen(); + + getGridElement().sendKeys(Keys.ENTER); + + String firstFieldValue = getEditorWidgets().get(0) + .getAttribute("value"); + assertEquals("Editor should move to row 101", "(101, 0)", + firstFieldValue); + + for (int i = 0; i < 10; i++) { + getGridElement().sendKeys(Keys.SHIFT, Keys.ENTER); + } + + firstFieldValue = getEditorWidgets().get(0).getAttribute("value"); + assertEquals("Editor should move to row 91", "(91, 0)", firstFieldValue); + } + + @Test public void testValidationErrorPreventsMove() { // Because of "out of view" issues, we need to move this for easy access selectMenuPath("Component", "Columns", "Column 7", "Column 7 Width", |