Skip to content

Commit

Permalink
Make CloseSessionTest more stable with waitUntil
Browse files Browse the repository at this point in the history
  • Loading branch information
Teemu Suo-Anttila committed Mar 23, 2017
1 parent d26317d commit b983e2e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
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 {
Expand All @@ -23,6 +24,7 @@ public void setup() throws Exception {
@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");
}
Expand All @@ -34,6 +36,7 @@ public void testCloseAndReopen() {
@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");
}
Expand Down

0 comments on commit b983e2e

Please sign in to comment.