blob: 3167269490c38e908e4dcb3e42c9d7196ed98683 (
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
32
33
34
35
36
37
|
package com.vaadin.tests.components.datefield;
import static org.junit.Assert.assertFalse;
import java.io.IOException;
import java.util.List;
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.tests.tb3.MultiBrowserTest;
public class DisabledDateFieldPopupTest extends MultiBrowserTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
return getIEBrowsersOnly();
}
@Test
public void testPopup() throws IOException {
openTestURL();
WebElement button = driver
.findElement(By.className("v-datefield-button"));
new Actions(driver).moveToElement(button).click()
.sendKeys(Keys.ARROW_DOWN).perform();
assertFalse(
"Calendar popup should not be opened for disabled date field",
isElementPresent(By.className("v-datefield-popup")));
}
}
|