blob: 34ef5dcba6efbef05f7aab37222621da8acc17a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package com.vaadin.tests.components.combobox;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.openqa.selenium.WebElement;
import com.vaadin.testbench.elements.ComboBoxElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
public class ComboBoxPopupWhenBodyScrollsTest extends MultiBrowserTest {
@Test
public void popupBelow() {
openTestURL();
ComboBoxElement combobox = $(ComboBoxElement.class).first();
combobox.openPopup();
WebElement popup = $(ComboBoxElement.class).first()
.getSuggestionPopup();
int comboboxTop = combobox.getLocation().getY();
int popupTop = popup.getLocation().getY();
assertTrue("Popup should be below combobox", popupTop > comboboxTop);
}
}
|