From a69660c9d8cb35fc73af09b42df82c7a4a153caa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pekka=20Hyv=C3=B6nen?= Date: Tue, 21 Apr 2015 15:42:54 +0300 Subject: [PATCH] Fixed regression and fragile test for Grid. - Fixed regression caused by #17423 in IE8 - Fixed fragile tests for focusing spacer content in Grid - Changed TestCategory for EscalatorBasicClientFeaturesTest from 'escalator' to 'grid'. Change-Id: I644f85a68fee643e468342093ad537dcd7bf8626 --- client/src/com/vaadin/client/widgets/Escalator.java | 2 +- .../EscalatorBasicClientFeaturesTest.java | 2 +- .../basicfeatures/escalator/EscalatorSpacerTest.java | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/src/com/vaadin/client/widgets/Escalator.java b/client/src/com/vaadin/client/widgets/Escalator.java index eae5789b8a..cfbbb7dace 100644 --- a/client/src/com/vaadin/client/widgets/Escalator.java +++ b/client/src/com/vaadin/client/widgets/Escalator.java @@ -4871,7 +4871,7 @@ public class Escalator extends Widget implements RequiresResize, .toString(); deco.getStyle().setProperty("clip", clip); } else { - deco.getStyle().clearProperty("clip"); + deco.getStyle().setProperty("clip", "auto"); } } } diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeaturesTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeaturesTest.java index 862e959ebc..c1b8028cbf 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeaturesTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/EscalatorBasicClientFeaturesTest.java @@ -31,7 +31,7 @@ import com.vaadin.testbench.TestBenchElement; import com.vaadin.testbench.parallel.TestCategory; import com.vaadin.tests.tb3.MultiBrowserTest; -@TestCategory("escalator") +@TestCategory("grid") public abstract class EscalatorBasicClientFeaturesTest extends MultiBrowserTest { private static final String LOGICAL_ROW_ATTRIBUTE_NAME = "vLogicalRow"; diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java index 71cc19ecdd..e044c192f7 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/escalator/EscalatorSpacerTest.java @@ -34,6 +34,7 @@ import org.openqa.selenium.WebElement; import com.vaadin.client.WidgetUtil; import com.vaadin.shared.ui.grid.Range; +import com.vaadin.testbench.TestBenchElement; import com.vaadin.testbench.elements.NotificationElement; import com.vaadin.testbench.parallel.BrowserUtil; import com.vaadin.tests.components.grid.basicfeatures.EscalatorBasicClientFeaturesTest; @@ -450,7 +451,8 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest { selectMenuPath(FEATURES, SPACERS, FOCUSABLE_UPDATER); selectMenuPath(FEATURES, SPACERS, ROW_1, SET_100PX); tryToTabIntoFocusUpdaterElement(); - assertEquals("input", getFocusedElement().getTagName()); + WebElement focusedElement = getFocusedElement(); + assertEquals("input", focusedElement.getTagName()); } @Test @@ -485,11 +487,9 @@ public class EscalatorSpacerTest extends EscalatorBasicClientFeaturesTest { } private void tryToTabIntoFocusUpdaterElement() { - getEscalator().sendKeys( // - Keys.TAB, // v-ui v-scrollable - Keys.TAB, // menubar - Keys.TAB // - ); + ((TestBenchElement) findElement(By.className("gwt-MenuBar"))).focus(); + WebElement focusedElement = getFocusedElement(); + focusedElement.sendKeys(Keys.TAB); } private WebElement getChild(WebElement parent, int childIndex) { -- 2.39.5