]> source.dussan.org Git - vaadin-framework.git/commitdiff
Convert ComboBoxItemIcon test to TB4
authorHenri Sara <hesara@vaadin.com>
Fri, 8 Jan 2016 12:03:37 +0000 (14:03 +0200)
committerVaadin Code Review <review@vaadin.com>
Fri, 8 Jan 2016 13:26:25 +0000 (13:26 +0000)
Change-Id: I939fe7e5c5b57c007a543f5f7c491c8c9f11e773

uitest/src/com/vaadin/tests/components/combobox/ComboBoxItemIconTest.java [new file with mode: 0644]
uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxItemIcon.html [deleted file]

diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxItemIconTest.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxItemIconTest.java
new file mode 100644 (file)
index 0000000..15c87b6
--- /dev/null
@@ -0,0 +1,32 @@
+package com.vaadin.tests.components.combobox;
+
+import org.junit.Test;
+
+import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
+
+public class ComboBoxItemIconTest extends MultiBrowserTest {
+    @Test
+    public void testIconsInComboBox() throws Exception {
+        openTestURL();
+
+        ComboBoxElement firstCombo = $(ComboBoxElement.class).first();
+
+        firstCombo.openPopup();
+        compareScreen("first-combobox-open");
+
+        // null item not on the list, so use index 1
+        firstCombo.selectByText(firstCombo.getPopupSuggestions().get(1));
+
+        compareScreen("fi-hu-selected");
+
+        ComboBoxElement secondCombo = $(ComboBoxElement.class).get(1);
+
+        secondCombo.openPopup();
+        compareScreen("second-combobox-open");
+
+        secondCombo.selectByText(secondCombo.getPopupSuggestions().get(2));
+        compareScreen("fi-au-selected");
+    }
+
+}
\ No newline at end of file
diff --git a/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxItemIcon.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxItemIcon.html
deleted file mode 100644 (file)
index 6e6e87b..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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>ComboBoxItemIcon</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
-<thead>
-<tr><td rowspan="1" colspan="3">ComboBoxItemIcon</td></tr>
-</thead><tbody>
-<tr>
-       <td>open</td>
-       <td>/run/com.vaadin.tests.components.combobox.ComboBoxItemIcon?restartApplication</td>
-       <td></td>
-</tr>
-<tr>
-       <td>waitForVaadin</td>
-       <td></td>
-       <td></td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxItemIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[1]</td>
-       <td></td>
-</tr>
-<tr>
-       <td>waitForVaadin</td>
-       <td></td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>first-combobox-open</td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>//div[@id='VAADIN_COMBOBOX_OPTIONLIST']/div/div[2]/table/tbody/tr[2]/td</td>
-       <td></td>
-</tr>
-<tr>
-       <td>waitForVaadin</td>
-       <td></td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>fi-hu-selected</td>
-</tr>
-<tr>
-       <td>mouseClick</td>
-       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxItemIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[2]</td>
-       <td>12,17</td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>second-combobox-open</td>
-</tr>
-<tr>
-       <td>mouseClick</td>
-       <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxItemIcon::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item2</td>
-       <td>32,10</td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>fi-au-selected</td>
-</tr>
-</tbody></table>
-</body>
-</html>