chore(project): fix linting errors
This commit is contained in:
parent
7d08b98c0f
commit
33156e43be
|
@ -197,6 +197,7 @@ Modeler.prototype._collectIds = function(definitions, context) {
|
||||||
};
|
};
|
||||||
|
|
||||||
Modeler.prototype._interactionModules = [
|
Modeler.prototype._interactionModules = [
|
||||||
|
|
||||||
// non-modeling components
|
// non-modeling components
|
||||||
KeyboardMoveModule,
|
KeyboardMoveModule,
|
||||||
MoveCanvasModule,
|
MoveCanvasModule,
|
||||||
|
@ -205,6 +206,7 @@ Modeler.prototype._interactionModules = [
|
||||||
];
|
];
|
||||||
|
|
||||||
Modeler.prototype._modelingModules = [
|
Modeler.prototype._modelingModules = [
|
||||||
|
|
||||||
// modeling components
|
// modeling components
|
||||||
AlignElementsModule,
|
AlignElementsModule,
|
||||||
AutoPlaceModule,
|
AutoPlaceModule,
|
||||||
|
|
|
@ -1154,6 +1154,7 @@ export default function BpmnRenderer(
|
||||||
var text = getSemantic(element).name;
|
var text = getSemantic(element).name;
|
||||||
renderLaneLabel(parentGfx, text, element);
|
renderLaneLabel(parentGfx, text, element);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Collapsed pool draw text inline
|
// Collapsed pool draw text inline
|
||||||
var text2 = getSemantic(element).name;
|
var text2 = getSemantic(element).name;
|
||||||
renderLabel(parentGfx, text2, {
|
renderLabel(parentGfx, text2, {
|
||||||
|
|
|
@ -151,6 +151,7 @@ export function getFlowNodeDistance(source, element) {
|
||||||
getTargets(source, isReference).map(toTargetNode(5)),
|
getTargets(source, isReference).map(toTargetNode(5)),
|
||||||
getSources(source, isReference).map(toSourceNode(1))
|
getSources(source, isReference).map(toSourceNode(1))
|
||||||
), function(nodes, node) {
|
), function(nodes, node) {
|
||||||
|
|
||||||
// filter out shapes connected twice via source or target
|
// filter out shapes connected twice via source or target
|
||||||
nodes[node.shape.id + '__weight_' + node.weight] = node;
|
nodes[node.shape.id + '__weight_' + node.weight] = node;
|
||||||
|
|
||||||
|
|
|
@ -185,6 +185,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
|
||||||
function splitLaneHandler(count) {
|
function splitLaneHandler(count) {
|
||||||
|
|
||||||
return function(event, element) {
|
return function(event, element) {
|
||||||
|
|
||||||
// actual split
|
// actual split
|
||||||
modeling.splitLane(element, count);
|
modeling.splitLane(element, count);
|
||||||
|
|
||||||
|
@ -338,6 +339,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!popupMenu.isEmpty(element, 'bpmn-replace')) {
|
if (!popupMenu.isEmpty(element, 'bpmn-replace')) {
|
||||||
|
|
||||||
// Replace menu entry
|
// Replace menu entry
|
||||||
assign(actions, {
|
assign(actions, {
|
||||||
'replace': {
|
'replace': {
|
||||||
|
@ -400,6 +402,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
|
||||||
var deleteAllowed = rules.allowed('elements.delete', { elements: [ element ] });
|
var deleteAllowed = rules.allowed('elements.delete', { elements: [ element ] });
|
||||||
|
|
||||||
if (isArray(deleteAllowed)) {
|
if (isArray(deleteAllowed)) {
|
||||||
|
|
||||||
// was the element returned as a deletion candidate?
|
// was the element returned as a deletion candidate?
|
||||||
deleteAllowed = deleteAllowed[0] === element;
|
deleteAllowed = deleteAllowed[0] === element;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,7 @@ BpmnEditorActions.prototype._registerDefaultActions = function(injector) {
|
||||||
|
|
||||||
if (canvas && elementRegistry && selection) {
|
if (canvas && elementRegistry && selection) {
|
||||||
this._registerAction('selectElements', function() {
|
this._registerAction('selectElements', function() {
|
||||||
|
|
||||||
// select all elements except for the invisible
|
// select all elements except for the invisible
|
||||||
// root element
|
// root element
|
||||||
var rootElement = canvas.getRootElement();
|
var rootElement = canvas.getRootElement();
|
||||||
|
|
|
@ -352,6 +352,7 @@ function getBoundaryEventTargetLayout(attachOrientation, targetOrientation, atta
|
||||||
// attached to either top, right, bottom or left side
|
// attached to either top, right, bottom or left side
|
||||||
if (attachedToSide) {
|
if (attachedToSide) {
|
||||||
if (isHorizontalOrientation(attachOrientation)) {
|
if (isHorizontalOrientation(attachOrientation)) {
|
||||||
|
|
||||||
// orientation is 'right' or 'left'
|
// orientation is 'right' or 'left'
|
||||||
|
|
||||||
// opposite horizontal orientation or same orientation
|
// opposite horizontal orientation or same orientation
|
||||||
|
@ -365,6 +366,7 @@ function getBoundaryEventTargetLayout(attachOrientation, targetOrientation, atta
|
||||||
// fallback
|
// fallback
|
||||||
return 'v';
|
return 'v';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// orientation is 'top' or 'bottom'
|
// orientation is 'top' or 'bottom'
|
||||||
|
|
||||||
// opposite vertical orientation or same orientation
|
// opposite vertical orientation or same orientation
|
||||||
|
@ -379,6 +381,7 @@ function getBoundaryEventTargetLayout(attachOrientation, targetOrientation, atta
|
||||||
return 'h';
|
return 'h';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// attached to either top-right, top-left, bottom-right or bottom-left corner
|
// attached to either top-right, top-left, bottom-right or bottom-left corner
|
||||||
|
|
||||||
// orientation is 'right', 'left'
|
// orientation is 'right', 'left'
|
||||||
|
|
|
@ -77,6 +77,7 @@ export default function BpmnUpdater(
|
||||||
var context = e.context;
|
var context = e.context;
|
||||||
|
|
||||||
var element = context.shape || context.connection,
|
var element = context.shape || context.connection,
|
||||||
|
|
||||||
// oldParent is the (old) new parent, because we are undoing
|
// oldParent is the (old) new parent, because we are undoing
|
||||||
oldParent = context.parent || context.newParent;
|
oldParent = context.parent || context.newParent;
|
||||||
|
|
||||||
|
@ -310,6 +311,7 @@ BpmnUpdater.prototype.updateAttachment = function(context) {
|
||||||
};
|
};
|
||||||
|
|
||||||
BpmnUpdater.prototype.updateParent = function(element, oldParent) {
|
BpmnUpdater.prototype.updateParent = function(element, oldParent) {
|
||||||
|
|
||||||
// do not update BPMN 2.0 label parent
|
// do not update BPMN 2.0 label parent
|
||||||
if (element instanceof Label) {
|
if (element instanceof Label) {
|
||||||
return;
|
return;
|
||||||
|
@ -517,6 +519,7 @@ BpmnUpdater.prototype.updateSemanticParent = function(businessObject, newParent,
|
||||||
|
|
||||||
if (is(newParent, 'bpmn:Lane')) {
|
if (is(newParent, 'bpmn:Lane')) {
|
||||||
do {
|
do {
|
||||||
|
|
||||||
// unwrap Lane -> LaneSet -> (Lane | FlowElementsContainer)
|
// unwrap Lane -> LaneSet -> (Lane | FlowElementsContainer)
|
||||||
newParent = newParent.$parent.$parent;
|
newParent = newParent.$parent.$parent;
|
||||||
} while (is(newParent, 'bpmn:Lane'));
|
} while (is(newParent, 'bpmn:Lane'));
|
||||||
|
@ -596,6 +599,7 @@ BpmnUpdater.prototype.updateSemanticParent = function(businessObject, newParent,
|
||||||
var children;
|
var children;
|
||||||
|
|
||||||
if (businessObject.$parent) {
|
if (businessObject.$parent) {
|
||||||
|
|
||||||
// remove from old parent
|
// remove from old parent
|
||||||
children = businessObject.$parent.get(containment);
|
children = businessObject.$parent.get(containment);
|
||||||
collectionRemove(children, businessObject);
|
collectionRemove(children, businessObject);
|
||||||
|
@ -604,6 +608,7 @@ BpmnUpdater.prototype.updateSemanticParent = function(businessObject, newParent,
|
||||||
if (!newParent) {
|
if (!newParent) {
|
||||||
businessObject.$parent = null;
|
businessObject.$parent = null;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// add to new parent
|
// add to new parent
|
||||||
children = newParent.get(containment);
|
children = newParent.get(containment);
|
||||||
children.push(businessObject);
|
children.push(businessObject);
|
||||||
|
@ -671,6 +676,7 @@ BpmnUpdater.prototype.updateConnection = function(context) {
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if (is(businessObject, 'bpmn:DataInputAssociation')) {
|
if (is(businessObject, 'bpmn:DataInputAssociation')) {
|
||||||
|
|
||||||
// handle obnoxious isMsome sourceRef
|
// handle obnoxious isMsome sourceRef
|
||||||
businessObject.get('sourceRef')[0] = newSource;
|
businessObject.get('sourceRef')[0] = newSource;
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ ElementFactory.$inject = [
|
||||||
ElementFactory.prototype.baseCreate = BaseElementFactory.prototype.create;
|
ElementFactory.prototype.baseCreate = BaseElementFactory.prototype.create;
|
||||||
|
|
||||||
ElementFactory.prototype.create = function(elementType, attrs) {
|
ElementFactory.prototype.create = function(elementType, attrs) {
|
||||||
|
|
||||||
// no special magic for labels,
|
// no special magic for labels,
|
||||||
// we assume their businessObjects have already been created
|
// we assume their businessObjects have already been created
|
||||||
// and wired via attrs
|
// and wired via attrs
|
||||||
|
|
|
@ -62,6 +62,7 @@ export default function DropOnFlowBehavior(eventBus, bpmnRules, modeling) {
|
||||||
target = targetFlow.target;
|
target = targetFlow.target;
|
||||||
|
|
||||||
if (bpmnRules.canConnect(source, shape, targetFlow)) {
|
if (bpmnRules.canConnect(source, shape, targetFlow)) {
|
||||||
|
|
||||||
// reconnect source -> inserted shape
|
// reconnect source -> inserted shape
|
||||||
modeling.reconnectEnd(targetFlow, shape, waypointsBefore || position);
|
modeling.reconnectEnd(targetFlow, shape, waypointsBefore || position);
|
||||||
|
|
||||||
|
@ -71,6 +72,7 @@ export default function DropOnFlowBehavior(eventBus, bpmnRules, modeling) {
|
||||||
if (bpmnRules.canConnect(shape, target, targetFlow)) {
|
if (bpmnRules.canConnect(shape, target, targetFlow)) {
|
||||||
|
|
||||||
if (!incomingConnection) {
|
if (!incomingConnection) {
|
||||||
|
|
||||||
// reconnect inserted shape -> end
|
// reconnect inserted shape -> end
|
||||||
modeling.reconnectStart(targetFlow, shape, waypointsAfter || position);
|
modeling.reconnectStart(targetFlow, shape, waypointsAfter || position);
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ export default function IsHorizontalFix(eventBus) {
|
||||||
var bo = getBusinessObject(event.context.shape);
|
var bo = getBusinessObject(event.context.shape);
|
||||||
|
|
||||||
if (isAny(bo, elementTypesToUpdate) && !bo.di.get('isHorizontal')) {
|
if (isAny(bo, elementTypesToUpdate) && !bo.di.get('isHorizontal')) {
|
||||||
|
|
||||||
// set attribute directly to avoid modeling#updateProperty side effects
|
// set attribute directly to avoid modeling#updateProperty side effects
|
||||||
bo.di.set('isHorizontal', true);
|
bo.di.set('isHorizontal', true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ export default function RemoveParticipantBehavior(eventBus, modeling) {
|
||||||
var collaborationRoot = context.collaborationRoot;
|
var collaborationRoot = context.collaborationRoot;
|
||||||
|
|
||||||
if (collaborationRoot && !collaborationRoot.businessObject.participants.length) {
|
if (collaborationRoot && !collaborationRoot.businessObject.participants.length) {
|
||||||
|
|
||||||
// replace empty collaboration with process diagram
|
// replace empty collaboration with process diagram
|
||||||
modeling.makeProcess();
|
modeling.makeProcess();
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@ export default function ResizeLaneBehavior(eventBus, modeling) {
|
||||||
if (is(shape, 'bpmn:Lane') || is(shape, 'bpmn:Participant')) {
|
if (is(shape, 'bpmn:Lane') || is(shape, 'bpmn:Participant')) {
|
||||||
|
|
||||||
if (canExecute) {
|
if (canExecute) {
|
||||||
|
|
||||||
// ensure we have actual pixel values for new bounds
|
// ensure we have actual pixel values for new bounds
|
||||||
// (important when zoom level was > 1 during move)
|
// (important when zoom level was > 1 during move)
|
||||||
newBounds = roundBounds(newBounds);
|
newBounds = roundBounds(newBounds);
|
||||||
|
|
|
@ -43,6 +43,7 @@ export default function ToggleElementCollapseBehaviour(
|
||||||
visibleBBox = computeChildrenBBox(visibleElements);
|
visibleBBox = computeChildrenBBox(visibleElements);
|
||||||
|
|
||||||
if (visibleBBox) {
|
if (visibleBBox) {
|
||||||
|
|
||||||
// center to visibleBBox with max(defaultSize, childrenBounds)
|
// center to visibleBBox with max(defaultSize, childrenBounds)
|
||||||
newBounds.width = Math.max(visibleBBox.width, newBounds.width);
|
newBounds.width = Math.max(visibleBBox.width, newBounds.width);
|
||||||
newBounds.height = Math.max(visibleBBox.height, newBounds.height);
|
newBounds.height = Math.max(visibleBBox.height, newBounds.height);
|
||||||
|
@ -50,6 +51,7 @@ export default function ToggleElementCollapseBehaviour(
|
||||||
newBounds.x = visibleBBox.x + (visibleBBox.width - newBounds.width) / 2;
|
newBounds.x = visibleBBox.x + (visibleBBox.width - newBounds.width) / 2;
|
||||||
newBounds.y = visibleBBox.y + (visibleBBox.height - newBounds.height) / 2;
|
newBounds.y = visibleBBox.y + (visibleBBox.height - newBounds.height) / 2;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// center to collapsed shape with defaultSize
|
// center to collapsed shape with defaultSize
|
||||||
newBounds.x = shape.x + (shape.width - newBounds.width) / 2;
|
newBounds.x = shape.x + (shape.width - newBounds.width) / 2;
|
||||||
newBounds.y = shape.y + (shape.height - newBounds.height) / 2;
|
newBounds.y = shape.y + (shape.height - newBounds.height) / 2;
|
||||||
|
@ -78,12 +80,14 @@ export default function ToggleElementCollapseBehaviour(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!shape.collapsed) {
|
if (!shape.collapsed) {
|
||||||
|
|
||||||
// all children got made visible through djs, hide empty labels
|
// all children got made visible through djs, hide empty labels
|
||||||
hideEmptyLables(shape.children);
|
hideEmptyLables(shape.children);
|
||||||
|
|
||||||
// remove collapsed marker
|
// remove collapsed marker
|
||||||
getBusinessObject(shape).di.isExpanded = true;
|
getBusinessObject(shape).di.isExpanded = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// place collapsed marker
|
// place collapsed marker
|
||||||
getBusinessObject(shape).di.isExpanded = false;
|
getBusinessObject(shape).di.isExpanded = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ export function vectorLength(v) {
|
||||||
* @return {Float}
|
* @return {Float}
|
||||||
*/
|
*/
|
||||||
export function getAngle(line) {
|
export function getAngle(line) {
|
||||||
|
|
||||||
// return value is between 0, 180 and -180, -0
|
// return value is between 0, 180 and -180, -0
|
||||||
// @janstuemmel: maybe replace return a/b with b/a
|
// @janstuemmel: maybe replace return a/b with b/a
|
||||||
return Math.atan((line[1].y - line[0].y) / (line[1].x - line[0].x));
|
return Math.atan((line[1].y - line[0].y) / (line[1].x - line[0].x));
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
* @return {Point}
|
* @return {Point}
|
||||||
*/
|
*/
|
||||||
export default function lineIntersect(l1s, l1e, l2s, l2e) {
|
export default function lineIntersect(l1s, l1e, l2s, l2e) {
|
||||||
|
|
||||||
// if the lines intersect, the result contains the x and y of the
|
// if the lines intersect, the result contains the x and y of the
|
||||||
// intersection (treating the lines as infinite) and booleans for
|
// intersection (treating the lines as infinite) and booleans for
|
||||||
// whether line segment 1 or line segment 2 contain the point
|
// whether line segment 1 or line segment 2 contain the point
|
||||||
|
|
|
@ -69,9 +69,11 @@ SplitLaneHandler.prototype.preExecute = function(context) {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (idx < existingLanesCount) {
|
if (idx < existingLanesCount) {
|
||||||
|
|
||||||
// resize existing lane
|
// resize existing lane
|
||||||
modeling.resizeShape(childLanes[idx], laneBounds);
|
modeling.resizeShape(childLanes[idx], laneBounds);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// create a new lane at position
|
// create a new lane at position
|
||||||
newLaneAttrs = {
|
newLaneAttrs = {
|
||||||
type: 'bpmn:Lane'
|
type: 'bpmn:Lane'
|
||||||
|
|
|
@ -193,6 +193,7 @@ function setProperties(businessObject, properties) {
|
||||||
if (key !== DI) {
|
if (key !== DI) {
|
||||||
businessObject.set(key, value);
|
businessObject.set(key, value);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// only update, if businessObject.di exists
|
// only update, if businessObject.di exists
|
||||||
if (businessObject.di) {
|
if (businessObject.di) {
|
||||||
setDiProperties(businessObject.di, value);
|
setDiProperties(businessObject.di, value);
|
||||||
|
|
|
@ -34,6 +34,7 @@ export default function BpmnOrderingProvider(eventBus, canvas, translate) {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// handle DataAssociation(s) like message flows and render them always on top
|
// handle DataAssociation(s) like message flows and render them always on top
|
||||||
{
|
{
|
||||||
type: 'bpmn:DataAssociation',
|
type: 'bpmn:DataAssociation',
|
||||||
|
|
|
@ -327,12 +327,14 @@ ReplaceMenuProvider.prototype._createSequenceFlowEntries = function(element, rep
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
||||||
// default flows
|
// default flows
|
||||||
if (is(businessObject.sourceRef, 'bpmn:Activity') && businessObject.conditionExpression) {
|
if (is(businessObject.sourceRef, 'bpmn:Activity') && businessObject.conditionExpression) {
|
||||||
return menuEntries.push(self._createMenuEntry(entry, element, function() {
|
return menuEntries.push(self._createMenuEntry(entry, element, function() {
|
||||||
modeling.updateProperties(element, { conditionExpression: undefined });
|
modeling.updateProperties(element, { conditionExpression: undefined });
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
// conditional flows
|
// conditional flows
|
||||||
if ((is(businessObject.sourceRef, 'bpmn:ExclusiveGateway') ||
|
if ((is(businessObject.sourceRef, 'bpmn:ExclusiveGateway') ||
|
||||||
is(businessObject.sourceRef, 'bpmn:InclusiveGateway') ||
|
is(businessObject.sourceRef, 'bpmn:InclusiveGateway') ||
|
||||||
|
|
|
@ -54,11 +54,13 @@ function toggeling(element, target) {
|
||||||
var targetCollapsed;
|
var targetCollapsed;
|
||||||
|
|
||||||
if (target && (has(target, 'collapsed') || has(target, 'isExpanded'))) {
|
if (target && (has(target, 'collapsed') || has(target, 'isExpanded'))) {
|
||||||
|
|
||||||
// property is explicitly set so use it
|
// property is explicitly set so use it
|
||||||
targetCollapsed = (
|
targetCollapsed = (
|
||||||
has(target, 'collapsed') ? target.collapsed : !target.isExpanded
|
has(target, 'collapsed') ? target.collapsed : !target.isExpanded
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// keep old state
|
// keep old state
|
||||||
targetCollapsed = oldCollapsed;
|
targetCollapsed = oldCollapsed;
|
||||||
}
|
}
|
||||||
|
@ -105,6 +107,7 @@ export default function BpmnReplace(
|
||||||
if (isSubProcess(oldBusinessObject)) {
|
if (isSubProcess(oldBusinessObject)) {
|
||||||
if (type === 'bpmn:SubProcess') {
|
if (type === 'bpmn:SubProcess') {
|
||||||
if (toggeling(element, target)) {
|
if (toggeling(element, target)) {
|
||||||
|
|
||||||
// expanding or collapsing process
|
// expanding or collapsing process
|
||||||
modeling.toggleCollapse(element);
|
modeling.toggleCollapse(element);
|
||||||
|
|
||||||
|
@ -176,9 +179,11 @@ export default function BpmnReplace(
|
||||||
if (is(oldBusinessObject, 'bpmn:Activity')) {
|
if (is(oldBusinessObject, 'bpmn:Activity')) {
|
||||||
|
|
||||||
if (isSubProcess(oldBusinessObject)) {
|
if (isSubProcess(oldBusinessObject)) {
|
||||||
|
|
||||||
// no toggeling, so keep old state
|
// no toggeling, so keep old state
|
||||||
newElement.isExpanded = isExpanded(oldBusinessObject);
|
newElement.isExpanded = isExpanded(oldBusinessObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
// else if property is explicitly set, use it
|
// else if property is explicitly set, use it
|
||||||
else if (target && has(target, 'isExpanded')) {
|
else if (target && has(target, 'isExpanded')) {
|
||||||
newElement.isExpanded = target.isExpanded;
|
newElement.isExpanded = target.isExpanded;
|
||||||
|
@ -205,6 +210,7 @@ export default function BpmnReplace(
|
||||||
if (target.isExpanded === true) {
|
if (target.isExpanded === true) {
|
||||||
newBusinessObject.processRef = bpmnFactory.create('bpmn:Process');
|
newBusinessObject.processRef = bpmnFactory.create('bpmn:Process');
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// remove children when transforming to collapsed pool
|
// remove children when transforming to collapsed pool
|
||||||
hints.moveChildren = false;
|
hints.moveChildren = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -311,6 +311,7 @@ export var GATEWAY = [
|
||||||
eventGatewayType: 'Exclusive'
|
eventGatewayType: 'Exclusive'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gateways deactivated until https://github.com/bpmn-io/bpmn-js/issues/194
|
// Gateways deactivated until https://github.com/bpmn-io/bpmn-js/issues/194
|
||||||
// {
|
// {
|
||||||
// label: 'Event based instantiating Gateway',
|
// label: 'Event based instantiating Gateway',
|
||||||
|
@ -775,6 +776,7 @@ export var PARTICIPANT = [
|
||||||
{
|
{
|
||||||
label: 'Collapsed Pool',
|
label: 'Collapsed Pool',
|
||||||
actionName: 'replace-with-collapsed-pool',
|
actionName: 'replace-with-collapsed-pool',
|
||||||
|
|
||||||
// TODO(@janstuemmel): maybe design new icon
|
// TODO(@janstuemmel): maybe design new icon
|
||||||
className: 'bpmn-icon-lane',
|
className: 'bpmn-icon-lane',
|
||||||
target: {
|
target: {
|
||||||
|
|
|
@ -79,6 +79,7 @@ BpmnRules.prototype.init = function() {
|
||||||
try {
|
try {
|
||||||
return canConnect(source, target);
|
return canConnect(source, target);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
||||||
// unset temporary target parent
|
// unset temporary target parent
|
||||||
if (targetParent) {
|
if (targetParent) {
|
||||||
target.parent = null;
|
target.parent = null;
|
||||||
|
|
|
@ -185,6 +185,7 @@ BpmnImporter.prototype.add = function(semantic, parentElement) {
|
||||||
semantic: elementToString(semantic)
|
semantic: elementToString(semantic)
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
// (optional) LABEL
|
// (optional) LABEL
|
||||||
if (isLabelExternal(semantic) && getLabel(element)) {
|
if (isLabelExternal(semantic) && getLabel(element)) {
|
||||||
this.addLabel(semantic, element);
|
this.addLabel(semantic, element);
|
||||||
|
@ -246,6 +247,7 @@ BpmnImporter.prototype.addLabel = function(semantic, element) {
|
||||||
text = getLabel(element);
|
text = getLabel(element);
|
||||||
|
|
||||||
if (text) {
|
if (text) {
|
||||||
|
|
||||||
// get corrected bounds from actual layouted text
|
// get corrected bounds from actual layouted text
|
||||||
bounds = this._textRenderer.getExternalLabelBounds(bounds, text);
|
bounds = this._textRenderer.getExternalLabelBounds(bounds, text);
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,6 +156,7 @@ export default function BpmnTreeWalker(handler, translate) {
|
||||||
* @throws {Error} if no diagram to display could be found
|
* @throws {Error} if no diagram to display could be found
|
||||||
*/
|
*/
|
||||||
function handleDefinitions(definitions, diagram) {
|
function handleDefinitions(definitions, diagram) {
|
||||||
|
|
||||||
// make sure we walk the correct bpmnElement
|
// make sure we walk the correct bpmnElement
|
||||||
|
|
||||||
var diagrams = definitions.diagrams;
|
var diagrams = definitions.diagrams;
|
||||||
|
@ -399,6 +400,7 @@ export default function BpmnTreeWalker(handler, translate) {
|
||||||
} else if (is(e, 'bpmn:FlowNode')) {
|
} else if (is(e, 'bpmn:FlowNode')) {
|
||||||
handleFlowNode(e, context);
|
handleFlowNode(e, context);
|
||||||
} else if (is(e, 'bpmn:DataObject')) {
|
} else if (is(e, 'bpmn:DataObject')) {
|
||||||
|
|
||||||
// SKIP (assume correct referencing via DataObjectReference)
|
// SKIP (assume correct referencing via DataObjectReference)
|
||||||
} else if (is(e, 'bpmn:DataStoreReference')) {
|
} else if (is(e, 'bpmn:DataStoreReference')) {
|
||||||
handleDataElement(e, context);
|
handleDataElement(e, context);
|
||||||
|
@ -439,6 +441,7 @@ export default function BpmnTreeWalker(handler, translate) {
|
||||||
|
|
||||||
|
|
||||||
function wireFlowNodeRefs(lane) {
|
function wireFlowNodeRefs(lane) {
|
||||||
|
|
||||||
// wire the virtual flowNodeRefs <-> relationship
|
// wire the virtual flowNodeRefs <-> relationship
|
||||||
forEach(lane.flowNodeRef, function(flowNode) {
|
forEach(lane.flowNodeRef, function(flowNode) {
|
||||||
var lanes = flowNode.get('lanes');
|
var lanes = flowNode.get('lanes');
|
||||||
|
|
|
@ -57,6 +57,7 @@ export function bootstrapBpmnJS(BpmnJS, diagram, options, locals) {
|
||||||
// This is needed if other libraries rely on this helper for testing
|
// This is needed if other libraries rely on this helper for testing
|
||||||
// while not adding the mocha-test-container-support as a dependency.
|
// while not adding the mocha-test-container-support as a dependency.
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// 'this' is the current test context
|
// 'this' is the current test context
|
||||||
testContainer = TestContainer.get(this);
|
testContainer = TestContainer.get(this);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -54,6 +54,7 @@ describe('custom elements', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should render custom elements', inject(function(elementRegistry) {
|
it('should render custom elements', inject(function(elementRegistry) {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
|
|
||||||
// then
|
// then
|
||||||
|
@ -63,6 +64,7 @@ describe('custom elements', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should get the correct custom elements path', inject(function(graphicsFactory) {
|
it('should get the correct custom elements path', inject(function(graphicsFactory) {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
var trianglePath = graphicsFactory.getShapePath(triangle),
|
var trianglePath = graphicsFactory.getShapePath(triangle),
|
||||||
circlePath = graphicsFactory.getShapePath(circle);
|
circlePath = graphicsFactory.getShapePath(circle);
|
||||||
|
@ -74,6 +76,7 @@ describe('custom elements', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should still render bpmn elements', inject(function(elementFactory) {
|
it('should still render bpmn elements', inject(function(elementFactory) {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
var startEvent = elementFactory.createShape({ type: 'bpmn:StartEvent' });
|
var startEvent = elementFactory.createShape({ type: 'bpmn:StartEvent' });
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ CustomRules.prototype.init = function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.addRule('connection.updateWaypoints', HIGH_PRIORITY, function(context) {
|
this.addRule('connection.updateWaypoints', HIGH_PRIORITY, function(context) {
|
||||||
|
|
||||||
// OK! but visually ignore
|
// OK! but visually ignore
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
|
|
@ -644,6 +644,7 @@ describe('Viewer', function() {
|
||||||
'import.render.complete',
|
'import.render.complete',
|
||||||
'import.done'
|
'import.done'
|
||||||
], function(e) {
|
], function(e) {
|
||||||
|
|
||||||
// log event type + event arguments
|
// log event type + event arguments
|
||||||
events.push([
|
events.push([
|
||||||
e.type,
|
e.type,
|
||||||
|
@ -812,6 +813,7 @@ describe('Viewer', function() {
|
||||||
'import.render.complete',
|
'import.render.complete',
|
||||||
'import.done'
|
'import.done'
|
||||||
], function(e) {
|
], function(e) {
|
||||||
|
|
||||||
// log event type + event arguments
|
// log event type + event arguments
|
||||||
events.push([
|
events.push([
|
||||||
e.type,
|
e.type,
|
||||||
|
@ -839,6 +841,7 @@ describe('Viewer', function() {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
viewer.on('import.render.complete', function(context) {
|
viewer.on('import.render.complete', function(context) {
|
||||||
|
|
||||||
// then
|
// then
|
||||||
done(context.error);
|
done(context.error);
|
||||||
});
|
});
|
||||||
|
@ -1169,6 +1172,7 @@ describe('Viewer', function() {
|
||||||
'import.render.complete',
|
'import.render.complete',
|
||||||
'import.done'
|
'import.done'
|
||||||
], function(e) {
|
], function(e) {
|
||||||
|
|
||||||
// log event type + event arguments
|
// log event type + event arguments
|
||||||
events.push([
|
events.push([
|
||||||
e.type,
|
e.type,
|
||||||
|
@ -1232,6 +1236,7 @@ describe('Viewer', function() {
|
||||||
'saveXML.serialized',
|
'saveXML.serialized',
|
||||||
'saveXML.done'
|
'saveXML.done'
|
||||||
], function(e) {
|
], function(e) {
|
||||||
|
|
||||||
// log event type + event arguments
|
// log event type + event arguments
|
||||||
events.push([
|
events.push([
|
||||||
e.type,
|
e.type,
|
||||||
|
@ -1245,6 +1250,7 @@ describe('Viewer', function() {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
viewer.saveXML(function(err) {
|
viewer.saveXML(function(err) {
|
||||||
|
|
||||||
// then
|
// then
|
||||||
expect(events).to.eql([
|
expect(events).to.eql([
|
||||||
[ 'saveXML.start', [ 'definitions' ] ],
|
[ 'saveXML.start', [ 'definitions' ] ],
|
||||||
|
@ -1405,6 +1411,7 @@ describe('Viewer', function() {
|
||||||
'saveSVG.start',
|
'saveSVG.start',
|
||||||
'saveSVG.done'
|
'saveSVG.done'
|
||||||
], function(e) {
|
], function(e) {
|
||||||
|
|
||||||
// log event type + event arguments
|
// log event type + event arguments
|
||||||
events.push([
|
events.push([
|
||||||
e.type,
|
e.type,
|
||||||
|
@ -1418,6 +1425,7 @@ describe('Viewer', function() {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
viewer.saveSVG(function() {
|
viewer.saveSVG(function() {
|
||||||
|
|
||||||
// then
|
// then
|
||||||
expect(events).to.eql([
|
expect(events).to.eql([
|
||||||
[ 'saveSVG.start', [ ] ],
|
[ 'saveSVG.start', [ ] ],
|
||||||
|
|
|
@ -476,6 +476,7 @@ describe('features - context-pad', function() {
|
||||||
|
|
||||||
it('should not open non-existing replace menu', inject(
|
it('should not open non-existing replace menu', inject(
|
||||||
function(create, dragging, canvas, elementFactory) {
|
function(create, dragging, canvas, elementFactory) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var rootShape = canvas.getRootElement(),
|
var rootShape = canvas.getRootElement(),
|
||||||
dataObject = elementFactory.createShape({ type: 'bpmn:DataObjectReference' }),
|
dataObject = elementFactory.createShape({ type: 'bpmn:DataObjectReference' }),
|
||||||
|
|
|
@ -37,6 +37,7 @@ describe('features/editor-actions', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should move to origin', inject(function(editorActions) {
|
it('should move to origin', inject(function(editorActions) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var elements = editorActions.trigger('selectElements'),
|
var elements = editorActions.trigger('selectElements'),
|
||||||
boundingBox;
|
boundingBox;
|
||||||
|
@ -73,6 +74,7 @@ describe('features/editor-actions', function() {
|
||||||
|
|
||||||
it('should ignore children of subprocesses', inject(
|
it('should ignore children of subprocesses', inject(
|
||||||
function(editorActions, elementRegistry) {
|
function(editorActions, elementRegistry) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var startEvent = elementRegistry.get('StartEvent_3'),
|
var startEvent = elementRegistry.get('StartEvent_3'),
|
||||||
startEventParent = getParent(startEvent);
|
startEventParent = getParent(startEvent);
|
||||||
|
|
|
@ -22,6 +22,7 @@ describe('features/modeling - append shape', function() {
|
||||||
describe('shape handling', function() {
|
describe('shape handling', function() {
|
||||||
|
|
||||||
it('should execute', inject(function(elementRegistry, modeling) {
|
it('should execute', inject(function(elementRegistry, modeling) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var startEventShape = elementRegistry.get('StartEvent_1');
|
var startEventShape = elementRegistry.get('StartEvent_1');
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,7 @@ describe('features - bpmn-updater', function() {
|
||||||
|
|
||||||
it('should crop connection only once per reconnect', inject(
|
it('should crop connection only once per reconnect', inject(
|
||||||
function(modeling, elementRegistry, connectionDocking) {
|
function(modeling, elementRegistry, connectionDocking) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_1'),
|
var sequenceFlow = elementRegistry.get('SequenceFlow_1'),
|
||||||
target = elementRegistry.get('EndEvent_2'),
|
target = elementRegistry.get('EndEvent_2'),
|
||||||
|
|
|
@ -27,6 +27,7 @@ describe('features/modeling - id claim management', function() {
|
||||||
describe('unclaim', function() {
|
describe('unclaim', function() {
|
||||||
|
|
||||||
it('should unclaim id when removing element', inject(function(modeling, moddle) {
|
it('should unclaim id when removing element', inject(function(modeling, moddle) {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
modeling.removeElements([ element ]);
|
modeling.removeElements([ element ]);
|
||||||
|
|
||||||
|
@ -36,6 +37,7 @@ describe('features/modeling - id claim management', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should revert unclaim action on restoring element', inject(function(modeling, moddle, commandStack) {
|
it('should revert unclaim action on restoring element', inject(function(modeling, moddle, commandStack) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
modeling.removeElements([ element ]);
|
modeling.removeElements([ element ]);
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,7 @@ describe('label bounds', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should reduce width', inject(function(elementRegistry) {
|
it('should reduce width', inject(function(elementRegistry) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var shape = elementRegistry.get('StartEvent_1'),
|
var shape = elementRegistry.get('StartEvent_1'),
|
||||||
oldLabelWidth = shape.label.width;
|
oldLabelWidth = shape.label.width;
|
||||||
|
@ -100,6 +101,7 @@ describe('label bounds', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should reduce height', inject(function(elementRegistry) {
|
it('should reduce height', inject(function(elementRegistry) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var shape = elementRegistry.get('StartEvent_3'),
|
var shape = elementRegistry.get('StartEvent_3'),
|
||||||
oldLabelHeight = shape.label.height;
|
oldLabelHeight = shape.label.height;
|
||||||
|
|
|
@ -32,6 +32,7 @@ describe('features/modeling - move', function() {
|
||||||
|
|
||||||
it('should not attach label when moving BoundaryEvent',
|
it('should not attach label when moving BoundaryEvent',
|
||||||
inject(function(elementRegistry, move, dragging) {
|
inject(function(elementRegistry, move, dragging) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var boundaryEvent = elementRegistry.get('BoundaryEvent_1'),
|
var boundaryEvent = elementRegistry.get('BoundaryEvent_1'),
|
||||||
subProcess = elementRegistry.get('SubProcess_1'),
|
subProcess = elementRegistry.get('SubProcess_1'),
|
||||||
|
|
|
@ -352,6 +352,7 @@ describe('features/modeling/behavior - data store', function() {
|
||||||
beforeEach(bootstrapModeler(processDiagramXML, { modules: testModules }));
|
beforeEach(bootstrapModeler(processDiagramXML, { modules: testModules }));
|
||||||
|
|
||||||
beforeEach(inject(function(elementRegistry, modeling) {
|
beforeEach(inject(function(elementRegistry, modeling) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var participantElement = elementRegistry.get('Participant'),
|
var participantElement = elementRegistry.get('Participant'),
|
||||||
participant2Element = elementRegistry.get('Participant_2'),
|
participant2Element = elementRegistry.get('Participant_2'),
|
||||||
|
|
|
@ -169,6 +169,7 @@ describe('modeling/behavior - drop on connection', function() {
|
||||||
|
|
||||||
it('should connect start -> target -> end (with bendpointBefore inside bbox)', inject(
|
it('should connect start -> target -> end (with bendpointBefore inside bbox)', inject(
|
||||||
function(modeling, elementRegistry, elementFactory) {
|
function(modeling, elementRegistry, elementFactory) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var taskShape = elementFactory.createShape({ type: 'bpmn:Task' }),
|
var taskShape = elementFactory.createShape({ type: 'bpmn:Task' }),
|
||||||
sequenceFlow = elementRegistry.get('SequenceFlow_1'),
|
sequenceFlow = elementRegistry.get('SequenceFlow_1'),
|
||||||
|
@ -345,6 +346,7 @@ describe('modeling/behavior - drop on connection', function() {
|
||||||
|
|
||||||
it('should connect start -> target -> end (with bendpointBefore inside bbox)', inject(
|
it('should connect start -> target -> end (with bendpointBefore inside bbox)', inject(
|
||||||
function(elementRegistry, selection, move, dragging) {
|
function(elementRegistry, selection, move, dragging) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var task3 = elementRegistry.get('Task_3'),
|
var task3 = elementRegistry.get('Task_3'),
|
||||||
sequenceFlow = elementRegistry.get('SequenceFlow_1'),
|
sequenceFlow = elementRegistry.get('SequenceFlow_1'),
|
||||||
|
@ -378,6 +380,7 @@ describe('modeling/behavior - drop on connection', function() {
|
||||||
|
|
||||||
it('should connect start -> target -> end (with bendpointAfter inside bbox)', inject(
|
it('should connect start -> target -> end (with bendpointAfter inside bbox)', inject(
|
||||||
function(elementRegistry, selection, move, dragging) {
|
function(elementRegistry, selection, move, dragging) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var task3 = elementRegistry.get('Task_3'),
|
var task3 = elementRegistry.get('Task_3'),
|
||||||
sequenceFlow = elementRegistry.get('SequenceFlow_1'),
|
sequenceFlow = elementRegistry.get('SequenceFlow_1'),
|
||||||
|
|
|
@ -28,6 +28,7 @@ describe('features/modeling/behavior - IsHorizontalFix', function() {
|
||||||
|
|
||||||
it('should set isHorizontal=true when participant is created',
|
it('should set isHorizontal=true when participant is created',
|
||||||
inject(function(canvas, elementFactory, modeling) {
|
inject(function(canvas, elementFactory, modeling) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var processShape = canvas.getRootElement(),
|
var processShape = canvas.getRootElement(),
|
||||||
participantShape = elementFactory.createParticipantShape(true);
|
participantShape = elementFactory.createParticipantShape(true);
|
||||||
|
@ -45,6 +46,7 @@ describe('features/modeling/behavior - IsHorizontalFix', function() {
|
||||||
|
|
||||||
it('should set isHorizontal=true when lane is created',
|
it('should set isHorizontal=true when lane is created',
|
||||||
inject(function(canvas, elementFactory, modeling) {
|
inject(function(canvas, elementFactory, modeling) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var processShape = canvas.getRootElement(),
|
var processShape = canvas.getRootElement(),
|
||||||
participantShape = elementFactory.createParticipantShape(true),
|
participantShape = elementFactory.createParticipantShape(true),
|
||||||
|
|
|
@ -60,6 +60,7 @@ describe('features/modeling - remove element behavior', function() {
|
||||||
|
|
||||||
// then
|
// then
|
||||||
var waypoints = elementRegistry.get('SequenceFlow7').waypoints;
|
var waypoints = elementRegistry.get('SequenceFlow7').waypoints;
|
||||||
|
|
||||||
// connection has two vertically equal waypoints
|
// connection has two vertically equal waypoints
|
||||||
expect(waypoints).to.have.length(2);
|
expect(waypoints).to.have.length(2);
|
||||||
expect(waypoints[0].x).to.eql(waypoints[1].x);
|
expect(waypoints[0].x).to.eql(waypoints[1].x);
|
||||||
|
|
|
@ -299,6 +299,7 @@ describe('features/modeling - collapse and expand elements', function() {
|
||||||
originalChildren.forEach(function(c) {
|
originalChildren.forEach(function(c) {
|
||||||
expect(collapsedSubProcess.children).to.include(c);
|
expect(collapsedSubProcess.children).to.include(c);
|
||||||
});
|
});
|
||||||
|
|
||||||
// and hide them
|
// and hide them
|
||||||
expect(collapsedSubProcess.children).to.satisfy(allHidden());
|
expect(collapsedSubProcess.children).to.satisfy(allHidden());
|
||||||
})
|
})
|
||||||
|
@ -634,6 +635,7 @@ function allShown() {
|
||||||
function childrenHidden(hidden) {
|
function childrenHidden(hidden) {
|
||||||
return function(children) {
|
return function(children) {
|
||||||
return children.every(function(child) {
|
return children.every(function(child) {
|
||||||
|
|
||||||
// empty labels are allways hidden
|
// empty labels are allways hidden
|
||||||
if (child.type === 'label' && !child.businessObject.name) {
|
if (child.type === 'label' && !child.businessObject.name) {
|
||||||
return child.hidden;
|
return child.hidden;
|
||||||
|
|
|
@ -27,6 +27,7 @@ describe('features/modeling - delete default connection', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should remove default connection', inject(function(modeling) {
|
it('should remove default connection', inject(function(modeling) {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
modeling.removeConnection(defaultConnection);
|
modeling.removeConnection(defaultConnection);
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ describe('features/modeling - delete default connection', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should revert default connection', inject(function(modeling, commandStack) {
|
it('should revert default connection', inject(function(modeling, commandStack) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
modeling.removeConnection(defaultConnection);
|
modeling.removeConnection(defaultConnection);
|
||||||
|
|
||||||
|
@ -50,6 +52,7 @@ describe('features/modeling - delete default connection', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should NOT remove default connection on removing other connections', inject(function(modeling) {
|
it('should NOT remove default connection on removing other connections', inject(function(modeling) {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
modeling.removeConnection(normalConnection);
|
modeling.removeConnection(normalConnection);
|
||||||
|
|
||||||
|
@ -62,6 +65,7 @@ describe('features/modeling - delete default connection', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should NOT remove default connection on restoring other connections', inject(function(modeling, commandStack) {
|
it('should NOT remove default connection on restoring other connections', inject(function(modeling, commandStack) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
modeling.removeConnection(normalConnection);
|
modeling.removeConnection(normalConnection);
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,7 @@ describe('modeling/behavior/util - GeometricUtil', function() {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var testVectors = [
|
var testVectors = [
|
||||||
|
|
||||||
// x=-10 because we have system with flipped y axis
|
// x=-10 because we have system with flipped y axis
|
||||||
{ vector: { x: 0, y: 10 }, angle: 90, rotated: { x: -10, y: 0 } },
|
{ vector: { x: 0, y: 10 }, angle: 90, rotated: { x: -10, y: 0 } },
|
||||||
{ vector: { x: 10, y: 0 }, angle: 90, rotated: { x: 0, y: 10 } },
|
{ vector: { x: 10, y: 0 }, angle: 90, rotated: { x: 0, y: 10 } },
|
||||||
|
|
|
@ -7,10 +7,13 @@ describe('modeling/behavior/util - LabelLayoutUtil#getLabelAdjustment', function
|
||||||
|
|
||||||
var newLine = [
|
var newLine = [
|
||||||
{ x: 10, y: 10 },
|
{ x: 10, y: 10 },
|
||||||
|
|
||||||
// -
|
// -
|
||||||
{ x: 15, y: 10 },
|
{ x: 15, y: 10 },
|
||||||
|
|
||||||
// |
|
// |
|
||||||
{ x: 15, y: 5 },
|
{ x: 15, y: 5 },
|
||||||
|
|
||||||
// -
|
// -
|
||||||
{ x: 30, y: 5 }
|
{ x: 30, y: 5 }
|
||||||
];
|
];
|
||||||
|
@ -21,6 +24,7 @@ describe('modeling/behavior/util - LabelLayoutUtil#getLabelAdjustment', function
|
||||||
// given
|
// given
|
||||||
var line = [
|
var line = [
|
||||||
{ x: 10, y: 10 },
|
{ x: 10, y: 10 },
|
||||||
|
|
||||||
// -
|
// -
|
||||||
{ x: 20, y: 10 }
|
{ x: 20, y: 10 }
|
||||||
];
|
];
|
||||||
|
@ -47,6 +51,7 @@ describe('modeling/behavior/util - LabelLayoutUtil#getLabelAdjustment', function
|
||||||
// given
|
// given
|
||||||
var line = [
|
var line = [
|
||||||
{ x: 10, y: 10 },
|
{ x: 10, y: 10 },
|
||||||
|
|
||||||
// -
|
// -
|
||||||
{ x: 10, y: 10 }
|
{ x: 10, y: 10 }
|
||||||
];
|
];
|
||||||
|
|
|
@ -15,10 +15,13 @@ describe('modeling/behavior/util - LineAttachmentUtil#getAttachment', function()
|
||||||
//
|
//
|
||||||
var line = [
|
var line = [
|
||||||
{ x: 10, y: 10 },
|
{ x: 10, y: 10 },
|
||||||
|
|
||||||
// -
|
// -
|
||||||
{ x: 30, y: 10 },
|
{ x: 30, y: 10 },
|
||||||
|
|
||||||
// |
|
// |
|
||||||
{ x: 30, y: 30 },
|
{ x: 30, y: 30 },
|
||||||
|
|
||||||
// \
|
// \
|
||||||
{ x: 130, y: 130 }
|
{ x: 130, y: 130 }
|
||||||
];
|
];
|
||||||
|
@ -199,10 +202,13 @@ describe('modeling/behavior/util - LineAttachmentUtil#getAttachment', function()
|
||||||
//
|
//
|
||||||
var floatingPointLine = [
|
var floatingPointLine = [
|
||||||
{ x: 10.141592, y: 10.653589 },
|
{ x: 10.141592, y: 10.653589 },
|
||||||
|
|
||||||
// -
|
// -
|
||||||
{ x: 30.793238, y: 10.462643 },
|
{ x: 30.793238, y: 10.462643 },
|
||||||
|
|
||||||
// |
|
// |
|
||||||
{ x: 30.383279, y: 30.502884 },
|
{ x: 30.383279, y: 30.502884 },
|
||||||
|
|
||||||
// \
|
// \
|
||||||
{ x: 130.197169, y: 130.399375 }
|
{ x: 130.197169, y: 130.399375 }
|
||||||
];
|
];
|
||||||
|
@ -246,6 +252,7 @@ describe('modeling/behavior/util - LineAttachmentUtil#getAttachment', function()
|
||||||
|
|
||||||
var zeroLengthLine = [
|
var zeroLengthLine = [
|
||||||
{ x: 10, y: 10 },
|
{ x: 10, y: 10 },
|
||||||
|
|
||||||
// -
|
// -
|
||||||
{ x: 10, y: 10 }
|
{ x: 10, y: 10 }
|
||||||
];
|
];
|
||||||
|
@ -253,6 +260,7 @@ describe('modeling/behavior/util - LineAttachmentUtil#getAttachment', function()
|
||||||
|
|
||||||
var zeroLengthFloatingPointLine = [
|
var zeroLengthFloatingPointLine = [
|
||||||
{ x: 10.1, y: 10.12313 },
|
{ x: 10.1, y: 10.12313 },
|
||||||
|
|
||||||
// -
|
// -
|
||||||
{ x: 10, y: 10.112 }
|
{ x: 10, y: 10.112 }
|
||||||
];
|
];
|
||||||
|
|
|
@ -181,6 +181,7 @@ describe('features/modeling - layout message flows', function() {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
modeling.moveElements([ participantShape ], { x: 300, y: 50 });
|
modeling.moveElements([ participantShape ], { x: 300, y: 50 });
|
||||||
|
|
||||||
// then
|
// then
|
||||||
|
|
||||||
// expect cropped, repaired manhattan connection
|
// expect cropped, repaired manhattan connection
|
||||||
|
|
|
@ -229,6 +229,7 @@ describe('features/modeling - layout', function() {
|
||||||
|
|
||||||
|
|
||||||
it('attached bottom center, orientation bottom', function() {
|
it('attached bottom center, orientation bottom', function() {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
var connection = connect('BoundaryEvent_BottomCenter', 'Task_Bottom');
|
var connection = connect('BoundaryEvent_BottomCenter', 'Task_Bottom');
|
||||||
|
|
||||||
|
@ -240,6 +241,7 @@ describe('features/modeling - layout', function() {
|
||||||
|
|
||||||
|
|
||||||
it('attached top center, orientation top', function() {
|
it('attached top center, orientation top', function() {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
var connection = connect('BoundaryEvent_TopCenter', 'Task_Top');
|
var connection = connect('BoundaryEvent_TopCenter', 'Task_Top');
|
||||||
|
|
||||||
|
@ -251,6 +253,7 @@ describe('features/modeling - layout', function() {
|
||||||
|
|
||||||
|
|
||||||
it('attached right center, orientation right', function() {
|
it('attached right center, orientation right', function() {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
var connection = connect('BoundaryEvent_RightCenter', 'Task_Right');
|
var connection = connect('BoundaryEvent_RightCenter', 'Task_Right');
|
||||||
|
|
||||||
|
@ -262,6 +265,7 @@ describe('features/modeling - layout', function() {
|
||||||
|
|
||||||
|
|
||||||
it('attached right center, orientation left', function() {
|
it('attached right center, orientation left', function() {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
var connection = connect('BoundaryEvent_RightCenter', 'Task_Left');
|
var connection = connect('BoundaryEvent_RightCenter', 'Task_Left');
|
||||||
|
|
||||||
|
|
|
@ -908,6 +908,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should show default replace option [gateway]', inject(function(elementRegistry, popupMenu) {
|
it('should show default replace option [gateway]', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_3');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_3');
|
||||||
|
|
||||||
|
@ -920,6 +921,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should show Default replace option [task]', inject(function(elementRegistry, popupMenu) {
|
it('should show Default replace option [task]', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_15f5knn');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_15f5knn');
|
||||||
|
|
||||||
|
@ -932,6 +934,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should NOT show default replace option', inject(function(elementRegistry, popupMenu) {
|
it('should NOT show default replace option', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_4');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_4');
|
||||||
|
|
||||||
|
@ -955,6 +958,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should show default replace option', inject(function(elementRegistry, popupMenu) {
|
it('should show default replace option', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_2');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_2');
|
||||||
|
|
||||||
|
@ -971,6 +975,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should NOT show default replace option', inject(function(elementRegistry, popupMenu) {
|
it('should NOT show default replace option', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_1');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_1');
|
||||||
|
|
||||||
|
@ -998,6 +1003,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should show default replace option', inject(function(elementRegistry, popupMenu) {
|
it('should show default replace option', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_2');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_2');
|
||||||
|
|
||||||
|
@ -1014,6 +1020,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should NOT show default replace option', inject(function(elementRegistry, popupMenu) {
|
it('should NOT show default replace option', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_1');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_1');
|
||||||
|
|
||||||
|
@ -1041,6 +1048,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should show ConditionalFlow replace option', inject(function(elementRegistry, popupMenu) {
|
it('should show ConditionalFlow replace option', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_3');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_3');
|
||||||
|
|
||||||
|
@ -1057,6 +1065,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should NOT show ConditionalFlow replace option', inject(function(elementRegistry, popupMenu) {
|
it('should NOT show ConditionalFlow replace option', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_1');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_1');
|
||||||
|
|
||||||
|
@ -1133,6 +1142,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should replace SequenceFlow with DefaultFlow [gateway]', inject(function(elementRegistry, popupMenu) {
|
it('should replace SequenceFlow with DefaultFlow [gateway]', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_3');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_3');
|
||||||
|
|
||||||
|
@ -1151,6 +1161,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should replace SequenceFlow with DefaultFlow [task]', inject(function(elementRegistry, popupMenu) {
|
it('should replace SequenceFlow with DefaultFlow [task]', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_15f5knn');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_15f5knn');
|
||||||
|
|
||||||
|
@ -1169,6 +1180,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should morph DefaultFlow into a SequenceFlow [task]', inject(function(elementRegistry, popupMenu) {
|
it('should morph DefaultFlow into a SequenceFlow [task]', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_15f5knn'),
|
var sequenceFlow = elementRegistry.get('SequenceFlow_15f5knn'),
|
||||||
entries;
|
entries;
|
||||||
|
@ -1224,6 +1236,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should morph DefaultFlow into a ConditionalFlow [task]', inject(function(elementRegistry, popupMenu) {
|
it('should morph DefaultFlow into a ConditionalFlow [task]', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_15f5knn'),
|
var sequenceFlow = elementRegistry.get('SequenceFlow_15f5knn'),
|
||||||
task = elementRegistry.get('Task_1ei94kl'),
|
task = elementRegistry.get('Task_1ei94kl'),
|
||||||
|
@ -1322,6 +1335,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should only have one DefaultFlow', inject(function(elementRegistry, popupMenu) {
|
it('should only have one DefaultFlow', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_1'),
|
var sequenceFlow = elementRegistry.get('SequenceFlow_1'),
|
||||||
sequenceFlow3 = elementRegistry.get('SequenceFlow_3');
|
sequenceFlow3 = elementRegistry.get('SequenceFlow_3');
|
||||||
|
@ -1514,6 +1528,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should keep DefaultFlow when morphing Gateway', inject(function(elementRegistry, popupMenu, bpmnReplace) {
|
it('should keep DefaultFlow when morphing Gateway', inject(function(elementRegistry, popupMenu, bpmnReplace) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_3'),
|
var sequenceFlow = elementRegistry.get('SequenceFlow_3'),
|
||||||
exclusiveGateway = elementRegistry.get('ExclusiveGateway_1');
|
exclusiveGateway = elementRegistry.get('ExclusiveGateway_1');
|
||||||
|
@ -1533,6 +1548,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should keep DefaultFlow when morphing Task', inject(function(elementRegistry, bpmnReplace, popupMenu) {
|
it('should keep DefaultFlow when morphing Task', inject(function(elementRegistry, bpmnReplace, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_15f5knn'),
|
var sequenceFlow = elementRegistry.get('SequenceFlow_15f5knn'),
|
||||||
task = elementRegistry.get('Task_1ei94kl');
|
task = elementRegistry.get('Task_1ei94kl');
|
||||||
|
@ -1648,6 +1664,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should morph into a ConditionalFlow', inject(function(elementRegistry, popupMenu) {
|
it('should morph into a ConditionalFlow', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_2');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_2');
|
||||||
|
|
||||||
|
@ -1665,6 +1682,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
it('should morph into a ConditionalFlow -> undo', inject(
|
it('should morph into a ConditionalFlow -> undo', inject(
|
||||||
function(elementRegistry, popupMenu, commandStack) {
|
function(elementRegistry, popupMenu, commandStack) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_2');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_2');
|
||||||
|
|
||||||
|
@ -1684,6 +1702,7 @@ describe('features/popup-menu - replace menu provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should morph back into a SequenceFlow', inject(function(elementRegistry, popupMenu) {
|
it('should morph back into a SequenceFlow', inject(function(elementRegistry, popupMenu) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var sequenceFlow = elementRegistry.get('SequenceFlow_2');
|
var sequenceFlow = elementRegistry.get('SequenceFlow_2');
|
||||||
|
|
||||||
|
|
|
@ -1199,6 +1199,7 @@ describe('features/modeling/rules - BpmnRules', function() {
|
||||||
|
|
||||||
|
|
||||||
it('-> Collaboration', function() {
|
it('-> Collaboration', function() {
|
||||||
|
|
||||||
// then
|
// then
|
||||||
expectCanDrop(label, 'Collaboration', true);
|
expectCanDrop(label, 'Collaboration', true);
|
||||||
});
|
});
|
||||||
|
@ -1249,6 +1250,7 @@ describe('features/modeling/rules - BpmnRules', function() {
|
||||||
|
|
||||||
|
|
||||||
it('-> Collaboration', function() {
|
it('-> Collaboration', function() {
|
||||||
|
|
||||||
// then
|
// then
|
||||||
expectCanCreate(group, 'Collaboration', true);
|
expectCanCreate(group, 'Collaboration', true);
|
||||||
});
|
});
|
||||||
|
@ -1508,6 +1510,7 @@ describe('features/modeling/rules - BpmnRules', function() {
|
||||||
|
|
||||||
it('attach/move multiple BoundaryEvents -> SubProcess_1', inject(
|
it('attach/move multiple BoundaryEvents -> SubProcess_1', inject(
|
||||||
function(elementRegistry) {
|
function(elementRegistry) {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
var boundaryEvent = elementRegistry.get('BoundaryEvent_1'),
|
var boundaryEvent = elementRegistry.get('BoundaryEvent_1'),
|
||||||
boundaryEvent2 = elementRegistry.get('BoundaryEvent_2');
|
boundaryEvent2 = elementRegistry.get('BoundaryEvent_2');
|
||||||
|
@ -1527,6 +1530,7 @@ describe('features/modeling/rules - BpmnRules', function() {
|
||||||
|
|
||||||
it('attach/move SubProcess, BoundaryEvent and label -> Process', inject(
|
it('attach/move SubProcess, BoundaryEvent and label -> Process', inject(
|
||||||
function(elementRegistry) {
|
function(elementRegistry) {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
var subProcess = elementRegistry.get('SubProcess_1'),
|
var subProcess = elementRegistry.get('SubProcess_1'),
|
||||||
boundaryEvent = elementRegistry.get('BoundaryEvent_1'),
|
boundaryEvent = elementRegistry.get('BoundaryEvent_1'),
|
||||||
|
@ -2108,6 +2112,7 @@ describe('features/modeling/rules - BpmnRules', function() {
|
||||||
];
|
];
|
||||||
|
|
||||||
types.forEach(function(type) {
|
types.forEach(function(type) {
|
||||||
|
|
||||||
// when
|
// when
|
||||||
var element = elementFactory.createShape({ type: type });
|
var element = elementFactory.createShape({ type: type });
|
||||||
|
|
||||||
|
@ -2231,6 +2236,7 @@ describe('features/modeling/rules - BpmnRules', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should allow start for given element types', inject(function(elementFactory, rules) {
|
it('should allow start for given element types', inject(function(elementFactory, rules) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var types = [
|
var types = [
|
||||||
'bpmn:FlowNode',
|
'bpmn:FlowNode',
|
||||||
|
@ -2253,6 +2259,7 @@ describe('features/modeling/rules - BpmnRules', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should ignore label elements', inject(function(elementFactory, rules) {
|
it('should ignore label elements', inject(function(elementFactory, rules) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var label = elementFactory.createShape({ type: 'bpmn:FlowNode', labelTarget: {} });
|
var label = elementFactory.createShape({ type: 'bpmn:FlowNode', labelTarget: {} });
|
||||||
|
|
||||||
|
@ -2265,6 +2272,7 @@ describe('features/modeling/rules - BpmnRules', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should NOT allow start on unknown element', inject(function(rules) {
|
it('should NOT allow start on unknown element', inject(function(rules) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var element = { type: 'bpmn:SomeUnknownType' };
|
var element = { type: 'bpmn:SomeUnknownType' };
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ describe('features - BPMN search provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should not return root element (collaboration)', inject(function(bpmnSearch) {
|
it('should not return root element (collaboration)', inject(function(bpmnSearch) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var pattern = 'collaboration';
|
var pattern = 'collaboration';
|
||||||
|
|
||||||
|
@ -43,6 +44,7 @@ describe('features - BPMN search provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('find should return all elements that match label or ID', inject(function(bpmnSearch) {
|
it('find should return all elements that match label or ID', inject(function(bpmnSearch) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var pattern = '123456';
|
var pattern = '123456';
|
||||||
|
|
||||||
|
@ -60,6 +62,7 @@ describe('features - BPMN search provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('matches IDs', inject(function(bpmnSearch) {
|
it('matches IDs', inject(function(bpmnSearch) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var pattern = 'datastore';
|
var pattern = 'datastore';
|
||||||
|
|
||||||
|
@ -79,6 +82,7 @@ describe('features - BPMN search provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('should not return root element (process)', inject(function(bpmnSearch) {
|
it('should not return root element (process)', inject(function(bpmnSearch) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var pattern = 'process';
|
var pattern = 'process';
|
||||||
|
|
||||||
|
@ -93,6 +97,7 @@ describe('features - BPMN search provider', function() {
|
||||||
describe('should split result into matched and non matched tokens', function() {
|
describe('should split result into matched and non matched tokens', function() {
|
||||||
|
|
||||||
it('matched all', inject(function(bpmnSearch) {
|
it('matched all', inject(function(bpmnSearch) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var pattern = 'all matched';
|
var pattern = 'all matched';
|
||||||
|
|
||||||
|
@ -107,6 +112,7 @@ describe('features - BPMN search provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('matched start', inject(function(bpmnSearch) {
|
it('matched start', inject(function(bpmnSearch) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var pattern = 'before';
|
var pattern = 'before';
|
||||||
|
|
||||||
|
@ -122,6 +128,7 @@ describe('features - BPMN search provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('matched middle', inject(function(bpmnSearch) {
|
it('matched middle', inject(function(bpmnSearch) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var pattern = 'middle';
|
var pattern = 'middle';
|
||||||
|
|
||||||
|
@ -138,6 +145,7 @@ describe('features - BPMN search provider', function() {
|
||||||
|
|
||||||
|
|
||||||
it('matched end', inject(function(bpmnSearch) {
|
it('matched end', inject(function(bpmnSearch) {
|
||||||
|
|
||||||
// given
|
// given
|
||||||
var pattern = 'after';
|
var pattern = 'after';
|
||||||
|
|
||||||
|
|
|
@ -12,5 +12,6 @@ CustomRules.$inject = [ 'eventBus' ];
|
||||||
inherits(CustomRules, RuleProvider);
|
inherits(CustomRules, RuleProvider);
|
||||||
|
|
||||||
CustomRules.prototype.init = function() {
|
CustomRules.prototype.init = function() {
|
||||||
|
|
||||||
// placeholder
|
// placeholder
|
||||||
};
|
};
|
Loading…
Reference in New Issue