From 7aa9c79617009e6b33b710873ebdbddd9b91a463 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Fri, 4 May 2018 14:53:21 +0300 Subject: Fix Grid initial data when changing TabSheet Tab (#10872) --- .../tests/components/grid/GridInTabSheetTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'uitest/src/test/java') diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridInTabSheetTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridInTabSheetTest.java index e20ec622c7..785bda8261 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridInTabSheetTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridInTabSheetTest.java @@ -2,6 +2,8 @@ package com.vaadin.tests.components.grid; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertTrue; import org.junit.Test; @@ -68,6 +70,21 @@ public class GridInTabSheetTest extends MultiBrowserTest { assertNoNotification(); } + @Test + public void testNoDataRequestFromClientWhenSwitchingTab() { + setDebug(true); + openTestURL(); + + TabSheetElement tabsheet = $(TabSheetElement.class).first(); + tabsheet.openTab("Label"); + tabsheet.openTab("Grid"); + + getLogs().forEach(logText -> assertTrue( + "There should be no logged requests, was: " + logText, + logText.trim().isEmpty())); + assertNoNotification(); + } + private void removeGridRow() { $(ButtonElement.class).caption("Remove row from Grid").first().click(); } -- cgit v1.2.3