diff options
author | Aleksi Hietanen <aleksi@vaadin.com> | 2017-09-04 10:56:58 +0300 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-09-04 10:56:58 +0300 |
commit | 5df3c0ac7b6d851b30e333fee52bf992fe6e804a (patch) | |
tree | decc406218b4ef49c7194cd1e01b5b495877d1d3 /uitest | |
parent | 6e30d6b7d6c918a7cf7e9b9367261c8f86b8259b (diff) | |
download | vaadin-framework-5df3c0ac7b6d851b30e333fee52bf992fe6e804a.tar.gz vaadin-framework-5df3c0ac7b6d851b30e333fee52bf992fe6e804a.zip |
Fix ListSelect scrolling behavior on IE (#9910)
Fixes #9894
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectJumpTest.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectJumpTest.java b/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectJumpTest.java new file mode 100644 index 0000000000..22839f612c --- /dev/null +++ b/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectJumpTest.java @@ -0,0 +1,39 @@ +package com.vaadin.tests.components.listselect; + +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.By; +import org.openqa.selenium.Keys; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.interactions.Actions; +import org.openqa.selenium.remote.DesiredCapabilities; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class ListSelectJumpTest extends MultiBrowserTest { + + @Override + public List<DesiredCapabilities> getBrowsersToTest() { + return getIEBrowsersOnly(); + } + + @Test + public void list_select_does_not_change_scroll_position_when_receiving_uidl() { + openTestURL(); + WebElement listSelect = findElements(By.className("v-select-select")) + .get(0); + List<WebElement> options = listSelect + .findElements(By.tagName("option")); + options.get(0).click(); + getTestBenchCommandExecutor() + .executeScript("arguments[0].scrollTop = " + 100, listSelect); + new Actions(getDriver()).keyDown(Keys.META).perform(); + options.get(9).click(); + $(ButtonElement.class).first().click(); + Assert.assertEquals(new Long(100), (Long) getTestBenchCommandExecutor() + .executeScript("return arguments[0].scrollTop", listSelect)); + } +} |