Skip to content

Commit

Permalink
feat(modeling): don't select start-event inside newly created sub-pro…
Browse files Browse the repository at this point in the history
…cess

The canonical modeling operation shall
not be drill down, but continue to model.
  • Loading branch information
nikku authored and MaxTru committed Dec 8, 2021
1 parent 88a484e commit 6214772
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/features/palette/PaletteProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ PaletteProvider.prototype.getPaletteEntries = function(element) {

create.start(event, [ subProcess, startEvent ], {
hints: {
autoSelect: [ startEvent ]
autoSelect: [ subProcess ]
}
});
}
Expand Down
8 changes: 5 additions & 3 deletions test/spec/features/palette/PaletteProviderSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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;
}));

});
Expand Down

0 comments on commit 6214772

Please sign in to comment.