diff options
author | Artur Signell <artur@vaadin.com> | 2015-09-07 14:24:36 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-09-07 13:41:19 +0000 |
commit | 8ffe48687ae367a765e3e54721c2821d8d773c2d (patch) | |
tree | 996333015111745f8343bc91f1eed4aea7d0c2cd /uitest/src/com/vaadin/tests/tb3 | |
parent | 6992460acb6b0980c5224ef32d8f6f6c405bd4ea (diff) | |
download | vaadin-framework-8ffe48687ae367a765e3e54721c2821d8d773c2d.tar.gz vaadin-framework-8ffe48687ae367a765e3e54721c2821d8d773c2d.zip |
Make test work correctly with resynchronize
Change-Id: I4aaf8875cbd69db525c4aaa8ac92a26b3b11b158
Diffstat (limited to 'uitest/src/com/vaadin/tests/tb3')
-rw-r--r-- | uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java index a58575890e..5ca945c860 100644 --- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java +++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java @@ -1208,4 +1208,20 @@ public abstract class AbstractTB3Test extends ParallelTest { return (WebElement) executeScript("return document.activeElement;"); } + + protected void waitForThemeToChange(final String theme) { + + final WebElement rootDiv = findElement(By + .xpath("//div[contains(@class,'v-app')]")); + waitUntil(new ExpectedCondition<Boolean>() { + + @Override + public Boolean apply(WebDriver input) { + String rootClass = rootDiv.getAttribute("class").trim(); + + return rootClass.contains(theme); + } + }, 30); + } + } |