From 6834d65caec655b2d0c20ec599f9d90302d1e4a9 Mon Sep 17 00:00:00 2001 From: Mika Murtojarvi Date: Tue, 19 May 2015 12:55:50 +0300 Subject: [PATCH] Fix a Grid test failure on Firefox Change-Id: I3d6ab2abd146a53ee0d93b1d738ae7a3379c4ff5 --- .../basicfeatures/client/DisabledGridClientTest.java | 11 ++++++----- .../grid/basicfeatures/server/DisabledGridTest.java | 7 +++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/DisabledGridClientTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/DisabledGridClientTest.java index 63d031bc85..8465906801 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/DisabledGridClientTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/DisabledGridClientTest.java @@ -23,6 +23,7 @@ import org.junit.Test; import org.openqa.selenium.Keys; import org.openqa.selenium.interactions.Actions; +import com.vaadin.testbench.elements.GridElement.GridCellElement; import com.vaadin.testbench.elements.GridElement.GridRowElement; import com.vaadin.tests.components.grid.basicfeatures.GridBasicClientFeaturesTest; @@ -39,20 +40,20 @@ public class DisabledGridClientTest extends GridBasicClientFeaturesTest { selectMenuPath("Component", "State", "Selection mode", "single"); GridRowElement row = getGridElement().getRow(0); - row.click(); + GridCellElement cell = getGridElement().getCell(0, 0); + cell.click(); assertFalse("disabled row should not be selected", row.isSelected()); - } @Test public void testEditorOpening() { selectMenuPath("Component", "Editor", "Enabled"); - GridRowElement row = getGridElement().getRow(0); - row.click(); + GridCellElement cell = getGridElement().getCell(0, 0); + cell.click(); assertNull("Editor should not open", getEditor()); new Actions(getDriver()).sendKeys(Keys.ENTER).perform(); assertNull("Editor should not open", getEditor()); } -} +} \ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/DisabledGridTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/DisabledGridTest.java index ed1234e608..cd6a7a7b69 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/DisabledGridTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/server/DisabledGridTest.java @@ -23,6 +23,7 @@ import org.junit.Test; import org.openqa.selenium.Keys; import org.openqa.selenium.interactions.Actions; +import com.vaadin.testbench.elements.GridElement.GridCellElement; import com.vaadin.testbench.elements.GridElement.GridRowElement; import com.vaadin.tests.components.grid.basicfeatures.GridBasicFeaturesTest; @@ -39,7 +40,8 @@ public class DisabledGridTest extends GridBasicFeaturesTest { selectMenuPath("Component", "State", "Selection mode", "single"); GridRowElement row = getGridElement().getRow(0); - row.click(); + GridCellElement cell = getGridElement().getCell(0, 0); + cell.click(); assertFalse("disabled row should not be selected", row.isSelected()); } @@ -49,7 +51,8 @@ public class DisabledGridTest extends GridBasicFeaturesTest { selectMenuPath("Component", "Editor", "Enabled"); GridRowElement row = getGridElement().getRow(0); - row.click(); + GridCellElement cell = getGridElement().getCell(0, 0); + cell.click(); assertNull("Editor should not open", getEditor()); new Actions(getDriver()).sendKeys(Keys.ENTER).perform(); -- 2.39.5