diff options
author | Automerge <automerge@vaadin.com> | 2012-02-15 14:16:44 +0000 |
---|---|---|
committer | Automerge <automerge@vaadin.com> | 2012-02-15 14:16:44 +0000 |
commit | b3a19fc9e8ff957c4624b78e8054e9dbfcf7db47 (patch) | |
tree | 82db6c5dfd135b3ad69dad5a67849405b63a123c /tests | |
parent | 591dc74d3f6013091e56d7b423399cc6e3f68e04 (diff) | |
download | vaadin-framework-b3a19fc9e8ff957c4624b78e8054e9dbfcf7db47.tar.gz vaadin-framework-b3a19fc9e8ff957c4624b78e8054e9dbfcf7db47.zip |
[merge from 6.7] #4353 ComboBox.removeAllItems did not remove selected icon
svn changeset:23030/svn branch:6.8
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html | 42 | ||||
-rw-r--r-- | tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java | 53 |
2 files changed, 95 insertions, 0 deletions
diff --git a/tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html b/tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html new file mode 100644 index 0000000000..fc3862ebb7 --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.html @@ -0,0 +1,42 @@ +<?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>RemovalOfSelectedIcon</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">RemovalOfSelectedIcon</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.combobox.RemovalOfSelectedIcon?restartApplication</td> + <td></td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxRemovalOfSelectedIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[1]</td> + <td>9,11</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxRemovalOfSelectedIcon::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td> + <td>131,3</td> +</tr> +<tr> + <td>click</td> + <td>vaadin=runcomvaadintestscomponentscomboboxRemovalOfSelectedIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]</td> + <td></td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td>combobox-empty-and-widths-match</td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java b/tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java new file mode 100644 index 0000000000..a79b85ece4 --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/combobox/RemovalOfSelectedIcon.java @@ -0,0 +1,53 @@ +package com.vaadin.tests.components.combobox; + +import com.vaadin.terminal.ThemeResource; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.ComboBox; + +@SuppressWarnings("serial") +public class RemovalOfSelectedIcon extends TestBase { + + @Override + protected void setup() { + + final ComboBox cb1 = createComboBox("Don't touch this combobox"); + addComponent(cb1); + + final ComboBox cb2 = createComboBox("Select icon test combobox"); + addComponent(cb2); + + Button btClear = new Button("Clear button"); + btClear.setImmediate(true); + btClear.addListener(new Button.ClickListener() { + + public void buttonClick(ClickEvent event) { + cb2.removeAllItems(); + cb2.setContainerDataSource(null); + } + }); + + addComponent(btClear); + } + + private ComboBox createComboBox(String caption) { + ComboBox cb = new ComboBox(caption); + cb.setImmediate(true); + cb.addItem(1); + cb.setItemCaption(1, "icon test"); + cb.setItemIcon(1, new ThemeResource("menubar/img/checked.png")); + return cb; + } + + @Override + protected String getDescription() { + return "Clear button must remove selected icon, and comboboxes' widths must stay same."; + } + + @Override + protected Integer getTicketNumber() { + return 4353; + } + +} |