diff options
3 files changed, 107 insertions, 1 deletions
diff --git a/WebContent/VAADIN/themes/tests-tickets/styles.css b/WebContent/VAADIN/themes/tests-tickets/styles.css index c1dd89d6b8..b96fcbb23d 100644 --- a/WebContent/VAADIN/themes/tests-tickets/styles.css +++ b/WebContent/VAADIN/themes/tests-tickets/styles.css @@ -1,6 +1,17 @@ @import url(../runo/legacy-styles.css); -/* DO NOT ADD GENERIC RULES LIKE .v-table IN THIS FILE */ +/* DO NOT ADD GENERIC RULES LIKE .v-table IN THIS FILE */ +/* Instead prefix with e.g .v-app-<TestClass> or other unique selectors */ +/*****************************************************************************/ + +/*****************************************************************************/ +/* com.vaadin.tests.components.combobox.ComboBoxBorder */ +/*****************************************************************************/ +.v-slot-ComboBoxBorder .v-filterselect-error { + /* Ticket 11267 */ + border: 1px solid #FF0000 ; + height: 25px; /* runo: 23+2, reindeer: 24+2 */ +} /*****************************************************************************/ /* Ticket 1904 */ diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxBorder.html b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxBorder.html new file mode 100644 index 0000000000..7e7bb7722d --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxBorder.html @@ -0,0 +1,52 @@ +<?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="http://localhost:8888/" /> +<title>ComboBoxBorder</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">ComboBoxBorder</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/ComboBoxBorder?restartApplication</td> + <td></td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runComboBoxBorder::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]#textbox</td> + <td>53,10</td> +</tr> +<tr> + <td>pressSpecialKey</td> + <td>vaadin=runComboBoxBorder::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]#textbox</td> + <td>down</td> +</tr> +<tr> + <td>pressSpecialKey</td> + <td>vaadin=runComboBoxBorder::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]#textbox</td> + <td>down</td> +</tr> +<tr> + <td>pressSpecialKey</td> + <td>vaadin=runComboBoxBorder::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]#textbox</td> + <td>down</td> +</tr> +<tr> + <td>pressSpecialKey</td> + <td>vaadin=runComboBoxBorder::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]#textbox</td> + <td>enter</td> +</tr> +<tr> + <td>screenCapture</td> + <td></td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxBorder.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxBorder.java new file mode 100644 index 0000000000..731e23188e --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxBorder.java @@ -0,0 +1,43 @@ +package com.vaadin.tests.components.combobox; + +import java.util.Arrays; + +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; +import com.vaadin.server.UserError; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.ComboBox; + +public class ComboBoxBorder extends TestBase { + + @Override + protected void setup() { + setTheme("tests-tickets"); + + final ComboBox cb = new ComboBox("All errors", Arrays.asList("Error", + "Error 2")); + cb.setStyleName("ComboBoxBorder"); + cb.setImmediate(true); + cb.setWidth("200px"); // must have with to reproduce + + cb.addListener(new ValueChangeListener() { + public void valueChange(ValueChangeEvent event) { + cb.setComponentError(new UserError("Error")); + } + }); + + addComponent(cb); + + } + + @Override + protected String getDescription() { + return "Adding a border as a result of styleName change should not break the ComboBox"; + } + + @Override + protected Integer getTicketNumber() { + return 11267; + } + +} |