diff options
author | Piotr Wilkin <piotr.wilkin@syndatis.com> | 2018-02-14 08:50:11 +0100 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2018-02-14 09:50:11 +0200 |
commit | fd4dedf921f6cf0f80bfedac8474562b41325e56 (patch) | |
tree | 1525309dadea9d8bbae74d04ea8650e17ee389dc /uitest/src | |
parent | 33647404e97b80bc12c7fde76d23ea4abe97bf4f (diff) | |
download | vaadin-framework-fd4dedf921f6cf0f80bfedac8474562b41325e56.tar.gz vaadin-framework-fd4dedf921f6cf0f80bfedac8474562b41325e56.zip |
Fixes Grid editor visibility inside TabSheet (#10557)
Fixes #10146
Fixes #10543
Diffstat (limited to 'uitest/src')
-rw-r--r-- | uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java | 2 | ||||
-rw-r--r-- | uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorTest.java | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java index 0deb5b1b3a..484452b6ac 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java +++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java @@ -792,6 +792,8 @@ public class GridBasics extends AbstractTestUIWithLog { editorMenu.addItem("Save", i -> grid.getEditor().save()); editorMenu.addItem("Cancel edit", i -> grid.getEditor().cancel()); + editorMenu.addItem("Hide grid", i -> grid.setVisible(false)); + editorMenu.addItem("Show grid", i -> grid.setVisible(true)); Stream.of(0, 5, 100).forEach(i -> editorMenu.addItem("Edit row " + i, menuItem -> grid.getEditor().editRow(i))); diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorTest.java index 832e5e6651..cd36a59d14 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/grid/basics/GridEditorTest.java @@ -15,10 +15,6 @@ */ package com.vaadin.tests.components.grid.basics; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import org.junit.Assert; import org.junit.Before; import org.junit.Ignore; @@ -32,6 +28,8 @@ import com.vaadin.testbench.TestBenchElement; import com.vaadin.testbench.elements.GridElement.GridCellElement; import com.vaadin.testbench.elements.GridElement.GridEditorElement; +import static org.junit.Assert.*; + public abstract class GridEditorTest extends GridBasicsTest { protected static final org.openqa.selenium.By BY_EDITOR_CANCEL = By @@ -58,6 +56,16 @@ public abstract class GridEditorTest extends GridBasicsTest { assertEditorClosed(); } + public void testEditorReopenAfterHide() { + editRow(5); + assertEditorOpen(); + selectMenuPath("Component", "Editor", "Hide grid"); + selectMenuPath("Component", "Editor", "Show grid"); + assertEditorClosed(); + editRow(5); + assertEditorOpen(); + } + @Test public void testKeyboardOpeningClosing() { |