diff options
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", |