summaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-09-07 06:40:10 +0000
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-09-07 06:40:10 +0000
commit7f4ff9d20fde6f1f6526fa46f95dc5a40c309a22 (patch)
treefbf1fb0a921c92d9c59416aa2c34cb44304436a0 /tests/src
parentaababd0b6d371d14598e06accfd58ceaeb0c22ab (diff)
downloadvaadin-framework-7f4ff9d20fde6f1f6526fa46f95dc5a40c309a22.tar.gz
vaadin-framework-7f4ff9d20fde6f1f6526fa46f95dc5a40c309a22.zip
Fix for #7230
svn changeset:20895/svn branch:6.7
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationScroll87
-rw-r--r--tests/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationScrolls.java54
2 files changed, 141 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationScroll b/tests/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationScroll
new file mode 100644
index 0000000000..8d03e3aaf3
--- /dev/null
+++ b/tests/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationScroll
@@ -0,0 +1,87 @@
+<?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>TreeKeyboardNavigationScroll</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.tree.TreeKeyboardNavigationScrolls?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstreeTreeKeyboardNavigationScrolls::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTree[0]#n[0]</td>
+ <td>4,3</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentstreeTreeKeyboardNavigationScrolls::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTree[0]/domChild[1]</td>
+ <td>right</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentstreeTreeKeyboardNavigationScrolls::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTree[0]/domChild[1]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentstreeTreeKeyboardNavigationScrolls::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTree[0]/domChild[1]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentstreeTreeKeyboardNavigationScrolls::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTree[0]/domChild[1]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentstreeTreeKeyboardNavigationScrolls::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTree[0]/domChild[1]</td>
+ <td>right</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentstreeTreeKeyboardNavigationScrolls::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTree[0]/domChild[1]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentstreeTreeKeyboardNavigationScrolls::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTree[0]/domChild[1]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentstreeTreeKeyboardNavigationScrolls::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTree[0]/domChild[1]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentstreeTreeKeyboardNavigationScrolls::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTree[0]/domChild[1]</td>
+ <td>right</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentstreeTreeKeyboardNavigationScrolls::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTree[0]/domChild[1]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentstreeTreeKeyboardNavigationScrolls::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VTree[0]/domChild[1]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>noscroll</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationScrolls.java b/tests/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationScrolls.java
new file mode 100644
index 0000000000..5bbc5423ab
--- /dev/null
+++ b/tests/src/com/vaadin/tests/components/tree/TreeKeyboardNavigationScrolls.java
@@ -0,0 +1,54 @@
+/*
+@ITMillApache2LicenseForJavaFiles@
+ */
+package com.vaadin.tests.components.tree;
+
+import com.vaadin.data.Container;
+import com.vaadin.data.util.HierarchicalContainer;
+import com.vaadin.data.validator.AbstractValidator;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Tree;
+
+public class TreeKeyboardNavigationScrolls extends TestBase {
+
+ @Override
+ protected void setup() {
+ Tree tree = new Tree();
+ tree.setContainerDataSource(generateHierarchicalContainer());
+ tree.setImmediate(true);
+ tree.addValidator(new AbstractValidator("failed") {
+ public boolean isValid(Object value) {
+ return false;
+ }
+
+ });
+ addComponent(tree);
+ }
+
+ private Container generateHierarchicalContainer() {
+ HierarchicalContainer cont = new HierarchicalContainer();
+ for (int i = 1; i < 6; i++) {
+ cont.addItem(i);
+ for (int j = 1; j < 3; j++) {
+ String id = i
+ + " foo bar baz make this node really wide so that we don't have to fiddle with resizing the browser window -> what would you do if you had one of your legs on backwards? it's legs time! everybody get your legs! "
+ + j;
+ cont.addItem(id);
+ cont.setChildrenAllowed(id, false);
+ cont.setParent(id, i);
+ }
+ }
+ return cont;
+ }
+
+ @Override
+ protected String getDescription() {
+ return "The tree scrolls right if the focused node is too wide when navigating with the keyboard";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 7230;
+ }
+
+}