From 9384800435ae90602f930581bb5de7781acef2f5 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Thu, 2 Feb 2023 11:55:12 -0800 Subject: [PATCH] e2etests/testdata: Fix --- d2graph/seqdiagram.go | 2 +- .../dagre/board.exp.json | 57 +++---------------- .../dagre/sketch.exp.svg | 7 ++- .../elk/board.exp.json | 57 +++---------------- .../elk/sketch.exp.svg | 7 ++- 5 files changed, 27 insertions(+), 103 deletions(-) diff --git a/d2graph/seqdiagram.go b/d2graph/seqdiagram.go index c7497fa9a..b9cddac8d 100644 --- a/d2graph/seqdiagram.go +++ b/d2graph/seqdiagram.go @@ -33,7 +33,7 @@ func (obj *Object) IsSequenceDiagramGroup() bool { return false } } - return len(obj.ChildrenArray) > 0 || obj.ContainsAnyEdge(obj.Graph.Edges) + return obj.ContainsAnyObject(obj.Graph.Objects) || obj.ContainsAnyEdge(obj.Graph.Edges) } // notes are descendant of actors with no edges and no children diff --git a/e2etests/testdata/stable/sequence_diagram_groups/dagre/board.exp.json b/e2etests/testdata/stable/sequence_diagram_groups/dagre/board.exp.json index 8a0bdf5ef..d88f4983a 100644 --- a/e2etests/testdata/stable/sequence_diagram_groups/dagre/board.exp.json +++ b/e2etests/testdata/stable/sequence_diagram_groups/dagre/board.exp.json @@ -495,16 +495,16 @@ "id": "choo", "type": "rectangle", "pos": { - "x": 1024, - "y": 74 + "x": 717, + "y": 1846 }, - "width": 150, - "height": 126, + "width": 254, + "height": 216, "opacity": 1, "strokeDash": 0, - "strokeWidth": 2, + "strokeWidth": 0, "borderRadius": 0, - "fill": "#EDF0FD", + "fill": "#DEE1EB", "stroke": "#0D32B2", "shadow": false, "3d": false, @@ -514,7 +514,7 @@ "link": "", "icon": null, "iconPosition": "", - "blend": false, + "blend": true, "fields": null, "methods": null, "columns": null, @@ -528,8 +528,8 @@ "underline": false, "labelWidth": 38, "labelHeight": 26, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, + "labelPosition": "INSIDE_TOP_LEFT", + "zIndex": 3, "level": 1 }, { @@ -1120,45 +1120,6 @@ "tooltip": "", "icon": null, "zIndex": 1 - }, - { - "id": "(choo -- )[0]", - "src": "choo", - "srcArrow": "none", - "srcLabel": "", - "dst": "choo-lifeline-end-3474163975", - "dstArrow": "none", - "dstLabel": "", - "opacity": 1, - "strokeDash": 6, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 1099, - "y": 200 - }, - { - "x": 1099, - "y": 2142 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 1 } ] } diff --git a/e2etests/testdata/stable/sequence_diagram_groups/dagre/sketch.exp.svg b/e2etests/testdata/stable/sequence_diagram_groups/dagre/sketch.exp.svg index 8baf9c609..5f1e317d3 100644 --- a/e2etests/testdata/stable/sequence_diagram_groups/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/sequence_diagram_groups/dagre/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="1354" height="2270" viewBox="-78 -28 1354 2270">