diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/uitest/src/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java b/uitest/src/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java index dc4dd341f4..f892775ea3 100644 --- a/uitest/src/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java +++ b/uitest/src/com/vaadin/tests/components/embedded/EmbeddedThemeResourceTest.java @@ -80,12 +80,16 @@ public class EmbeddedThemeResourceTest extends SingleBrowserTest { @Test public void testUpdatedTheme() { - EmbeddedElement embedded = $(EmbeddedElement.class).first(); - final ImageElement image = $(ImageElement.class).first(); - final String initial = image.getAttribute("src"); + final String initial = $(ImageElement.class).first() + .getAttribute("src"); // update theme $(ButtonElement.class).first().click(); + waitForThemeToChange("reindeer"); + + EmbeddedElement embedded = $(EmbeddedElement.class).first(); + // Re fetch as theme change creates new elements + final ImageElement image = $(ImageElement.class).first(); waitUntil(new ExpectedCondition<Boolean>() { @Override @@ -107,4 +111,5 @@ public class EmbeddedThemeResourceTest extends SingleBrowserTest { embedded.findElement(By.tagName("img")).getAttribute("src"), is(image.getAttribute("src"))); } + } |