use of org.uberfire.client.workbench.events.PlaceHiddenEvent in project kie-wb-common by kiegroup.
the class AuthoringWorkbenchDocksTest method testCloseComponentPalette.
@Test
public void testCloseComponentPalette() {
authoringWorkbenchDocks.onLayoutEditorFocus(new LayoutEditorFocusEvent());
reset(uberfireDocks);
authoringWorkbenchDocks.onLayoutEditorClose(new PlaceHiddenEvent(new DefaultPlaceRequest("FormEditor")));
verify(uberfireDocks).remove(authoringWorkbenchDocks.componentPaletteDock);
assertFalse(authoringWorkbenchDocks.componentPaletteEnabled);
verify(uberfireDocks, never()).open(any());
}
use of org.uberfire.client.workbench.events.PlaceHiddenEvent in project kie-wb-common by kiegroup.
the class ProjectDiagramEditorTest method testOnPlaceHiddenEvent.
@Test
public void testOnPlaceHiddenEvent() {
PlaceHiddenEvent event = new PlaceHiddenEvent(placeRequest);
tested.hideDiagramEditorDocks(event);
verify(onDiagramLostFocusEven).fire(any(OnDiagramLoseFocusEvent.class));
}
use of org.uberfire.client.workbench.events.PlaceHiddenEvent in project kie-wb-common by kiegroup.
the class ProjectDiagramEditorTest method testNotValidOnPlaceHiddenEvent.
@Test
public void testNotValidOnPlaceHiddenEvent() {
PlaceRequest anotherRequest = mock(PlaceRequest.class);
when(anotherRequest.getIdentifier()).thenReturn("");
PlaceHiddenEvent event = new PlaceHiddenEvent(anotherRequest);
tested.hideDiagramEditorDocks(event);
verify(onDiagramLostFocusEven, never()).fire(any(OnDiagramLoseFocusEvent.class));
}
Aggregations