diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-02-05 13:20:38 +0200 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2015-02-05 14:44:41 +0200 |
commit | 5cb3d82ca37e7ecf32c151dd272f1b1b9711ef27 (patch) | |
tree | c1b0aea58d005eb32a9c8baca977ab90cf1c6e4b /uitest | |
parent | 611260e783de9d8d22d8c8dfac9ff42467958cc6 (diff) | |
download | vaadin-framework-5cb3d82ca37e7ecf32c151dd272f1b1b9711ef27.tar.gz vaadin-framework-5cb3d82ca37e7ecf32c151dd272f1b1b9711ef27.zip |
Close notification correctly in GridEditorTest
Change-Id: Ibe5f1cab99025fa4760ebd1e6b9d11d739e1a435
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java | 2 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/tb3/newelements/FixedNotificationElement.java | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java index 994b2e8e2e..566946a7ea 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/GridEditorTest.java @@ -219,7 +219,7 @@ public class GridEditorTest extends GridBasicFeaturesTest { FixedNotificationElement n = $(FixedNotificationElement.class).first(); assertEquals("Column 7: Could not convert value to Integer", n.getCaption()); - n.click(); + n.close(); editor.cancel(); selectMenuPath(EDIT_ITEM_100); diff --git a/uitest/src/com/vaadin/tests/tb3/newelements/FixedNotificationElement.java b/uitest/src/com/vaadin/tests/tb3/newelements/FixedNotificationElement.java index db20016486..ff7715e281 100644 --- a/uitest/src/com/vaadin/tests/tb3/newelements/FixedNotificationElement.java +++ b/uitest/src/com/vaadin/tests/tb3/newelements/FixedNotificationElement.java @@ -1,6 +1,8 @@ package com.vaadin.tests.tb3.newelements; import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; import com.vaadin.testbench.By; import com.vaadin.testbench.elements.NotificationElement; @@ -13,4 +15,11 @@ public class FixedNotificationElement extends NotificationElement { WebElement caption = popup.findElement(By.tagName("h1")); return caption.getText(); } + + public void close() { + click(); + WebDriverWait wait = new WebDriverWait(getDriver(), 10); + wait.until(ExpectedConditions.not(ExpectedConditions + .presenceOfAllElementsLocatedBy(By.className("v-Notification")))); + } } |