diff --git a/test/spec/features/modeling/behavior/ReplaceConnectionBehavior.association.bpmn b/test/spec/features/modeling/behavior/ReplaceConnectionBehavior.association.bpmn index ce0e5a1a..5df92d07 100644 --- a/test/spec/features/modeling/behavior/ReplaceConnectionBehavior.association.bpmn +++ b/test/spec/features/modeling/behavior/ReplaceConnectionBehavior.association.bpmn @@ -4,8 +4,15 @@ - - + + + DataObjectReference + + + + + + @@ -16,8 +23,18 @@ - - + + + + + + + + + + + + diff --git a/test/spec/features/modeling/behavior/ReplaceConnectionBehaviorSpec.js b/test/spec/features/modeling/behavior/ReplaceConnectionBehaviorSpec.js index 50ae9a92..3428461f 100644 --- a/test/spec/features/modeling/behavior/ReplaceConnectionBehaviorSpec.js +++ b/test/spec/features/modeling/behavior/ReplaceConnectionBehaviorSpec.js @@ -271,7 +271,7 @@ describe('features/modeling - replace connection', function() { }); - describe('should replace SequenceFlow <> MessageFlow', function() { + describe('text/data association', function() { var processDiagramXML = require('./ReplaceConnectionBehavior.association.bpmn'); @@ -324,6 +324,43 @@ describe('features/modeling - replace connection', function() { }); + + describe('reconnecting data output association to text annotation', function() { + + it('execute', inject(function(modeling) { + + // given + var textAnnotation = element('TextAnnotation_1'), + dataObjectReference = element('DataObjectReference'), + dataOutputAssociation = element('DataOutputAssociation'); + + // when + modeling.reconnectStart(dataOutputAssociation, textAnnotation, { x: 708, y: 100 }); + + // then + expectConnected(textAnnotation, dataObjectReference, 'bpmn:Association'); + })); + + + it('undo', inject(function(modeling, commandStack) { + + // given + var task = element('Task'), + dataObjectReference = element('DataObjectReference'), + textAnnotation = element('TextAnnotation_1'), + dataOutputAssociation = element('DataOutputAssociation'); + + modeling.reconnectStart(dataOutputAssociation, textAnnotation, { x: 708, y: 100 }); + + // when + commandStack.undo(); + + // then + expectConnected(task, dataObjectReference, dataOutputAssociation); + })); + + }); + });