summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2016-01-08 16:23:32 +0200
committerTeemu Suo-Anttila <teemusa@vaadin.com>2016-01-08 16:31:02 +0200
commit02b9b7346e1981a5fff52ceba52d6eea30a89fee (patch)
tree06598aeb2485a4748dc8acbf9af8971daaacbb62 /uitest
parentcf50732c3c8d94bb6ec542c43b1225fbb46f741e (diff)
downloadvaadin-framework-02b9b7346e1981a5fff52ceba52d6eea30a89fee.tar.gz
vaadin-framework-02b9b7346e1981a5fff52ceba52d6eea30a89fee.zip
Use simple date format for BasicCrudGridEditorRow test UI
This patch also forces locales to US for all the date formats to avoid issues on different default locales. Change-Id: I7445f4ff1a25d83ab9dbb0633caefcea56d50acc
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/GridThemeUI.java6
-rw-r--r--uitest/src/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java7
2 files changed, 11 insertions, 2 deletions
diff --git a/uitest/src/com/vaadin/tests/components/grid/GridThemeUI.java b/uitest/src/com/vaadin/tests/components/grid/GridThemeUI.java
index 2fccf4d7c8..b0128e936a 100644
--- a/uitest/src/com/vaadin/tests/components/grid/GridThemeUI.java
+++ b/uitest/src/com/vaadin/tests/components/grid/GridThemeUI.java
@@ -99,7 +99,8 @@ public class GridThemeUI extends AbstractTestUIWithLog {
new IntegerRangeValidator("Must be between 0 and 100", 0,
100));
getColumn("birthDate").setRenderer(
- new DateRenderer(DateFormat.getDateInstance()));
+ new DateRenderer(DateFormat.getDateInstance(
+ DateFormat.MEDIUM, Locale.US)));
}
}
@@ -139,7 +140,8 @@ public class GridThemeUI extends AbstractTestUIWithLog {
new IntegerRangeValidator("Must be between 0 and 100", 0,
100));
getColumn("birthDate").setRenderer(
- new DateRenderer(DateFormat.getDateInstance()));
+ new DateRenderer(DateFormat.getDateInstance(
+ DateFormat.MEDIUM, Locale.US)));
addFooterRowAt(0);
}
diff --git a/uitest/src/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java b/uitest/src/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java
index 62c217445f..0fc0669288 100644
--- a/uitest/src/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java
+++ b/uitest/src/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java
@@ -15,6 +15,9 @@
*/
package com.vaadin.tests.fieldgroup;
+import java.text.DateFormat;
+import java.util.Locale;
+
import com.vaadin.data.Item;
import com.vaadin.data.util.BeanItem;
import com.vaadin.data.validator.IntegerRangeValidator;
@@ -22,6 +25,7 @@ import com.vaadin.event.SelectionEvent;
import com.vaadin.event.SelectionEvent.SelectionListener;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Grid;
+import com.vaadin.ui.renderers.DateRenderer;
public class BasicCrudGridEditorRow extends AbstractBasicCrud {
@@ -52,6 +56,9 @@ public class BasicCrudGridEditorRow extends AbstractBasicCrud {
.addValidator(
new IntegerRangeValidator("Must be between 0 and 100",
0, 100));
+ grid.getColumn("birthDate").setRenderer(
+ new DateRenderer(DateFormat.getDateInstance(DateFormat.MEDIUM,
+ Locale.US)));
addComponent(grid);
getLayout().setExpandRatio(grid, 1);
}