summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2014-12-30 11:27:03 +0200
committerTeemu Suo-Anttila <teemusa@vaadin.com>2015-01-02 14:40:31 +0000
commit2e4677b67a63980fd71955d4325c4e329a95f5e8 (patch)
treefdf08ef102535054f9a7ba2e1b2c410d12731e97 /uitest
parentad1252def1f1fe8d55edd711d6031a2db3985479 (diff)
downloadvaadin-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.java8
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/grid/GridDefaultTextRendererWidget.java10
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);
}
-
}