diff --git a/package-lock.json b/package-lock.json index fa2e16c..0e6bd6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "sinon": "^17.0.1", "sinon-chai": "^3.7.0", "webpack": "^5.74.0", - "zeebe-bpmn-moddle": "^1.7.0" + "zeebe-bpmn-moddle": "^1.9.0" }, "peerDependencies": { "bpmn-js": ">= 9", @@ -7867,11 +7867,10 @@ } }, "node_modules/zeebe-bpmn-moddle": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/zeebe-bpmn-moddle/-/zeebe-bpmn-moddle-1.7.0.tgz", - "integrity": "sha512-eZ6OXSt0c4n9V/oN/46gTlwDIS3GhWQLt9jbM5uS/YryB4yN8wdrrKrtw+TpyNy0SSKWXNDHyC83nCA2blPO3Q==", - "dev": true, - "license": "MIT" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/zeebe-bpmn-moddle/-/zeebe-bpmn-moddle-1.9.0.tgz", + "integrity": "sha512-Y9ncIdP4m1PKbIBDqSghwZud2eiiBpfygE0bTApGqtnGlJMA/6Xanl/J7ujxG5zREoAliwf6rJyJFk3FZ75AYg==", + "dev": true }, "node_modules/zod": { "version": "3.23.8", @@ -13656,9 +13655,9 @@ "dev": true }, "zeebe-bpmn-moddle": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/zeebe-bpmn-moddle/-/zeebe-bpmn-moddle-1.7.0.tgz", - "integrity": "sha512-eZ6OXSt0c4n9V/oN/46gTlwDIS3GhWQLt9jbM5uS/YryB4yN8wdrrKrtw+TpyNy0SSKWXNDHyC83nCA2blPO3Q==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/zeebe-bpmn-moddle/-/zeebe-bpmn-moddle-1.9.0.tgz", + "integrity": "sha512-Y9ncIdP4m1PKbIBDqSghwZud2eiiBpfygE0bTApGqtnGlJMA/6Xanl/J7ujxG5zREoAliwf6rJyJFk3FZ75AYg==", "dev": true }, "zod": { diff --git a/package.json b/package.json index 4feb1a4..17e9ef7 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "sinon": "^17.0.1", "sinon-chai": "^3.7.0", "webpack": "^5.74.0", - "zeebe-bpmn-moddle": "^1.7.0" + "zeebe-bpmn-moddle": "^1.9.0" }, "peerDependencies": { "bpmn-js": ">= 9", diff --git a/test/camunda-cloud/ZeebeAdHocBehaviorSpec.js b/test/camunda-cloud/ZeebeAdHocBehaviorSpec.js new file mode 100644 index 0000000..cd465ea --- /dev/null +++ b/test/camunda-cloud/ZeebeAdHocBehaviorSpec.js @@ -0,0 +1,32 @@ +import { + bootstrapCamundaCloudModeler, + inject +} from 'test/TestHelper'; + +import { getExtensionElementsList } from 'lib/util/ExtensionElementsUtil'; + +import { getBusinessObject } from 'bpmn-js/lib/util/ModelUtil'; + +import diagramXML from './zeebe-ad-hoc.bpmn'; + + +describe('camunda-cloud/features/modeling - ZeebeAdHocBehaviorSpec', function() { + + beforeEach(bootstrapCamundaCloudModeler(diagramXML)); + + it('should remove zeebe:AdHoc for non ad-hoc sub process', inject(function(bpmnReplace, elementRegistry) { + + // given + const subprocess = elementRegistry.get('Adhoc_Subprocess'); + + // when + const result = bpmnReplace.replaceElement(subprocess, { + type: 'bpmn:SubProcess' + }); + + // then + const extensionElements = getExtensionElementsList(getBusinessObject(result)); + expect(extensionElements).to.have.lengthOf(0); + })); + +}); \ No newline at end of file diff --git a/test/camunda-cloud/zeebe-ad-hoc.bpmn b/test/camunda-cloud/zeebe-ad-hoc.bpmn new file mode 100644 index 0000000..de2f393 --- /dev/null +++ b/test/camunda-cloud/zeebe-ad-hoc.bpmn @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +