diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-07-17 11:52:17 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-07-17 09:56:27 +0000 |
commit | 929adacf733d5e685925f143061db7d0450d7b03 (patch) | |
tree | 4ffce506537dd4b697ddd1fc0c43b79243a37854 /uitest/src/com/vaadin/tests/components | |
parent | 23abf1d905eca80ad36e20d2de13203b98e23ac7 (diff) | |
download | vaadin-framework-929adacf733d5e685925f143061db7d0450d7b03.tar.gz vaadin-framework-929adacf733d5e685925f143061db7d0450d7b03.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: I41f2af38f7eba2194aa49c8d7a0d13073166cddf
Diffstat (limited to 'uitest/src/com/vaadin/tests/components')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/combobox/ComboBoxLargeIconsTest.java | 58 |
1 files changed, 58 insertions, 0 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"); + } +} |