diff options
author | Marc Englund <marc.englund@itmill.com> | 2013-05-10 12:51:12 +0000 |
---|---|---|
committer | Marc Englund <marc@vaadin.com> | 2013-05-15 08:51:24 +0000 |
commit | 611e5f9030d4d783a53ce99150680008b1ec4065 (patch) | |
tree | 7bbb6940517e77d59a27e3a1875e9c0670f543a4 /uitest | |
parent | 67696f3dcb968bde52bee4bb841b642c41fc6009 (diff) | |
download | vaadin-framework-611e5f9030d4d783a53ce99150680008b1ec4065.tar.gz vaadin-framework-611e5f9030d4d783a53ce99150680008b1ec4065.zip |
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
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/combobox/ComboBoxBorder.html | 52 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/combobox/ComboBoxBorder.java | 43 |
2 files changed, 95 insertions, 0 deletions
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; + } + +} |