diff options
author | Anthony Guerreiro <anthony@vaadin.com> | 2014-07-01 10:38:00 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-07-07 06:10:42 +0000 |
commit | 7b008eb818d2d27bd7034321bcbe07d24a6e60d8 (patch) | |
tree | 7db01e6399dcd153f1b14f0f82bdd0baa3cb897f | |
parent | a3578d3ac293442b64cbc5f5feb4cb9106799fdb (diff) | |
download | vaadin-framework-7b008eb818d2d27bd7034321bcbe07d24a6e60d8.tar.gz vaadin-framework-7b008eb818d2d27bd7034321bcbe07d24a6e60d8.zip |
Modified test case to work around bug preventing popup to close in IE (#14086)
Change-Id: Icb47d8a0c737e27a3d88078b4162c633ba08739c
-rw-r--r-- | uitest/src/com/vaadin/tests/components/datefield/LocaleChangeTest.java | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/uitest/src/com/vaadin/tests/components/datefield/LocaleChangeTest.java b/uitest/src/com/vaadin/tests/components/datefield/LocaleChangeTest.java index cf756034a1..c80a74599d 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/LocaleChangeTest.java +++ b/uitest/src/com/vaadin/tests/components/datefield/LocaleChangeTest.java @@ -34,7 +34,7 @@ public class LocaleChangeTest extends MultiBrowserTest { assertPopupOpen(true); // Close the popup and change the locale. - toggleDatePopup(); + toggleDatePopupWorkaroundClosePopupIE(); assertPopupOpen(false); driver.findElement(By.className("v-button")).click(); // Locale change. @@ -55,6 +55,26 @@ public class LocaleChangeTest extends MultiBrowserTest { driver.findElement(By.className("v-datefield-button")).click(); } + /* + * Work around bug reported in ticket #14086. Delete this method once fixed + * andd use toggleDatePopup() instead. + */ + private void toggleDatePopupWorkaroundClosePopupIE() { + if (!BrowserUtil.isIE(getDesiredCapabilities())) { + driver.findElement(By.className("v-datefield-button")).click(); + } else { + boolean popupOpen = driver.findElements( + By.className("v-datefield-popup")).size() == 1; + if (popupOpen) { + driver.findElement( + By.className("v-datefield-calendarpanel-day-selected")) + .click(); + } else { + driver.findElement(By.className("v-datefield-button")).click(); + } + } + } + private String getDateValue() { return driver.findElement(By.className("v-datefield-textfield")) .getAttribute("value"); |