use of com.vaadin.flow.component.timepicker.TimePicker in project flow-components by vaadin.
the class TimePickerTest method setAutoOpenDisabled.
@Test
public void setAutoOpenDisabled() {
TimePicker timePicker = new TimePicker();
assertTrue(timePicker.isAutoOpen());
timePicker.setAutoOpen(false);
assertTrue(timePicker.getElement().getProperty(PROP_AUTO_OPEN_DISABLED, false));
assertFalse(timePicker.isAutoOpen());
}
use of com.vaadin.flow.component.timepicker.TimePicker in project flow-components by vaadin.
the class TimePickerTest method testSetStep_millisecondsNotDivideEvenly_throwsException.
@Test(expected = IllegalArgumentException.class)
public void testSetStep_millisecondsNotDivideEvenly_throwsException() {
TimePicker timePicker = new TimePicker();
timePicker.setStep(Duration.ofMillis(333));
}
use of com.vaadin.flow.component.timepicker.TimePicker in project flow-components by vaadin.
the class TimePickerTest method setMinTime_getMin_null.
@Test
public void setMinTime_getMin_null() {
TimePicker timePicker = new TimePicker();
assertEquals(null, timePicker.getMinTime());
timePicker.setMinTime(null);
assertEquals(null, timePicker.getMin());
assertEquals(null, timePicker.getMinTime());
}
use of com.vaadin.flow.component.timepicker.TimePicker in project flow-components by vaadin.
the class TimePickerTest method setMaxTime_getMax_null.
@Test
public void setMaxTime_getMax_null() {
TimePicker timePicker = new TimePicker();
assertEquals(null, timePicker.getMaxTime());
timePicker.setMaxTime(null);
assertEquals(null, timePicker.getMax());
assertEquals(null, timePicker.getMaxTime());
}
use of com.vaadin.flow.component.timepicker.TimePicker in project flow-components by vaadin.
the class TimePickerPage method createHelperComponent.
private void createHelperComponent() {
TimePicker timePickerHelperComponent = new TimePicker();
timePickerHelperComponent.setId("time-picker-helper-component");
Span span = new Span("Helper component");
span.setId("helper-component");
timePickerHelperComponent.setHelperComponent(span);
NativeButton clearComponent = new NativeButton("Clear component helper", e -> {
timePickerHelperComponent.setHelperComponent(null);
});
clearComponent.setId("button-clear-helper-component");
add(timePickerHelperComponent, clearComponent);
}
Aggregations