From 5884ce758f7a93ffb06c73391135779d5e86a186 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Thu, 22 Feb 2024 10:13:11 +0100 Subject: [PATCH] feat(platform): always display multi instance configuration Related to https://github.com/bpmn-io/bpmn-js-element-templates/pull/27 --- .../ElementTemplatesPropertiesProvider.js | 3 +- .../ElementTemplatesPropertiesProvider.bpmn | 37 ++++++++++++++----- ...ElementTemplatesPropertiesProvider.spec.js | 23 ++++++++++++ 3 files changed, 52 insertions(+), 11 deletions(-) diff --git a/src/element-templates/properties-panel/ElementTemplatesPropertiesProvider.js b/src/element-templates/properties-panel/ElementTemplatesPropertiesProvider.js index 8a6e8de3..d1c06f8b 100644 --- a/src/element-templates/properties-panel/ElementTemplatesPropertiesProvider.js +++ b/src/element-templates/properties-panel/ElementTemplatesPropertiesProvider.js @@ -22,7 +22,8 @@ const LOWER_PRIORITY = 300; const ALWAYS_DISPLAYED_GROUPS = [ 'general', - 'documentation' + 'documentation', + 'multiInstance' ]; diff --git a/test/spec/element-templates/properties-panel/ElementTemplatesPropertiesProvider.bpmn b/test/spec/element-templates/properties-panel/ElementTemplatesPropertiesProvider.bpmn index 3c042c63..1cd4f38a 100644 --- a/test/spec/element-templates/properties-panel/ElementTemplatesPropertiesProvider.bpmn +++ b/test/spec/element-templates/properties-panel/ElementTemplatesPropertiesProvider.bpmn @@ -1,12 +1,12 @@ - + - - - - - - + + + + + + input-1-value @@ -15,35 +15,52 @@ - - + + + + + + + + + + + + + + - + + + + + + diff --git a/test/spec/element-templates/properties-panel/ElementTemplatesPropertiesProvider.spec.js b/test/spec/element-templates/properties-panel/ElementTemplatesPropertiesProvider.spec.js index 3a81443e..12ef3d92 100644 --- a/test/spec/element-templates/properties-panel/ElementTemplatesPropertiesProvider.spec.js +++ b/test/spec/element-templates/properties-panel/ElementTemplatesPropertiesProvider.spec.js @@ -523,6 +523,29 @@ describe('provider/element-templates - ElementTemplates', function() { }); + + describe('multiInstance', function() { + + it('should display multi-instance section', inject( + async function(elementRegistry, selection, modeling, bpmnFactory) { + + // given + const element = elementRegistry.get('MultiInstanceTask'); + + // when + await act(() => { + selection.select(element); + }); + + // then + const group = domQuery('[data-group-id="group-multiInstance"]', container); + + expect(group).to.exist; + }) + ); + + }); + });