aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/components/table
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/table')
-rw-r--r--uitest/src/com/vaadin/tests/components/table/TableMoveFocusWithSelectionTest.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/uitest/src/com/vaadin/tests/components/table/TableMoveFocusWithSelectionTest.java b/uitest/src/com/vaadin/tests/components/table/TableMoveFocusWithSelectionTest.java
index b38705eeb6..5075e22f1b 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableMoveFocusWithSelectionTest.java
+++ b/uitest/src/com/vaadin/tests/components/table/TableMoveFocusWithSelectionTest.java
@@ -57,19 +57,25 @@ public class TableMoveFocusWithSelectionTest extends MultiBrowserTest {
// Click on row 7
getDriver().findElement(By.id("row-7")).click();
+ // Clicking a row should get the row focus
+ WebElement row7TableRow = getDriver().findElement(
+ By.xpath("//div[@id='row-7']/../../.."));
+ String row7StyleName = row7TableRow.getAttribute("class");
+ assertTrue(row7StyleName.contains("v-table-focus"));
+
// Select row 5-10 server side
getDriver().findElement(By.id("select-510")).click();
+ /*
+ * Focus the table again (some browsers steal focus when performing
+ * button click, other don't)
+ */
+ getDriver().findElement(By.id("test-table")).click();
+
// Ensure row 7 is still focused
- WebElement row7TableRow = getDriver().findElement(
+ row7TableRow = getDriver().findElement(
By.xpath("//div[@id='row-7']/../../.."));
- String row7StyleName = row7TableRow.getAttribute("class");
+ row7StyleName = row7TableRow.getAttribute("class");
assertTrue(row7StyleName.contains("v-table-focus"));
}
-
- @Override
- protected Class<?> getUIClass() {
- // FIXME Remove when this is done automatically
- return TableMoveFocusWithSelection.class;
- }
}