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 17:17:30 +0200
commitc15277f38efeeb1170b21c90910953fc9c7aa244 (patch)
tree8b24e63479bdb226bfbcaaedfa2128509bf71ece /uitest
parenta2bb2c707d6f06df8fb4b1e6c6b6ab12920184f8 (diff)
downloadvaadin-framework-c15277f38efeeb1170b21c90910953fc9c7aa244.tar.gz
vaadin-framework-c15277f38efeeb1170b21c90910953fc9c7aa244.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: I6f59e3c7d8ef175304d1f3e0fff7fab04ca14c8c
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);
}