diff options
Diffstat (limited to 'uitest/src')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/grid/GridSingleColumn.java | 1 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/grid/GridSingleColumnTest.java | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/uitest/src/com/vaadin/tests/components/grid/GridSingleColumn.java b/uitest/src/com/vaadin/tests/components/grid/GridSingleColumn.java index e9987db1a8..2ab0282102 100644 --- a/uitest/src/com/vaadin/tests/components/grid/GridSingleColumn.java +++ b/uitest/src/com/vaadin/tests/components/grid/GridSingleColumn.java @@ -44,6 +44,7 @@ public class GridSingleColumn extends AbstractTestUI { column.setHeaderCaption("Header"); addComponent(grid); + grid.scrollTo(grid.getContainerDataSource().getIdByIndex(50)); } @Override diff --git a/uitest/src/com/vaadin/tests/components/grid/GridSingleColumnTest.java b/uitest/src/com/vaadin/tests/components/grid/GridSingleColumnTest.java index 05f6b4b9f7..42eb2197bf 100644 --- a/uitest/src/com/vaadin/tests/components/grid/GridSingleColumnTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/GridSingleColumnTest.java @@ -20,6 +20,7 @@ import org.junit.Test; import com.vaadin.testbench.elements.GridElement; import com.vaadin.testbench.elements.GridElement.GridCellElement; +import com.vaadin.testbench.elements.NotificationElement; import com.vaadin.tests.annotations.TestCategory; import com.vaadin.tests.tb3.MultiBrowserTest; @@ -27,11 +28,20 @@ import com.vaadin.tests.tb3.MultiBrowserTest; public class GridSingleColumnTest extends MultiBrowserTest { @Test - public void headerIsVisible() { + public void testHeaderIsVisible() { openTestURL(); GridCellElement cell = $(GridElement.class).first().getHeaderCell(0, 0); Assert.assertTrue("No header available", cell.getText() .equalsIgnoreCase("header")); } + + @Test + public void testScrollDidNotThrow() { + setDebug(true); + openTestURL(); + + Assert.assertFalse("Exception when scrolling on init", + isElementPresent(NotificationElement.class)); + } } |