diff options
author | Artur Signell <artur.signell@itmill.com> | 2011-10-07 07:07:58 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2011-10-07 07:07:58 +0000 |
commit | 4bb70102310d681bfdff627443c9707638889bcf (patch) | |
tree | a0329fd7f98de9f66df039c41cba9c0387019287 | |
parent | 01aea64a3775144555c262cc7566f5ffff23f8e7 (diff) | |
download | vaadin-framework-4bb70102310d681bfdff627443c9707638889bcf.tar.gz vaadin-framework-4bb70102310d681bfdff627443c9707638889bcf.zip |
Attempt to make TreeConnectors test less random in IE6
svn changeset:21629/svn branch:6.7
-rw-r--r-- | tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-base.html (renamed from tests/testbench/com/vaadin/tests/components/tree/TreeConnectors.html) | 43 | ||||
-rw-r--r-- | tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-chameleon.html | 36 | ||||
-rw-r--r-- | tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-reindeer.html | 36 | ||||
-rw-r--r-- | tests/testbench/com/vaadin/tests/components/tree/TreeConnectors-runo.html | 36 | ||||
-rw-r--r-- | tests/testbench/com/vaadin/tests/components/tree/TreeConnectors.java | 32 |
5 files changed, 134 insertions, 49 deletions
diff --git a/tests/testbench/com/vaadin/tests/components/tree/TreeConnectors.html b/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 @@ </thead><tbody> <tr> <td>open</td> - <td>/run/TreeConnectors?theme=base</td> + <td>/run/TreeConnectors?theme=base&restartApplication</td> <td></td> </tr> <tr> <td>screenCapture</td> <td></td> - <td>base</td> + <td>default</td> </tr> <tr> - <td>open</td> - <td>/run/TreeConnectors?theme=reindeer</td> - <td></td> -</tr> -<tr> - <td>screenCapture</td> - <td></td> - <td>reindeer</td> -</tr> -<tr> - <td>open</td> - <td>/run/TreeConnectors?theme=runo</td> - <td></td> -</tr> -<tr> - <td>screenCapture</td> - <td></td> - <td>runo</td> -</tr> -<tr> - <td>open</td> - <td>/run/TreeConnectors?theme=liferay</td> - <td></td> -</tr> -<tr> - <td>screenCapture</td> - <td></td> - <td>liferay</td> -</tr> -<tr> - <td>open</td> - <td>/run/TreeConnectors?theme=chameleon</td> - <td></td> + <td>mouseClick</td> + <td>vaadin=runTreeConnectors::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td> + <td>7,13</td> </tr> <tr> <td>screenCapture</td> <td></td> - <td>chameleon</td> + <td>connectors</td> </tr> - </tbody></table> </body> </html> 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 @@ +<?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="/" /> +<title>TreeConnectors</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">TreeConnectors</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/TreeConnectors?theme=chameleon&restartApplication</td> + <td></td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>default</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runTreeConnectors::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td> + <td>7,13</td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>connectors</td> +</tr> +</tbody></table> +</body> +</html> 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 @@ +<?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="/" /> +<title>TreeConnectors</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">TreeConnectors</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/TreeConnectors?theme=reindeer&restartApplication</td> + <td></td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>default</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runTreeConnectors::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td> + <td>7,13</td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>connectors</td> +</tr> +</tbody></table> +</body> +</html> 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 @@ +<?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="/" /> +<title>TreeConnectors</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">TreeConnectors</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/TreeConnectors?theme=runo&restartApplication</td> + <td></td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>default</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runTreeConnectors::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td> + <td>7,13</td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>connectors</td> +</tr> +</tbody></table> +</body> +</html> 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; } |