diff options
author | John Ahlroos <john@vaadin.com> | 2013-10-21 16:12:09 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-10-21 15:14:26 +0000 |
commit | 361ad179ebbe5f25e157497394d3d1fb5aaee506 (patch) | |
tree | a6da57d2315b2ecded972c92d8c54298ece30a70 | |
parent | ab5b20cf502f99944c82f619ffef387f0525e8ba (diff) | |
download | vaadin-framework-361ad179ebbe5f25e157497394d3d1fb5aaee506.tar.gz vaadin-framework-361ad179ebbe5f25e157497394d3d1fb5aaee506.zip |
Fixed focus issue in TableMoveFocusWithSelectionTest (#12540)
Change-Id: I40dbc81b6aa4eaf0a235ae2cc7f04025011445c9
-rw-r--r-- | uitest/src/com/vaadin/tests/components/table/TableMoveFocusWithSelectionTest.java | 22 |
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; - } } |