Search in sources :

Example 6 with Veterinarian

use of io.jmix.petclinic.entity.veterinarian.Veterinarian in project jmix-sneferu by mariodavid.

the class CloseEditorInteractionTest method given_validForm_when_interactionIsPerformed_then_screenIsClosedAndSuccessIsReturned.

@Test
void given_validForm_when_interactionIsPerformed_then_screenIsClosedAndSuccessIsReturned(UiTestAPI uiTestAPI) {
    // given:
    StandardEditorTestAPI<Veterinarian, VeterinarianEdit> visitEdit = uiTestAPI.openStandardEditor(Veterinarian.class, VeterinarianEdit.class);
    // and:
    visitEdit.interact(enter(textInputField("firstNameField"), "Oak"));
    // when:
    final OperationResult operationResult = visitEdit.andThenGet(closeEditor());
    // then:
    assertThat(operationResult).isEqualTo(OperationResult.success());
}
Also used : VeterinarianEdit(io.jmix.petclinic.screen.veterinarian.veterinarian.VeterinarianEdit) Veterinarian(io.jmix.petclinic.entity.veterinarian.Veterinarian) OperationResult(io.jmix.ui.util.OperationResult) Test(org.junit.jupiter.api.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) SneferuUiTest(de.diedavids.sneferu.SneferuUiTest)

Aggregations

Veterinarian (io.jmix.petclinic.entity.veterinarian.Veterinarian)6 SneferuUiTest (de.diedavids.sneferu.SneferuUiTest)5 Test (org.junit.jupiter.api.Test)5 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)5 VeterinarianEdit (io.jmix.petclinic.screen.veterinarian.veterinarian.VeterinarianEdit)3 OperationResult (io.jmix.ui.util.OperationResult)3 DataGridComponentDescriptor (de.diedavids.sneferu.components.descriptor.DataGridComponentDescriptor)2 VeterinarianBrowse (io.jmix.petclinic.screen.veterinarian.veterinarian.VeterinarianBrowse)2