use of org.kie.workbench.common.stunner.core.client.canvas.controls.builder.EdgeBuilderControl in project kie-wb-common by kiegroup.
the class CaseManagementCanvasFactoryTest method testControls.
@Test
public void testControls() {
ConnectionAcceptorControl connectionAcceptorControl = factory.newControl(ConnectionAcceptorControl.class);
assertNotNull(connectionAcceptorControl);
ContainmentAcceptorControl containmentAcceptorControl = factory.newControl(ContainmentAcceptorControl.class);
assertNotNull(containmentAcceptorControl);
DockingAcceptorControl dockingAcceptorControl = factory.newControl(DockingAcceptorControl.class);
assertNotNull(dockingAcceptorControl);
CanvasInPlaceTextEditorControl canvasInPlaceTextEditorControl = factory.newControl(CanvasInPlaceTextEditorControl.class);
assertNotNull(canvasInPlaceTextEditorControl);
SelectionControl selectionControl = factory.newControl(SelectionControl.class);
assertNotNull(selectionControl);
ElementBuilderControl elementBuilderControl = factory.newControl(ElementBuilderControl.class);
assertNotNull(elementBuilderControl);
NodeBuilderControl nodeBuilderControl = factory.newControl(NodeBuilderControl.class);
assertNotNull(nodeBuilderControl);
EdgeBuilderControl edgeBuilderControl = factory.newControl(EdgeBuilderControl.class);
assertNotNull(edgeBuilderControl);
ZoomControl zoomControl = factory.newControl(ZoomControl.class);
assertNotNull(zoomControl);
PanControl panControl = factory.newControl(PanControl.class);
assertNotNull(panControl);
KeyboardControl keyboardControl = factory.newControl(KeyboardControl.class);
assertNotNull(keyboardControl);
}
use of org.kie.workbench.common.stunner.core.client.canvas.controls.builder.EdgeBuilderControl in project kie-wb-common by kiegroup.
the class CreateConnectorActionTest method testCompleteDrag.
private void testCompleteDrag(DragProxyCallback callback) {
// Verify drag proxy complete.
callback.onComplete(100, 500);
final ArgumentCaptor<EdgeBuildRequest> edgeBuildRequestArgumentCaptor = ArgumentCaptor.forClass(EdgeBuildRequest.class);
final ArgumentCaptor<BuilderControl.BuildCallback> completeCallbackCaptor = ArgumentCaptor.forClass(BuilderControl.BuildCallback.class);
verify(edgeBuilderControl, times(1)).build(edgeBuildRequestArgumentCaptor.capture(), completeCallbackCaptor.capture());
final EdgeBuildRequest edgeBuildRequest = edgeBuildRequestArgumentCaptor.getValue();
assertEquals(edge, edgeBuildRequest.getEdge());
assertEquals(element, edgeBuildRequest.getInNode());
assertEquals(targetNode, edgeBuildRequest.getOutNode());
final BuilderControl.BuildCallback completeCallback = completeCallbackCaptor.getValue();
completeCallback.onSuccess(TARGET_NODE_UUID);
verify(edgeBuilderControl, times(1)).disable();
verify(edgeBuilderControl, times(1)).setCommandManagerProvider(eq(null));
verify(canvasHighlight, times(1)).destroy();
}
Aggregations