From: Denis Anisimov Date: Mon, 31 Oct 2016 07:10:02 +0000 (+0200) Subject: Date/time issues are fixed in the tests. X-Git-Tag: 8.0.0.alpha6~35 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=66724b35c5d82cc084974db28b84fc41e79bb8f3;p=vaadin-framework.git Date/time issues are fixed in the tests. - legacy DateField declarative format tests are fixed (day light saving time is taken into account). - CalendarMonthViewDndEvent UI because you are not supposed to work on Sundays (when the test is broken). Change-Id: If7ddf238a7fab104514211df4a12fa6d071f5af2 --- diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/datefield/LegacyDateFieldDeclarativeTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/datefield/LegacyDateFieldDeclarativeTest.java index e9b7ac7959..d55825aa08 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/datefield/LegacyDateFieldDeclarativeTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/datefield/LegacyDateFieldDeclarativeTest.java @@ -46,7 +46,8 @@ public class LegacyDateFieldDeclarativeTest } private String getTimezoneDesign() { - String timeZone = new SimpleDateFormat("Z").format(new Date()); + String timeZone = new SimpleDateFormat("Z") + .format(new Date(2014 - 1900, 5 - 1, 5)); return String.format( "", timeZone); diff --git a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEvent.java b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEvent.java index 09739f1f73..2300268f1a 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEvent.java +++ b/uitest/src/main/java/com/vaadin/tests/components/calendar/CalendarMonthViewDndEvent.java @@ -40,6 +40,11 @@ public class CalendarMonthViewDndEvent extends AbstractReindeerTestUI { protected void setup(VaadinRequest request) { final Calendar calendar = new Calendar("Test calendar"); final java.util.Calendar cal = getAdjustedCalendar(); + if (cal.get( + java.util.Calendar.DAY_OF_WEEK) == java.util.Calendar.SUNDAY) { + // don't use Sunday: no space to move event on the left + cal.add(java.util.Calendar.DAY_OF_MONTH, 1); + } Date from = cal.getTime();