aboutsummaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2017-07-24 14:38:49 +0300
committerHenri Sara <henri.sara@gmail.com>2017-07-24 14:38:49 +0300
commita3f37c7b6b66acd5e5763ced1e5d2d6927f67679 (patch)
tree6239bc193a278941f5eaa7d836bde3b92322c7ad /uitest
parent94f2e1f4227c59b21011747ab04ed553cfa235a8 (diff)
downloadvaadin-framework-a3f37c7b6b66acd5e5763ced1e5d2d6927f67679.tar.gz
vaadin-framework-a3f37c7b6b66acd5e5763ced1e5d2d6927f67679.zip
Fix button text and waitUntil rule (#9720)
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/main/java/com/vaadin/tests/push/PushToggleComponentVisibility.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/push/PushToggleComponentVisibilityTest.java3
2 files changed, 2 insertions, 3 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/push/PushToggleComponentVisibility.java b/uitest/src/main/java/com/vaadin/tests/push/PushToggleComponentVisibility.java
index bbb004bcb1..8055518538 100644
--- a/uitest/src/main/java/com/vaadin/tests/push/PushToggleComponentVisibility.java
+++ b/uitest/src/main/java/com/vaadin/tests/push/PushToggleComponentVisibility.java
@@ -37,7 +37,7 @@ public class PushToggleComponentVisibility extends UI {
label.setVisible(false);
mainLayout.addComponent(label);
- Button button = new Button("Hide me 3 secondes");
+ Button button = new Button("Hide me for 3 seconds");
button.setId("hide");
button.addClickListener(event1 -> {
button.setVisible(false);
diff --git a/uitest/src/test/java/com/vaadin/tests/push/PushToggleComponentVisibilityTest.java b/uitest/src/test/java/com/vaadin/tests/push/PushToggleComponentVisibilityTest.java
index 831d6a11b2..11ad287240 100644
--- a/uitest/src/test/java/com/vaadin/tests/push/PushToggleComponentVisibilityTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/push/PushToggleComponentVisibilityTest.java
@@ -17,7 +17,6 @@ package com.vaadin.tests.push;
import org.junit.Assert;
import org.junit.Test;
-import org.openqa.selenium.By;
import com.vaadin.testbench.elements.ButtonElement;
import com.vaadin.testbench.elements.LabelElement;
@@ -35,7 +34,7 @@ public class PushToggleComponentVisibilityTest extends SingleBrowserTest {
Assert.assertEquals("Please wait",
$(LabelElement.class).first().getText());
- waitForElementPresent(By.id(HIDE));
+ waitUntil(driver -> isElementPresent(ButtonElement.class));
$(ButtonElement.class).id(HIDE).click();
Assert.assertEquals("Please wait",
$(LabelElement.class).first().getText());