You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DateFieldPopupClosingOnDetachTest.java 883B

1234567891011121314151617181920212223242526272829
  1. package com.vaadin.tests.components.datefield;
  2. import java.io.IOException;
  3. import org.junit.Test;
  4. import org.openqa.selenium.By;
  5. import com.vaadin.testbench.elements.AbstractDateFieldElement;
  6. import com.vaadin.tests.tb3.MultiBrowserTest;
  7. public class DateFieldPopupClosingOnDetachTest extends MultiBrowserTest {
  8. @Test
  9. public void testDateFieldPopupClosingLongClick()
  10. throws InterruptedException, IOException {
  11. openTestURL();
  12. // Open the DateField popup.
  13. AbstractDateFieldElement df = $(AbstractDateFieldElement.class).first();
  14. df.findElement(By.tagName("button")).click();
  15. // Test UI will remove the DateField after 1 second.
  16. waitForElementNotPresent(By.className("v-datefield"));
  17. // The popup should be also removed now.
  18. assertElementNotPresent(By.className("v-datefield-popup"));
  19. }
  20. }