chore: add e2e testcase
This commit is contained in:
parent
4850038406
commit
fc4ff9c523
5 changed files with 472 additions and 0 deletions
|
|
@ -12,6 +12,24 @@ var testMarkdown string
|
||||||
|
|
||||||
func testStable(t *testing.T) {
|
func testStable(t *testing.T) {
|
||||||
tcs := []testCase{
|
tcs := []testCase{
|
||||||
|
{
|
||||||
|
name: "class_and_sqlTable_border_radius",
|
||||||
|
script: `
|
||||||
|
a: {
|
||||||
|
shape: sql_table
|
||||||
|
id: int {constraint: primary_key}
|
||||||
|
disk: int {constraint: foreign_key}
|
||||||
|
|
||||||
|
json: jsonb {constraint: unique}
|
||||||
|
last_updated: timestamp with time zone
|
||||||
|
|
||||||
|
style {
|
||||||
|
fill: red
|
||||||
|
border-radius: 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "elk_border_radius",
|
name: "elk_border_radius",
|
||||||
script: `
|
script: `
|
||||||
|
|
|
||||||
204
e2etests/testdata/stable/class_and_sqlTable_border_radius/dagre/board.exp.json
generated
vendored
Normal file
204
e2etests/testdata/stable/class_and_sqlTable_border_radius/dagre/board.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,204 @@
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"isFolderOnly": false,
|
||||||
|
"fontFamily": "SourceSansPro",
|
||||||
|
"shapes": [
|
||||||
|
{
|
||||||
|
"id": "a",
|
||||||
|
"type": "sql_table",
|
||||||
|
"pos": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"width": 439,
|
||||||
|
"height": 180,
|
||||||
|
"opacity": 1,
|
||||||
|
"strokeDash": 0,
|
||||||
|
"strokeWidth": 2,
|
||||||
|
"borderRadius": 10,
|
||||||
|
"fill": "red",
|
||||||
|
"stroke": "N7",
|
||||||
|
"shadow": false,
|
||||||
|
"3d": false,
|
||||||
|
"multiple": false,
|
||||||
|
"double-border": false,
|
||||||
|
"tooltip": "",
|
||||||
|
"link": "",
|
||||||
|
"icon": null,
|
||||||
|
"iconPosition": "",
|
||||||
|
"blend": false,
|
||||||
|
"fields": null,
|
||||||
|
"methods": null,
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": {
|
||||||
|
"label": "id",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 15,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"label": "int",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 23,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"constraint": "primary_key",
|
||||||
|
"reference": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": {
|
||||||
|
"label": "disk",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 35,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"label": "int",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 23,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"constraint": "foreign_key",
|
||||||
|
"reference": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": {
|
||||||
|
"label": "json",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 36,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"label": "jsonb",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 48,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"constraint": "unique",
|
||||||
|
"reference": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": {
|
||||||
|
"label": "last_updated",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 110,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"label": "timestamp with time zone",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 219,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"constraint": "",
|
||||||
|
"reference": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"label": "a",
|
||||||
|
"fontSize": 20,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": true,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 11,
|
||||||
|
"labelHeight": 31,
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 1,
|
||||||
|
"primaryAccentColor": "B2",
|
||||||
|
"secondaryAccentColor": "AA2",
|
||||||
|
"neutralAccentColor": "N2"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"connections": [],
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
}
|
||||||
23
e2etests/testdata/stable/class_and_sqlTable_border_radius/dagre/sketch.exp.svg
vendored
Normal file
23
e2etests/testdata/stable/class_and_sqlTable_border_radius/dagre/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 331 KiB |
204
e2etests/testdata/stable/class_and_sqlTable_border_radius/elk/board.exp.json
generated
vendored
Normal file
204
e2etests/testdata/stable/class_and_sqlTable_border_radius/elk/board.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,204 @@
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"isFolderOnly": false,
|
||||||
|
"fontFamily": "SourceSansPro",
|
||||||
|
"shapes": [
|
||||||
|
{
|
||||||
|
"id": "a",
|
||||||
|
"type": "sql_table",
|
||||||
|
"pos": {
|
||||||
|
"x": 12,
|
||||||
|
"y": 12
|
||||||
|
},
|
||||||
|
"width": 439,
|
||||||
|
"height": 180,
|
||||||
|
"opacity": 1,
|
||||||
|
"strokeDash": 0,
|
||||||
|
"strokeWidth": 2,
|
||||||
|
"borderRadius": 10,
|
||||||
|
"fill": "red",
|
||||||
|
"stroke": "N7",
|
||||||
|
"shadow": false,
|
||||||
|
"3d": false,
|
||||||
|
"multiple": false,
|
||||||
|
"double-border": false,
|
||||||
|
"tooltip": "",
|
||||||
|
"link": "",
|
||||||
|
"icon": null,
|
||||||
|
"iconPosition": "",
|
||||||
|
"blend": false,
|
||||||
|
"fields": null,
|
||||||
|
"methods": null,
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"name": {
|
||||||
|
"label": "id",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 15,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"label": "int",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 23,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"constraint": "primary_key",
|
||||||
|
"reference": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": {
|
||||||
|
"label": "disk",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 35,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"label": "int",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 23,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"constraint": "foreign_key",
|
||||||
|
"reference": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": {
|
||||||
|
"label": "json",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 36,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"label": "jsonb",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 48,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"constraint": "unique",
|
||||||
|
"reference": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": {
|
||||||
|
"label": "last_updated",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 110,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"label": "timestamp with time zone",
|
||||||
|
"fontSize": 0,
|
||||||
|
"fontFamily": "",
|
||||||
|
"language": "",
|
||||||
|
"color": "",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 219,
|
||||||
|
"labelHeight": 26
|
||||||
|
},
|
||||||
|
"constraint": "",
|
||||||
|
"reference": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"label": "a",
|
||||||
|
"fontSize": 20,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": true,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 11,
|
||||||
|
"labelHeight": 31,
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 1,
|
||||||
|
"primaryAccentColor": "B2",
|
||||||
|
"secondaryAccentColor": "AA2",
|
||||||
|
"neutralAccentColor": "N2"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"connections": [],
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
}
|
||||||
23
e2etests/testdata/stable/class_and_sqlTable_border_radius/elk/sketch.exp.svg
vendored
Normal file
23
e2etests/testdata/stable/class_and_sqlTable_border_radius/elk/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 331 KiB |
Loading…
Reference in a new issue