diff --git a/test/spec/features/modeling/BpmnUpdater.missingBounds.bpmn b/test/spec/features/modeling/BpmnUpdater.incompleteDi.bpmn similarity index 71% rename from test/spec/features/modeling/BpmnUpdater.missingBounds.bpmn rename to test/spec/features/modeling/BpmnUpdater.incompleteDi.bpmn index 29963b82..f8bb7a2b 100644 --- a/test/spec/features/modeling/BpmnUpdater.missingBounds.bpmn +++ b/test/spec/features/modeling/BpmnUpdater.incompleteDi.bpmn @@ -2,13 +2,17 @@ + - + + + + - \ No newline at end of file + diff --git a/test/spec/features/modeling/BpmnUpdaterSpec.js b/test/spec/features/modeling/BpmnUpdaterSpec.js index 013f8200..ecdc4eef 100644 --- a/test/spec/features/modeling/BpmnUpdaterSpec.js +++ b/test/spec/features/modeling/BpmnUpdaterSpec.js @@ -89,16 +89,16 @@ describe('features - bpmn-updater', function() { }); - describe('missing bpmndi:Bounds', function() { + describe('incomplete DI', function() { - var diagramXML = require('./BpmnUpdater.missingBounds.bpmn'); + var diagramXML = require('./BpmnUpdater.incompleteDi.bpmn'); beforeEach(bootstrapModeler(diagramXML, { modules: testModules })); - it('should add bpmndi:Bounds', inject( + it('should add missing label bpmndi:Bounds', inject( function(modeling, elementRegistry) { // given @@ -121,6 +121,27 @@ describe('features - bpmn-updater', function() { } )); + + it('should add missing bpmndi:BPMNLabel', inject( + function(modeling, elementRegistry) { + + // given + var event = elementRegistry.get('StartEvent_2'), + label = event.label, + di = event.businessObject.di; + + // when + modeling.moveElements([ label ], { x: 20, y: 20 }); + + var diLabel = di.label; + + // then + expect(diLabel).to.exist; + + expect(diLabel.bounds).to.exist; + } + )); + }); });