use of io.jmix.petclinic.entity.visit.Visit in project jmix-sneferu by mariodavid.
the class GetValueInteractionTest method componentValue_isAnAliasForGetValue.
@Test
void componentValue_isAnAliasForGetValue(UiTestAPI uiTestAPI) {
// given:
StandardEditorTestAPI<Visit, VisitEdit> visitEdit = uiTestAPI.openStandardEditor(Visit.class, VisitEdit.class);
visitEdit.interact(enter(VISIT_START_FIELD, VISIT_START_VALUE));
// when:
final LocalDateTime actualVisitStart = (LocalDateTime) visitEdit.andThenGet(componentValue(VISIT_START_FIELD));
// then:
assertThat(actualVisitStart).isEqualTo(VISIT_START_VALUE);
}
use of io.jmix.petclinic.entity.visit.Visit in project jmix-sneferu by mariodavid.
the class ScreenOpenModeInteractionTest method when_interactionIsPerformed_then_openModeIsReturned.
@Test
void when_interactionIsPerformed_then_openModeIsReturned(UiTestAPI uiTestAPI) {
// given:
final Visit expectedVisit = dataManager.create(Visit.class);
// and:
StandardEditorTestAPI<Visit, VisitEdit> visitEdit = uiTestAPI.openStandardEditor(Visit.class, VisitEdit.class, expectedVisit);
// when:
final OpenMode actualOpenMode = visitEdit.andThenGet(screenOpenMode());
// then:
assertThat(actualOpenMode).isEqualTo(OpenMode.DIALOG);
}
use of io.jmix.petclinic.entity.visit.Visit 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.Visit 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.Visit 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);
}
Aggregations