summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2017-06-12 16:29:49 +0300
committerIlia Motornyi <elmot@vaadin.com>2017-06-12 16:29:49 +0300
commitc5cdca0c6290b96cf9499d29b4b5380466b33082 (patch)
treeb2afed7806bfe9e2ab1694ea595c30939f7c8c5f /uitest
parent585c9ec24dc6f71f008218929aa91cabdc54c000 (diff)
downloadvaadin-framework-c5cdca0c6290b96cf9499d29b4b5380466b33082.tar.gz
vaadin-framework-c5cdca0c6290b96cf9499d29b4b5380466b33082.zip
Add handler for row height changing in Grid
Fixes #9488
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridRowHeightChange.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/grid/GridRowHeightChangeTest.java22
2 files changed, 16 insertions, 8 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridRowHeightChange.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridRowHeightChange.java
index 34fc2048be..1b3a7a0ab2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridRowHeightChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridRowHeightChange.java
@@ -4,6 +4,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.stream.IntStream;
+import com.vaadin.annotations.Widgetset;
import com.vaadin.server.VaadinRequest;
import com.vaadin.shared.ui.grid.HeightMode;
import com.vaadin.tests.components.AbstractReindeerTestUI;
@@ -12,6 +13,7 @@ import com.vaadin.ui.NativeSelect;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.VerticalLayout;
+@Widgetset("com.vaadin.DefaultWidgetSet")
public class GridRowHeightChange extends AbstractReindeerTestUI {
private final List<String> themes = Arrays.asList("valo", "reindeer",
diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridRowHeightChangeTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridRowHeightChangeTest.java
index 18ecba5696..dbc9278229 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridRowHeightChangeTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridRowHeightChangeTest.java
@@ -25,19 +25,25 @@ public class GridRowHeightChangeTest extends MultiBrowserTest {
@Test
public void changeThemeAndMeasureGridHeight() {
+ // Initial check
+ verifyGridSize();
+
for (String theme : themes) {
// select theme
$(NativeSelectElement.class).first().selectByText(theme);
- GridElement grid = $(GridElement.class).first();
+ verifyGridSize();
+ }
+ }
- int gridHeight = grid.getSize().getHeight();
- int tabsheetHeight = findElements(
- By.className("v-tabsheet-content")).get(0).getSize()
- .getHeight();
+ private void verifyGridSize() {
+ GridElement grid = $(GridElement.class).first();
- assertEquals("Grid's visible height should be equal to Grid height",
- gridHeight, tabsheetHeight, 1);
- }
+ int gridHeight = grid.getSize().getHeight();
+ int tabsheetHeight = findElements(By.className("v-tabsheet-content"))
+ .get(0).getSize().getHeight();
+
+ assertEquals("Grid's visible height should be equal to Grid height",
+ gridHeight, tabsheetHeight, 1);
}
}