test(modeling): verify connection layouting on element removal
Closes #989
This commit is contained in:
parent
55ca4c8f3d
commit
a40b95cf2f
|
@ -188,14 +188,14 @@ describe('features/modeling - remove element behavior', function() {
|
|||
});
|
||||
|
||||
|
||||
describe('connections layout', function() {
|
||||
describe('connection layouting', function() {
|
||||
|
||||
var processDiagramXML = require('./RemoveElementBehavior.diagonal.bpmn');
|
||||
|
||||
beforeEach(bootstrapModeler(processDiagramXML, { modules: testModules }));
|
||||
|
||||
|
||||
it('should layout connection', inject(function(modeling, elementRegistry) {
|
||||
it('should execute', inject(function(modeling, elementRegistry) {
|
||||
|
||||
// given
|
||||
var task = elementRegistry.get('Task1');
|
||||
|
@ -223,6 +223,26 @@ describe('features/modeling - remove element behavior', function() {
|
|||
|
||||
}));
|
||||
|
||||
|
||||
it('should redo', inject(function(commandStack, modeling, elementRegistry) {
|
||||
|
||||
// given
|
||||
var task = elementRegistry.get('Task1'),
|
||||
connection = elementRegistry.get('SequenceFlow1'),
|
||||
newWaypoints;
|
||||
|
||||
// when
|
||||
modeling.removeShape(task);
|
||||
|
||||
newWaypoints = connection.waypoints.slice();
|
||||
|
||||
commandStack.undo();
|
||||
commandStack.redo();
|
||||
|
||||
// then
|
||||
expect(connection).to.have.waypoints(newWaypoints);
|
||||
}));
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue