diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java new file mode 100644 index 0000000000..e57651ba03 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleInTabsheetTest.java @@ -0,0 +1,27 @@ +package com.vaadin.tests.components.tabsheet; + + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.TabSheetElement; +import com.vaadin.tests.tb3.MultiBrowserTest; +import junit.framework.Assert; +import org.junit.Test; + +public class FirstTabNotVisibleInTabsheetTest extends MultiBrowserTest { + @Test + public void testFirstTabIsVisibleAfterBeingInvisible() { + openTestURL(); + + toggleFirstTabVisibility(); + toggleFirstTabVisibility(); + + TabSheetElement tabSheet = $(TabSheetElement.class).first(); + + Assert.assertTrue("TabSheet should have first tab visible", + tabSheet.getTabCaptions().contains("first visible tab")); + } + + private void toggleFirstTabVisibility() { + $(ButtonElement.class).caption("Toggle first tab").first().click(); + } +} |