diff --git a/e2etests/report/main.go b/e2etests/report/main.go
index 81ae168d3..652807d0a 100644
--- a/e2etests/report/main.go
+++ b/e2etests/report/main.go
@@ -85,13 +85,14 @@ func main() {
}
if testFile != nil {
+ testCaseRoot := filepath.Dir(path)
matchTestCase := true
if testCaseFlag != "" {
- matchTestCase, _ = regexp.MatchString(testCaseFlag, filepath.Base(path))
+ matchTestCase, _ = regexp.MatchString(testCaseFlag, filepath.Base(testCaseRoot))
}
matchTestSet := true
if testSetFlag != "" {
- matchTestSet, _ = regexp.MatchString(testSetFlag, filepath.Base(filepath.Dir(path)))
+ matchTestSet, _ = regexp.MatchString(testSetFlag, filepath.Base(filepath.Dir(testCaseRoot)))
}
if matchTestSet && matchTestCase {
diff --git a/e2etests/stable_test.go b/e2etests/stable_test.go
index b48e2b20e..6f03c9570 100644
--- a/e2etests/stable_test.go
+++ b/e2etests/stable_test.go
@@ -881,6 +881,17 @@ b: {
icon: https://icons.terrastruct.com/essentials/004-picture.svg
}
a -> b
+`,
+ },
+ {
+ name: "arrowhead_labels",
+ script: `
+a -> b: To err is human, to moo bovine {
+ source-arrowhead: 1
+ target-arrowhead: * {
+ shape: diamond
+ }
+}
`,
},
}
diff --git a/e2etests/testdata/stable/arrowhead_labels/dagre/board.exp.json b/e2etests/testdata/stable/arrowhead_labels/dagre/board.exp.json
new file mode 100644
index 000000000..60b8d8edd
--- /dev/null
+++ b/e2etests/testdata/stable/arrowhead_labels/dagre/board.exp.json
@@ -0,0 +1,130 @@
+{
+ "name": "",
+ "shapes": [
+ {
+ "id": "a",
+ "type": "",
+ "pos": {
+ "x": 0,
+ "y": 0
+ },
+ "width": 113,
+ "height": 126,
+ "level": 1,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 13,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER"
+ },
+ {
+ "id": "b",
+ "type": "",
+ "pos": {
+ "x": 0,
+ "y": 226
+ },
+ "width": 113,
+ "height": 126,
+ "level": 1,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "b",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 13,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER"
+ }
+ ],
+ "connections": [
+ {
+ "id": "(a -> b)[0]",
+ "src": "a",
+ "srcArrow": "none",
+ "srcLabel": "1",
+ "dst": "b",
+ "dstArrow": "diamond",
+ "dstLabel": "*",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "To err is human, to moo bovine",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 201,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 56.5,
+ "y": 126
+ },
+ {
+ "x": 56.5,
+ "y": 166
+ },
+ {
+ "x": 56.5,
+ "y": 186
+ },
+ {
+ "x": 56.5,
+ "y": 226
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null
+ }
+ ]
+}
diff --git a/e2etests/testdata/stable/arrowhead_labels/dagre/sketch.exp.svg b/e2etests/testdata/stable/arrowhead_labels/dagre/sketch.exp.svg
new file mode 100644
index 000000000..916fade4d
--- /dev/null
+++ b/e2etests/testdata/stable/arrowhead_labels/dagre/sketch.exp.svg
@@ -0,0 +1,34 @@
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/stable/arrowhead_labels/elk/board.exp.json b/e2etests/testdata/stable/arrowhead_labels/elk/board.exp.json
new file mode 100644
index 000000000..a0458a9db
--- /dev/null
+++ b/e2etests/testdata/stable/arrowhead_labels/elk/board.exp.json
@@ -0,0 +1,121 @@
+{
+ "name": "",
+ "shapes": [
+ {
+ "id": "a",
+ "type": "",
+ "pos": {
+ "x": 12,
+ "y": 12
+ },
+ "width": 113,
+ "height": 126,
+ "level": 1,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 13,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER"
+ },
+ {
+ "id": "b",
+ "type": "",
+ "pos": {
+ "x": 526,
+ "y": 12
+ },
+ "width": 113,
+ "height": 126,
+ "level": 1,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "b",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 13,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER"
+ }
+ ],
+ "connections": [
+ {
+ "id": "(a -> b)[0]",
+ "src": "a",
+ "srcArrow": "none",
+ "srcLabel": "1",
+ "dst": "b",
+ "dstArrow": "diamond",
+ "dstLabel": "*",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "To err is human, to moo bovine",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 201,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 125,
+ "y": 75
+ },
+ {
+ "x": 526,
+ "y": 75
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null
+ }
+ ]
+}
diff --git a/e2etests/testdata/stable/arrowhead_labels/elk/sketch.exp.svg b/e2etests/testdata/stable/arrowhead_labels/elk/sketch.exp.svg
new file mode 100644
index 000000000..0b67ee9dc
--- /dev/null
+++ b/e2etests/testdata/stable/arrowhead_labels/elk/sketch.exp.svg
@@ -0,0 +1,34 @@
+
+
\ No newline at end of file
diff --git a/out/.gitignore b/out/.gitignore
new file mode 100644
index 000000000..e69de29bb