diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-09-07 14:36:03 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-09-07 14:28:10 +0000 |
commit | c41cd67905bb621a0032a1fc5bed938629f76f77 (patch) | |
tree | aac8acb8c8f535b1442335857d3e9648e0eb5d4e /uitest | |
parent | 8ffe48687ae367a765e3e54721c2821d8d773c2d (diff) | |
download | vaadin-framework-c41cd67905bb621a0032a1fc5bed938629f76f77.tar.gz vaadin-framework-c41cd67905bb621a0032a1fc5bed938629f76f77.zip |
Save editor content on keyboard editor move (#18809)
Change-Id: I1bb3e352c87fac491269c1ca93f6acdff8bb97eb
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorUnbufferedTest.java | 22 |
1 files changed, 22 insertions, 0 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 08094b57e3..0b84d3470f 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 @@ -26,6 +26,7 @@ import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; +import com.vaadin.testbench.TestBenchElement; import com.vaadin.testbench.elements.GridElement.GridCellElement; public class GridEditorUnbufferedTest extends GridEditorTest { @@ -220,4 +221,25 @@ public class GridEditorUnbufferedTest extends GridEditorTest { assertEditorClosed(); } + + @Test + public void testEditorSaveOnRowChange() { + // Double click sets the focus programmatically + getGridElement().getCell(5, 2).doubleClick(); + + TestBenchElement editor = getGridElement().getEditor().getField(2); + editor.clear(); + // Click to ensure IE focus... + editor.click(5, 5); + editor.sendKeys("Foo", Keys.ENTER); + + assertEquals("Editor did not move.", "(6, 0)", getGridElement() + .getEditor().getField(0).getAttribute("value")); + assertEquals("Editor field value did not update from server.", + "(6, 2)", getGridElement().getEditor().getField(2) + .getAttribute("value")); + + assertEquals("Edited value was not saved.", "Foo", getGridElement() + .getCell(5, 2).getText()); + } }
\ No newline at end of file |