use of io.jmix.petclinic.entity.visit.VisitType in project jmix-sneferu by mariodavid.
the class SetValueInteractionTest method enter_isAnAliasForSetValue.
@Test
void enter_isAnAliasForSetValue(UiTestAPI uiTestAPI) {
// given:
final StandardEditorTestAPI<Visit, VisitEdit> openedScreen = openVisitEditor(uiTestAPI);
// and:
final VisitType recharge = VisitType.RECHARGE;
// when:
openedScreen.interact(enter(comboBox("typeField"), recharge));
// then:
typeHasValue(openedScreen, recharge);
}
use of io.jmix.petclinic.entity.visit.VisitType in project jmix-sneferu by mariodavid.
the class SetValueInteractionTest method when_interactionIsPerformed_then_valueIsSet.
@Test
void when_interactionIsPerformed_then_valueIsSet(UiTestAPI uiTestAPI) {
// given:
final StandardEditorTestAPI<Visit, VisitEdit> openedScreen = openVisitEditor(uiTestAPI);
// and:
final VisitType recharge = VisitType.RECHARGE;
// when:
openedScreen.interact(setValue(comboBox("typeField"), recharge));
// then:
typeHasValue(openedScreen, recharge);
}
use of io.jmix.petclinic.entity.visit.VisitType in project jmix-sneferu by mariodavid.
the class SetValueInteractionTest method select_isAnAliasForSetValue.
@Test
void select_isAnAliasForSetValue(UiTestAPI uiTestAPI) {
// given:
final StandardEditorTestAPI<Visit, VisitEdit> openedScreen = openVisitEditor(uiTestAPI);
// and:
final VisitType recharge = VisitType.RECHARGE;
// when:
openedScreen.interact(select(comboBox("typeField"), recharge));
// then:
typeHasValue(openedScreen, recharge);
}
use of io.jmix.petclinic.entity.visit.VisitType in project jmix-sneferu by mariodavid.
the class InteractionsTest method when_interactIsPerformedMultipleTimes_then_allInteractionsArePerformed.
@Test
void when_interactIsPerformedMultipleTimes_then_allInteractionsArePerformed(UiTestAPI uiTestAPI) {
// given:
final StandardEditorTestAPI<Visit, VisitEdit> openedScreen = uiTestAPI.openStandardEditor(Visit.class, VisitEdit.class);
// and:
assertThat(openedScreen.component(dateField("visitStartField"))).isNotNull();
assertThat(openedScreen.component(comboBox("typeField"))).isNotNull();
// and:
final LocalDateTime startDate = LocalDateTime.of(2022, 1, 15, 6, 0);
final VisitType recharge = VisitType.RECHARGE;
// when:
openedScreen.interact(enter(dateField("visitStartField"), startDate)).andThen(select(comboBox("typeField"), recharge));
// then:
assertThat(openedScreen.verify(entityValue("visitStart", LocalDateTime.class))).isEqualTo(startDate);
// and:
assertThat(openedScreen.verify(entityValue("type", VisitType.class))).isEqualTo(recharge);
}
Aggregations