add test
This commit is contained in:
parent
47354c5e96
commit
72af538e2f
2 changed files with 65 additions and 4 deletions
|
|
@ -9,12 +9,14 @@ import (
|
|||
"cdr.dev/slog"
|
||||
|
||||
tassert "github.com/stretchr/testify/assert"
|
||||
|
||||
"oss.terrastruct.com/util-go/assert"
|
||||
"oss.terrastruct.com/util-go/diff"
|
||||
|
||||
"oss.terrastruct.com/d2/d2compiler"
|
||||
"oss.terrastruct.com/d2/d2exporter"
|
||||
"oss.terrastruct.com/d2/d2layouts/d2dagrelayout"
|
||||
"oss.terrastruct.com/d2/d2layouts/d2sequence"
|
||||
"oss.terrastruct.com/d2/d2target"
|
||||
"oss.terrastruct.com/d2/d2themes/d2themescatalog"
|
||||
"oss.terrastruct.com/d2/lib/geo"
|
||||
|
|
@ -237,7 +239,7 @@ func run(t *testing.T, tc testCase) {
|
|||
err = g.SetDimensions(nil, ruler, nil)
|
||||
assert.JSON(t, nil, err)
|
||||
|
||||
err = d2dagrelayout.Layout(ctx, g)
|
||||
err = d2sequence.Layout(ctx, g, d2dagrelayout.Layout)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
65
testdata/d2exporter/TestExport/shape/sequence_group_position.exp.json
generated
vendored
65
testdata/d2exporter/TestExport/shape/sequence_group_position.exp.json
generated
vendored
|
|
@ -155,7 +155,7 @@
|
|||
"underline": false,
|
||||
"labelWidth": 0,
|
||||
"labelHeight": 0,
|
||||
"zIndex": 0,
|
||||
"zIndex": 3,
|
||||
"level": 2
|
||||
}
|
||||
],
|
||||
|
|
@ -185,11 +185,70 @@
|
|||
"labelPosition": "",
|
||||
"labelPercentage": 0,
|
||||
"route": [],
|
||||
"isCurve": true,
|
||||
"animated": false,
|
||||
"tooltip": "",
|
||||
"icon": null,
|
||||
"zIndex": 0
|
||||
"zIndex": 4
|
||||
},
|
||||
{
|
||||
"id": "(hey.a -- )[0]",
|
||||
"src": "hey.a",
|
||||
"srcArrow": "none",
|
||||
"srcLabel": "",
|
||||
"dst": "a-lifeline-end-2251863791",
|
||||
"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": [],
|
||||
"animated": false,
|
||||
"tooltip": "",
|
||||
"icon": null,
|
||||
"zIndex": 1
|
||||
},
|
||||
{
|
||||
"id": "(hey.b -- )[0]",
|
||||
"src": "hey.b",
|
||||
"srcArrow": "none",
|
||||
"srcLabel": "",
|
||||
"dst": "b-lifeline-end-668380428",
|
||||
"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": [],
|
||||
"animated": false,
|
||||
"tooltip": "",
|
||||
"icon": null,
|
||||
"zIndex": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue