Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TEST] Add visual tests for label default position #749

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions test/e2e/bpmn.rendering.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ describe('no visual regression', () => {
windows: 0.007,
},
],
[
'labels.03.default.position',
{
// Expected image to match or be a close match to snapshot but was 0.0008459985669673209%
linux: 0.000009,
// Expected image to match or be a close match to snapshot but was 0.4666976128188338%
macos: 0.005,
// Expected image to match or be a close match to snapshot but was 0.2970500950379207%
windows: 0.003,
},
],
// ubuntu: Expected image to match or be a close match to snapshot but was 0.19665548561466073%
// macOS: Expected image to match or be a close match to snapshot but was 0.15006201878846603%
// windows: Expected image to match or be a close match to snapshot but was 0.12200021675353723%
Expand Down
38 changes: 38 additions & 0 deletions test/fixtures/bpmn/non-regression/labels.03.default.position.bpmn
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_0x0opj6" targetNamespace="http://example.bpmn.com/schema/bpmn" exporter="bpmn-js (https://demo.bpmn.io)" exporterVersion="7.3.0">
<bpmn:process id="Process_1" isExecutable="false">
<bpmn:startEvent id="StartEvent_1" name="Start Event">
<bpmn:outgoing>Flow_1</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_1" name="horizontal SeqFlow" sourceRef="StartEvent_1" targetRef="Activity_1" />
<bpmn:task id="Activity_1" name="Task">
<bpmn:incoming>Flow_1</bpmn:incoming>
<bpmn:outgoing>Flow_1w8ldp8</bpmn:outgoing>
</bpmn:task>
<bpmn:sequenceFlow id="Flow_1w8ldp8" name="vertical SeqFlow" sourceRef="Activity_1" targetRef="Gateway_1vkgxli" />
<bpmn:exclusiveGateway id="Gateway_1vkgxli" name="gateway">
<bpmn:incoming>Flow_1w8ldp8</bpmn:incoming>
</bpmn:exclusiveGateway>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
<bpmndi:BPMNEdge id="Flow_1w8ldp8_di" bpmnElement="Flow_1w8ldp8">
<di:waypoint x="380" y="139" />
<di:waypoint x="380" y="235" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_Flow_1" bpmnElement="Flow_1">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A flow with label bounds is missing 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have such flows in the labels.01.general.bpmn file

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value of STYLE_VERTICAL_ALIGN is not the same if there is label bounds.
And the label position changes in all cases if we change the value of STYLE_VERTICAL_ALIGN.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this comment is related to this thread? I don't get it

<di:waypoint x="198" y="99" />
<di:waypoint x="330" y="99" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="BPMNShape_StartEvent_1" bpmnElement="StartEvent_1">
<dc:Bounds x="162" y="81" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape_Activity_1" bpmnElement="Activity_1">
<dc:Bounds x="330" y="59" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_1vkgxli_di" bpmnElement="Gateway_1vkgxli" isMarkerVisible="true">
<dc:Bounds x="355" y="235" width="50" height="50" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>