use of de.diedavids.sneferu.ScreenNotOpenException in project jmix-sneferu by mariodavid.
the class GetOpenedEditorScreenTest method given_noEditorScreenIsOpen_when_getOpenedScreen_then_exceptionIsThrown.
@Test
void given_noEditorScreenIsOpen_when_getOpenedScreen_then_exceptionIsThrown(Screens screens, UiTestAPI uiTestAPI) {
// given:
screens.removeAll();
// when:
final ScreenNotOpenException exception = Assertions.assertThrows(ScreenNotOpenException.class, () -> uiTestAPI.getOpenedEditorScreen(VisitEdit.class));
// then:
assertThat(exception.getMessage()).isEqualTo("No Screen of class VisitEdit found");
}
use of de.diedavids.sneferu.ScreenNotOpenException in project jmix-sneferu by mariodavid.
the class GetOpenedLookupScreenTest method given_noLookupScreenIsOpen_when_getOpenedScreen_then_exceptionIsThrown.
@Test
void given_noLookupScreenIsOpen_when_getOpenedScreen_then_exceptionIsThrown(Screens screens, UiTestAPI uiTestAPI) {
// given:
screens.removeAll();
// when:
final ScreenNotOpenException exception = Assertions.assertThrows(ScreenNotOpenException.class, () -> uiTestAPI.getOpenedLookupScreen(VisitBrowse.class));
// then:
assertThat(exception.getMessage()).isEqualTo("No Screen of class VisitBrowse found");
}
use of de.diedavids.sneferu.ScreenNotOpenException in project jmix-sneferu by mariodavid.
the class GetOpenedLookupScreenTest method given_differentLookupScreenIsOpen_when_getOpenedScreen_then_exceptionIsThrown.
@Test
void given_differentLookupScreenIsOpen_when_getOpenedScreen_then_exceptionIsThrown(Screens screens, UiTestAPI uiTestAPI) {
// given:
screens.removeAll();
screens.create(PetBrowse.class).show();
// when:
final ScreenNotOpenException exception = Assertions.assertThrows(ScreenNotOpenException.class, () -> uiTestAPI.getOpenedLookupScreen(VisitBrowse.class));
// then:
assertThat(exception.getMessage()).isEqualTo("No Screen of class VisitBrowse found");
}
use of de.diedavids.sneferu.ScreenNotOpenException in project jmix-sneferu by mariodavid.
the class GetLazyOpenedStandardScreenTest method given_lazyTestApiIsReturned_when_accessingScreen_then_ScreenNotFoundExceptionIsThrown.
@Test
void given_lazyTestApiIsReturned_when_accessingScreen_then_ScreenNotFoundExceptionIsThrown(Screens screens, UiTestAPI uiTestAPI) {
// given:
screens.removeAll();
// when:
final StandardScreenTestAPI<MyVisits> lazyOpenedScreen = uiTestAPI.getLazyOpenedStandardScreen(MyVisits.class);
// then:
final ScreenNotOpenException exception = Assertions.assertThrows(ScreenNotOpenException.class, lazyOpenedScreen::screen);
// then:
assertThat(exception.getMessage()).isEqualTo("No Screen of class MyVisits found");
}
use of de.diedavids.sneferu.ScreenNotOpenException in project jmix-sneferu by mariodavid.
the class GetLazyOpenedEditorScreenTest method given_lazyTestApiIsReturned_when_accessingScreen_then_ScreenNotFoundExceptionIsThrown.
@Test
void given_lazyTestApiIsReturned_when_accessingScreen_then_ScreenNotFoundExceptionIsThrown(Screens screens, UiTestAPI uiTestAPI) {
// given:
screens.removeAll();
// when:
final StandardEditorTestAPI<Visit, VisitEdit> lazyOpenedScreen = uiTestAPI.getLazyOpenedEditorScreen(VisitEdit.class);
// then:
final ScreenNotOpenException exception = Assertions.assertThrows(ScreenNotOpenException.class, lazyOpenedScreen::screen);
// then:
assertThat(exception.getMessage()).isEqualTo("No Screen of class VisitEdit found");
}
Aggregations