summaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2011-09-05 10:33:34 +0000
committerLeif Åstrand <leif@vaadin.com>2011-09-05 10:33:34 +0000
commit3a3f8cb01bf22436bdeb0be61850cbd77626d860 (patch)
treed04d95d32e024304f087018441dd1f66aec5f7a8 /tests/src
parent7d28033c7f50155f720c6e36363521848094bb58 (diff)
downloadvaadin-framework-3a3f8cb01bf22436bdeb0be61850cbd77626d860.tar.gz
vaadin-framework-3a3f8cb01bf22436bdeb0be61850cbd77626d860.zip
#7536 combobox search result does not get cleared when added to a popup window
svn changeset:20841/svn branch:6.6
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.html31
-rw-r--r--tests/src/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.java42
2 files changed, 73 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.html b/tests/src/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.html
new file mode 100644
index 0000000000..838c9cac1b
--- /dev/null
+++ b/tests/src/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.html
@@ -0,0 +1,31 @@
+<?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>New Test</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.combobox.ComboBoxSuggestionOnDetach?restartApplication&amp;debug</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxSuggestionOnDetach::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[1]</td>
+ <td>11,12</td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxSuggestionOnDetach::Root/VFilterSelect$SuggestionPopup[0]</td>
+ <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/tests/src/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.java b/tests/src/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.java
new file mode 100644
index 0000000000..134e13e49c
--- /dev/null
+++ b/tests/src/com/vaadin/tests/components/combobox/ComboBoxSuggestionOnDetach.java
@@ -0,0 +1,42 @@
+package com.vaadin.tests.components.combobox;
+
+import java.util.Arrays;
+
+import com.vaadin.event.FieldEvents;
+import com.vaadin.event.FieldEvents.FocusEvent;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.ComboBox;
+import com.vaadin.ui.Window;
+
+public class ComboBoxSuggestionOnDetach extends TestBase {
+
+ @Override
+ protected void setup() {
+ final Window popup = new Window();
+ ComboBox comboBox = new ComboBox("Combo box", Arrays.asList("Option 1",
+ "Option 2", "Option 3"));
+ comboBox.addListener(new FieldEvents.FocusListener() {
+ public void focus(FocusEvent event) {
+ popup.getParent().removeWindow(popup);
+ }
+ });
+ popup.addComponent(comboBox);
+
+ popup.setSizeUndefined();
+ popup.getContent().setSizeUndefined();
+ popup.center();
+
+ getMainWindow().addWindow(popup);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Click the arrow to open the combo box suggestion list. When the box is focused, the window is closed and the suggestion popup of the combo box should also be closed";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return Integer.valueOf(7536);
+ }
+
+}