2018-04-02 19:01:53 +00:00
|
|
|
import {
|
|
|
|
bootstrapModeler,
|
|
|
|
inject
|
|
|
|
} from 'test/TestHelper';
|
2015-04-17 10:46:16 +00:00
|
|
|
|
2018-04-02 19:01:53 +00:00
|
|
|
import {
|
|
|
|
is
|
|
|
|
} from 'lib/util/ModelUtil';
|
2015-04-17 10:46:16 +00:00
|
|
|
|
2018-04-02 19:01:53 +00:00
|
|
|
import {
|
|
|
|
find
|
|
|
|
} from 'min-dash';
|
2015-04-17 10:46:16 +00:00
|
|
|
|
2018-04-02 19:01:53 +00:00
|
|
|
import modelingModule from 'lib/features/modeling';
|
|
|
|
import moveModule from 'diagram-js/lib/features/move';
|
|
|
|
import coreModule from 'lib/core';
|
2015-04-17 10:46:16 +00:00
|
|
|
|
2018-04-02 19:01:53 +00:00
|
|
|
import {
|
|
|
|
createCanvasEvent as canvasEvent
|
|
|
|
} from '../../../../util/MockEvents';
|
2016-04-26 09:07:44 +00:00
|
|
|
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
function getConnection(source, target, connectionOrType) {
|
|
|
|
return find(source.outgoing, function(c) {
|
|
|
|
return c.target === target &&
|
2015-10-06 14:12:40 +00:00
|
|
|
(typeof connectionOrType === 'string' ? is(c, connectionOrType) : c === connectionOrType);
|
2015-04-17 10:46:16 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function expectConnected(source, target, connectionOrType) {
|
2015-10-05 13:09:21 +00:00
|
|
|
expect(getConnection(source, target, connectionOrType)).to.exist;
|
2015-04-17 10:46:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function expectNotConnected(source, target, connectionOrType) {
|
2015-12-01 07:27:45 +00:00
|
|
|
expect(getConnection(source, target, connectionOrType)).not.to.exist;
|
2015-04-17 10:46:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-07-20 09:59:41 +00:00
|
|
|
describe('features/modeling - replace connection', function() {
|
2015-04-17 10:46:16 +00:00
|
|
|
|
2017-12-10 22:04:08 +00:00
|
|
|
var testModules = [
|
|
|
|
coreModule,
|
|
|
|
moveModule,
|
|
|
|
modelingModule
|
|
|
|
];
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
describe('should replace SequenceFlow <> MessageFlow', function() {
|
|
|
|
|
2015-07-20 09:59:41 +00:00
|
|
|
var processDiagramXML = require('./ReplaceConnectionBehavior.message-sequence-flow.bpmn');
|
2015-04-17 10:46:16 +00:00
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
beforeEach(bootstrapModeler(processDiagramXML, {
|
|
|
|
modules: testModules
|
|
|
|
}));
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
var element;
|
|
|
|
|
|
|
|
beforeEach(inject(function(elementRegistry) {
|
|
|
|
element = function(id) {
|
|
|
|
return elementRegistry.get(id);
|
|
|
|
};
|
|
|
|
}));
|
|
|
|
|
2015-07-20 09:59:41 +00:00
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
describe('after reconnecting', function() {
|
|
|
|
|
|
|
|
it('sequence flow to another task', inject(function(elementRegistry, modeling) {
|
2015-07-20 09:59:41 +00:00
|
|
|
|
2015-07-20 11:33:51 +00:00
|
|
|
// given
|
2015-07-20 09:59:41 +00:00
|
|
|
var task4Shape = element('Task_4');
|
|
|
|
var connection = element('SequenceFlow_1');
|
|
|
|
|
2015-10-06 14:12:40 +00:00
|
|
|
var newWaypoints = [ connection.waypoints[0], { x: task4Shape.x + 30, y: task4Shape.y }];
|
2015-07-20 09:59:41 +00:00
|
|
|
|
2015-07-20 11:33:51 +00:00
|
|
|
// when
|
2015-07-20 09:59:41 +00:00
|
|
|
modeling.reconnectEnd(connection, task4Shape, newWaypoints);
|
|
|
|
|
2015-07-20 11:33:51 +00:00
|
|
|
// then
|
2015-07-20 09:59:41 +00:00
|
|
|
expectConnected(element('Task_2'), task4Shape, 'bpmn:MessageFlow');
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
it('message flow to another task', inject(function(elementRegistry, modeling) {
|
2015-07-20 09:59:41 +00:00
|
|
|
|
2015-07-20 11:33:51 +00:00
|
|
|
// given
|
2015-07-20 09:59:41 +00:00
|
|
|
var task4Shape = element('Task_4');
|
|
|
|
var connection = element('MessageFlow_1');
|
|
|
|
|
2015-10-06 14:12:40 +00:00
|
|
|
var newWaypoints = [ connection.waypoints[0], { x: task4Shape.x, y: task4Shape.y + 20 } ];
|
2015-07-20 09:59:41 +00:00
|
|
|
|
2015-07-20 11:33:51 +00:00
|
|
|
// when
|
2015-07-20 09:59:41 +00:00
|
|
|
modeling.reconnectEnd(connection, task4Shape, newWaypoints);
|
|
|
|
|
2015-07-20 11:33:51 +00:00
|
|
|
// then
|
2015-07-20 09:59:41 +00:00
|
|
|
expectConnected(element('Task_3'), task4Shape, 'bpmn:SequenceFlow');
|
|
|
|
}));
|
|
|
|
|
2015-07-20 11:33:51 +00:00
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
it('sequence flow to a participant', inject(function(elementRegistry, modeling) {
|
2015-07-20 11:33:51 +00:00
|
|
|
|
|
|
|
// given
|
|
|
|
var participant2 = element('Participant_2');
|
|
|
|
var connection = element('SequenceFlow_1');
|
|
|
|
|
2015-10-06 14:12:40 +00:00
|
|
|
var newWaypoints = [ connection.waypoints[0], { x: participant2.x, y: participant2.y }];
|
2015-07-20 11:33:51 +00:00
|
|
|
|
|
|
|
// when
|
|
|
|
modeling.reconnectEnd(connection, participant2, newWaypoints);
|
|
|
|
|
|
|
|
// then
|
|
|
|
expectConnected(element('Task_2'), participant2, 'bpmn:MessageFlow');
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
it('sequence flow from a participant', inject(function(elementRegistry, modeling) {
|
2015-07-20 11:33:51 +00:00
|
|
|
|
|
|
|
// given
|
|
|
|
var participant2 = element('Participant_2'),
|
|
|
|
subProcess1 = element('SubProcess_1'),
|
|
|
|
connection = element('SequenceFlow_1');
|
|
|
|
|
|
|
|
var newWaypoints = [
|
2015-10-06 14:12:40 +00:00
|
|
|
{ x: participant2.x + 200, y: participant2.y },
|
|
|
|
{ x: subProcess1.x, y: subProcess1.y + 50 }
|
2015-07-20 11:33:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
// when
|
|
|
|
modeling.reconnectStart(connection, participant2, newWaypoints);
|
|
|
|
|
|
|
|
// then
|
|
|
|
expectConnected(participant2, subProcess1, 'bpmn:MessageFlow');
|
|
|
|
}));
|
|
|
|
|
2015-07-20 09:59:41 +00:00
|
|
|
});
|
2015-04-17 10:46:16 +00:00
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
|
2015-04-17 10:46:16 +00:00
|
|
|
describe('moving single shape', function() {
|
|
|
|
|
|
|
|
it('execute', inject(function(modeling, elementRegistry) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var taskShape = element('Task_2'),
|
|
|
|
targetShape = element('Participant_2');
|
|
|
|
|
|
|
|
// when
|
2015-08-13 08:51:52 +00:00
|
|
|
modeling.moveElements([ taskShape ], { x: 0, y: 330 }, targetShape);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
// then
|
2015-07-15 15:22:19 +00:00
|
|
|
expect(taskShape.parent).to.eql(targetShape);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
expectNotConnected(element('StartEvent_1'), taskShape, 'bpmn:SequenceFlow');
|
|
|
|
|
|
|
|
expectConnected(taskShape, element('Task_4'), 'bpmn:SequenceFlow');
|
|
|
|
expectConnected(taskShape, element('SubProcess_1'), 'bpmn:MessageFlow');
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
it('undo', inject(function(modeling, elementRegistry, commandStack) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var taskShape = element('Task_2'),
|
|
|
|
targetShape = element('Participant_2'),
|
|
|
|
oldParent = taskShape.parent;
|
|
|
|
|
2015-08-13 08:51:52 +00:00
|
|
|
modeling.moveElements([ taskShape ], { x: 0, y: 300 }, targetShape);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
// when
|
|
|
|
commandStack.undo();
|
|
|
|
|
|
|
|
// then
|
2015-07-15 15:22:19 +00:00
|
|
|
expect(taskShape.parent).to.eql(oldParent);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
expectConnected(element('StartEvent_1'), taskShape, element('SequenceFlow_3'));
|
|
|
|
|
|
|
|
expectConnected(taskShape, element('Task_4'), element('MessageFlow_5'));
|
|
|
|
expectConnected(taskShape, element('SubProcess_1'), element('SequenceFlow_1'));
|
|
|
|
}));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
describe('moving multiple shapes', function() {
|
|
|
|
|
|
|
|
it('execute', inject(function(modeling, elementRegistry) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var startEventShape = element('StartEvent_1'),
|
|
|
|
taskShape = element('Task_2'),
|
|
|
|
targetShape = element('Participant_2');
|
|
|
|
|
|
|
|
// when
|
2015-08-13 08:51:52 +00:00
|
|
|
modeling.moveElements([ startEventShape, taskShape ], { x: 0, y: 330 }, targetShape);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
// then
|
2015-07-15 15:22:19 +00:00
|
|
|
expect(taskShape.parent).to.eql(targetShape);
|
|
|
|
expect(startEventShape.parent).to.eql(targetShape);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
expectConnected(startEventShape, taskShape, element('SequenceFlow_3'));
|
|
|
|
|
|
|
|
expectNotConnected(element('Participant_2'), startEventShape, 'bpmn:MessageFlow');
|
|
|
|
expectConnected(taskShape, element('SubProcess_1'), 'bpmn:MessageFlow');
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
it('undo', inject(function(modeling, elementRegistry, commandStack) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var taskShape = element('Task_2'),
|
|
|
|
targetShape = element('Participant_2'),
|
|
|
|
oldParent = taskShape.parent;
|
|
|
|
|
2015-08-13 08:51:52 +00:00
|
|
|
modeling.moveElements([ taskShape ], { x: 0, y: 300 }, targetShape);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
// when
|
|
|
|
commandStack.undo();
|
|
|
|
|
|
|
|
// then
|
2015-07-15 15:22:19 +00:00
|
|
|
expect(taskShape.parent).to.eql(oldParent);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
expectConnected(element('StartEvent_1'), taskShape, element('SequenceFlow_3'));
|
|
|
|
|
|
|
|
expectConnected(taskShape, element('Task_4'), element('MessageFlow_5'));
|
|
|
|
expectConnected(taskShape, element('SubProcess_1'), element('SequenceFlow_1'));
|
|
|
|
|
|
|
|
expectConnected(element('Participant_2'), element('StartEvent_1'), element('MessageFlow_4'));
|
|
|
|
}));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
describe('moving nested shapes', function() {
|
|
|
|
|
|
|
|
it('execute', inject(function(modeling, elementRegistry) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var subProcessShape = element('SubProcess_1'),
|
|
|
|
targetShape = element('Participant_2');
|
|
|
|
|
|
|
|
// when
|
2015-08-13 08:51:52 +00:00
|
|
|
modeling.moveElements([ subProcessShape ], { x: 0, y: 530 }, targetShape);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
// then
|
2015-07-15 15:22:19 +00:00
|
|
|
expect(subProcessShape.parent).to.eql(targetShape);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
expectConnected(element('Task_2'), subProcessShape, 'bpmn:MessageFlow');
|
|
|
|
|
|
|
|
expectNotConnected(element('Task_1'), element('Participant_2'), 'bpmn:MessageFlow');
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
it('undo', inject(function(modeling, elementRegistry, commandStack) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var subProcessShape = element('SubProcess_1'),
|
|
|
|
targetShape = element('Participant_2');
|
|
|
|
|
2015-08-13 08:51:52 +00:00
|
|
|
modeling.moveElements([ subProcessShape ], { x: 0, y: 530 }, targetShape);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
// when
|
|
|
|
commandStack.undo();
|
|
|
|
|
|
|
|
// then
|
|
|
|
expectConnected(element('Task_2'), subProcessShape, element('SequenceFlow_1'));
|
|
|
|
|
|
|
|
expectConnected(element('Task_1'), element('Participant_2'), element('MessageFlow_3'));
|
|
|
|
}));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
describe('should replace SequenceFlow <> MessageFlow', function() {
|
|
|
|
|
2015-07-20 09:59:41 +00:00
|
|
|
var processDiagramXML = require('./ReplaceConnectionBehavior.association.bpmn');
|
2015-04-17 10:46:16 +00:00
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
beforeEach(bootstrapModeler(processDiagramXML, {
|
|
|
|
modules: testModules
|
|
|
|
}));
|
|
|
|
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
var element;
|
|
|
|
|
|
|
|
beforeEach(inject(function(elementRegistry) {
|
|
|
|
element = function(id) {
|
|
|
|
return elementRegistry.get(id);
|
|
|
|
};
|
|
|
|
}));
|
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
|
2015-04-17 10:46:16 +00:00
|
|
|
describe('moving text-annotation to participant', function() {
|
|
|
|
|
|
|
|
it('execute', inject(function(modeling, elementRegistry) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var textAnnotationShape = element('TextAnnotation_1'),
|
|
|
|
targetShape = element('Participant_1');
|
|
|
|
|
|
|
|
// when
|
2015-08-13 08:51:52 +00:00
|
|
|
modeling.moveElements([ textAnnotationShape ], { x: -200, y: 40 }, targetShape);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
// then
|
2015-07-15 15:22:19 +00:00
|
|
|
expect(textAnnotationShape.parent).to.eql(targetShape);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
expectNotConnected(textAnnotationShape, targetShape, 'bpmn:TextAnnotation');
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
it('undo', inject(function(modeling, elementRegistry, commandStack) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var textAnnotationShape = element('TextAnnotation_1'),
|
|
|
|
targetShape = element('Participant_1');
|
|
|
|
|
2015-08-13 08:51:52 +00:00
|
|
|
modeling.moveElements([ textAnnotationShape ], { x: -200, y: 40 }, targetShape);
|
2015-04-17 10:46:16 +00:00
|
|
|
|
|
|
|
// when
|
|
|
|
commandStack.undo();
|
|
|
|
|
|
|
|
// then
|
|
|
|
expectConnected(textAnnotationShape, targetShape, element('Association_1'));
|
|
|
|
}));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2016-04-26 09:07:44 +00:00
|
|
|
|
2015-09-01 13:30:00 +00:00
|
|
|
describe('boundary events', function() {
|
|
|
|
|
2016-04-26 09:07:44 +00:00
|
|
|
describe('moving host', function() {
|
2015-09-01 13:30:00 +00:00
|
|
|
|
2016-04-26 09:07:44 +00:00
|
|
|
var processDiagramXML = require('./ReplaceConnectionBehavior.boundary-events.bpmn');
|
2015-09-01 13:30:00 +00:00
|
|
|
|
2017-12-10 22:04:08 +00:00
|
|
|
beforeEach(bootstrapModeler(processDiagramXML, {
|
|
|
|
modules: testModules
|
|
|
|
}));
|
2015-09-01 13:30:00 +00:00
|
|
|
|
2016-04-26 09:07:44 +00:00
|
|
|
var element;
|
2015-09-01 13:30:00 +00:00
|
|
|
|
2016-04-26 09:07:44 +00:00
|
|
|
beforeEach(inject(function(elementRegistry) {
|
|
|
|
element = function(id) {
|
|
|
|
return elementRegistry.get(id);
|
|
|
|
};
|
|
|
|
}));
|
2015-09-01 13:30:00 +00:00
|
|
|
|
|
|
|
it('should remove invalid connections', inject(function(modeling) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var taskShape = element('Task_1'),
|
2015-10-05 13:09:21 +00:00
|
|
|
taskShape2 = element('Task_2'),
|
2015-09-01 13:30:00 +00:00
|
|
|
targetShape = element('SubProcess_1'),
|
2015-10-05 13:09:21 +00:00
|
|
|
boundaryEvent = element('BoundaryEvent_1'),
|
2015-09-01 13:30:00 +00:00
|
|
|
sequenceFlow = element('SequenceFlow_1');
|
|
|
|
|
|
|
|
// when
|
|
|
|
modeling.moveElements([ taskShape ], { x: 30, y: 200 }, targetShape);
|
|
|
|
|
|
|
|
// then
|
2015-10-05 13:09:21 +00:00
|
|
|
expectNotConnected(boundaryEvent, taskShape2 ,sequenceFlow);
|
2015-09-01 13:30:00 +00:00
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
it('should remove invalid connections (undo)', inject(function(modeling, commandStack) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var taskShape = element('Task_1'),
|
2015-10-05 13:09:21 +00:00
|
|
|
taskShape2 = element('Task_2'),
|
|
|
|
boundaryEvent = element('BoundaryEvent_1'),
|
2015-09-01 13:30:00 +00:00
|
|
|
targetShape = element('SubProcess_1'),
|
|
|
|
sequenceFlow = element('SequenceFlow_1');
|
|
|
|
|
|
|
|
// when
|
|
|
|
modeling.moveElements([ taskShape ], { x: 30, y: 200 }, targetShape);
|
|
|
|
commandStack.undo();
|
|
|
|
|
|
|
|
// then
|
2015-10-05 13:09:21 +00:00
|
|
|
expectConnected(boundaryEvent, taskShape2, sequenceFlow);
|
2015-09-01 13:30:00 +00:00
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
it('should remove invalid connections (redo)', inject(function(modeling, commandStack) {
|
|
|
|
|
|
|
|
// given
|
|
|
|
var taskShape = element('Task_1'),
|
|
|
|
targetShape = element('SubProcess_1'),
|
|
|
|
sequenceFlow = element('SequenceFlow_1');
|
|
|
|
|
|
|
|
// when
|
|
|
|
modeling.moveElements([ taskShape ], { x: 30, y: 200 }, targetShape);
|
|
|
|
commandStack.undo();
|
|
|
|
commandStack.redo();
|
|
|
|
|
|
|
|
// then
|
|
|
|
expectNotConnected(taskShape, targetShape, sequenceFlow);
|
|
|
|
}));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2016-04-26 09:07:44 +00:00
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
describe('moving along host with outgoing', function() {
|
|
|
|
|
2016-04-26 09:07:44 +00:00
|
|
|
var processDiagramXML = require('../../../../fixtures/bpmn/features/replace/connection.bpmn');
|
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
beforeEach(bootstrapModeler(processDiagramXML, {
|
|
|
|
modules: testModules
|
|
|
|
}));
|
|
|
|
|
2016-04-26 09:07:44 +00:00
|
|
|
|
|
|
|
it('should move connections outgoing from an attacher',
|
|
|
|
inject(function(canvas, elementFactory, move, dragging, elementRegistry, selection) {
|
2016-06-07 06:46:45 +00:00
|
|
|
|
|
|
|
// given
|
2016-04-26 09:07:44 +00:00
|
|
|
var rootShape = canvas.getRootElement(),
|
|
|
|
rootGfx = elementRegistry.getGraphics(rootShape),
|
|
|
|
host = elementRegistry.get('Task_1'),
|
|
|
|
task = elementRegistry.get('Task_2'),
|
|
|
|
boundaryEvent = elementRegistry.get('BoundaryEvent_1'),
|
|
|
|
connection = elementRegistry.get('SequenceFlow_1');
|
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
selection.select([ host, boundaryEvent, task ]);
|
2016-04-26 09:07:44 +00:00
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
// when
|
|
|
|
move.start(canvasEvent({ x: 0, y: 0 }), host);
|
2016-04-26 09:07:44 +00:00
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
dragging.hover({
|
|
|
|
element: rootShape,
|
|
|
|
gfx: rootGfx
|
|
|
|
});
|
2016-04-26 09:07:44 +00:00
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
dragging.move(canvasEvent({ x: 0, y: 300 }));
|
|
|
|
dragging.end();
|
2016-04-26 09:07:44 +00:00
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
// then
|
|
|
|
expect(connection.waypoints[0].x).to.equal(165);
|
|
|
|
expect(connection.waypoints[0].y).to.equal(477);
|
2016-04-26 09:07:44 +00:00
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
expect(connection.waypoints[1].x).to.equal(165);
|
|
|
|
expect(connection.waypoints[1].y).to.equal(544);
|
2016-04-26 09:07:44 +00:00
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
expect(connection.waypoints[2].x).to.equal(234);
|
|
|
|
expect(connection.waypoints[2].y).to.equal(544);
|
|
|
|
|
|
|
|
expect(connection.source).to.eql(boundaryEvent);
|
|
|
|
expect(connection.target).to.eql(task);
|
|
|
|
})
|
|
|
|
);
|
2016-04-26 09:07:44 +00:00
|
|
|
|
|
|
|
});
|
|
|
|
|
2015-09-01 13:30:00 +00:00
|
|
|
});
|
|
|
|
|
2016-06-07 06:46:45 +00:00
|
|
|
});
|