aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2019-10-25 15:09:36 +0300
committerGitHub <noreply@github.com>2019-10-25 15:09:36 +0300
commit87afa7668eb837c57f586a202baaaecbf2387dc3 (patch)
treea315934721f3b420c2dab5d0659445348474c751
parent6cd34cec8cdeff845bc0282e5eb0cd4491b40f1b (diff)
downloadvaadin-framework-87afa7668eb837c57f586a202baaaecbf2387dc3.tar.gz
vaadin-framework-87afa7668eb837c57f586a202baaaecbf2387dc3.zip
Tweak a test to open Grid details row by clicking cell instead of row. (#11767)
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridHeightTest.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeightTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeightTest.java
index 0e0e21a424..ae92382ae2 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeightTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridHeightTest.java
@@ -1,5 +1,10 @@
package com.vaadin.tests.components.grid;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.number.IsCloseTo.closeTo;
+import static org.junit.Assert.fail;
+
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
@@ -7,6 +12,7 @@ import java.util.Map.Entry;
import org.junit.Ignore;
import org.junit.Test;
import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
import com.vaadin.testbench.elements.GridElement;
import com.vaadin.testbench.elements.GridElement.GridRowElement;
@@ -14,11 +20,6 @@ import com.vaadin.testbench.elements.RadioButtonGroupElement;
import com.vaadin.testbench.parallel.TestCategory;
import com.vaadin.tests.tb3.MultiBrowserTest;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.number.IsCloseTo.closeTo;
-import static org.junit.Assert.fail;
-
/**
* Tests that Grid gets correct height based on height mode, and resizes
* properly with details row if height is undefined.
@@ -85,7 +86,9 @@ public class GridHeightTest extends MultiBrowserTest {
}
GridRowElement row = grid.getRow(2);
- row.click(getXOffset(row, 5), getYOffset(row, 5));
+ WebElement cell = row.findElements(By.className("v-grid-cell"))
+ .get(0);
+ cell.click();
waitForElementPresent(By.id("lbl1"));
int openHeight = grid.getSize().getHeight();
@@ -98,7 +101,7 @@ public class GridHeightTest extends MultiBrowserTest {
detailsRowHeight, "opened" });
}
- row.click(5, 5);
+ cell.click();
waitForElementNotPresent(By.id("lbl1"));
int afterHeight = grid.getSize().getHeight();