fix(copy-paste): don't override descriptor <type> property
This is redundant anyway, as we take the type + additional information from the to-be-copied business object. Closes #751
This commit is contained in:
parent
f40b5c41b3
commit
729ddce821
|
@ -54,7 +54,6 @@ function BpmnCopyPaste(
|
||||||
}
|
}
|
||||||
|
|
||||||
setProperties(descriptor, businessObject, [
|
setProperties(descriptor, businessObject, [
|
||||||
'type',
|
|
||||||
'processRef',
|
'processRef',
|
||||||
'triggeredByEvent'
|
'triggeredByEvent'
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -33,7 +33,9 @@ describe('features/copy-paste', function() {
|
||||||
|
|
||||||
describe('basic diagram', function() {
|
describe('basic diagram', function() {
|
||||||
|
|
||||||
beforeEach(bootstrapModeler(basicXML, { modules: testModules }));
|
beforeEach(bootstrapModeler(basicXML, {
|
||||||
|
modules: testModules
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
describe('copy', function() {
|
describe('copy', function() {
|
||||||
|
@ -55,6 +57,26 @@ describe('features/copy-paste', function() {
|
||||||
expect(subProcess.isExpanded).to.be.true;
|
expect(subProcess.isExpanded).to.be.true;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
it('selected elements 2', inject(function(elementRegistry, copyPaste) {
|
||||||
|
|
||||||
|
// given
|
||||||
|
var event = elementRegistry.get('StartEvent_1');
|
||||||
|
|
||||||
|
// add business object type property
|
||||||
|
event.businessObject.type = 'Foo';
|
||||||
|
|
||||||
|
// when
|
||||||
|
var tree = copy([ event ]);
|
||||||
|
|
||||||
|
var eventDescriptor = tree.getElement('StartEvent_1');
|
||||||
|
|
||||||
|
// then
|
||||||
|
expect(tree.getLength()).to.equal(1);
|
||||||
|
|
||||||
|
expect(eventDescriptor.type).to.eql('bpmn:StartEvent');
|
||||||
|
}));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue