]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix PopupViewResizeWhileOpenTest to use correct shadow.
authorSauli Tähkäpää <sauli@vaadin.com>
Thu, 18 Sep 2014 05:41:13 +0000 (08:41 +0300)
committerVaadin Code Review <review@vaadin.com>
Fri, 19 Sep 2014 05:43:06 +0000 (05:43 +0000)
Change-Id: I3be56581099d87a9ff3b2147f26a8a84af063189

uitest/src/com/vaadin/tests/components/popupview/PopupViewResizeWhileOpenTest.java

index bca8fd43900aaf6408cb179daec64ff3f8ecc26d..6c23e4e4a588bb5032147281c08c732ee5f693fc 100644 (file)
@@ -26,6 +26,7 @@ import java.util.List;
 import org.junit.Test;
 import org.openqa.selenium.By;
 import org.openqa.selenium.Dimension;
+import org.openqa.selenium.WebElement;
 import org.openqa.selenium.remote.DesiredCapabilities;
 
 import com.vaadin.testbench.elements.ButtonElement;
@@ -57,7 +58,7 @@ public class PopupViewResizeWhileOpenTest extends MultiBrowserTest {
     }
 
     private void assertShadowSize() {
-        Dimension shadowSize = findElement(By.className("v-shadow")).getSize();
+        Dimension shadowSize = getPopupShadow().getSize();
         Dimension layoutSize = $(VerticalLayoutElement.class).id("content-vl")
                 .getSize();
 
@@ -67,6 +68,11 @@ public class PopupViewResizeWhileOpenTest extends MultiBrowserTest {
         assertThat(shadowSize.width, is(lessThan(layoutSize.width + 10)));
     }
 
+    private WebElement getPopupShadow() {
+        //Shadows with index 0: tooltip, index 1: popup
+        return findElements(By.className("v-shadow")).get(1);
+    }
+
     @Override
     public List<DesiredCapabilities> getBrowsersToTest() {
         return Collections.singletonList(Browser.IE8.getDesiredCapabilities());