summaryrefslogtreecommitdiffstats
path: root/uitest/src
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-06-29 12:18:45 +0300
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-07-04 11:41:36 +0300
commit37e42d097e8507b24a1edea2c97502971b98b68f (patch)
tree18a1a82df32e4b355cae3f2d62ae42dfd940bdf9 /uitest/src
parent333c65e97c9617ea1e47999609a0182d623f9c63 (diff)
downloadvaadin-framework-8.4.5.tar.gz
vaadin-framework-8.4.5.zip
Fix ComboboxScrollableWindowTest to use assertion (#11014)8.4.58.4
Diffstat (limited to 'uitest/src')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/ComboboxScrollableWindowTest.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/ComboboxScrollableWindowTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/ComboboxScrollableWindowTest.java
index c4cb78eeef..62a6925282 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/ComboboxScrollableWindowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/ComboboxScrollableWindowTest.java
@@ -2,8 +2,10 @@ package com.vaadin.tests.components.window;
import static com.vaadin.tests.components.window.ComboboxScrollableWindow.COMBOBOX_ID;
import static com.vaadin.tests.components.window.ComboboxScrollableWindow.WINDOW_ID;
+import static org.junit.Assert.assertEquals;
import org.junit.Test;
+import org.openqa.selenium.Point;
import org.openqa.selenium.WebElement;
import com.vaadin.testbench.By;
@@ -29,11 +31,20 @@ public class ComboboxScrollableWindowTest extends MultiBrowserTest {
TestBenchElementCommands scrollable = testBenchElement(
scrollableElement);
scrollable.scroll(1000);
+
+ int beforeClick = getScrollTop(scrollableElement);
ComboBoxElement comboBox = $(ComboBoxElement.class).id(COMBOBOX_ID);
+ Point location = comboBox.getLocation();
+
comboBox.openPopup();
waitForElementPresent(By.className("v-filterselect-suggestpopup"));
- compareScreen("combobox-open");
+ assertEquals("Clicking should not cause scrolling", beforeClick,
+ getScrollTop(scrollableElement));
+ assertEquals("ComboBox should not move along x-axis", location.getX(),
+ comboBox.getLocation().getX());
+ assertEquals("ComboBox should not move along y-axis", location.getY(),
+ comboBox.getLocation().getY());
}
}