summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2014-06-19 09:29:15 +0300
committerVaadin Code Review <review@vaadin.com>2014-06-23 12:25:47 +0000
commit5fe5f05576c166600f6912345f4580b5d0bfa8a1 (patch)
treeebacb424e9d30458e17eeaa4091cbceb3e588250
parentb5bc598c0938fd254ca666dd4b0ebdc3dc36d8da (diff)
downloadvaadin-framework-5fe5f05576c166600f6912345f4580b5d0bfa8a1.tar.gz
vaadin-framework-5fe5f05576c166600f6912345f4580b5d0bfa8a1.zip
Refactor DateFieldReadOnlyTest to use a predefined locale with 24h time.
Change-Id: I32011639b6e0dfdc36d6ede350db27af80549ac3
-rw-r--r--uitest/src/com/vaadin/tests/components/datefield/DateFieldReadOnly.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/uitest/src/com/vaadin/tests/components/datefield/DateFieldReadOnly.java b/uitest/src/com/vaadin/tests/components/datefield/DateFieldReadOnly.java
index 392dbaf9c6..304c978381 100644
--- a/uitest/src/com/vaadin/tests/components/datefield/DateFieldReadOnly.java
+++ b/uitest/src/com/vaadin/tests/components/datefield/DateFieldReadOnly.java
@@ -3,16 +3,18 @@ package com.vaadin.tests.components.datefield;
import java.util.Calendar;
import java.util.Locale;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.DateField;
-public class DateFieldReadOnly extends TestBase {
+public class DateFieldReadOnly extends AbstractTestUI {
@Override
- protected String getDescription() {
+ protected String getTestDescription() {
return "A read-only DateField should not show the popup button and not be editable.";
}
@@ -22,7 +24,7 @@ public class DateFieldReadOnly extends TestBase {
}
@Override
- protected void setup() {
+ protected void setup(VaadinRequest request) {
final DateField timeField = new DateField("A read-only datefield");
timeField.setResolution(DateField.RESOLUTION_SEC);
timeField.setDateFormat("HH:mm:ss");
@@ -30,6 +32,7 @@ public class DateFieldReadOnly extends TestBase {
timeField.setIcon(null);
timeField.setWidth("8em");
timeField.addStyleName("timeField");
+ timeField.setLocale(new Locale("fi"));
// Set date so that testing always has same time
Calendar c = Calendar.getInstance(Locale.ENGLISH);