From 20a7ca431030cb926c9e055cb1eb6a22fef7f33c Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Thu, 13 Sep 2012 12:24:54 +0300 Subject: [PATCH] Set a specific date for the DateFields so test does not change daily. --- .../tests/components/uitest/components/DatesCssTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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 e41eb7543f..454cc68202 100644 --- a/uitest/src/com/vaadin/tests/components/uitest/components/DatesCssTest.java +++ b/uitest/src/com/vaadin/tests/components/uitest/components/DatesCssTest.java @@ -1,5 +1,8 @@ package com.vaadin.tests.components.uitest.components; +import java.util.Calendar; +import java.util.GregorianCalendar; + import com.vaadin.tests.components.uitest.TestSampler; import com.vaadin.ui.Component; import com.vaadin.ui.DateField; @@ -13,6 +16,8 @@ public class DatesCssTest extends HorizontalLayout { private TestSampler parent; private int debugIdCounter = 0; + private Calendar cal = new GregorianCalendar(2012, 8, 11, 18, 00, 00); + public DatesCssTest(TestSampler parent) { this.parent = parent; setSpacing(true); @@ -24,16 +29,19 @@ public class DatesCssTest extends HorizontalLayout { DateField df = new PopupDateField("Popup date field"); df.setId("datefield" + debugIdCounter++); + df.setValue(cal.getTime()); addComponent(df); df = new InlineDateField("Inline date field"); df.setId("datefield" + debugIdCounter++); + df.setValue(cal.getTime()); addComponent(df); } private void createDateFieldWith(String caption, String primaryStyleName) { DateField df = new DateField("Date field"); df.setId("datefield" + debugIdCounter++); + df.setValue(cal.getTime()); if (caption != null) { df.setCaption(caption); -- 2.39.5