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 test for text annotation label #627

Merged
merged 3 commits into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all 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.
8 changes: 4 additions & 4 deletions test/e2e/bpmn.rendering.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ describe('no visual regression', () => {
const imageSnapshotThresholdConfig = new Map<string, ImageSnapshotThresholdConfig>([
[
'labels.01.general', // minimal threshold to make test pass on Github Workflow
// ubuntu: Expected image to match or be a close match to snapshot but was 0.019162386876825366%
// macOS: Expected image to match or be a close match to snapshot but was 0.556652966856197%
// ubuntu: Expected image to match or be a close match to snapshot but was 0.46065520175824215%
// macOS: Expected image to match or be a close match to snapshot but was 0.733363909363971%
// windows: Expected image to match or be a close match to snapshot but was 0.40964885362031467%
{
linux: 0.0002,
macos: 0.006,
linux: 0.0047,
macos: 0.0074,
windows: 0.005,
},
],
Expand Down
53 changes: 32 additions & 21 deletions test/fixtures/bpmn/non-regression/labels.01.general.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,35 @@
<bpmn:outgoing>Flow_0p1kcz3</bpmn:outgoing>
</bpmn:task>
<bpmn:sequenceFlow id="Flow_1lal61z" name="Very long label the sun is shinning, the bird is in the kitchen for sequence flow 4" sourceRef="Activity_0wj6598" targetRef="Activity_0z68329" />
<bpmn:textAnnotation id="TextAnnotation_0l0wlgd">
<bpmn:text>Interesting fact about this task is described here</bpmn:text>
</bpmn:textAnnotation>
<bpmn:association id="Association_0c28bez" sourceRef="Activity_0z68329" targetRef="TextAnnotation_0l0wlgd" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
<bpmndi:BPMNShape id="TextAnnotation_0l0wlgd_di" bpmnElement="TextAnnotation_0l0wlgd">
<dc:Bounds x="200" y="140" width="100" height="68" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_1lal61z_di" bpmnElement="Flow_1lal61z">
<di:waypoint x="530" y="280" />
<di:waypoint x="430" y="280" />
<bpmndi:BPMNLabel>
<dc:Bounds x="436" y="180" width="87" height="80" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0p1kcz3_di" bpmnElement="Flow_0p1kcz3">
<di:waypoint x="330" y="280" />
<di:waypoint x="268" y="280" />
<bpmndi:BPMNLabel>
<dc:Bounds x="248" y="323" width="85" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_Flow_1" bpmnElement="Flow_1">
<di:waypoint x="268" y="99" />
<di:waypoint x="330" y="99" />
<bpmndi:BPMNEdge id="Flow_1r3r6dm_di" bpmnElement="Flow_1r3r6dm">
<di:waypoint x="580" y="139" />
<di:waypoint x="580" y="240" />
<bpmndi:BPMNLabel>
<dc:Bounds x="255" y="63" width="56" height="14" />
<dc:Bounds x="595" y="163" width="50" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1w8ldp8_di" bpmnElement="Flow_1w8ldp8">
Expand All @@ -52,18 +66,11 @@
<dc:Bounds x="452" y="81" width="56" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1r3r6dm_di" bpmnElement="Flow_1r3r6dm">
<di:waypoint x="580" y="139" />
<di:waypoint x="580" y="240" />
<bpmndi:BPMNLabel>
<dc:Bounds x="595" y="163" width="50" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1lal61z_di" bpmnElement="Flow_1lal61z">
<di:waypoint x="530" y="280" />
<di:waypoint x="430" y="280" />
<bpmndi:BPMNEdge id="BPMNEdge_Flow_1" bpmnElement="Flow_1">
<di:waypoint x="268" y="99" />
<di:waypoint x="330" y="99" />
<bpmndi:BPMNLabel>
<dc:Bounds x="436" y="180" width="87" height="80" />
<dc:Bounds x="255" y="63" width="56" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="BPMNShape_StartEvent_1" bpmnElement="StartEvent_1">
Expand All @@ -75,6 +82,12 @@
<bpmndi:BPMNShape id="BPMNShape_Activity_1" bpmnElement="Activity_1">
<dc:Bounds x="330" y="59" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0yq74a9_di" bpmnElement="Event_0yq74a9">
<dc:Bounds x="232" y="262" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="191" y="243" width="58" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_06zea2d_di" bpmnElement="Activity_1omool6">
<dc:Bounds x="530" y="59" width="100" height="80" />
</bpmndi:BPMNShape>
Expand All @@ -84,12 +97,10 @@
<bpmndi:BPMNShape id="Activity_0z68329_di" bpmnElement="Activity_0z68329">
<dc:Bounds x="330" y="240" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0yq74a9_di" bpmnElement="Event_0yq74a9">
<dc:Bounds x="232" y="262" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="191" y="243" width="58" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Association_0c28bez_di" bpmnElement="Association_0c28bez">
<di:waypoint x="339" y="240" />
<di:waypoint x="300" y="203" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>