summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2017-08-18 12:03:36 +0300
committerHenri Sara <henri.sara@gmail.com>2017-08-18 14:52:15 +0300
commit4f1d664497a0ae6f2ef5f7e63e0c483708b1350a (patch)
tree7052d382c4703a7646c0cdc579982f3420db9899 /uitest
parent81691c6c2df5c755d4c288dfbc61eab455638f45 (diff)
downloadvaadin-framework-4f1d664497a0ae6f2ef5f7e63e0c483708b1350a.tar.gz
vaadin-framework-4f1d664497a0ae6f2ef5f7e63e0c483708b1350a.zip
Fix state update on Grid Column hide in client (#9836)
Fixes #9152
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnHidingTest.java21
1 files changed, 20 insertions, 1 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnHidingTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnHidingTest.java
index a8a1d8f229..e1b5939ead 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnHidingTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridColumnHidingTest.java
@@ -26,8 +26,8 @@ import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import com.vaadin.testbench.By;
-import com.vaadin.testbench.elements.GridElement;
import com.vaadin.testbench.elements.ButtonElement;
+import com.vaadin.testbench.elements.GridElement;
import com.vaadin.testbench.elements.GridElement.GridCellElement;
import com.vaadin.testbench.elements.LabelElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
@@ -89,6 +89,25 @@ public class GridColumnHidingTest extends MultiBrowserTest {
}
@Test
+ public void clientHideServerShowColumns() {
+ openTestURL();
+ GridElement grid = $(GridElement.class).first();
+
+ getSidebarOpenButton(grid).click();
+ // Assuming client-side hiding works. See clientHideColumns()
+ getColumnHidingToggle(grid, "custom age column caption").click();
+ getColumnHidingToggle(grid, "Name").click();
+
+ // Show from server
+ $(ButtonElement.class).caption("server side toggle age column").first()
+ .click();
+ Assert.assertEquals("46", grid.getCell(0, 0).getText());
+ Assert.assertEquals("18", grid.getCell(1, 0).getText());
+ Assert.assertEquals("yeah@cool.com", grid.getCell(0, 1).getText());
+ Assert.assertEquals("maya@foo.bar", grid.getCell(1, 1).getText());
+ }
+
+ @Test
public void columnVisibilityChangeListener() {
openTestURL();
GridElement grid = $(GridElement.class).first();