blob: 979537c98a7e31c50309398e53ec7115ada64247 (
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
|
package com.vaadin.tests.components.datefield;
import java.io.IOException;
import org.junit.Test;
import org.openqa.selenium.By;
import com.vaadin.testbench.elements.AbstractDateFieldElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
public class DateFieldPopupClosingOnDetachTest extends MultiBrowserTest {
@Test
public void testDateFieldPopupClosingLongClick()
throws InterruptedException, IOException {
openTestURL();
// Open the DateField popup.
AbstractDateFieldElement df = $(AbstractDateFieldElement.class).first();
df.findElement(By.tagName("button")).click();
// Test UI will remove the DateField after 1 second.
waitForElementNotPresent(By.className("v-datefield"));
// The popup should be also removed now.
assertElementNotPresent(By.className("v-datefield-popup"));
}
}
|