summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorJouni Koivuviita <jouni@vaadin.com>2014-08-07 17:03:37 +0300
committerArtur Signell <artur@vaadin.com>2014-08-07 14:22:45 +0000
commit83cef3a4df1528f4572e287bfc36ed793e7ac539 (patch)
tree35ea9d2cc19153a46f1f28bcecad7b5ff3aef4a5 /uitest
parent3be1db9dd80f4df2d81a89861541241c3100d892 (diff)
downloadvaadin-framework-83cef3a4df1528f4572e287bfc36ed793e7ac539.tar.gz
vaadin-framework-83cef3a4df1528f4572e287bfc36ed793e7ac539.zip
VerticalSplitPanel inside a HorizontalSplitPanel doesn't display its second component (Valo theme) (#14152)
Change-Id: I81b340206a6020d349593926156264b85253c4e6
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeak.java85
-rw-r--r--uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeakTest.java31
2 files changed, 116 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeak.java b/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeak.java
new file mode 100644
index 0000000000..b634e43f46
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeak.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.components.splitpanel;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.AbstractSplitPanel;
+import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.HorizontalSplitPanel;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.VerticalSplitPanel;
+
+public class SplitPanelStyleLeak extends AbstractTestUI {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ CssLayout wrap = new CssLayout();
+ addComponent(wrap);
+
+ wrap.addComponent(getSplit(true, null));
+ wrap.addComponent(getSplit(false, null));
+
+ wrap.addComponent(getSplit(true, "small"));
+ wrap.addComponent(getSplit(false, "small"));
+
+ wrap.addComponent(getSplit(true, "large"));
+ wrap.addComponent(getSplit(false, "large"));
+ }
+
+ private AbstractSplitPanel getSplit(boolean horizontal, String style) {
+ AbstractSplitPanel split = horizontal ? new HorizontalSplitPanel()
+ : new VerticalSplitPanel();
+
+ if (style != null) {
+ split.addStyleName(style);
+ }
+ split.setWidth("300px");
+ split.setHeight("300px");
+
+ AbstractSplitPanel content = horizontal ? new VerticalSplitPanel()
+ : new HorizontalSplitPanel();
+ content.addComponent(new Label("First"));
+ content.addComponent(new Label("Second"));
+ split.addComponent(content);
+
+ content = horizontal ? new VerticalSplitPanel()
+ : new HorizontalSplitPanel();
+ content.addComponent(new Label("First"));
+ split.addComponent(content);
+
+ // Inception level nesting, but we need to test that the first level
+ // styles don't leak to a nested split panel with the same orientation
+ AbstractSplitPanel content2 = horizontal ? new HorizontalSplitPanel()
+ : new VerticalSplitPanel();
+ content2.addComponent(new Label("First"));
+ content2.addComponent(new Label("Second"));
+ content.addComponent(content2);
+
+ return split;
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "Vertical/horizontal SplitPanel styles should not leak to any contained horizontal/vertical SplitPanel.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 14152;
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeakTest.java b/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeakTest.java
new file mode 100644
index 0000000000..1ad9cdb461
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/splitpanel/SplitPanelStyleLeakTest.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.components.splitpanel;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+public class SplitPanelStyleLeakTest extends MultiBrowserTest {
+
+ @Test
+ public void checkScreenshot() throws IOException {
+ openTestURL();
+ compareScreen("all");
+ }
+}