diff options
author | Artur Signell <artur@vaadin.com> | 2012-12-07 16:35:07 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-12-07 14:58:43 +0000 |
commit | 8fcde69c2a970b9f175e0c599ab2bc2dc12b0b49 (patch) | |
tree | 2c60f1631e044dfb75ef00c4f6b411a4e58b33f9 | |
parent | 7ac9f6509ef97bcf19b83c82318a3f29f9491d91 (diff) | |
download | vaadin-framework-8fcde69c2a970b9f175e0c599ab2bc2dc12b0b49.tar.gz vaadin-framework-8fcde69c2a970b9f175e0c599ab2bc2dc12b0b49.zip |
Hide using display:none to be screenshot compatible (#10080)
Change-Id: I67b3e21640760ee6581b656450e0a5517788580d
-rw-r--r-- | WebContent/VAADIN/themes/tests-components/styles.css | 7 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/AbstractComponentTest.java | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/WebContent/VAADIN/themes/tests-components/styles.css b/WebContent/VAADIN/themes/tests-components/styles.css index 5b41f1824f..0680e2b472 100644 --- a/WebContent/VAADIN/themes/tests-components/styles.css +++ b/WebContent/VAADIN/themes/tests-components/styles.css @@ -53,4 +53,11 @@ 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 diff --git a/uitest/src/com/vaadin/tests/components/AbstractComponentTest.java b/uitest/src/com/vaadin/tests/components/AbstractComponentTest.java index c086e03ae0..8dae56b079 100644 --- a/uitest/src/com/vaadin/tests/components/AbstractComponentTest.java +++ b/uitest/src/com/vaadin/tests/components/AbstractComponentTest.java @@ -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); } } |