From d718e984d3244ba6846c2826ec5ccfde811747ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9line=20Souchet?= Date: Wed, 30 Sep 2020 17:11:57 +0200 Subject: [PATCH] Fix label position --- test/e2e/mxGraph.model.test.ts | 55 ++-------- .../bpmn/model-complete-semantic.bpmn | 103 ++---------------- 2 files changed, 16 insertions(+), 142 deletions(-) diff --git a/test/e2e/mxGraph.model.test.ts b/test/e2e/mxGraph.model.test.ts index 3a96d711e9..461147588e 100644 --- a/test/e2e/mxGraph.model.test.ts +++ b/test/e2e/mxGraph.model.test.ts @@ -753,45 +753,23 @@ describe('mxGraph model', () => { // activity // Task - expectModelContainsShape('task_id', { - kind: ShapeBpmnElementKind.TASK, - font: { - isBold: false, - isItalic: false, - isStrikeThrough: false, - isUnderline: true, - name: 'Arial', - size: 11.0, - }, - label: 'Task', - }); + expectModelContainsShape('task_id', { kind: ShapeBpmnElementKind.TASK, label: 'Task' }); expectModelContainsShape('task_with_loop_id', { kind: ShapeBpmnElementKind.TASK, - font: { - isBold: false, - isItalic: false, - isStrikeThrough: false, - isUnderline: true, - name: 'Arial', - size: 11.0, - }, label: 'Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); expectModelContainsShape('task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK, - font: { - isBold: false, - isItalic: false, - isStrikeThrough: false, - isUnderline: true, - name: 'Arial', - size: 11.0, - }, label: 'Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); expectModelContainsShape('task_with_parallel_multi_instance_id', { + kind: ShapeBpmnElementKind.TASK, + label: 'Task With Parallel Multi-instance', + markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL], + }); + expectModelContainsShape('task_with_flows_id', { kind: ShapeBpmnElementKind.TASK, font: { isBold: false, @@ -801,27 +779,23 @@ describe('mxGraph model', () => { name: 'Arial', size: 11.0, }, - label: 'Task With Parallel Multi-instance', - markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL], + label: 'Task with Flows', }); // Service Task expectModelContainsShape('service_task_id', { kind: ShapeBpmnElementKind.TASK_SERVICE, font: expectedBoldFont, label: 'Service Task' }); expectModelContainsShape('service_task_with_loop_id', { kind: ShapeBpmnElementKind.TASK_SERVICE, - font: expectedBoldFont, label: 'Service Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); expectModelContainsShape('service_task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_SERVICE, - font: expectedBoldFont, label: 'Service Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); expectModelContainsShape('service_task_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_SERVICE, - font: expectedBoldFont, label: 'Service Task With Parallel Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL], }); @@ -830,19 +804,16 @@ describe('mxGraph model', () => { expectModelContainsShape('user_task_id', { kind: ShapeBpmnElementKind.TASK_USER, font: expectedBoldFont, label: 'User Task' }); expectModelContainsShape('user_task_with_loop_id', { kind: ShapeBpmnElementKind.TASK_USER, - font: expectedBoldFont, label: 'User Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); expectModelContainsShape('user_task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_USER, - font: expectedBoldFont, label: 'User Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); expectModelContainsShape('user_task_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_USER, - font: expectedBoldFont, label: 'User Task With Parallel Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL], }); @@ -893,19 +864,16 @@ describe('mxGraph model', () => { expectModelContainsShape('send_task_id', { kind: ShapeBpmnElementKind.TASK_SEND, font: expectedBoldFont, label: 'Send Task' }); expectModelContainsShape('send_task_with_loop_id', { kind: ShapeBpmnElementKind.TASK_SEND, - font: expectedBoldFont, label: 'Send Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); expectModelContainsShape('send_task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_SEND, - font: expectedBoldFont, label: 'Send Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); expectModelContainsShape('send_task_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_SEND, - font: expectedBoldFont, label: 'Send Task With Parallel Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL], }); @@ -914,19 +882,16 @@ describe('mxGraph model', () => { expectModelContainsShape('manual_task_id', { kind: ShapeBpmnElementKind.TASK_MANUAL, font: expectedBoldFont, label: 'Manual Task' }); expectModelContainsShape('manual_task_with_loop_id', { kind: ShapeBpmnElementKind.TASK_MANUAL, - font: expectedBoldFont, label: 'Manual Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); expectModelContainsShape('manual_task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_MANUAL, - font: expectedBoldFont, label: 'Manual Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); expectModelContainsShape('manual_task_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_MANUAL, - font: expectedBoldFont, label: 'Manual Task With Parallel Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL], }); @@ -935,19 +900,16 @@ describe('mxGraph model', () => { expectModelContainsShape('script_task_id', { kind: ShapeBpmnElementKind.TASK_SCRIPT, font: expectedBoldFont, label: 'Script Task' }); expectModelContainsShape('script_task_with_loop_id', { kind: ShapeBpmnElementKind.TASK_SCRIPT, - font: expectedBoldFont, label: 'Script Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); expectModelContainsShape('script_task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_SCRIPT, - font: expectedBoldFont, label: 'Script Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); expectModelContainsShape('script_task_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_SCRIPT, - font: expectedBoldFont, label: 'Script Task With Parallel Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL], }); @@ -956,19 +918,16 @@ describe('mxGraph model', () => { expectModelContainsShape('business_rule_task_id', { kind: ShapeBpmnElementKind.TASK_BUSINESS_RULE, font: expectedBoldFont, label: 'Business Rule Task' }); expectModelContainsShape('business_rule_task_with_loop_id', { kind: ShapeBpmnElementKind.TASK_BUSINESS_RULE, - font: expectedBoldFont, label: 'Business Rule Task With Loop', markers: [ShapeBpmnMarkerKind.LOOP], }); expectModelContainsShape('business_rule_task_with_sequential_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_BUSINESS_RULE, - font: expectedBoldFont, label: 'Business Rule Task With Sequential Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL], }); expectModelContainsShape('business_rule_task_with_parallel_multi_instance_id', { kind: ShapeBpmnElementKind.TASK_BUSINESS_RULE, - font: expectedBoldFont, label: 'Business Rule Task With Parallel Multi-instance', markers: [ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL], }); diff --git a/test/fixtures/bpmn/model-complete-semantic.bpmn b/test/fixtures/bpmn/model-complete-semantic.bpmn index da82602d9d..9ece8ef41c 100644 --- a/test/fixtures/bpmn/model-complete-semantic.bpmn +++ b/test/fixtures/bpmn/model-complete-semantic.bpmn @@ -515,138 +515,90 @@ - + - - - - - - - - - - + - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - - + - - - - - - - - - @@ -681,104 +633,68 @@ - + - - - - - - - - - - + - - - - - - - - - - + - - - - - - - - - - + - - - - - - - - - @@ -1402,7 +1318,6 @@ -