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 fake-join[bot]
parent 9f483adb42
commit b47b37310f
2 changed files with 6 additions and 4 deletions

View File

@ -88,7 +88,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;
}));
});