From 26dac6ff92b38ffec2491c7e1d12585ca20dfa10 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Sat, 22 Oct 2016 19:45:40 +0300 Subject: Publish Escalator.getBodyRowCount to JS (#20344) This is needed to be able to get the information from e.g. TestBench Change-Id: I95ec6064f602e6a8b24e35cc59d467e9c8b31c1e --- .../grid/basicfeatures/server/GridStructureTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'uitest/src/test') diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridStructureTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridStructureTest.java index aa38f61083..da06dde016 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridStructureTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/basicfeatures/server/GridStructureTest.java @@ -514,4 +514,18 @@ public class GridStructureTest extends GridBasicFeaturesTest { selectMenuPath("Component", "Body rows", "Add third row"); assertFalse(logContainsText("Exception occured")); } + + @Test + public void getBodyRowCountJS() { + openTestURL(); + GridElement grid = $(GridElement.class).first(); + assertEquals(1000L, + executeScript("return arguments[0].getBodyRowCount()", grid)); + selectMenuPath("Component", "Body rows", "Remove all rows"); + assertEquals(0L, + executeScript("return arguments[0].getBodyRowCount()", grid)); + selectMenuPath("Component", "Body rows", "Add first row"); + assertEquals(1L, + executeScript("return arguments[0].getBodyRowCount()", grid)); + } } -- cgit v1.2.3