Skip to content

Commit

Permalink
test: fix tests to use replaceElement correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Dec 2, 2024
1 parent c64755e commit ee9a16c
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions test/camunda-cloud/CleanUpTaskListenersBehaviorSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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();

Expand All @@ -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();
Expand All @@ -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');
Expand Down

0 comments on commit ee9a16c

Please sign in to comment.