summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebContent/VAADIN/themes/base/tabsheet/tabsheet.scss2
-rw-r--r--uitest/src/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.html37
-rw-r--r--uitest/src/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.java50
3 files changed, 88 insertions, 1 deletions
diff --git a/WebContent/VAADIN/themes/base/tabsheet/tabsheet.scss b/WebContent/VAADIN/themes/base/tabsheet/tabsheet.scss
index c58c25be58..e8cd536024 100644
--- a/WebContent/VAADIN/themes/base/tabsheet/tabsheet.scss
+++ b/WebContent/VAADIN/themes/base/tabsheet/tabsheet.scss
@@ -33,7 +33,7 @@
height: 1em;
padding: 0.2em 0;
}
-.v-tabsheet-hidetabs .v-tabsheet-tabcontainer {
+.v-tabsheet-hidetabs > .v-tabsheet-tabcontainer {
display: none;
}
.v-tabsheet-scroller {
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.html b/uitest/src/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.html
new file mode 100644
index 0000000000..cc018de5eb
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.html
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:8070/" />
+<title>NestedTabSheetsHideTabs</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">NestedTabSheetsHideTabs</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.tabsheet.NestedTabSheetsHideTabs?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstabsheetNestedTabSheetsHideTabs::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>78,6</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentstabsheetNestedTabSheetsHideTabs::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td>vaadin=runcomvaadintestscomponentstabsheetNestedTabSheetsHideTabs::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>outer-tabsheet-tabs-hidden</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.java b/uitest/src/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.java
new file mode 100644
index 0000000000..0e958e632c
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/tabsheet/NestedTabSheetsHideTabs.java
@@ -0,0 +1,50 @@
+package com.vaadin.tests.components.tabsheet;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.ComponentContainer;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.TabSheet;
+import com.vaadin.ui.VerticalLayout;
+
+public class NestedTabSheetsHideTabs extends TestBase {
+
+ TabSheet main;
+ TabSheet sub;
+
+ @Override
+ public void setup() {
+ addComponent(new Button("Toggle tabs", new Button.ClickListener() {
+ @Override
+ public void buttonClick(final ClickEvent event) {
+ main.hideTabs(!main.areTabsHidden());
+ }
+ }));
+ sub = new TabSheet();
+ sub.addTab(newPage(21), "Page 21");
+ sub.addTab(newPage(22), "Page 22");
+ main = new TabSheet();
+ main.addTab(newPage(1), "Page 1");
+ main.addTab(sub, "Page 2 (TabSheet)");
+ main.addTab(newPage(3), "Page 3");
+ addComponent(main);
+ }
+
+ private static ComponentContainer newPage(final int number) {
+ final VerticalLayout vl = new VerticalLayout();
+ vl.addComponent(new Label("Page " + number));
+ return vl;
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Setting hideTabs(true) for a TabSheet containing another TabSheet hides the nested TabSheet's tabs as well";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 9294;
+ }
+
+}