diff options
6 files changed, 7 insertions, 41 deletions
@@ -225,7 +225,7 @@ <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-testbench</artifactId> - <version>4.0.3</version> + <version>4.1.0</version> </dependency> <dependency> <groupId>org.eclipse.jetty</groupId> diff --git a/uitest-common/src/main/java/com/vaadin/testbench/customelements/ProgressBarElement.java b/uitest-common/src/main/java/com/vaadin/testbench/customelements/ProgressBarElement.java index 30874d1fee..78b6ffb4c4 100644 --- a/uitest-common/src/main/java/com/vaadin/testbench/customelements/ProgressBarElement.java +++ b/uitest-common/src/main/java/com/vaadin/testbench/customelements/ProgressBarElement.java @@ -24,6 +24,7 @@ import com.vaadin.testbench.elementsbase.ServerClass; public class ProgressBarElement extends com.vaadin.testbench.elements.ProgressBarElement { + @Override public double getValue() { WebElement indicator = findElement( By.className("v-progressbar-indicator")); @@ -35,22 +36,4 @@ public class ProgressBarElement return Double.parseDouble(width.replace("%", "")) / 100.0; } - /** - * @since 7.5.6 - * @param indicator - * @param string - * @return - */ - private String getStyleAttribute(WebElement element, String styleName) { - String style = element.getAttribute("style"); - String[] styles = style.split(";"); - for (String s : styles) { - if (s.startsWith(styleName + ":")) { - return s.substring(styleName.length() + 1).trim(); - } - } - - return null; - } - } diff --git a/uitest-common/src/main/java/com/vaadin/testbench/customelements/TableElement.java b/uitest-common/src/main/java/com/vaadin/testbench/customelements/TableElement.java index b84b67a896..28432fade9 100644 --- a/uitest-common/src/main/java/com/vaadin/testbench/customelements/TableElement.java +++ b/uitest-common/src/main/java/com/vaadin/testbench/customelements/TableElement.java @@ -3,7 +3,6 @@ package com.vaadin.testbench.customelements; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; -import com.vaadin.testbench.elementsbase.AbstractElement; import com.vaadin.testbench.elementsbase.ServerClass; @ServerClass("com.vaadin.ui.Table") @@ -22,19 +21,4 @@ public class TableElement extends com.vaadin.testbench.elements.TableElement { return findElement(By.className("v-table-column-selector")); } - public static class ContextMenuElement extends AbstractElement { - - public WebElement getItem(int index) { - return findElement( - By.xpath(".//table//tr[" + (index + 1) + "]//td/*")); - } - - } - - public ContextMenuElement getContextMenu() { - WebElement cm = getDriver().findElement(By.className("v-contextmenu")); - return wrapElement(cm, getCommandExecutor()) - .wrap(ContextMenuElement.class); - } - } diff --git a/uitest-common/src/main/java/com/vaadin/testbench/customelements/WindowElement.java b/uitest-common/src/main/java/com/vaadin/testbench/customelements/WindowElement.java index 28d2dd63cc..eae6019b96 100644 --- a/uitest-common/src/main/java/com/vaadin/testbench/customelements/WindowElement.java +++ b/uitest-common/src/main/java/com/vaadin/testbench/customelements/WindowElement.java @@ -16,6 +16,7 @@ public class WindowElement extends com.vaadin.testbench.elements.WindowElement { private final String maximizeBoxClass = "v-window-maximizebox"; private final String closeBoxClass = "v-window-closebox"; + @Override public void restore() { if (isMaximized()) { getRestoreButton().click(); @@ -25,14 +26,11 @@ public class WindowElement extends com.vaadin.testbench.elements.WindowElement { } } - private boolean isMaximized() { - return isElementPresent(By.className(restoreBoxClass)); - } - private WebElement getRestoreButton() { return findElement(By.className("v-window-restorebox")); } + @Override public void maximize() { if (!isMaximized()) { getMaximizeButton().click(); @@ -69,6 +67,7 @@ public class WindowElement extends com.vaadin.testbench.elements.WindowElement { return findElement(By.className(closeBoxClass)); } + @Override public void close() { getCloseButton().click(); diff --git a/uitest/ivy.xml b/uitest/ivy.xml index 2a7bbff47f..3e92b17ff9 100644 --- a/uitest/ivy.xml +++ b/uitest/ivy.xml @@ -122,7 +122,7 @@ <dependency org="org.hsqldb" name="hsqldb" rev="2.2.6" conf="build -> default" /> <dependency org="com.vaadin" name="vaadin-testbench" - rev="4.0.3" conf="build-provided -> default" /> + rev="4.1.0" conf="build-provided -> default" /> <!-- This should be removed once tests have been updated to use lang3 --> <dependency org="commons-lang" name="commons-lang" rev="2.6" conf="build -> default" /> diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java index 5b120e52b5..3b986b503c 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/table/ColumnCollapsingAndColumnExpansionTest.java @@ -24,8 +24,8 @@ import org.openqa.selenium.WebElement; import com.vaadin.testbench.TestBenchElement; import com.vaadin.testbench.customelements.TableElement; -import com.vaadin.testbench.customelements.TableElement.ContextMenuElement; import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.testbench.elements.TableElement.ContextMenuElement; import com.vaadin.tests.tb3.MultiBrowserTest; public class ColumnCollapsingAndColumnExpansionTest extends MultiBrowserTest { |