aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2014-03-06 14:49:54 +0200
committerVaadin Code Review <review@vaadin.com>2014-03-06 12:57:49 +0000
commitef319f8b67c2ceb494ded6d2fec037c80e500896 (patch)
tree714920d8cbbafff40d5fbc58d9c61082c125398d
parente888353d74380e16eda17db565caa977a2d53bfa (diff)
downloadvaadin-framework-ef319f8b67c2ceb494ded6d2fec037c80e500896.tar.gz
vaadin-framework-ef319f8b67c2ceb494ded6d2fec037c80e500896.zip
Fix NestedLayoutCaptionHoverTest to work with TB 3.1.3
Change-Id: Ief75a235f8563f9664dd82c9c5a1aab38c7bc77d
-rw-r--r--uitest/src/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHoverTest.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHoverTest.java b/uitest/src/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHoverTest.java
index 95a2c9f493..24a27f343a 100644
--- a/uitest/src/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHoverTest.java
+++ b/uitest/src/com/vaadin/tests/components/orderedlayout/NestedLayoutCaptionHoverTest.java
@@ -16,10 +16,12 @@
package com.vaadin.tests.components.orderedlayout;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import org.junit.Test;
import org.openqa.selenium.By;
+import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.HasInputDevices;
import org.openqa.selenium.interactions.internal.Coordinates;
@@ -46,9 +48,14 @@ public class NestedLayoutCaptionHoverTest extends MultiBrowserTest {
((HasInputDevices) getDriver()).getMouse().mouseMove(coords);
sleep(1000);
- // Verify that there's no error notification
- WebElement error = vaadinElement("Root/VNotification[0]");
- assertNull("No error should be found", error);
+ String selector = "Root/VNotification[0]";
+ try {
+ // Verify that there's no error notification
+ vaadinElement(selector);
+ fail("No error notification should be found");
+ } catch (NoSuchElementException e) {
+ // Exception caught. Verify it's the right one.
+ assertTrue(e.getMessage().contains(selector));
+ }
}
-
}