Search in sources :

Example 31 with Visit

use of io.jmix.petclinic.entity.visit.Visit in project jmix-sneferu by mariodavid.

the class GetLazyOpenedLookupScreenTest method given_screenIsAlreadyOpened_when_getLazyOpenedLookupScreen_then_lazyTestApiIsReturned.

@Test
void given_screenIsAlreadyOpened_when_getLazyOpenedLookupScreen_then_lazyTestApiIsReturned(Screens screens, UiTestAPI uiTestAPI) {
    // given:
    final VisitBrowse screen = screens.create(VisitBrowse.class);
    // and:
    screen.show();
    // when:
    final StandardLookupTestAPI<Visit, VisitBrowse> lazyOpenedScreen = uiTestAPI.getLazyOpenedLookupScreen(VisitBrowse.class);
    // then:
    assertThat(lazyOpenedScreen.screen()).isEqualTo(screen);
}
Also used : Visit(io.jmix.petclinic.entity.visit.Visit) VisitBrowse(io.jmix.petclinic.screen.visit.VisitBrowse) Test(org.junit.jupiter.api.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) SneferuUiTest(de.diedavids.sneferu.SneferuUiTest)

Aggregations

Visit (io.jmix.petclinic.entity.visit.Visit)31 SneferuUiTest (de.diedavids.sneferu.SneferuUiTest)25 Test (org.junit.jupiter.api.Test)25 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)25 VisitEdit (io.jmix.petclinic.screen.visit.VisitEdit)17 VisitBrowse (io.jmix.petclinic.screen.visit.VisitBrowse)9 LocalDateTime (java.time.LocalDateTime)5 VisitType (io.jmix.petclinic.entity.visit.VisitType)4 Subscribe (io.jmix.ui.screen.Subscribe)4 OperationResult (io.jmix.ui.util.OperationResult)3 ScreenNotOpenException (de.diedavids.sneferu.ScreenNotOpenException)2 TabsheetComponentDescriptor (de.diedavids.sneferu.components.descriptor.TabsheetComponentDescriptor)2 Interactions.screenOpenMode (de.diedavids.sneferu.Interactions.screenOpenMode)1 ButtonTestAPI (de.diedavids.sneferu.components.testapi.ButtonTestAPI)1 Pet (io.jmix.petclinic.entity.pet.Pet)1 Button (io.jmix.ui.component.Button)1 TabSheet (io.jmix.ui.component.TabSheet)1 OpenMode (io.jmix.ui.screen.OpenMode)1 Screen (io.jmix.ui.screen.Screen)1