Browse Source

Updated test for #3991

svn changeset:16924/svn branch:6.5
tags/6.7.0.beta1
Artur Signell 13 years ago
parent
commit
c5e87da980

+ 107
- 0
tests/src/com/vaadin/tests/components/select/SelectIconPlacement.html View File

@@ -0,0 +1,107 @@
<?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.select.SelectIconPlacement?restartApplication</td>
<td></td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
<td>icon-and-text-initial</td>
</tr>
<tr>
<td>open</td>
<td>/run/com.vaadin.tests.components.select.SelectIconPlacement?restartApplication</td>
<td></td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
<td>icon-and-text-initial-reload</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentsselectSelectIconPlacement::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[2]</td>
<td>16,6</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentsselectSelectIconPlacement::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
<td>277,11</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentsselectSelectIconPlacement::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[2]</td>
<td>9,13</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentsselectSelectIconPlacement::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
<td>99,11</td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
<td>icon-and-text-reselected-items</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentsselectSelectIconPlacement::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[2]</td>
<td>17,7</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentsselectSelectIconPlacement::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item0</td>
<td>85,8</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentsselectSelectIconPlacement::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[1]</td>
<td>11,14</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentsselectSelectIconPlacement::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
<td>57,12</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentsselectSelectIconPlacement::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[2]</td>
<td>16,14</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentsselectSelectIconPlacement::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item0</td>
<td>125,8</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentsselectSelectIconPlacement::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[1]</td>
<td>14,15</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentsselectSelectIconPlacement::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
<td>105,12</td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
<td>icon-and-text-reselected-items-2</td>
</tr>

</tbody></table>
</body>
</html>

+ 16
- 7
tests/src/com/vaadin/tests/components/select/SelectIconPlacement.java View File

@@ -11,18 +11,27 @@ public class SelectIconPlacement extends TestBase {

@Override
protected void setup() {
mySelect = new Select("Foo");
String bar = "FooBarBaz";
mySelect.addItem(bar);
mySelect.setItemIcon(bar, new ThemeResource("common/icons/error.png"));
mySelect.select(bar);
addComponent(mySelect);
for (String width : new String[] { null, "200px" }) {
String icon = "error.png";
if (width == null) {
icon = "bullet.png";
}
mySelect = new Select("Width: " + (width == null ? "auto" : width));
String bar = "Only item";
mySelect.addItem(bar);
mySelect.setItemIcon(bar, new ThemeResource("common/icons/" + icon
+ "?w=" + width));
mySelect.select(bar);
mySelect.setWidth(width);
addComponent(mySelect);
}

}

@Override
protected String getDescription() {
return "A select with item icons pushes the caption of that item to the right to make room for the icon. It works fine in all browsers except IE8.<br/>"
+ "Upon component render the icon and caption is on top of each others, and it corrects itself when you open the dropdown. ";
+ "Upon component render the icon and caption is on top of each others, and it corrects itself when you open the dropdown. <br/><br/>";
}

@Override

Loading…
Cancel
Save