diff options
author | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-05-04 14:53:21 +0300 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2018-05-04 14:53:21 +0300 |
commit | 7aa9c79617009e6b33b710873ebdbddd9b91a463 (patch) | |
tree | a1bc5db9f27f32aeabb00104855841f592c71a37 /uitest/src/test/java | |
parent | a50b5d5fcd55fe0bf0241c77d040ebfd65baa233 (diff) | |
download | vaadin-framework-7aa9c79617009e6b33b710873ebdbddd9b91a463.tar.gz vaadin-framework-7aa9c79617009e6b33b710873ebdbddd9b91a463.zip |
Fix Grid initial data when changing TabSheet Tab (#10872)
Diffstat (limited to 'uitest/src/test/java')
-rw-r--r-- | uitest/src/test/java/com/vaadin/tests/components/grid/GridInTabSheetTest.java | 17 |
1 files changed, 17 insertions, 0 deletions
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(); } |