summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}