diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2016-10-03 13:44:49 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-10-04 05:45:28 +0000 |
commit | 93756b7f814bf2352a14621dc0203d81c55ca3fb (patch) | |
tree | 40da9abb289779426b5c21508ff5452d16282aaa /uitest | |
parent | 7fa06c9d083fea0b155760ab357763139d25830e (diff) | |
download | vaadin-framework-93756b7f814bf2352a14621dc0203d81c55ca3fb.tar.gz vaadin-framework-93756b7f814bf2352a14621dc0203d81c55ca3fb.zip |
Fix broken DateField for ValoThemeTestUI
Change-Id: Ia21f8acb317bb6c3643e4923ce7c774345821f93
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java index 4346d1c64b..b92461be8b 100644 --- a/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java +++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java @@ -16,6 +16,7 @@ package com.vaadin.tests.themes.valo; import java.time.LocalDate; +import java.util.Date; import java.util.Locale; import com.vaadin.navigator.View; @@ -175,7 +176,7 @@ public class DateFields extends VerticalLayout implements View { row.addComponent(date); PropertysetItem item = new PropertysetItem(); - item.addItemProperty("date", new ObjectProperty<>(getDefaultDate())); + item.addItemProperty("date", new ObjectProperty<>(getDefaultOldDate())); FormLayout form = new FormLayout(); form.setMargin(false); @@ -207,6 +208,14 @@ public class DateFields extends VerticalLayout implements View { } } + private Date getDefaultOldDate() { + if (ValoThemeUI.isTestMode()) { + return new Date(2014 - 1900, 5, 7); + } else { + return new Date(); + } + } + @Override public void enter(ViewChangeEvent event) { // TODO Auto-generated method stub |