summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-03-21 14:10:33 +0200
committerArtur Signell <artur@vaadin.com>2012-03-21 15:28:15 +0200
commit08987be4c28f017098662a63e6f2527027328af5 (patch)
tree2c0553774038fa4a211f8a0abc0a5b330b3bc21d
parent76a46585b4edd100ae2e8b67e9bb3e5464ee423e (diff)
downloadvaadin-framework-08987be4c28f017098662a63e6f2527027328af5.tar.gz
vaadin-framework-08987be4c28f017098662a63e6f2527027328af5.zip
Hide log by setting width/height to 0 so that the same spacing is used
as in Vaadin 6 (to ease screenshot migration)
-rw-r--r--WebContent/VAADIN/themes/base/common/common.css4
-rw-r--r--tests/testbench/com/vaadin/tests/components/AbstractComponentTest.java14
2 files changed, 17 insertions, 1 deletions
diff --git a/WebContent/VAADIN/themes/base/common/common.css b/WebContent/VAADIN/themes/base/common/common.css
index a95f33afcd..6de2b26267 100644
--- a/WebContent/VAADIN/themes/base/common/common.css
+++ b/WebContent/VAADIN/themes/base/common/common.css
@@ -239,4 +239,8 @@ div.v-app-loading {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: default;
+}
+
+.v-clip {
+ overflow: hidden;
} \ No newline at end of file
diff --git a/tests/testbench/com/vaadin/tests/components/AbstractComponentTest.java b/tests/testbench/com/vaadin/tests/components/AbstractComponentTest.java
index e8ac213049..5934cf19d0 100644
--- a/tests/testbench/com/vaadin/tests/components/AbstractComponentTest.java
+++ b/tests/testbench/com/vaadin/tests/components/AbstractComponentTest.java
@@ -157,11 +157,23 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
}
protected void setLogVisible(boolean visible) {
- log.setVisible(visible);
+ // This is only to be screenshot-compatible with Vaadin 6, where
+ // invisible components cause spacing
+ if (visible) {
+ log.setHeight(null);
+ log.setWidth(null);
+ log.setCaption((String) log.getData());
+ } else {
+ log.setHeight("0px");
+ log.setWidth("0px");
+ log.setCaption(null);
+ }
}
private void createLog() {
log = new Log(5).setNumberLogRows(true);
+ log.setData(log.getCaption());
+ log.setStyleName("v-clip");
getLayout().addComponent(log, 1);
}