]> source.dussan.org Git - vaadin-framework.git/commitdiff
Hide using display:none to be screenshot compatible (#10080) 69/469/2
authorArtur Signell <artur@vaadin.com>
Fri, 7 Dec 2012 14:35:07 +0000 (16:35 +0200)
committerVaadin Code Review <review@vaadin.com>
Fri, 7 Dec 2012 14:58:43 +0000 (14:58 +0000)
Change-Id: I67b3e21640760ee6581b656450e0a5517788580d

WebContent/VAADIN/themes/tests-components/styles.css
uitest/src/com/vaadin/tests/components/AbstractComponentTest.java

index 5b41f1824faf3da5b18a568d21b49010843d54eb..0680e2b47239bf962313f56dfcf3ac809cb6b12e 100644 (file)
        box-shadow: inset 0 1px 2px rgba(0,0,0,.2);
        border-radius: .5em;
        background: rgba(0,0,0,.02);
+}
+
+.displaynone {
+       height: 0;
+       width: 0;
+       display: none;
+}
 }
\ No newline at end of file
index c086e03ae017789aaa7917585d052ac353d8450b..8dae56b0795d9bb3abbc085671f94a5b19515804 100644 (file)
@@ -165,12 +165,10 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
         // This is only to be screenshot-compatible with Vaadin 6, where
         // invisible components cause spacing
         if (visible) {
-            log.setHeight(null);
-            log.setWidth(null);
+            log.removeStyleName("displaynone");
             log.setCaption((String) log.getData());
         } else {
-            log.setHeight("0px");
-            log.setWidth("0px");
+            log.addStyleName("displaynone");
             log.setCaption(null);
         }
     }