test(drilldown): add integration test for group creation

This commit is contained in:
Martin Stamm 2022-02-14 13:18:49 +01:00 committed by fake-join[bot]
parent e41442b393
commit bd419fedf9
1 changed files with 25 additions and 0 deletions

View File

@ -744,6 +744,31 @@ describe('Modeler', function() {
return verifyDrilldown(xml);
});
it('should allow creation of groups in collapsed subprocesses', function() {
var xml = require('../fixtures/bpmn/collapsed-sub-process.bpmn');
return createModeler(xml).then(function() {
// given
var elementRegistry = modeler.get('elementRegistry'),
elementFactory = modeler.get('elementFactory'),
modeling = modeler.get('modeling');
var collapsedProcessPlane = elementRegistry.get('collapsedProcess_plane'),
groupElement = elementFactory.createShape({ type: 'bpmn:Group' });
// when
var group = modeling.createShape(groupElement, { x: 100, y: 100 }, collapsedProcessPlane);
// then
expect(group).to.exist;
expect(group.parent).to.equal(collapsedProcessPlane);
});
});
});