aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java9
-rw-r--r--uitest/src/test/java/com/vaadin/tests/focusable/GridFocusableTest.java10
2 files changed, 15 insertions, 4 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java
index 19867f9559..208f91d71d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basics/GridBasics.java
@@ -382,6 +382,11 @@ public class GridBasics extends AbstractTestUIWithLog {
}
private void createStateMenu(MenuItem stateMenu) {
+ MenuItem tabIndexMenu = stateMenu.addItem("Tab index", null);
+ addGridMethodMenu(tabIndexMenu, "0", 0, grid::setTabIndex);
+ addGridMethodMenu(tabIndexMenu, "-1", -1, grid::setTabIndex);
+ addGridMethodMenu(tabIndexMenu, "10", 10, grid::setTabIndex);
+
MenuItem frozenColMenu = stateMenu.addItem("Frozen column count", null);
for (int i = -1; i < 3; ++i) {
addGridMethodMenu(frozenColMenu, "" + i, i,
@@ -463,10 +468,6 @@ public class GridBasics extends AbstractTestUIWithLog {
createSelectionMenu(stateMenu);
stateMenu.addItem("Set focus", item -> grid.focus());
- MenuItem tabIndexMenu = stateMenu.addItem("Tab index", null);
- addGridMethodMenu(tabIndexMenu, "0", 0, grid::setTabIndex);
- addGridMethodMenu(tabIndexMenu, "-1", -1, grid::setTabIndex);
- addGridMethodMenu(tabIndexMenu, "10", 10, grid::setTabIndex);
}
private void createRowStyleMenu(MenuItem rowStyleMenu) {
diff --git a/uitest/src/test/java/com/vaadin/tests/focusable/GridFocusableTest.java b/uitest/src/test/java/com/vaadin/tests/focusable/GridFocusableTest.java
index 96a19902eb..85aa8bea11 100644
--- a/uitest/src/test/java/com/vaadin/tests/focusable/GridFocusableTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/focusable/GridFocusableTest.java
@@ -1,5 +1,9 @@
package com.vaadin.tests.focusable;
+import org.openqa.selenium.NoSuchElementException;
+import org.openqa.selenium.WebElement;
+
+import com.vaadin.testbench.By;
import com.vaadin.testbench.customelements.GridElement;
import com.vaadin.testbench.elements.GridElement.GridCellElement;
import com.vaadin.tests.components.grid.basics.GridBasics;
@@ -25,4 +29,10 @@ public class GridFocusableTest extends AbstractFocusableComponentTest {
protected GridCellElement getFocusElement() {
return $(GridElement.class).first().getCell(0, 0);
}
+
+ @Override
+ protected WebElement getMenuElement(String menuCaption)
+ throws NoSuchElementException {
+ return super.getMenuElement(menuCaption).findElement(By.xpath(".."));
+ }
}