aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/components/datefield/DateFieldWeekShortName.java
blob: a2148d4378d4b48ca63bed18c4df5240824f7fe9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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);
    }

}