use of org.uberfire.client.workbench.events.PlaceGainFocusEvent in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method onSelectLibraryTest.
@Test
public void onSelectLibraryTest() {
doReturn(libraryPerspective).when(perspectiveManager).getCurrentPerspective();
final DefaultPlaceRequest projectSettingsPlaceRequest = new DefaultPlaceRequest(LibraryPlaces.LIBRARY_SCREEN);
final PlaceGainFocusEvent placeGainFocusEvent = mock(PlaceGainFocusEvent.class);
doReturn(projectSettingsPlaceRequest).when(placeGainFocusEvent).getPlace();
libraryPlaces.onSelectPlaceEvent(placeGainFocusEvent);
verify(libraryBreadcrumbs).setupForSpace(libraryPlaces.getActiveWorkspace().getOrganizationalUnit());
}
use of org.uberfire.client.workbench.events.PlaceGainFocusEvent in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method onSelectProjectSettingsTest.
@Test
public void onSelectProjectSettingsTest() {
doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
final DefaultPlaceRequest projectSettingsPlaceRequest = new DefaultPlaceRequest(LibraryPlaces.PROJECT_SETTINGS);
final PlaceGainFocusEvent placeGainFocusEvent = mock(PlaceGainFocusEvent.class);
doReturn(projectSettingsPlaceRequest).when(placeGainFocusEvent).getPlace();
libraryPlaces.onSelectPlaceEvent(placeGainFocusEvent);
verify(libraryPlaces).hideDocks();
verify(libraryPlaces).setupLibraryBreadCrumbsForAsset(null);
}
use of org.uberfire.client.workbench.events.PlaceGainFocusEvent in project kie-wb-common by kiegroup.
the class TestRunnerReportingScreenTest method doNotCloseWhenThisScreenGainsFocus.
@Test
public void doNotCloseWhenThisScreenGainsFocus() {
screen.onPlaceGainFocusEvent(new PlaceGainFocusEvent(new DefaultPlaceRequest(TestRunnerReportingScreen.IDENTIFIER)));
verify(placeManager, never()).closePlace(TestRunnerReportingScreen.IDENTIFIER);
}
use of org.uberfire.client.workbench.events.PlaceGainFocusEvent in project kie-wb-common by kiegroup.
the class TestRunnerReportingScreenTest method nullIdentifier.
@Test
public void nullIdentifier() {
screen.onPlaceGainFocusEvent(new PlaceGainFocusEvent(new DefaultPlaceRequest()));
verify(placeManager).closePlace(TestRunnerReportingScreen.IDENTIFIER);
}
use of org.uberfire.client.workbench.events.PlaceGainFocusEvent in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method onSelectPlaceOutsideLibraryTest.
@Test
public void onSelectPlaceOutsideLibraryTest() {
doReturn(otherPerspective).when(perspectiveManager).getCurrentPerspective();
final PlaceGainFocusEvent placeGainFocusEvent = mock(PlaceGainFocusEvent.class);
libraryPlaces.onSelectPlaceEvent(placeGainFocusEvent);
verify(placeGainFocusEvent, never()).getPlace();
}
Aggregations