diff --git a/lib/features/ordering/BpmnOrderingProvider.js b/lib/features/ordering/BpmnOrderingProvider.js index fdee5ccb..8d908173 100644 --- a/lib/features/ordering/BpmnOrderingProvider.js +++ b/lib/features/ordering/BpmnOrderingProvider.js @@ -63,7 +63,16 @@ export default function BpmnOrderingProvider(eventBus, canvas, translate) { } }, { type: 'bpmn:BoundaryEvent', order: { level: 8 } }, - { type: 'bpmn:Group', order: { level: 10 } }, + { + type: 'bpmn:Group', + order: { + level: 10, + containers: [ + 'bpmn:Collaboration', + 'bpmn:Process' + ] + } + }, { type: 'bpmn:FlowElement', order: { level: 5 } }, { type: 'bpmn:Participant', order: { level: -2 } }, { type: 'bpmn:Lane', order: { level: -1 } } diff --git a/test/spec/features/ordering/BpmnOrderingProviderSpec.js b/test/spec/features/ordering/BpmnOrderingProviderSpec.js index 0474e2fe..34b885fa 100644 --- a/test/spec/features/ordering/BpmnOrderingProviderSpec.js +++ b/test/spec/features/ordering/BpmnOrderingProviderSpec.js @@ -91,6 +91,16 @@ describe('features/modeling - ordering', function() { })); + it('should stay behind Group', inject(function() { + + // when + move('Participant', 'Collaboration'); + + // then + expectZOrder('Participant_StartEvent', 'Participant', 'Group'); + })); + + it('should stay behind DataInputAssociation when moving Participant with DataStore', inject(function() { // when @@ -321,6 +331,16 @@ describe('features/modeling - ordering', function() { expectZOrder('SubProcess', 'Group'); })); + + it('move onto ', inject(function() { + + // when + move('Group', { x: 50, y: 0 }, 'Participant', false); + + // then + expectZOrder('Participant', 'Group'); + })); + }); }); diff --git a/test/spec/features/ordering/groups.bpmn b/test/spec/features/ordering/groups.bpmn index 35f86aea..ceba7010 100644 --- a/test/spec/features/ordering/groups.bpmn +++ b/test/spec/features/ordering/groups.bpmn @@ -3,28 +3,37 @@ + + + + - - - - + + + - + - + - + - + + + + + + + diff --git a/test/spec/features/ordering/ordering.bpmn b/test/spec/features/ordering/ordering.bpmn index 8c60d9ec..c0e4207e 100644 --- a/test/spec/features/ordering/ordering.bpmn +++ b/test/spec/features/ordering/ordering.bpmn @@ -4,6 +4,7 @@ + @@ -96,6 +97,9 @@ + + +