aboutsummaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-17 11:52:17 +0300
committerTeemu Suo-Anttila <teemusa@vaadin.com>2015-07-21 14:41:41 +0300
commit7d83a080189cef947af94c34bd3212fd5bb03928 (patch)
treeb95dba506c9671ba931329320db9f87c7d38bd4a /uitest
parente71b084bee0ef85fea0cae64a96bfaf3935a4e66 (diff)
downloadvaadin-framework-7d83a080189cef947af94c34bd3212fd5bb03928.tar.gz
vaadin-framework-7d83a080189cef947af94c34bd3212fd5bb03928.zip
Convert ComboBoxLargeIconsTest from TB2 to TB4
This patch also adds some subpart awareness as well as deferred worker interface to VFilterSelect to support running TB4 tests reliably. Change-Id: I59afe353853026a88b16bcabb5f7a3923d5db7cd
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java58
-rw-r--r--uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.html152
2 files changed, 58 insertions, 152 deletions
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java
new file mode 100644
index 0000000000..407ab7aa04
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java
@@ -0,0 +1,58 @@
+package com.vaadin.tests.components.combobox;
+
+import org.junit.Test;
+import org.openqa.selenium.Keys;
+import org.openqa.selenium.interactions.Actions;
+
+import com.vaadin.testbench.By;
+import com.vaadin.testbench.elements.NativeSelectElement;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.newelements.ComboBoxElement;
+
+public class ComboBoxLargeIconsTest extends MultiBrowserTest {
+ @Override
+ protected Class<?> getUIClass() {
+ return com.vaadin.tests.components.combobox.Comboboxes.class;
+ }
+
+ @Test
+ public void testComboBoxIcons() throws Exception {
+ openTestURL();
+ NativeSelectElement iconSelect = $(NativeSelectElement.class).first();
+ iconSelect.selectByText("16x16");
+
+ ComboBoxElement cb = $(ComboBoxElement.class).caption(
+ "Undefined wide select with 50 items").first();
+ cb.openPopup();
+ compareScreen("icons-16x16-page1");
+ cb.openNextPage();
+ compareScreen("icons-16x16-page2");
+ cb.findElement(By.vaadin("#popup/item0")).click();
+ compareScreen("icons-16x16-selected-1-3-5-9");
+
+ iconSelect.selectByText("32x32");
+ cb.openPopup();
+ compareScreen("icons-32x32-page2");
+
+ // Closes the popup
+ cb.openPopup();
+
+ iconSelect.selectByText("64x64");
+
+ ComboBoxElement pageLength0cb = $(ComboBoxElement.class).caption(
+ "Pagelength 0").first();
+ pageLength0cb.openPopup();
+ pageLength0cb.findElement(By.vaadin("#popup/item1")).click();
+
+ ComboBoxElement cb200px = $(ComboBoxElement.class).caption(
+ "200px wide select with 50 items").first();
+ cb200px.openPopup();
+ cb200px.findElement(By.vaadin("#popup/item1")).click();
+
+ ComboBoxElement cb150px = $(ComboBoxElement.class).caption(
+ "150px wide select with 5 items").first();
+ new Actions(driver).sendKeys(cb150px, Keys.DOWN).perform();
+
+ compareScreen("icons-64x64-page1-highlight-first");
+ }
+}
diff --git a/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.html b/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.html
deleted file mode 100644
index ff6c82dfdb..0000000000
--- a/uitest/tb2/com/vaadin/tests/components/combobox/ComboBoxLargeIcons.html
+++ /dev/null
@@ -1,152 +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>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.combobox.Comboboxes?restartApplication</td>
- <td></td>
-</tr>
-<tr>
- <td>select</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::PID_Sselectaction-Icon/domChild[0]</td>
- <td>label=16x16</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VFilterSelect[0]/domChild[1]</td>
- <td>13,8</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[2]/domChild[0]</td>
- <td>116,6</td>
-</tr>
-<!-- Open twice to avoid IE6 css issues -->
-<tr>
- <td>open</td>
- <td>/run/com.vaadin.tests.components.combobox.Comboboxes?restartApplication</td>
- <td></td>
-</tr>
-<tr>
- <td>select</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::PID_Sselectaction-Icon/domChild[0]</td>
- <td>label=16x16</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VFilterSelect[0]/domChild[1]</td>
- <td>13,8</td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td>icons-16x16-page1</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[2]/domChild[0]</td>
- <td>116,6</td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td>icons-16x16-page2</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item0</td>
- <td>378,1</td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td>icons-16x16-selected-1-3-5-9</td>
-</tr>
-<tr>
- <td>select</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::PID_Sselectaction-Icon/domChild[0]</td>
- <td>label=32x32</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[4]/VFilterSelect[0]/domChild[2]</td>
- <td>8,13</td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td>icons-32x32-page2</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/domChild[1]</td>
- <td>409,27</td>
-</tr>
-<tr>
- <td>select</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::PID_Sselectaction-Icon/domChild[0]</td>
- <td>label=64x64</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[9]/VFilterSelect[0]/domChild[1]</td>
- <td>11,13</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
- <td>213,57</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/domChild[4]</td>
- <td>535,43</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[8]/VFilterSelect[0]/domChild[1]</td>
- <td>7,12</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
- <td>158,25</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VFilterSelect[0]/domChild[0]</td>
- <td>16,9</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VFilterSelect[0]/domChild[0]</td>
- <td>80,7</td>
-</tr>
-<tr>
- <td>pressSpecialKey</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[7]/VFilterSelect[0]/domChild[0]</td>
- <td>down</td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td>icons-64x64-page1-highlight-first</td>
-</tr>
-<tr>
- <td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/domChild[6]/domChild[0]</td>
- <td>510,1</td>
-</tr>
-</tbody></table>
-</body>
-</html>