diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-12-16 14:57:58 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-12-18 11:44:18 +0000 |
commit | 2278f678fc9d3199825399b4bd3fba6659048877 (patch) | |
tree | 7f85289d1508924928f41a59acf6189a3e8f8b7b /uitest | |
parent | 158b83d98b99b61712bf79bdb710fd85bd691a3a (diff) | |
download | vaadin-framework-2278f678fc9d3199825399b4bd3fba6659048877.tar.gz vaadin-framework-2278f678fc9d3199825399b4bd3fba6659048877.zip |
Fix IE8 focus handling in Grid editor in unbuffered state (#19389)
Change-Id: Ia77c246239cae7b0add3c4975dfa5ffaa42d08b6
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java | 26 |
1 files changed, 19 insertions, 7 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 eaa58254ba..c4d1893875 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 @@ -83,12 +83,17 @@ public class GridEditorUnbufferedTest extends GridEditorTest { } @Test - public void testEditorMoveWithKeyboard() { + public void testEditorMoveWithKeyboard() throws InterruptedException { selectMenuPath(EDIT_ITEM_100); assertEditorOpen(); - getGridElement().sendKeys(Keys.ENTER); + getEditorWidgets().get(0).click(); + new Actions(getDriver()).sendKeys(Keys.ENTER).perform(); + + if (BrowserUtil.isIE8(getDesiredCapabilities())) { + sleep(300); + } String firstFieldValue = getEditorWidgets().get(0) .getAttribute("value"); @@ -96,11 +101,18 @@ public class GridEditorUnbufferedTest extends GridEditorTest { firstFieldValue); for (int i = 0; i < 10; i++) { - getGridElement().sendKeys(Keys.SHIFT, Keys.ENTER); - } + new Actions(getDriver()).keyDown(Keys.SHIFT).sendKeys(Keys.ENTER) + .keyUp(Keys.SHIFT).perform(); - firstFieldValue = getEditorWidgets().get(0).getAttribute("value"); - assertEquals("Editor should move to row 91", "(91, 0)", firstFieldValue); + if (BrowserUtil.isIE8(getDesiredCapabilities())) { + sleep(300); + } + + firstFieldValue = getEditorWidgets().get(0).getAttribute("value"); + int row = 100 - i; + assertEquals("Editor should move to row " + row, + "(" + row + ", 0)", firstFieldValue); + } } @Test @@ -133,7 +145,7 @@ public class GridEditorUnbufferedTest extends GridEditorTest { getGridElement().getCell(10, 0).click(); - assertEquals("Editor should not to row 10", "(10, 0)", + assertEquals("Editor should move to row 10", "(10, 0)", getEditorWidgets().get(0).getAttribute("value")); } |