diff options
author | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2017-03-24 11:16:39 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-03-24 11:16:39 +0200 |
commit | ff3c31b8cb3ba65230edede8edcdef9aa613d178 (patch) | |
tree | 695961d7fec8d904c59d1235f25beb21a4eac8b4 /uitest | |
parent | 8fcb2da138eced17f0a6105ae39122a9d096ef0b (diff) | |
download | vaadin-framework-ff3c31b8cb3ba65230edede8edcdef9aa613d178.tar.gz vaadin-framework-ff3c31b8cb3ba65230edede8edcdef9aa613d178.zip |
Make CloseSessionTest more stable with waitUntil (#8928)
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/test/java/com/vaadin/tests/applicationcontext/CloseSessionTest.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/applicationcontext/CloseSessionTest.java b/uitest/src/test/java/com/vaadin/tests/applicationcontext/CloseSessionTest.java index 84f6085bb8..5a6657801d 100644 --- a/uitest/src/test/java/com/vaadin/tests/applicationcontext/CloseSessionTest.java +++ b/uitest/src/test/java/com/vaadin/tests/applicationcontext/CloseSessionTest.java @@ -6,6 +6,7 @@ import org.junit.Test; import com.vaadin.testbench.By; import com.vaadin.testbench.elements.ButtonElement; import com.vaadin.testbench.elements.NotificationElement; +import com.vaadin.testbench.elements.UIElement; import com.vaadin.tests.tb3.MultiBrowserTest; public class CloseSessionTest extends MultiBrowserTest { @@ -23,6 +24,7 @@ public class CloseSessionTest extends MultiBrowserTest { @Test public void testCloseAndReopen() { clickButton("Close VaadinServiceSession and reopen page"); + waitUntil(driver -> isElementPresent(UIElement.class)); assertLogText(2, "4. Same hash as current? false"); assertLogText(0, "6. Same WrappedSession id? true"); } @@ -34,6 +36,7 @@ public class CloseSessionTest extends MultiBrowserTest { @Test public void testInvalidateHttpSessionAndReopen() { clickButton("Invalidate HttpSession and reopen page"); + waitUntil(driver -> isElementPresent(UIElement.class)); assertLogText(2, "4. Same hash as current? false"); assertLogText(0, "6. Same WrappedSession id? false"); } |