Merge master to develop

This commit is contained in:
bpmn-io-bot 2022-02-24 14:22:59 +00:00
commit 9794498543
3 changed files with 39 additions and 2 deletions

View File

@ -48,7 +48,8 @@ export default function LabelEditingProvider(
'canvas.viewbox.changing',
'drag.init',
'element.mousedown',
'popupMenu.open'
'popupMenu.open',
'root.set'
], function(event) {
if (directEditing.isActive()) {

View File

@ -14,11 +14,12 @@
<bpmn:flowNodeRef>SubProcess_1</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_1" name="FOO BAR">
<bpmn:flowNodeRef>Task_1</bpmn:flowNodeRef>
<bpmn:flowNodeRef>StartEvent_08jn2xd</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_1</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_1fo1fvh</bpmn:flowNodeRef>
<bpmn:flowNodeRef>ExclusiveGateway_1</bpmn:flowNodeRef>
<bpmn:flowNodeRef>EndEvent_1</bpmn:flowNodeRef>
<bpmn:flowNodeRef>SubProcess_2</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:ioSpecification>
@ -66,6 +67,7 @@
<bpmn:dataObjectReference id="DataObjectReference_1" dataObjectRef="DataObject_1rq8hb8" />
<bpmn:dataObject id="DataObject_1rq8hb8" />
<bpmn:dataStoreReference id="DataStoreReference_1" />
<bpmn:subProcess id="SubProcess_2" />
<bpmn:association id="Association_0ckvfj2" sourceRef="SubProcess_1" targetRef="TextAnnotation_1" />
<bpmn:group id="Group_1" categoryValueRef="CategoryValue_1" />
<bpmn:group id="Group_2" />
@ -87,6 +89,9 @@
<bpmndi:BPMNShape id="SubProcess_194zznr_di" bpmnElement="SubProcess_1" isExpanded="true">
<dc:Bounds x="311" y="147" width="350" height="200" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="SubProcess_194zznr_di" bpmnElement="SubProcess_1" isExpanded="true">
<dc:Bounds x="311" y="147" width="350" height="200" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_0909sti_di" bpmnElement="StartEvent_1">
<dc:Bounds x="223" y="229" width="36" height="36" />
<bpmndi:BPMNLabel>
@ -211,4 +216,7 @@
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
<bpmndi:BPMNDiagram id="BPMNDiagram_17fa1v0">
<bpmndi:BPMNPlane id="BPMNPlane_1yas56k" bpmnElement="SubProcess_2" />
</bpmndi:BPMNDiagram>
</bpmn:definitions>

View File

@ -155,6 +155,34 @@ describe('features - label-editing', function() {
}
));
it('should submit on root element changed', inject(
function(elementRegistry, directEditing, canvas, eventBus) {
// given
var shape = elementRegistry.get('Task_1'),
task = shape.businessObject,
newRoot = elementRegistry.get('SubProcess_2_plane');
// activate
eventBus.fire('element.dblclick', { element: shape });
var newName = 'new value';
// a <textarea /> element
var content = directEditing._textbox.content;
content.innerText = newName;
// when
canvas.setRootElement(newRoot);
// then
expect(directEditing.isActive()).to.be.false;
expect(task.name).to.equal(newName);
}
));
});