From ee9a16ca763900ab3e412c44bdb8627575f8b01c Mon Sep 17 00:00:00 2001 From: Philipp Fromme Date: Mon, 2 Dec 2024 11:32:54 +0100 Subject: [PATCH] test: fix tests to use `replaceElement` correctly --- .../CleanUpTaskListenersBehaviorSpec.js | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/test/camunda-cloud/CleanUpTaskListenersBehaviorSpec.js b/test/camunda-cloud/CleanUpTaskListenersBehaviorSpec.js index d51963f..10e0803 100644 --- a/test/camunda-cloud/CleanUpTaskListenersBehaviorSpec.js +++ b/test/camunda-cloud/CleanUpTaskListenersBehaviorSpec.js @@ -100,10 +100,11 @@ describe('camunda-cloud/features/modeling - CleanUpTaskListenersBehavior', funct // given let el = elementRegistry.get('UserTaskWrongType'); - let targetEl = elementRegistry.get('UserTask'); // when - bpmnReplace.replaceElement(el, targetEl); + bpmnReplace.replaceElement(el, { + type: 'bpmn:UserTask' + }); // then el = elementRegistry.get('UserTaskWrongType'); @@ -117,10 +118,11 @@ describe('camunda-cloud/features/modeling - CleanUpTaskListenersBehavior', funct // given let el = elementRegistry.get('UserTaskWrongType'); - let targetEl = elementRegistry.get('UserTask'); // when - bpmnReplace.replaceElement(el, targetEl); + bpmnReplace.replaceElement(el, { + type: 'bpmn:UserTask' + }); commandStack.undo(); @@ -136,10 +138,11 @@ describe('camunda-cloud/features/modeling - CleanUpTaskListenersBehavior', funct // given let el = elementRegistry.get('UserTaskWrongType'); - let targetEl = elementRegistry.get('UserTask'); // when - bpmnReplace.replaceElement(el, targetEl); + bpmnReplace.replaceElement(el, { + type: 'bpmn:UserTask' + }); commandStack.undo(); commandStack.redo(); @@ -156,10 +159,11 @@ describe('camunda-cloud/features/modeling - CleanUpTaskListenersBehavior', funct // given let el = elementRegistry.get('NonZeebeUserTask'); - const targetEl = elementRegistry.get('UserTask'); // when - bpmnReplace.replaceElement(el, targetEl); + bpmnReplace.replaceElement(el, { + type: 'bpmn:UserTask' + }); // then el = elementRegistry.get('NonZeebeUserTask');