summaryrefslogtreecommitdiffstats
path: root/uitest/src/main
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-10-16 17:21:23 +0200
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2017-10-16 18:21:23 +0300
commit4148d910a556c873477da62f1e31b0e285b8b4d9 (patch)
tree7caad300ff6431d64ca7b3ebd53ba996967013a1 /uitest/src/main
parent9b4bc1073527214437d41681741ce05f5fc60c56 (diff)
downloadvaadin-framework-4148d910a556c873477da62f1e31b0e285b8b4d9.tar.gz
vaadin-framework-4148d910a556c873477da62f1e31b0e285b8b4d9.zip
Fix AbstractDateField to correctly show week day names (#10188)
Fixes #9200
Diffstat (limited to 'uitest/src/main')
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/AbstractDateFieldTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldWeekShortName.java42
2 files changed, 42 insertions, 2 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/AbstractDateFieldTest.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/AbstractDateFieldTest.java
index 8ae2d48afd..9d7d75efb8 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/datefield/AbstractDateFieldTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/AbstractDateFieldTest.java
@@ -31,7 +31,6 @@ public abstract class AbstractDateFieldTest<T extends AbstractLocalDateField>
weekNumberCommand);
createDateFormatSelectAction(CATEGORY_FEATURES);
createSetValueAction(CATEGORY_FEATURES);
-
}
private void createSetValueAction(String category) {
@@ -68,7 +67,6 @@ public abstract class AbstractDateFieldTest<T extends AbstractLocalDateField>
createSelectAction("Date format", category, options, "-",
dateFormatCommand);
-
}
private String getDatePattern(Locale locale, int dateStyle) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldWeekShortName.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldWeekShortName.java
new file mode 100644
index 0000000000..a2148d4378
--- /dev/null
+++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldWeekShortName.java
@@ -0,0 +1,42 @@
+package com.vaadin.tests.components.datefield;
+
+import java.time.LocalDate;
+import java.util.Locale;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.DateField;
+
+public class DateFieldWeekShortName extends AbstractTestUI {
+
+ @Override
+ protected String getTestDescription() {
+ return "DateField to correctly show week name for locales with different first week day";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 9200;
+ }
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ LocalDate localDate = LocalDate.of(2017, 10, 20);
+
+ DateField ar = new DateField();
+ ar.setValue(localDate);
+ ar.setLocale(new Locale("ar"));
+ addComponent(ar);
+
+ DateField de = new DateField();
+ de.setLocale(Locale.GERMAN);
+ de.setValue(localDate);
+ addComponent(de);
+
+ DateField en = new DateField();
+ en.setLocale(Locale.ENGLISH);
+ en.setValue(localDate);
+ addComponent(en);
+ }
+
+}