aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksi Hietanen <aleksi@vaadin.com>2017-05-23 16:10:33 +0300
committerHenri Sara <henri.sara@gmail.com>2017-05-23 16:10:33 +0300
commit8cdb24715fac3612d8ae80c2dbee541a3c8a963c (patch)
treeb673a33e2732a6c7a0fb2dac8c05c4338f933eeb
parent77a0d562a330e15463e0cd29d1b87a5b312c8bf5 (diff)
downloadvaadin-framework-8cdb24715fac3612d8ae80c2dbee541a3c8a963c.tar.gz
vaadin-framework-8cdb24715fac3612d8ae80c2dbee541a3c8a963c.zip
Fix ComboBoxClosePopupRetainTextTest (#9415)
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java
index 606f406db0..3b7c57e693 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxClosePopupRetainTextTest.java
@@ -37,8 +37,11 @@ public class ComboBoxClosePopupRetainTextTest extends MultiBrowserTest {
ComboBoxElement cb = $(ComboBoxElement.class).first();
WebElement textbox = cb.findElement(By.vaadin("#textbox"));
textbox.sendKeys("I");
- cb.openPopup();
- cb.openPopup(); // openPopup() actually toggles
+ // Toggle the popup
+ // Uses #clickElement instead of ComboBoxElement#openPopup() due to an
+ // issue with the firefox driver
+ clickElement(cb.findElement(By.vaadin("#button")));
+ clickElement(cb.findElement(By.vaadin("#button")));
// The entered value should remain
assertEquals("I", textbox.getAttribute("value"));
}
@@ -51,7 +54,10 @@ public class ComboBoxClosePopupRetainTextTest extends MultiBrowserTest {
WebElement textbox = cb.findElement(By.vaadin("#textbox"));
textbox.clear();
textbox.sendKeys("I");
- cb.openPopup();
+ // Close the open suggestions popup
+ // Uses #clickElement instead of ComboBoxElement#openPopup() due to an
+ // issue with the firefox driver
+ clickElement(cb.findElement(By.vaadin("#button")));
// Entered value should remain in the text field even though the popup
// is opened
assertEquals("I", textbox.getAttribute("value"));