From 4bb70102310d681bfdff627443c9707638889bcf Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 7 Oct 2011 07:07:58 +0000 Subject: [PATCH] Attempt to make TreeConnectors test less random in IE6 svn changeset:21629/svn branch:6.7 --- ...nnectors.html => TreeConnectors-base.html} | 43 +++---------------- .../tree/TreeConnectors-chameleon.html | 36 ++++++++++++++++ .../tree/TreeConnectors-reindeer.html | 36 ++++++++++++++++ .../components/tree/TreeConnectors-runo.html | 36 ++++++++++++++++ .../tests/components/tree/TreeConnectors.java | 32 ++++++++------ 5 files changed, 134 insertions(+), 49 deletions(-) rename tests/testbench/com/vaadin/tests/components/tree/{TreeConnectors.html => TreeConnectors-base.html} (56%) create mode 100644 tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-chameleon.html create mode 100644 tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-reindeer.html create mode 100644 tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-runo.html diff --git a/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors.html b/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-base.html similarity index 56% rename from tests/testbench/com/vaadin/tests/components/tree/TreeConnectors.html rename to tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-base.html index b76c65fa69..8b9aaab2f7 100644 --- a/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors.html +++ b/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-base.html @@ -13,55 +13,24 @@ open - /run/TreeConnectors?theme=base + /run/TreeConnectors?theme=base&restartApplication screenCapture - base + default - open - /run/TreeConnectors?theme=reindeer - - - - screenCapture - - reindeer - - - open - /run/TreeConnectors?theme=runo - - - - screenCapture - - runo - - - open - /run/TreeConnectors?theme=liferay - - - - screenCapture - - liferay - - - open - /run/TreeConnectors?theme=chameleon - + mouseClick + vaadin=runTreeConnectors::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0] + 7,13 screenCapture - chameleon + connectors - diff --git a/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-chameleon.html b/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-chameleon.html new file mode 100644 index 0000000000..0200c31b4a --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-chameleon.html @@ -0,0 +1,36 @@ + + + + + + +TreeConnectors + + + + + + + + + + + + + + + + + + + + + + + + + + +
TreeConnectors
open/run/TreeConnectors?theme=chameleon&restartApplication
screenCapturedefault
mouseClickvaadin=runTreeConnectors::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]7,13
screenCaptureconnectors
+ + diff --git a/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-reindeer.html b/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-reindeer.html new file mode 100644 index 0000000000..f69dde73e4 --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-reindeer.html @@ -0,0 +1,36 @@ + + + + + + +TreeConnectors + + + + + + + + + + + + + + + + + + + + + + + + + + +
TreeConnectors
open/run/TreeConnectors?theme=reindeer&restartApplication
screenCapturedefault
mouseClickvaadin=runTreeConnectors::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]7,13
screenCaptureconnectors
+ + diff --git a/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-runo.html b/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-runo.html new file mode 100644 index 0000000000..46d12bfb9d --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-runo.html @@ -0,0 +1,36 @@ + + + + + + +TreeConnectors + + + + + + + + + + + + + + + + + + + + + + + + + + +
TreeConnectors
open/run/TreeConnectors?theme=runo&restartApplication
screenCapturedefault
mouseClickvaadin=runTreeConnectors::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]7,13
screenCaptureconnectors
+ + diff --git a/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors.java b/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors.java index 81c6d2df9e..b37d371b17 100644 --- a/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors.java +++ b/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors.java @@ -1,6 +1,8 @@ package com.vaadin.tests.components.tree; import com.vaadin.data.Item; +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; import com.vaadin.data.util.HierarchicalContainer; import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.event.dd.DropHandler; @@ -8,7 +10,7 @@ import com.vaadin.event.dd.acceptcriteria.AcceptAll; import com.vaadin.event.dd.acceptcriteria.AcceptCriterion; import com.vaadin.terminal.ThemeResource; import com.vaadin.tests.components.TestBase; -import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.CheckBox; import com.vaadin.ui.Tree; import com.vaadin.ui.Tree.TreeDragMode; import com.vaadin.ui.themes.BaseTheme; @@ -16,17 +18,25 @@ import com.vaadin.ui.themes.BaseTheme; @SuppressWarnings("serial") public class TreeConnectors extends TestBase { + private Tree tree = createTree(); + @Override protected void setup() { - HorizontalLayout l = new HorizontalLayout(); - l.setSpacing(true); - - l.addComponent(createTree()); - Tree connectors = createTree(); - connectors.addStyleName(BaseTheme.TREE_CONNECTORS); - l.addComponent(connectors); - - addComponent(l); + CheckBox cb = new CheckBox("Connectors"); + cb.setValue(false); + cb.setImmediate(true); + cb.addListener(new ValueChangeListener() { + + public void valueChange(ValueChangeEvent event) { + if ((Boolean) event.getProperty().getValue()) { + tree.addStyleName(BaseTheme.TREE_CONNECTORS); + } else { + tree.removeStyleName(BaseTheme.TREE_CONNECTORS); + } + } + }); + addComponent(cb); + addComponent(tree); } private Tree createTree() { @@ -61,8 +71,6 @@ public class TreeConnectors extends TestBase { "../runo/icons/64/users.png")); tree.setItemIcon("Item 17", new ThemeResource( "../runo/icons/16/document-pdf.png")); - tree.setItemIcon("Item 6", new ThemeResource( - "../runo/icons/16/folder-add.png")); return tree; } -- 2.39.5