1 package com.vaadin.tests.components.datefield;
3 import static org.junit.Assert.assertEquals;
7 import com.vaadin.testbench.elements.ButtonElement;
8 import com.vaadin.testbench.elements.DateFieldElement;
9 import com.vaadin.tests.tb3.MultiBrowserTest;
11 public class DateFieldMonthResolutionStatusChangeTest
12 extends MultiBrowserTest {
15 public void testChangeReadOnly() {
17 DateFieldElement df = $(DateFieldElement.class).first();
18 assertEquals("Unexpected initial date.", "1/19", df.getValue());
20 // switch read-only state
21 $(ButtonElement.class).id("readOnly").click();
23 assertEquals("Unexpected date change.", "1/19", df.getValue());
27 public void testAddRange() {
29 DateFieldElement df = $(DateFieldElement.class).first();
30 assertEquals("Unexpected initial date.", "1/19", df.getValue());
33 $(ButtonElement.class).id("addRange").click();
35 assertEquals("Unexpected date change.", "1/19", df.getValue());