blob: 96f90e4a7f4cf13330f79958b7cd924c83a60625 (
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
26
27
28
29
30
31
|
package com.vaadin.tests.components.datefield;
import static org.junit.Assert.assertTrue;
import org.openqa.selenium.WebElement;
import com.vaadin.testbench.elements.DateFieldElement;
/**
* Test for date field popup calendar position in Valo theme.
*
* Test method is defined in super class.
*
* @author Vaadin Ltd
*/
public class ValoDateFieldPopupPositionTest extends DateFieldPopupPositionTest {
@Override
protected void checkPopupPosition() {
DateFieldElement field = $(DateFieldElement.class).first();
WebElement popup = getPopup();
int left = field.getLocation().getX();
int popupRight = popup.getLocation().getX()
+ popup.getSize().getWidth();
assertTrue(
"Calendar popup has wrong X coordinate=" + popupRight
+ " , left side of the field is " + left,
popupRight <= left);
}
}
|