test(modeling): add test for non-interrupting event replacement

This commit is contained in:
Maciej Barelkowski 2021-06-28 18:09:15 +02:00 committed by fake-join[bot]
parent 3d88b210cc
commit 886da8924f
1 changed files with 25 additions and 0 deletions

View File

@ -515,5 +515,30 @@ describe('features/modeling - replace element behavior', function() {
).to.be.true; ).to.be.true;
}) })
); );
it('should replace Non-Interrupting Start Event when created in Process',
inject(function(elementRegistry, modeling, elementFactory) {
// given
var processElement = elementRegistry.get('Process_1'),
startEvent = elementFactory.createShape({
type: 'bpmn:StartEvent', eventDefinitionType: 'bpmn:TimerEventDefinition',
isInterrupting: false
}),
id = startEvent.businessObject.id;
// when
modeling.createElements(
startEvent, { x: 30, y: 30 }, processElement);
// then
var createdEvent = elementRegistry.get(id);
expect(createdEvent).to.eql(startEvent);
expect(createdEvent.businessObject.eventDefinitions).not.to.exist;
expect(createdEvent.businessObject.get('isInterrupting')).to.be.true;
})
);
}); });
}); });