From 611e5f9030d4d783a53ce99150680008b1ec4065 Mon Sep 17 00:00:00 2001 From: Marc Englund Date: Fri, 10 May 2013 12:51:12 +0000 Subject: [PATCH] Test for #11267 adapted from 6.8. The problem is not present in 7, but you need to use a slightly different css to acieve the same result. Change-Id: Iee6907a15fd9b0674dcb490f9110fc762c56deb6 Ticket: 11267 --- .../VAADIN/themes/tests-tickets/styles.css | 13 ++++- .../components/combobox/ComboBoxBorder.html | 52 +++++++++++++++++++ .../components/combobox/ComboBoxBorder.java | 43 +++++++++++++++ 3 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 uitest/src/com/vaadin/tests/components/combobox/ComboBoxBorder.html create mode 100644 uitest/src/com/vaadin/tests/components/combobox/ComboBoxBorder.java 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- 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 @@ + + + + + + +ComboBoxBorder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ComboBoxBorder
open/run/ComboBoxBorder?restartApplication
mouseClickvaadin=runComboBoxBorder::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]#textbox53,10
pressSpecialKeyvaadin=runComboBoxBorder::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]#textboxdown
pressSpecialKeyvaadin=runComboBoxBorder::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]#textboxdown
pressSpecialKeyvaadin=runComboBoxBorder::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]#textboxdown
pressSpecialKeyvaadin=runComboBoxBorder::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]#textboxenter
screenCapture
+ + 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; + } + +} -- 2.39.5