From ba5691d240b68570e202ed9b34f5a49b20b37841 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Thu, 13 Apr 2023 14:23:50 -0700 Subject: [PATCH] add long_arrowhead_label test --- e2etests/regression_test.go | 8 + .../long_arrowhead_label/dagre/board.exp.json | 180 ++++++++++++++++++ .../long_arrowhead_label/dagre/sketch.exp.svg | 102 ++++++++++ .../long_arrowhead_label/elk/board.exp.json | 171 +++++++++++++++++ .../long_arrowhead_label/elk/sketch.exp.svg | 102 ++++++++++ 5 files changed, 563 insertions(+) create mode 100644 e2etests/testdata/regression/long_arrowhead_label/dagre/board.exp.json create mode 100644 e2etests/testdata/regression/long_arrowhead_label/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/regression/long_arrowhead_label/elk/board.exp.json create mode 100644 e2etests/testdata/regression/long_arrowhead_label/elk/sketch.exp.svg diff --git a/e2etests/regression_test.go b/e2etests/regression_test.go index d2d1f27c6..aac686948 100644 --- a/e2etests/regression_test.go +++ b/e2etests/regression_test.go @@ -703,6 +703,14 @@ And other normal markdown stuff one two } +`, + }, + { + name: "long_arrowhead_label", + script: ` +a -> b: { + target-arrowhead: "a to b with unexpectedly long target arrowhead label" +} `, }, } diff --git a/e2etests/testdata/regression/long_arrowhead_label/dagre/board.exp.json b/e2etests/testdata/regression/long_arrowhead_label/dagre/board.exp.json new file mode 100644 index 000000000..3a51938ae --- /dev/null +++ b/e2etests/testdata/regression/long_arrowhead_label/dagre/board.exp.json @@ -0,0 +1,180 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 0, + "y": 0 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 0, + "y": 166 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(a -> b)[0]", + "src": "a", + "srcArrow": "none", + "srcLabel": "", + "dst": "b", + "dstArrow": "triangle", + "dstLabel": "a to b with unexpectedly long target arrowhead label", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 26.5, + "y": 66 + }, + { + "x": 26.5, + "y": 106 + }, + { + "x": 26.5, + "y": 126 + }, + { + "x": 26.5, + "y": 166 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/regression/long_arrowhead_label/dagre/sketch.exp.svg b/e2etests/testdata/regression/long_arrowhead_label/dagre/sketch.exp.svg new file mode 100644 index 000000000..2c6b4fcf0 --- /dev/null +++ b/e2etests/testdata/regression/long_arrowhead_label/dagre/sketch.exp.svg @@ -0,0 +1,102 @@ +ab a to b with unexpectedly long target arrowhead label + + + \ No newline at end of file diff --git a/e2etests/testdata/regression/long_arrowhead_label/elk/board.exp.json b/e2etests/testdata/regression/long_arrowhead_label/elk/board.exp.json new file mode 100644 index 000000000..4fa6bbba3 --- /dev/null +++ b/e2etests/testdata/regression/long_arrowhead_label/elk/board.exp.json @@ -0,0 +1,171 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 12, + "y": 12 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 12, + "y": 148 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(a -> b)[0]", + "src": "a", + "srcArrow": "none", + "srcLabel": "", + "dst": "b", + "dstArrow": "triangle", + "dstLabel": "a to b with unexpectedly long target arrowhead label", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 38.5, + "y": 78 + }, + { + "x": 38.5, + "y": 148 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/regression/long_arrowhead_label/elk/sketch.exp.svg b/e2etests/testdata/regression/long_arrowhead_label/elk/sketch.exp.svg new file mode 100644 index 000000000..45eaa1e37 --- /dev/null +++ b/e2etests/testdata/regression/long_arrowhead_label/elk/sketch.exp.svg @@ -0,0 +1,102 @@ +ab a to b with unexpectedly long target arrowhead label + + + \ No newline at end of file