diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-09-16 13:56:34 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-09-16 12:43:45 +0000 |
commit | 89df22ae86f870b984838940d73fbab0790452ca (patch) | |
tree | 736718bda8bf6840cb27b198660e69a4780656fd /uitest | |
parent | 07a3c3c07ccff25c8afeb623b9fd3ffee6d02361 (diff) | |
download | vaadin-framework-89df22ae86f870b984838940d73fbab0790452ca.tar.gz vaadin-framework-89df22ae86f870b984838940d73fbab0790452ca.zip |
Fix Grid validation with row change race condition (#18908)
Change-Id: I628f6b2921f800218a2e65d866b2332a9c574bda
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java | 16 |
1 files changed, 15 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 4fe88c6eac..984b03ac5b 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 @@ -114,12 +114,26 @@ public class GridEditorUnbufferedTest extends GridEditorTest { selectMenuPath(EDIT_ITEM_5); getEditorWidgets().get(1).click(); - getEditorWidgets().get(1).sendKeys("not a number"); + String faultyInt = "not a number"; + getEditorWidgets().get(1).sendKeys(faultyInt); getGridElement().getCell(10, 0).click(); assertEquals("Editor should not move from row 5", "(5, 0)", getEditorWidgets().get(0).getAttribute("value")); + + for (int i = 0; i < faultyInt.length(); ++i) { + getEditorWidgets().get(1).sendKeys(Keys.BACK_SPACE); + } + + // FIXME: Needs to trigger one extra validation round-trip for now + getGridElement().sendKeys(Keys.ENTER); + + getGridElement().getCell(10, 0).click(); + + assertEquals("Editor should not to row 10", "(10, 0)", + getEditorWidgets().get(0).getAttribute("value")); + } @Test |