diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-12-30 11:27:03 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-01-02 14:40:31 +0000 |
commit | 2e4677b67a63980fd71955d4325c4e329a95f5e8 (patch) | |
tree | fdf08ef102535054f9a7ba2e1b2c410d12731e97 /uitest | |
parent | ad1252def1f1fe8d55edd711d6031a2db3985479 (diff) | |
download | vaadin-framework-2e4677b67a63980fd71955d4325c4e329a95f5e8.tar.gz vaadin-framework-2e4677b67a63980fd71955d4325c4e329a95f5e8.zip |
Fix DefaultTextRenderer warning with String data (#15430)
Change-Id: I04eae1e82da6bb0213be19599c7d8fc3085a92a5
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRendererTest.java | 8 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/widgetset/client/grid/GridDefaultTextRendererWidget.java | 10 |
2 files changed, 17 insertions, 1 deletions
diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRendererTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRendererTest.java index cd31bfc860..79eadd03d8 100644 --- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRendererTest.java +++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/GridDefaultTextRendererTest.java @@ -22,6 +22,7 @@ import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; +import com.vaadin.testbench.By; import com.vaadin.testbench.elements.GridElement; import com.vaadin.testbench.elements.NotificationElement; import com.vaadin.testbench.elements.ServerClass; @@ -40,6 +41,7 @@ public class GridDefaultTextRendererTest extends MultiBrowserTest { @Before public void init() { + setDebug(true); openTestURL(); grid = $(MyGridElement.class).first(); assertFalse("There was an unexpected notification during init", @@ -57,4 +59,10 @@ public class GridDefaultTextRendererTest extends MultiBrowserTest { assertEquals("Second cell should've been populated ", "string", grid .getCell(1, 0).getText()); } + + @Test + public void testWarningShouldNotBeInDebugLog() { + assertFalse("Warning visible with string content.", + isElementPresent(By.xpath("//span[contains(.,'attached:#1')]"))); + } } diff --git a/uitest/src/com/vaadin/tests/widgetset/client/grid/GridDefaultTextRendererWidget.java b/uitest/src/com/vaadin/tests/widgetset/client/grid/GridDefaultTextRendererWidget.java index 173ae097ed..4f1ea48be5 100644 --- a/uitest/src/com/vaadin/tests/widgetset/client/grid/GridDefaultTextRendererWidget.java +++ b/uitest/src/com/vaadin/tests/widgetset/client/grid/GridDefaultTextRendererWidget.java @@ -47,10 +47,18 @@ public class GridDefaultTextRendererWidget extends } }); + grid.addColumn(new Column<String, String>() { + + @Override + public String getValue(String row) { + return "foo"; + } + + }); + grid.setHeightByRows(2); grid.setHeightMode(HeightMode.ROW); grid.setSelectionMode(SelectionMode.NONE); addNorth(grid, 500); } - } |