feat(modeling): don't select start-event inside newly created sub-process

The canonical modeling operation shall
not be drill down, but continue to model.
This commit is contained in:
Nico Rehwaldt 2021-12-07 22:31:48 +01:00 committed by MaxTru
parent 88a484e41e
commit 6214772b85
2 changed files with 6 additions and 4 deletions

View File

@ -90,7 +90,7 @@ PaletteProvider.prototype.getPaletteEntries = function(element) {
create.start(event, [ subProcess, startEvent ], {
hints: {
autoSelect: [ startEvent ]
autoSelect: [ subProcess ]
}
});
}

View File

@ -65,7 +65,7 @@ describe('features/palette', function() {
}));
it('should select start event', inject(function(canvas, dragging, selection) {
it('should select sub-process', inject(function(canvas, dragging, selection) {
// given
var rootElement = canvas.getRootElement(),
@ -82,8 +82,10 @@ describe('features/palette', function() {
dragging.end();
// then
expect(selection.get()).to.have.length(1);
expect(is(selection.get()[0], 'bpmn:StartEvent')).to.be.true;
var selected = selection.get();
expect(selected).to.have.length(1);
expect(is(selected[0], 'bpmn:SubProcess')).to.be.true;
}));
});