diff options
author | Artur Signell <artur@vaadin.com> | 2014-03-19 16:21:03 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-03-19 14:54:23 +0000 |
commit | 73a43f2bec76e9f2757e3ad6598b096dec4dd5da (patch) | |
tree | d24a548844c81b8b0c6c69d41605ce8a86c27503 /uitest | |
parent | 227a937af1d844f7372a5a3071c1e204e25a49c0 (diff) | |
download | vaadin-framework-73a43f2bec76e9f2757e3ad6598b096dec4dd5da.tar.gz vaadin-framework-73a43f2bec76e9f2757e3ad6598b096dec4dd5da.zip |
Make test work in IE. Disable Firefox which doesn't work
Change-Id: I79c0f8bc2a1e394b4ad2159a41ae426c058348ce
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/table/SelectAllRowsTest.java | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/uitest/src/com/vaadin/tests/components/table/SelectAllRowsTest.java b/uitest/src/com/vaadin/tests/components/table/SelectAllRowsTest.java index 664b36fa75..2e27675b25 100644 --- a/uitest/src/com/vaadin/tests/components/table/SelectAllRowsTest.java +++ b/uitest/src/com/vaadin/tests/components/table/SelectAllRowsTest.java @@ -21,7 +21,7 @@ import static com.vaadin.tests.components.table.SelectAllRows.TABLE; import static com.vaadin.tests.components.table.SelectAllRows.TOTAL_NUMBER_OF_ROWS; import static org.junit.Assert.assertEquals; -import java.util.Arrays; +import java.util.ArrayList; import java.util.List; import org.junit.Test; @@ -38,11 +38,19 @@ public class SelectAllRowsTest extends MultiBrowserTest { private final static String TABLE_ROW = "v-table-row"; @Override + protected DesiredCapabilities getDesiredCapabilities() { + DesiredCapabilities cap = super.getDesiredCapabilities(); + cap.setCapability("requireWindowFocus", true); + return cap; + } + + @Override public List<DesiredCapabilities> getBrowsersToTest() { - // Pressing Shift modifier key does not work with TestBench and IE - // (#8621) - return Arrays.asList(Browser.FIREFOX.getDesiredCapabilities(), - Browser.CHROME.getDesiredCapabilities()); + // Pressing Shift modifier key does not work with Firefox + ArrayList<DesiredCapabilities> browsers = new ArrayList<DesiredCapabilities>( + super.getBrowsersToTest()); + browsers.remove(Browser.FIREFOX.getDesiredCapabilities()); + return browsers; } @Test @@ -66,15 +74,14 @@ public class SelectAllRowsTest extends MultiBrowserTest { private void selectAllRowsInTable() { clickFirstRow(); scrollTableToBottom(); - new Actions(getDriver()).keyDown(Keys.SHIFT).perform(); - clickLastRow(); - new Actions(getDriver()).keyUp(Keys.SHIFT).perform(); + new Actions(getDriver()).keyDown(Keys.SHIFT).click(getLastRow()) + .keyUp(Keys.SHIFT).perform(); } - private void clickLastRow() { + private WebElement getLastRow() { List<WebElement> rows = allVisibleTableRows(); WebElement lastRow = rows.get(rows.size() - 1); - lastRow.click(); + return lastRow; } private void clickFirstRow() { |