]> source.dussan.org Git - vaadin-framework.git/commitdiff
Ugly hacks to make tests screenshot compatible 08/508/3
authorArtur Signell <artur@vaadin.com>
Fri, 14 Dec 2012 13:31:11 +0000 (15:31 +0200)
committerArtur Signell <artur@vaadin.com>
Mon, 17 Dec 2012 19:46:54 +0000 (21:46 +0200)
Change-Id: Ide0a7e2832e1a3a63edc015367e49912c6b77e0e

uitest/src/com/vaadin/tests/components/TestBase.java

index b500a1144bd404a40119f50fd6ec1eae04117ef6..d267d80669c034fe37474b599a94ae1d5d5c9155 100644 (file)
@@ -15,6 +15,19 @@ public abstract class TestBase extends AbstractTestCase {
         window.getContent().setSizeFull();
 
         Label label = new Label(getDescription(), ContentMode.HTML);
+        if (label.getValue() == null || "".equals(label.getValue())) {
+            // This is only an ugly hack to be screenshot compatible to be able
+            // to detect real problems when introducing IE font-size/line-height
+            // fixes
+            label.setValue("&nbsp;");
+            if (getBrowser().isIE()
+                    && getBrowser().getBrowserMajorVersion() == 9) {
+                label.setHeight("13.8px");
+            } else {
+                label.setHeight("15px");
+            }
+        }
+
         label.setWidth("100%");
         window.addComponent(label);