Skip to content

Commit 5756fda

Browse files
sombreknikku
authored andcommitted
fix: hide pause control on subprocess planes
1 parent d60d3ef commit 5756fda

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

lib/features/context-pads/ContextPads.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import {
2+
isPlane
3+
} from 'bpmn-js/lib/util/DrilldownUtil';
4+
15
import {
26
is
37
} from 'bpmn-js/lib/util/ModelUtil';
@@ -152,7 +156,7 @@ ContextPads.prototype.openContextPads = function(parent) {
152156
}
153157

154158
this._elementRegistry.forEach((element) => {
155-
if (isAncestor(parent, element)) {
159+
if (isAncestor(parent, element) && !isPlane(element)) {
156160
this.updateElementContextPads(element);
157161
}
158162
});

test/spec/features/context-pads/ContextPadsSpec.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,30 @@ describe('features/context-pads - collapsed subprocess', function() {
122122
}));
123123

124124

125+
it('should allow to pause subprocess', inject(
126+
async function() {
127+
128+
// then
129+
expect(canTriggerElement('CollapsedSubprocess')).to.be.true;
130+
}
131+
));
132+
133+
134+
it('should not allow to pause subprocess plane', inject(
135+
async function(canvas) {
136+
137+
// given
138+
const subprocess = canvas.findRoot('CollapsedSubprocess_plane');
139+
140+
// when
141+
canvas.setRootElement(subprocess);
142+
143+
// then
144+
expect(canTriggerElement('CollapsedSubprocess_plane')).to.be.false;
145+
}
146+
));
147+
148+
125149
it('should allow to pause visible activities', inject(
126150
async function(canvas) {
127151

0 commit comments

Comments
 (0)