Repository: ProcessMaker/modeler
Pull request #1108 (2020-02-12 14:17:41)

Feature/shape metrics
Adds some basic shape metrics. 

This is used to build align and distribute functionality in a later PR.

Related to (but not fixing) #1098 


Patch:
diff --git a/README.md b/README.md
index 75e67651..2d69acd3 100644
--- a/README.md
+++ b/README.md
@@ -230,7 +230,7 @@ export default {
   // moddle is a reference to an instance of bpmn-moddle: https://github.com/bpmn-io/bpmn-moddle
   definition(moddle) {
     return moddle.create('bpmn:ScriptTask', {
-      name: 'New Script Task',
+      name: 'Script Task',
     });
   },
 
diff --git a/src/components/nodes/boundaryErrorEvent/index.js b/src/components/nodes/boundaryErrorEvent/index.js
index c6b81dea..bdb24861 100644
--- a/src/components/nodes/boundaryErrorEvent/index.js
+++ b/src/components/nodes/boundaryErrorEvent/index.js
@@ -13,7 +13,7 @@ export default merge(cloneDeep(boundaryEventConfig), {
   icon: require('@/assets/toolpanel/boundary-error-event.svg'),
   definition(moddle, $t) {
     return moddle.create('bpmn:BoundaryEvent', {
-      name: $t('New Boundary Error Event'),
+      name: $t('Boundary Error Event'),
       eventDefinitions: [
         moddle.create('bpmn:ErrorEventDefinition'),
       ],
diff --git a/src/components/nodes/boundaryEscalationEvent/index.js b/src/components/nodes/boundaryEscalationEvent/index.js
index c56a01f8..cf504386 100644
--- a/src/components/nodes/boundaryEscalationEvent/index.js
+++ b/src/components/nodes/boundaryEscalationEvent/index.js
@@ -14,7 +14,7 @@ export default merge(cloneDeep(boundaryEventConfig), {
   icon: require('@/assets/toolpanel/boundary-escalation-event.svg'),
   definition(moddle, $t) {
     return moddle.create('bpmn:BoundaryEvent', {
-      name: $t('New Boundary Escalation Event'),
+      name: $t('Boundary Escalation Event'),
       cancelActivity: true,
       eventDefinitions: [
         moddle.create('bpmn:EscalationEventDefinition'),
diff --git a/src/components/nodes/boundaryEvent/index.js b/src/components/nodes/boundaryEvent/index.js
index d9d6c25a..e1fd734e 100644
--- a/src/components/nodes/boundaryEvent/index.js
+++ b/src/components/nodes/boundaryEvent/index.js
@@ -11,7 +11,7 @@ export default {
   label: 'Boundary Event',
   definition(moddle, $t) {
     return moddle.create('bpmn:BoundaryEvent', {
-      name: $t('New Boundary Event'),
+      name: $t('Boundary Event'),
       cancelActivity: true,
     });
   },
diff --git a/src/components/nodes/boundaryMessageEvent/index.js b/src/components/nodes/boundaryMessageEvent/index.js
index e5e9a39e..9007c8f2 100644
--- a/src/components/nodes/boundaryMessageEvent/index.js
+++ b/src/components/nodes/boundaryMessageEvent/index.js
@@ -13,7 +13,7 @@ export default merge(cloneDeep(boundaryEventConfig), {
   icon: require('@/assets/toolpanel/boundary-message-event.svg'),
   definition(moddle, $t) {
     return moddle.create('bpmn:BoundaryEvent', {
-      name: $t('New Boundary Message Event'),
+      name: $t('Boundary Message Event'),
       cancelActivity: true,
       eventDefinitions: [
         moddle.create('bpmn:MessageEventDefinition'),
diff --git a/src/components/nodes/boundarySignalEvent/index.js b/src/components/nodes/boundarySignalEvent/index.js
index 0431f3c3..477d3f39 100644
--- a/src/components/nodes/boundarySignalEvent/index.js
+++ b/src/components/nodes/boundarySignalEvent/index.js
@@ -14,7 +14,7 @@ export default merge(cloneDeep(boundaryEventConfig), {
   icon: require('@/assets/toolpanel/boundary-signal-event.svg'),
   definition(moddle, $t) {
     return moddle.create('bpmn:BoundaryEvent', {
-      name: $t('New Boundary Signal Event'),
+      name: $t('Boundary Signal Event'),
       cancelActivity: true,
       eventDefinitions: [
         moddle.create('bpmn:SignalEventDefinition'),
diff --git a/src/components/nodes/boundaryTimerEvent/index.js b/src/components/nodes/boundaryTimerEvent/index.js
index 8744ca87..bb891449 100644
--- a/src/components/nodes/boundaryTimerEvent/index.js
+++ b/src/components/nodes/boundaryTimerEvent/index.js
@@ -16,7 +16,7 @@ export default merge(cloneDeep(boundaryEventConfig), {
   icon: require('@/assets/toolpanel/boundary-timer-event.svg'),
   definition(moddle, $t) {
     return moddle.create('bpmn:BoundaryEvent', {
-      name: $t('New Boundary Timer Event'),
+      name: $t('Boundary Timer Event'),
       cancelActivity: true,
       eventDefinitions: [
         moddle.create('bpmn:TimerEventDefinition', {
diff --git a/src/components/nodes/eventBasedGateway/index.js b/src/components/nodes/eventBasedGateway/index.js
index 66f10636..88d1333b 100644
--- a/src/components/nodes/eventBasedGateway/index.js
+++ b/src/components/nodes/eventBasedGateway/index.js
@@ -10,7 +10,7 @@ export default {
   label: 'Event-Based Gateway',
   definition(moddle, $t) {
     return moddle.create('bpmn:EventBasedGateway', {
-      name: $t('New Event-Based Gateway'),
+      name: $t('Event-Based Gateway'),
     });
   },
   diagram(moddle) {
diff --git a/src/components/nodes/exclusiveGateway/index.js b/src/components/nodes/exclusiveGateway/index.js
index 0adcb9cb..94ba6c2c 100644
--- a/src/components/nodes/exclusiveGateway/index.js
+++ b/src/components/nodes/exclusiveGateway/index.js
@@ -13,7 +13,7 @@ export default {
   rank: 5,
   definition(moddle, $t) {
     return moddle.create('bpmn:ExclusiveGateway', {
-      name: $t('New Exclusive Gateway'),
+      name: $t('Exclusive Gateway'),
     });
   },
   diagram(moddle) {
diff --git a/src/components/nodes/gateway/index.js b/src/components/nodes/gateway/index.js
index fdf0b847..f233a889 100644
--- a/src/components/nodes/gateway/index.js
+++ b/src/components/nodes/gateway/index.js
@@ -10,7 +10,7 @@ export default {
   label: 'Gateway',
   definition(moddle, $t) {
     return moddle.create('bpmn:Gateway', {
-      name: $t('New Gateway'),
+      name: $t('Gateway'),
     });
   },
   diagram(moddle) {
diff --git a/src/components/nodes/inclusiveGateway/index.js b/src/components/nodes/inclusiveGateway/index.js
index ae1e0b89..686b4d09 100644
--- a/src/components/nodes/inclusiveGateway/index.js
+++ b/src/components/nodes/inclusiveGateway/index.js
@@ -12,7 +12,7 @@ export default {
   label: 'Inclusive Gateway',
   definition(moddle, $t) {
     return moddle.create('bpmn:InclusiveGateway', {
-      name: $t('New Inclusive Gateway'),
+      name: $t('Inclusive Gateway'),
       gatewayDirection: gatewayDirection.diverging,
     });
   },
diff --git a/src/components/nodes/manualTask/index.js b/src/components/nodes/manualTask/index.js
index 813aa021..c6fa2790 100644
--- a/src/components/nodes/manualTask/index.js
+++ b/src/components/nodes/manualTask/index.js
@@ -15,7 +15,7 @@ export default {
   label: 'Manual Task',
   definition(moddle, $t) {
     return moddle.create('bpmn:ManualTask', {
-      name: $t('New Manual Task'),
+      name: $t('Manual Task'),
     });
   },
   diagram(moddle) {
diff --git a/src/components/nodes/parallelGateway/index.js b/src/components/nodes/parallelGateway/index.js
index 217be164..b21b9ddb 100644
--- a/src/components/nodes/parallelGateway/index.js
+++ b/src/components/nodes/parallelGateway/index.js
@@ -12,7 +12,7 @@ export default {
   label: 'Parallel Gateway',
   definition(moddle, $t) {
     return moddle.create('bpmn:ParallelGateway', {
-      name: $t('New Parallel Gateway'),
+      name: $t('Parallel Gateway'),
       gatewayDirection: gatewayDirection.diverging,
     });
   },
diff --git a/src/components/nodes/pool/index.js b/src/components/nodes/pool/index.js
index e1e14365..9f9e70b4 100644
--- a/src/components/nodes/pool/index.js
+++ b/src/components/nodes/pool/index.js
@@ -14,7 +14,7 @@ export default {
   label: 'Pool',
   definition(moddle, $t) {
     return moddle.create('bpmn:Participant', {
-      name: $t('New Pool'),
+      name: $t('Pool'),
     });
   },
   diagram(moddle) {
diff --git a/src/components/nodes/poolLane/index.js b/src/components/nodes/poolLane/index.js
index 1856e6a2..6077bd1a 100644
--- a/src/components/nodes/poolLane/index.js
+++ b/src/components/nodes/poolLane/index.js
@@ -9,7 +9,7 @@ export default {
   bpmnType: 'bpmn:Lane',
   control: false,
   category: 'BPMN',
-  label: 'New Lane',
+  label: 'Lane',
   definition: (moddle) => moddle.create('bpmn:Lane', { name: '' }),
   diagram: (moddle) => moddle.create('bpmndi:BPMNShape', {
     bounds: moddle.create('dc:Bounds', {
diff --git a/src/components/nodes/scriptTask/index.js b/src/components/nodes/scriptTask/index.js
index fc45a2a1..3c46c7fc 100644
--- a/src/components/nodes/scriptTask/index.js
+++ b/src/components/nodes/scriptTask/index.js
@@ -14,7 +14,7 @@ export default {
   label: 'Script Task',
   definition(moddle, $t) {
     return moddle.create('bpmn:ScriptTask', {
-      name: $t('New Script Task'),
+      name: $t('Script Task'),
     });
   },
   diagram(moddle) {
diff --git a/src/components/nodes/sequenceFlow/index.js b/src/components/nodes/sequenceFlow/index.js
index 471692d5..a0787f38 100644
--- a/src/components/nodes/sequenceFlow/index.js
+++ b/src/components/nodes/sequenceFlow/index.js
@@ -11,7 +11,7 @@ export default {
   control: false,
   definition(moddle, $t) {
     return moddle.create('bpmn:SequenceFlow', {
-      name: $t('New Sequence Flow'),
+      name: $t('Sequence Flow'),
     });
   },
   diagram(moddle) {
diff --git a/src/components/nodes/serviceTask/index.js b/src/components/nodes/serviceTask/index.js
index 2fb18d65..d3e41bbd 100644
--- a/src/components/nodes/serviceTask/index.js
+++ b/src/components/nodes/serviceTask/index.js
@@ -8,7 +8,7 @@ export default {
   label: 'Service Task',
   definition(moddle, $t) {
     return moddle.create('bpmn:ServiceTask', {
-      name: $t('New Service Task'),
+      name: $t('Service Task'),
     });
   },
   inspectorConfig: [
diff --git a/src/components/nodes/subProcess/index.js b/src/components/nodes/subProcess/index.js
index 09764d80..6ee23af9 100644
--- a/src/components/nodes/subProcess/index.js
+++ b/src/components/nodes/subProcess/index.js
@@ -16,7 +16,7 @@ export default {
   label: 'Sub Process',
   definition(moddle, $t) {
     return moddle.create('bpmn:CallActivity', {
-      name: $t('New Sub Process'),
+      name: $t('Sub Process'),
       calledElement: '',
       config: '{}',
     });
diff --git a/src/components/nodes/textAnnotation/index.js b/src/components/nodes/textAnnotation/index.js
index 5e2459cb..cf197e73 100644
--- a/src/components/nodes/textAnnotation/index.js
+++ b/src/components/nodes/textAnnotation/index.js
@@ -13,7 +13,7 @@ export default {
   label: 'Text Annotation',
   definition(moddle, $t) {
     return moddle.create('bpmn:TextAnnotation', {
-      text: $t('New Text Annotation'),
+      text: $t('Text Annotation'),
     });
   },
   diagram(moddle) {
@@ -60,7 +60,7 @@ export default {
                 label: 'Text to Show',
                 helper: 'Body of the text annotation',
                 name: 'text',
-                placeholder: 'New Text Annotation',
+                placeholder: 'Text Annotation',
               },
             },
           ],
diff --git a/src/components/nodes/utilities/shapeMetrics.js b/src/components/nodes/utilities/shapeMetrics.js
new file mode 100644
index 00000000..b84447bc
--- /dev/null
+++ b/src/components/nodes/utilities/shapeMetrics.js
@@ -0,0 +1,6 @@
+export const shapeBottom = (shape) => shape.position().y + shape.size().height;
+export const shapeLeft = (shape) => shape.position().x;
+export const shapeCenterX = (shape) => shape.position().x + (shape.size().width / 2);
+export const shapeCenterY = (shape) => shape.position().y + (shape.size().height / 2);
+export const shapeRight = (shape) => shape.position().x + shape.size().width;
+export const shapeTop = (shape) => shape.position().y;


Test patch:
diff --git a/tests/e2e/fixtures/boundaryEvent.xml b/tests/e2e/fixtures/boundaryEvent.xml
index 511bf3f3..a0615811 100644
--- a/tests/e2e/fixtures/boundaryEvent.xml
+++ b/tests/e2e/fixtures/boundaryEvent.xml
@@ -14,10 +14,10 @@
     <bpmn:task id="node_2" name="Task">
       <bpmn:incoming>node_5</bpmn:incoming>
     </bpmn:task>
-    <bpmn:boundaryEvent id="node_3" name="New Boundary Event" attachedToRef="node_1">
+    <bpmn:boundaryEvent id="node_3" name="Boundary Event" attachedToRef="node_1">
       <bpmn:outgoing>node_5</bpmn:outgoing>
     </bpmn:boundaryEvent>
-    <bpmn:sequenceFlow id="node_5" name="New Sequence Flow" sourceRef="node_3" targetRef="node_2" />
+    <bpmn:sequenceFlow id="node_5" name="Sequence Flow" sourceRef="node_3" targetRef="node_2" />
   </bpmn:process>
   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
diff --git a/tests/e2e/fixtures/boundaryTimersInPools.xml b/tests/e2e/fixtures/boundaryTimersInPools.xml
index 2f69f3ac..1dab39b2 100644
--- a/tests/e2e/fixtures/boundaryTimersInPools.xml
+++ b/tests/e2e/fixtures/boundaryTimersInPools.xml
@@ -9,8 +9,8 @@
     </bpmn:boundaryEvent>
   </bpmn:process>
   <bpmn:collaboration id="collaboration_0">
-    <bpmn:participant id="node_2" name="New Pool" processRef="Process_1" />
-    <bpmn:participant id="node_3" name="New Pool" processRef="process_2" />
+    <bpmn:participant id="node_2" name="Pool" processRef="Process_1" />
+    <bpmn:participant id="node_3" name="Pool" processRef="process_2" />
   </bpmn:collaboration>
   <bpmn:process id="process_2">
     <bpmn:task id="node_5" name="pool 2 Task" />
diff --git a/tests/e2e/fixtures/offscreenProcess.xml b/tests/e2e/fixtures/offscreenProcess.xml
index bd2d874a..be55056b 100644
--- a/tests/e2e/fixtures/offscreenProcess.xml
+++ b/tests/e2e/fixtures/offscreenProcess.xml
@@ -17,16 +17,16 @@
       <bpmn:incoming>node_3</bpmn:incoming>
       <bpmn:outgoing>node_5</bpmn:outgoing>
     </bpmn:task>
-    <bpmn:sequenceFlow id="node_3" name="New Sequence Flow" sourceRef="node_1" targetRef="node_2" />
+    <bpmn:sequenceFlow id="node_3" name="Sequence Flow" sourceRef="node_1" targetRef="node_2" />
     <bpmn:task id="node_4" name="Task">
       <bpmn:incoming>node_5</bpmn:incoming>
       <bpmn:outgoing>node_7</bpmn:outgoing>
     </bpmn:task>
-    <bpmn:sequenceFlow id="node_5" name="New Sequence Flow" sourceRef="node_2" targetRef="node_4" />
+    <bpmn:sequenceFlow id="node_5" name="Sequence Flow" sourceRef="node_2" targetRef="node_4" />
     <bpmn:endEvent id="node_6" name="End Event">
       <bpmn:incoming>node_7</bpmn:incoming>
     </bpmn:endEvent>
-    <bpmn:sequenceFlow id="node_7" name="New Sequence Flow" sourceRef="node_4" targetRef="node_6" />
+    <bpmn:sequenceFlow id="node_7" name="Sequence Flow" sourceRef="node_4" targetRef="node_6" />
   </bpmn:process>
   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
diff --git a/tests/e2e/fixtures/taskWithBoundaryTimerEvent.xml b/tests/e2e/fixtures/taskWithBoundaryTimerEvent.xml
index 1e4606db..7b9fe3f7 100644
--- a/tests/e2e/fixtures/taskWithBoundaryTimerEvent.xml
+++ b/tests/e2e/fixtures/taskWithBoundaryTimerEvent.xml
@@ -2,7 +2,7 @@
 <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" id="Definitions_03dabax" targetNamespace="http://bpmn.io/schema/bpmn" exporter="ProcessMaker Modeler" exporterVersion="1.0">
     <bpmn:process id="Process_1" isExecutable="true">
         <bpmn:task id="node_1" name="Task" />
-        <bpmn:boundaryEvent id="test_node_identifier_01" name="New Boundary Timer Event" attachedToRef="node_1">
+        <bpmn:boundaryEvent id="test_node_identifier_01" name="Boundary Timer Event" attachedToRef="node_1">
             <bpmn:timerEventDefinition>
                 <bpmn:timeDuration>PT1H</bpmn:timeDuration>
             </bpmn:timerEventDefinition>
diff --git a/tests/e2e/specs/BoundaryErrorEvent.spec.js b/tests/e2e/specs/BoundaryErrorEvent.spec.js
index 9fb19ea5..f0919f09 100644
--- a/tests/e2e/specs/BoundaryErrorEvent.spec.js
+++ b/tests/e2e/specs/BoundaryErrorEvent.spec.js
@@ -4,7 +4,7 @@ import { CommonBoundaryEventBehaviour } from '../support/BoundaryEventCommonBeha
 CommonBoundaryEventBehaviour({
   type: 'Boundary Error Event',
   nodeType: nodeTypes.boundaryErrorEvent,
-  eventXMLSnippet: '<bpmn:boundaryEvent id="node_3" name="New Boundary Error Event" attachedToRef="node_2"><bpmn:errorEventDefinition /></bpmn:boundaryEvent>',
+  eventXMLSnippet: '<bpmn:boundaryEvent id="node_3" name="Boundary Error Event" attachedToRef="node_2"><bpmn:errorEventDefinition /></bpmn:boundaryEvent>',
   taskType: nodeTypes.task,
   taskTypeSelector: 'switch-to-user-task',
   invalidTargets: [{ type: nodeTypes.startEvent }],
diff --git a/tests/e2e/specs/BoundaryEscalationEvent.spec.js b/tests/e2e/specs/BoundaryEscalationEvent.spec.js
index 91f929a6..ad05c54d 100644
--- a/tests/e2e/specs/BoundaryEscalationEvent.spec.js
+++ b/tests/e2e/specs/BoundaryEscalationEvent.spec.js
@@ -60,7 +60,7 @@ describe.skip('Boundary Escalation Event', () => {
 CommonBoundaryEventBehaviour({
   type: 'Boundary Escalation Event',
   nodeType: nodeTypes.boundaryEscalationEvent,
-  eventXMLSnippet: '<bpmn:boundaryEvent id="node_4" name="New Boundary Escalation Event" attachedToRef="node_3"><bpmn:escalationEventDefinition /></bpmn:boundaryEvent>',
+  eventXMLSnippet: '<bpmn:boundaryEvent id="node_4" name="Boundary Escalation Event" attachedToRef="node_3"><bpmn:escalationEventDefinition /></bpmn:boundaryEvent>',
   taskType: nodeTypes.subProcess,
   taskTypeSelector: 'switch-to-sub-process',
   invalidTargets: [{ type: nodeTypes.startEvent }, { type: nodeTypes.task, color: defaultNodeColor }],
diff --git a/tests/e2e/specs/BoundaryMessageEvent.spec.js b/tests/e2e/specs/BoundaryMessageEvent.spec.js
index 7e40b500..5c3bcc70 100644
--- a/tests/e2e/specs/BoundaryMessageEvent.spec.js
+++ b/tests/e2e/specs/BoundaryMessageEvent.spec.js
@@ -1,9 +1,4 @@
-import {
-  addNodeTypeToPaper,
-  getElementAtPosition,
-  removeIndentationAndLinebreaks,
-  setBoundaryEvent,
-} from '../support/utils';
+import { addNodeTypeToPaper, getElementAtPosition, removeIndentationAndLinebreaks, setBoundaryEvent } from '../support/utils';
 import { nodeTypes } from '../support/constants';
 import { CommonBoundaryEventBehaviour } from '../support/BoundaryEventCommonBehaviour';
 
@@ -16,7 +11,7 @@ describe('Boundary Message Event', () => {
   it('Render an interrupting boundary message event', () => {
     setBoundaryEvent(nodeTypes.boundaryMessageEvent, taskPosition, nodeTypes.subProcess);
 
-    const boundaryMessageEventXML = '<bpmn:boundaryEvent id="node_4" name="New Boundary Message Event" attachedToRef="node_3"><bpmn:messageEventDefinition /></bpmn:boundaryEvent>';
+    const boundaryMessageEventXML = '<bpmn:boundaryEvent id="node_4" name="Boundary Message Event" attachedToRef="node_3"><bpmn:messageEventDefinition /></bpmn:boundaryEvent>';
 
     cy.get('[data-test=downloadXMLBtn]').click();
     cy.window()
@@ -33,7 +28,7 @@ describe('Boundary Message Event', () => {
 
     const interrupting = '[name=cancelActivity]';
     cy.get(interrupting).click();
-    const boundaryMessageEventXML = '<bpmn:boundaryEvent id="node_4" name="New Boundary Message Event" cancelActivity="false" attachedToRef="node_3"><bpmn:messageEventDefinition /></bpmn:boundaryEvent>';
+    const boundaryMessageEventXML = '<bpmn:boundaryEvent id="node_4" name="Boundary Message Event" cancelActivity="false" attachedToRef="node_3"><bpmn:messageEventDefinition /></bpmn:boundaryEvent>';
 
     cy.get('[data-test=downloadXMLBtn]').click();
     cy.window()
@@ -48,7 +43,7 @@ describe('Boundary Message Event', () => {
 CommonBoundaryEventBehaviour({
   type: 'Boundary Message Event',
   nodeType: nodeTypes.boundaryMessageEvent,
-  eventXMLSnippet: '<bpmn:boundaryEvent id="node_4" name="New Boundary Message Event" attachedToRef="node_3"><bpmn:messageEventDefinition /></bpmn:boundaryEvent>',
+  eventXMLSnippet: '<bpmn:boundaryEvent id="node_4" name="Boundary Message Event" attachedToRef="node_3"><bpmn:messageEventDefinition /></bpmn:boundaryEvent>',
   taskType: nodeTypes.subProcess,
   taskTypeSelector: 'switch-to-sub-process',
   invalidTargets: [{ type: nodeTypes.startEvent }],
diff --git a/tests/e2e/specs/BoundarySignalEvent.spec.js b/tests/e2e/specs/BoundarySignalEvent.spec.js
index 5db7ba89..14bacef7 100644
--- a/tests/e2e/specs/BoundarySignalEvent.spec.js
+++ b/tests/e2e/specs/BoundarySignalEvent.spec.js
@@ -49,7 +49,7 @@ describe.skip('Boundary Signal Event', () => {
 CommonBoundaryEventBehaviour({
   type: 'Boundary Signal Event',
   nodeType: nodeTypes.boundarySignalEvent,
-  eventXMLSnippet: '<bpmn:boundaryEvent id="node_3" name="New Boundary Signal Event" attachedToRef="node_2"><bpmn:signalEventDefinition /></bpmn:boundaryEvent>',
+  eventXMLSnippet: '<bpmn:boundaryEvent id="node_3" name="Boundary Signal Event" attachedToRef="node_2"><bpmn:signalEventDefinition /></bpmn:boundaryEvent>',
   taskType: nodeTypes.task,
   taskTypeSelector: 'switch-to-user-task',
   invalidTargets: [{ type: nodeTypes.startEvent }],
diff --git a/tests/e2e/specs/BoundaryTimerEvent.spec.js b/tests/e2e/specs/BoundaryTimerEvent.spec.js
index 4d0727c9..f24bf34e 100644
--- a/tests/e2e/specs/BoundaryTimerEvent.spec.js
+++ b/tests/e2e/specs/BoundaryTimerEvent.spec.js
@@ -143,8 +143,8 @@ describe('Boundary Timer Event', () => {
       .type(testId);
 
     assertDownloadedXmlContainsExpected(
-      `<bpmn:boundaryEvent id="${ testId }" name="New Boundary Timer Event" attachedToRef="node_1">`,
-      `<bpmndi:BPMNShape id="node_2_di" bpmnElement="${ testId }">`,
+      `<bpmn:boundaryEvent id="${testId}" name="Boundary Timer Event" attachedToRef="node_1">`,
+      `<bpmndi:BPMNShape id="node_2_di" bpmnElement="${testId}">`,
     );
   });
 
@@ -174,7 +174,7 @@ describe('Boundary Timer Event', () => {
     setBoundaryEvent(nodeTypes.boundaryTimerEvent, taskPosition);
 
     const taskXml = '<bpmn:task id="node_2" name="Task" />';
-    const boundaryEventOnTaskXml = '<bpmn:boundaryEvent id="node_3" name="New Boundary Timer Event" attachedToRef="node_2">';
+    const boundaryEventOnTaskXml = '<bpmn:boundaryEvent id="node_3" name="Boundary Timer Event" attachedToRef="node_2">';
 
     cy.get('[data-test=downloadXMLBtn]').click();
     cy.window()
@@ -201,7 +201,7 @@ describe('Boundary Timer Event', () => {
           .then(waitToRenderAllShapes)
           .then(() => {
             const task2Xml = '<bpmn:task id="node_4" name="Task" />';
-            const boundaryEventOnTask2Xml = '<bpmn:boundaryEvent id="node_3" name="New Boundary Timer Event" attachedToRef="node_4">';
+            const boundaryEventOnTask2Xml = '<bpmn:boundaryEvent id="node_3" name="Boundary Timer Event" attachedToRef="node_4">';
 
             cy.get('[data-test=downloadXMLBtn]').click();
             cy.window()
@@ -276,7 +276,7 @@ describe('Boundary Timer Event', () => {
 CommonBoundaryEventBehaviour({
   type: 'Boundary Timer Event',
   nodeType: nodeTypes.boundaryTimerEvent,
-  eventXMLSnippet: '<bpmn:boundaryEvent id="node_3" name="New Boundary Timer Event" attachedToRef="node_2"><bpmn:timerEventDefinition><bpmn:timeDuration>PT1H</bpmn:timeDuration></bpmn:timerEventDefinition></bpmn:boundaryEvent>',
+  eventXMLSnippet: '<bpmn:boundaryEvent id="node_3" name="Boundary Timer Event" attachedToRef="node_2"><bpmn:timerEventDefinition><bpmn:timeDuration>PT1H</bpmn:timeDuration></bpmn:timerEventDefinition></bpmn:boundaryEvent>',
   taskType: nodeTypes.task,
   taskTypeSelector: 'switch-to-user-task',
   invalidTargets: [{ type: nodeTypes.startEvent }],
diff --git a/tests/e2e/specs/Modeler.spec.js b/tests/e2e/specs/Modeler.spec.js
index 33c81852..729f9156 100644
--- a/tests/e2e/specs/Modeler.spec.js
+++ b/tests/e2e/specs/Modeler.spec.js
@@ -329,7 +329,7 @@ describe('Modeler', () => {
   it('persist boundary event with sequence flow in XML', () => {
     uploadXml('../fixtures/boundaryEvent.xml');
 
-    const sequenceFlowXML = '<bpmn:sequenceFlow id="node_5" name="New Sequence Flow" sourceRef="node_3" targetRef="node_2" />';
+    const sequenceFlowXML = '<bpmn:sequenceFlow id="node_5" name="Sequence Flow" sourceRef="node_3" targetRef="node_2" />';
 
     cy.get('[data-test=downloadXMLBtn]').click();
     cy.window()
diff --git a/tests/e2e/specs/Pools.spec.js b/tests/e2e/specs/Pools.spec.js
index 6e020259..d073d237 100644
--- a/tests/e2e/specs/Pools.spec.js
+++ b/tests/e2e/specs/Pools.spec.js
@@ -1,4 +1,5 @@
 import {
+  assertBoundaryEventIsCloseToTask,
   connectNodesWithFlow,
   dragFromSourceToDest,
   getCrownButtonForElement,
@@ -14,7 +15,6 @@ import {
 } from '../support/utils';
 
 import { nodeTypes } from '../support/constants';
-import { assertBoundaryEventIsCloseToTask } from '../support/utils';
 
 describe('Pools', () => {
   it('Update pool name', () => {
@@ -125,7 +125,7 @@ describe('Pools', () => {
         getCrownButtonForElement($pool, 'delete-button').click({ force: true });
       });
 
-    const sequenceFlowReference = '<bpmn:sequenceFlow id="node_3" name="New Sequence Flow" sourceRef="node_1" targetRef="node_2" />';
+    const sequenceFlowReference = '<bpmn:sequenceFlow id="node_3" name="Sequence Flow" sourceRef="node_1" targetRef="node_2" />';
 
     cy.get('[data-test=downloadXMLBtn]').click();
     cy.window()
@@ -183,7 +183,7 @@ describe('Pools', () => {
     });
 
     const startEvent = '<bpmn:startEvent id="node_1" name="Start Event" />';
-    const emptyPool = '<bpmn:participant id="node_2" name="New Pool" processRef="Process_1" />';
+    const emptyPool = '<bpmn:participant id="node_2" name="Pool" processRef="Process_1" />';
     cy.get('[data-test=downloadXMLBtn]').click();
     cy.window().its('xml').then(removeIndentationAndLinebreaks).then(xml => {
       expect(xml).to.contain(emptyPool);
@@ -205,7 +205,7 @@ describe('Pools', () => {
     setBoundaryEvent(nodeTypes.boundaryTimerEvent, taskPosition);
     moveElement(taskPosition, boundaryTimerEventPosition.x, boundaryTimerEventPosition.y);
 
-    const pool1taskXml = '<bpmn:process id="Process_1" isExecutable="true"><bpmn:startEvent id="node_1" name="Start Event" /><bpmn:task id="node_4" name="Task" /><bpmn:boundaryEvent id="node_5" name="New Boundary Timer Event" attachedToRef="node_4">';
+    const pool1taskXml = '<bpmn:process id="Process_1" isExecutable="true"><bpmn:startEvent id="node_1" name="Start Event" /><bpmn:task id="node_4" name="Task" /><bpmn:boundaryEvent id="node_5" name="Boundary Timer Event" attachedToRef="node_4">';
     cy.get('[data-test=downloadXMLBtn]').click();
     cy.window().its('xml').then(removeIndentationAndLinebreaks).then(xml => {
       expect(xml).to.contain(pool1taskXml);
@@ -213,7 +213,7 @@ describe('Pools', () => {
 
     moveElement(taskPosition, 150, 550);
 
-    const pool2taskXml = '<bpmn:process id="process_2"><bpmn:task id="node_4" name="Task" /><bpmn:boundaryEvent id="node_5" name="New Boundary Timer Event" attachedToRef="node_4">';
+    const pool2taskXml = '<bpmn:process id="process_2"><bpmn:task id="node_4" name="Task" /><bpmn:boundaryEvent id="node_5" name="Boundary Timer Event" attachedToRef="node_4">';
     cy.get('[data-test=downloadXMLBtn]').click();
     cy.window().its('xml').then(removeIndentationAndLinebreaks).then(xml => {
       expect(xml).to.contain(pool2taskXml);
diff --git a/tests/e2e/specs/SequenceFlows.spec.js b/tests/e2e/specs/SequenceFlows.spec.js
index d937fa7a..f3bdc847 100644
--- a/tests/e2e/specs/SequenceFlows.spec.js
+++ b/tests/e2e/specs/SequenceFlows.spec.js
@@ -286,7 +286,7 @@ describe('Sequence Flows', () => {
     const taskPosition = { x: 250, y: 250 };
     let numberOfSequenceFlowsAdded = 1;
 
-    const sequenceFlow = '<bpmn:sequenceFlow id="node_4" name="New Sequence Flow" sourceRef="node_1" targetRef="node_3"';
+    const sequenceFlow = '<bpmn:sequenceFlow id="node_4" name="Sequence Flow" sourceRef="node_1" targetRef="node_3"';
 
     addNodeTypeToPaper(taskPosition, nodeTypes.task, 'switch-to-script-task');
     getElementAtPosition(taskPosition).getType().should('equal', nodeTypes.scriptTask);
diff --git a/tests/e2e/specs/TextAnnotation.spec.js b/tests/e2e/specs/TextAnnotation.spec.js
index 357430cd..33387a97 100644
--- a/tests/e2e/specs/TextAnnotation.spec.js
+++ b/tests/e2e/specs/TextAnnotation.spec.js
@@ -53,7 +53,7 @@ describe('Text Annotation', () => {
     <bpmn:startEvent id="node_1" name="Start Event" />
     <bpmn:task id="node_7" name="Task" />
     <bpmn:textAnnotation id="node_6">
-      <bpmn:text>New Text Annotation</bpmn:text>
+      <bpmn:text>Text Annotation</bpmn:text>
     </bpmn:textAnnotation>
     <bpmn:association id="node_8" associationDirection="None" sourceRef="node_6" targetRef="node_7" />`;
 
@@ -72,7 +72,7 @@ describe('Text Annotation', () => {
     const expectedXML = `<bpmn:process id="Process_1" isExecutable="true">
     <bpmn:startEvent id="node_1" name="Start Event" />
     <bpmn:textAnnotation id="node_3">
-      <bpmn:text>New Text Annotation</bpmn:text>
+      <bpmn:text>Text Annotation</bpmn:text>
     </bpmn:textAnnotation>
     <bpmn:association id="node_4" associationDirection="None" sourceRef="node_3" targetRef="node_2" />
   </bpmn:process>`;
diff --git a/tests/e2e/specs/UndoRedo.spec.js b/tests/e2e/specs/UndoRedo.spec.js
index 6b46f167..679639c8 100644
--- a/tests/e2e/specs/UndoRedo.spec.js
+++ b/tests/e2e/specs/UndoRedo.spec.js
@@ -179,7 +179,7 @@ describe('Undo/redo', () => {
     <bpmn:startEvent id="node_1" name="Start Event" />
   </bpmn:process>
   <bpmn:collaboration id="collaboration_0">
-    <bpmn:participant id="node_2" name="New Pool" processRef="Process_1" />
+    <bpmn:participant id="node_2" name="Pool" processRef="Process_1" />
   </bpmn:collaboration>
   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="collaboration_0">
diff --git a/tests/unit/components/nodes/utilities/shapeMetrics.spec.js b/tests/unit/components/nodes/utilities/shapeMetrics.spec.js
new file mode 100644
index 00000000..5eac1612
--- /dev/null
+++ b/tests/unit/components/nodes/utilities/shapeMetrics.spec.js
@@ -0,0 +1,36 @@
+import {
+  shapeBottom,
+  shapeCenterX,
+  shapeCenterY,
+  shapeLeft,
+  shapeRight,
+  shapeTop,
+} from '@/components/nodes/utilities/shapeMetrics';
+import { dummyShape } from '../../../utilities/dummies';
+
+describe('Shape Metrics Utilities', () => {
+  it('returns x middle correctly', () => {
+    expect(shapeCenterX(dummyShape(0, 0, 100, 0))).toBe(50);
+  });
+
+  it('returns y middle correctly', () => {
+    expect(shapeCenterY(dummyShape(0, 0, 0, 100))).toBe(50);
+  });
+
+  it('returns left correctly', () => {
+    expect(shapeLeft(dummyShape(10, 0, 90, 0))).toBe(10);
+  });
+
+  it('returns top correctly', () => {
+    expect(shapeTop(dummyShape(0, 5, 0, 35))).toBe(5);
+  });
+
+  it('returns right correctly', () => {
+    expect(shapeRight(dummyShape(10, 0, 90, 0))).toBe(100);
+  });
+
+  it('returns bottom correctly', () => {
+    expect(shapeBottom(dummyShape(0, 5, 0, 35))).toBe(40);
+  });
+});
+
diff --git a/tests/unit/utilities/dummies.js b/tests/unit/utilities/dummies.js
new file mode 100644
index 00000000..2de3cd56
--- /dev/null
+++ b/tests/unit/utilities/dummies.js
@@ -0,0 +1,11 @@
+export function dummyShape(x, y, width, height) {
+  return {
+    position: () => {
+      return { x, y };
+    },
+    size: () => {
+      return { width, height };
+    },
+    translate: jest.fn(),
+  };
+}