summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-01-04 13:42:08 +0200
committerArtur Signell <artur@vaadin.com>2013-01-04 17:30:51 +0200
commit228267306146facd7d4f8ec7be3b22504a924bf7 (patch)
treedd244ae60713da94081a740c62d630310ad8363f /uitest/src/com/vaadin
parentfb68bd53035fdd9cf0448623d5f6867fe17bab64 (diff)
downloadvaadin-framework-228267306146facd7d4f8ec7be3b22504a924bf7.tar.gz
vaadin-framework-228267306146facd7d4f8ec7be3b22504a924bf7.zip
Ensure popup datefield width setting works in all themes (#10485)
Change-Id: I9f0891fb363e49d59b5ab2b1af53ba4bf9bca21e
Diffstat (limited to 'uitest/src/com/vaadin')
-rw-r--r--uitest/src/com/vaadin/tests/components/uitest/components/DatesCssTest.java23
1 files changed, 17 insertions, 6 deletions
diff --git a/uitest/src/com/vaadin/tests/components/uitest/components/DatesCssTest.java b/uitest/src/com/vaadin/tests/components/uitest/components/DatesCssTest.java
index 454cc68202..cb97e8ee84 100644
--- a/uitest/src/com/vaadin/tests/components/uitest/components/DatesCssTest.java
+++ b/uitest/src/com/vaadin/tests/components/uitest/components/DatesCssTest.java
@@ -6,12 +6,12 @@ import java.util.GregorianCalendar;
import com.vaadin.tests.components.uitest.TestSampler;
import com.vaadin.ui.Component;
import com.vaadin.ui.DateField;
-import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.GridLayout;
import com.vaadin.ui.InlineDateField;
import com.vaadin.ui.PopupDateField;
import com.vaadin.ui.themes.ChameleonTheme;
-public class DatesCssTest extends HorizontalLayout {
+public class DatesCssTest extends GridLayout {
private TestSampler parent;
private int debugIdCounter = 0;
@@ -19,13 +19,14 @@ public class DatesCssTest extends HorizontalLayout {
private Calendar cal = new GregorianCalendar(2012, 8, 11, 18, 00, 00);
public DatesCssTest(TestSampler parent) {
+ super(5, 2);
this.parent = parent;
setSpacing(true);
setWidth("100%");
- createDateFieldWith(null, null);
- createDateFieldWith("Small", ChameleonTheme.DATEFIELD_SMALL);
- createDateFieldWith("Big", ChameleonTheme.DATEFIELD_BIG);
+ createDateFieldWith(null, null, null);
+ createDateFieldWith("Small", ChameleonTheme.DATEFIELD_SMALL, null);
+ createDateFieldWith("Big", ChameleonTheme.DATEFIELD_BIG, null);
DateField df = new PopupDateField("Popup date field");
df.setId("datefield" + debugIdCounter++);
@@ -36,9 +37,16 @@ public class DatesCssTest extends HorizontalLayout {
df.setId("datefield" + debugIdCounter++);
df.setValue(cal.getTime());
addComponent(df);
+
+ createDateFieldWith(null, null, "130px");
+ createDateFieldWith("Small 130px", ChameleonTheme.DATEFIELD_SMALL,
+ "130px");
+ createDateFieldWith("Big 130px", ChameleonTheme.DATEFIELD_BIG, "130px");
+
}
- private void createDateFieldWith(String caption, String primaryStyleName) {
+ private void createDateFieldWith(String caption, String primaryStyleName,
+ String width) {
DateField df = new DateField("Date field");
df.setId("datefield" + debugIdCounter++);
df.setValue(cal.getTime());
@@ -50,6 +58,9 @@ public class DatesCssTest extends HorizontalLayout {
if (primaryStyleName != null) {
df.addStyleName(primaryStyleName);
}
+ if (width != null) {
+ df.setWidth(width);
+ }
addComponent(df);