fix(outline): added test case for outline after element replace

Closes #579
This commit is contained in:
Philipp Fromme 2016-06-29 12:12:11 +02:00 committed by Nico Rehwaldt
parent d1ed126e69
commit 713021ecff
1 changed files with 29 additions and 0 deletions

View File

@ -416,4 +416,33 @@ describe('features/modeling - move start event behavior', function() {
});
describe('outline', function() {
var diagramXML = require('../../../../fixtures/bpmn/features/replace/connection.bpmn');
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
it('should update size of outline on replace', inject(function(bpmnReplace, elementRegistry) {
// given
var task = elementRegistry.get('Task_2');
// when
var subProcess = bpmnReplace.replaceElement(task, {
type: 'bpmn:SubProcess',
isExpanded: true
});
// then
var gfx = elementRegistry.getGraphics(subProcess);
var outline = gfx.select('.djs-outline');
expect(outline.getBBox().width).to.equal(gfx.getBBox().width);
expect(outline.getBBox().height).to.equal(gfx.getBBox().height);
}));
});
});