add label_positions test
This commit is contained in:
parent
a1e7ec3f23
commit
3e29115fc9
6 changed files with 13857 additions and 0 deletions
|
|
@ -2779,6 +2779,7 @@ scenarios: {
|
||||||
loadFromFile(t, "multiple_offset_left"),
|
loadFromFile(t, "multiple_offset_left"),
|
||||||
loadFromFile(t, "multiple_box_selection"),
|
loadFromFile(t, "multiple_box_selection"),
|
||||||
loadFromFile(t, "outside_bottom_labels"),
|
loadFromFile(t, "outside_bottom_labels"),
|
||||||
|
loadFromFile(t, "label_positions"),
|
||||||
}
|
}
|
||||||
|
|
||||||
runa(t, tcs)
|
runa(t, tcs)
|
||||||
|
|
|
||||||
221
e2etests/testdata/files/label_positions.d2
vendored
Normal file
221
e2etests/testdata/files/label_positions.d2
vendored
Normal file
|
|
@ -0,0 +1,221 @@
|
||||||
|
non container: {
|
||||||
|
Default
|
||||||
|
|
||||||
|
OutsideTopLeft.class: OutsideTopLeft
|
||||||
|
OutsideTopCenter.class: OutsideTopCenter
|
||||||
|
OutsideTopRight.class: OutsideTopRight
|
||||||
|
|
||||||
|
OutsideLeftTop.class: OutsideLeftTop
|
||||||
|
OutsideLeftMiddle.class: OutsideLeftMiddle
|
||||||
|
OutsideLeftBottom.class: OutsideLeftBottom
|
||||||
|
|
||||||
|
OutsideRightTop.class: OutsideRightTop
|
||||||
|
OutsideRightMiddle.class: OutsideRightMiddle
|
||||||
|
OutsideRightBottom.class: OutsideRightBottom
|
||||||
|
|
||||||
|
OutsideBottomLeft.class: OutsideBottomLeft
|
||||||
|
OutsideBottomCenter.class: OutsideBottomCenter
|
||||||
|
OutsideBottomRight.class: OutsideBottomRight
|
||||||
|
|
||||||
|
InsideTopLeft.class: InsideTopLeft
|
||||||
|
InsideTopCenter.class: InsideTopCenter
|
||||||
|
InsideTopRight.class: InsideTopRight
|
||||||
|
|
||||||
|
InsideMiddleLeft.class: InsideMiddleLeft
|
||||||
|
InsideMiddleCenter.class: InsideMiddleCenter
|
||||||
|
InsideMiddleRight.class: InsideMiddleRight
|
||||||
|
|
||||||
|
InsideBottomLeft.class: InsideBottomLeft
|
||||||
|
InsideBottomCenter.class: InsideBottomCenter
|
||||||
|
InsideBottomRight.class: InsideBottomRight
|
||||||
|
}
|
||||||
|
|
||||||
|
container: {
|
||||||
|
Default.Default
|
||||||
|
|
||||||
|
OutsideTopLeft.class: OutsideTopLeft
|
||||||
|
OutsideTopCenter.class: OutsideTopCenter
|
||||||
|
OutsideTopRight.class: OutsideTopRight
|
||||||
|
|
||||||
|
OutsideLeftTop.class: OutsideLeftTop
|
||||||
|
OutsideLeftMiddle.class: OutsideLeftMiddle
|
||||||
|
OutsideLeftBottom.class: OutsideLeftBottom
|
||||||
|
|
||||||
|
OutsideRightTop.class: OutsideRightTop
|
||||||
|
OutsideRightMiddle.class: OutsideRightMiddle
|
||||||
|
OutsideRightBottom.class: OutsideRightBottom
|
||||||
|
|
||||||
|
OutsideBottomLeft.class: OutsideBottomLeft
|
||||||
|
OutsideBottomCenter.class: OutsideBottomCenter
|
||||||
|
OutsideBottomRight.class: OutsideBottomRight
|
||||||
|
|
||||||
|
InsideTopLeft.class: InsideTopLeft
|
||||||
|
InsideTopCenter.class: InsideTopCenter
|
||||||
|
InsideTopRight.class: InsideTopRight
|
||||||
|
|
||||||
|
InsideMiddleLeft.class: InsideMiddleLeft
|
||||||
|
InsideMiddleCenter.class: InsideMiddleCenter
|
||||||
|
InsideMiddleRight.class: InsideMiddleRight
|
||||||
|
|
||||||
|
InsideBottomLeft.class: InsideBottomLeft
|
||||||
|
InsideBottomCenter.class: InsideBottomCenter
|
||||||
|
InsideBottomRight.class: InsideBottomRight
|
||||||
|
|
||||||
|
OutsideTopLeft.OutsideTopLeft
|
||||||
|
OutsideTopCenter.OutsideTopCenter
|
||||||
|
OutsideTopRight.OutsideTopRight
|
||||||
|
|
||||||
|
OutsideLeftTop.OutsideLeftTop
|
||||||
|
OutsideLeftMiddle.OutsideLeftMiddle
|
||||||
|
OutsideLeftBottom.OutsideLeftBottom
|
||||||
|
|
||||||
|
OutsideRightTop.OutsideRightTop
|
||||||
|
OutsideRightMiddle.OutsideRightMiddle
|
||||||
|
OutsideRightBottom.OutsideRightBottom
|
||||||
|
|
||||||
|
OutsideBottomLeft.OutsideBottomLeft
|
||||||
|
OutsideBottomCenter.OutsideBottomCenter
|
||||||
|
OutsideBottomRight.OutsideBottomRight
|
||||||
|
|
||||||
|
InsideTopLeft.InsideTopLeft
|
||||||
|
InsideTopCenter.InsideTopCenter
|
||||||
|
InsideTopRight.InsideTopRight
|
||||||
|
|
||||||
|
InsideMiddleLeft.InsideMiddleLeft
|
||||||
|
InsideMiddleCenter.InsideMiddleCenter
|
||||||
|
InsideMiddleRight.InsideMiddleRight
|
||||||
|
|
||||||
|
InsideBottomLeft.InsideBottomLeft
|
||||||
|
InsideBottomCenter.InsideBottomCenter
|
||||||
|
InsideBottomRight.InsideBottomRight
|
||||||
|
}
|
||||||
|
|
||||||
|
with icon: {
|
||||||
|
Default.class: icon
|
||||||
|
|
||||||
|
OutsideTopLeft.class: [icon; OutsideTopLeft]
|
||||||
|
OutsideTopCenter.class: [icon; OutsideTopCenter]
|
||||||
|
OutsideTopRight.class: [icon; OutsideTopRight]
|
||||||
|
|
||||||
|
OutsideLeftTop.class: [icon; OutsideLeftTop]
|
||||||
|
OutsideLeftMiddle.class: [icon; OutsideLeftMiddle]
|
||||||
|
OutsideLeftBottom.class: [icon; OutsideLeftBottom]
|
||||||
|
|
||||||
|
OutsideRightTop.class: [icon; OutsideRightTop]
|
||||||
|
OutsideRightMiddle.class: [icon; OutsideRightMiddle]
|
||||||
|
OutsideRightBottom.class: [icon; OutsideRightBottom]
|
||||||
|
|
||||||
|
OutsideBottomLeft.class: [icon; OutsideBottomLeft]
|
||||||
|
OutsideBottomCenter.class: [icon; OutsideBottomCenter]
|
||||||
|
OutsideBottomRight.class: [icon; OutsideBottomRight]
|
||||||
|
|
||||||
|
InsideTopLeft.class: [icon; InsideTopLeft]
|
||||||
|
InsideTopCenter.class: [icon; InsideTopCenter]
|
||||||
|
InsideTopRight.class: [icon; InsideTopRight]
|
||||||
|
|
||||||
|
InsideMiddleLeft.class: [icon; InsideMiddleLeft]
|
||||||
|
InsideMiddleCenter.class: [icon; InsideMiddleCenter]
|
||||||
|
InsideMiddleRight.class: [icon; InsideMiddleRight]
|
||||||
|
|
||||||
|
InsideBottomLeft.class: [icon; InsideBottomLeft]
|
||||||
|
InsideBottomCenter.class: [icon; InsideBottomCenter]
|
||||||
|
InsideBottomRight.class: [icon; InsideBottomRight]
|
||||||
|
}
|
||||||
|
|
||||||
|
container with icon: {
|
||||||
|
Default.Default
|
||||||
|
|
||||||
|
OutsideTopLeft.OutsideTopLeft
|
||||||
|
OutsideTopCenter.OutsideTopCenter
|
||||||
|
OutsideTopRight.OutsideTopRight
|
||||||
|
|
||||||
|
OutsideLeftTop.OutsideLeftTop
|
||||||
|
OutsideLeftMiddle.OutsideLeftMiddle
|
||||||
|
OutsideLeftBottom.OutsideLeftBottom
|
||||||
|
|
||||||
|
OutsideRightTop.OutsideRightTop
|
||||||
|
OutsideRightMiddle.OutsideRightMiddle
|
||||||
|
OutsideRightBottom.OutsideRightBottom
|
||||||
|
|
||||||
|
OutsideBottomLeft.OutsideBottomLeft
|
||||||
|
OutsideBottomCenter.OutsideBottomCenter
|
||||||
|
OutsideBottomRight.OutsideBottomRight
|
||||||
|
|
||||||
|
InsideTopLeft.InsideTopLeft
|
||||||
|
InsideTopCenter.InsideTopCenter
|
||||||
|
InsideTopRight.InsideTopRight
|
||||||
|
|
||||||
|
InsideMiddleLeft.InsideMiddleLeft
|
||||||
|
InsideMiddleCenter.InsideMiddleCenter
|
||||||
|
InsideMiddleRight.InsideMiddleRight
|
||||||
|
|
||||||
|
InsideBottomLeft.InsideBottomLeft
|
||||||
|
InsideBottomCenter.InsideBottomCenter
|
||||||
|
InsideBottomRight.InsideBottomRight
|
||||||
|
|
||||||
|
Default.class: icon
|
||||||
|
|
||||||
|
OutsideTopLeft.class: [icon; OutsideTopLeft]
|
||||||
|
OutsideTopCenter.class: [icon; OutsideTopCenter]
|
||||||
|
OutsideTopRight.class: [icon; OutsideTopRight]
|
||||||
|
|
||||||
|
OutsideLeftTop.class: [icon; OutsideLeftTop]
|
||||||
|
OutsideLeftMiddle.class: [icon; OutsideLeftMiddle]
|
||||||
|
OutsideLeftBottom.class: [icon; OutsideLeftBottom]
|
||||||
|
|
||||||
|
OutsideRightTop.class: [icon; OutsideRightTop]
|
||||||
|
OutsideRightMiddle.class: [icon; OutsideRightMiddle]
|
||||||
|
OutsideRightBottom.class: [icon; OutsideRightBottom]
|
||||||
|
|
||||||
|
OutsideBottomLeft.class: [icon; OutsideBottomLeft]
|
||||||
|
OutsideBottomCenter.class: [icon; OutsideBottomCenter]
|
||||||
|
OutsideBottomRight.class: [icon; OutsideBottomRight]
|
||||||
|
|
||||||
|
InsideTopLeft.class: [icon; InsideTopLeft]
|
||||||
|
InsideTopCenter.class: [icon; InsideTopCenter]
|
||||||
|
InsideTopRight.class: [icon; InsideTopRight]
|
||||||
|
|
||||||
|
InsideMiddleLeft.class: [icon; InsideMiddleLeft]
|
||||||
|
InsideMiddleCenter.class: [icon; InsideMiddleCenter]
|
||||||
|
InsideMiddleRight.class: [icon; InsideMiddleRight]
|
||||||
|
|
||||||
|
InsideBottomLeft.class: [icon; InsideBottomLeft]
|
||||||
|
InsideBottomCenter.class: [icon; InsideBottomCenter]
|
||||||
|
InsideBottomRight.class: [icon; InsideBottomRight]
|
||||||
|
}
|
||||||
|
|
||||||
|
non container -> container -> with icon -> container with icon
|
||||||
|
|
||||||
|
classes: {
|
||||||
|
icon: {
|
||||||
|
icon: https://icons.terrastruct.com/essentials/time.svg
|
||||||
|
}
|
||||||
|
|
||||||
|
OutsideTopLeft.label.near: outside-top-left
|
||||||
|
OutsideTopCenter.label.near: outside-top-center
|
||||||
|
OutsideTopRight.label.near: outside-top-right
|
||||||
|
|
||||||
|
OutsideLeftTop.label.near: outside-left-top
|
||||||
|
OutsideLeftMiddle.label.near: outside-left-center
|
||||||
|
OutsideLeftBottom.label.near: outside-left-bottom
|
||||||
|
|
||||||
|
OutsideRightTop.label.near: outside-right-top
|
||||||
|
OutsideRightMiddle.label.near: outside-right-center
|
||||||
|
OutsideRightBottom.label.near: outside-right-bottom
|
||||||
|
|
||||||
|
OutsideBottomLeft.label.near: outside-bottom-left
|
||||||
|
OutsideBottomCenter.label.near: outside-bottom-center
|
||||||
|
OutsideBottomRight.label.near: outside-bottom-right
|
||||||
|
|
||||||
|
InsideTopLeft.label.near: top-left
|
||||||
|
InsideTopCenter.label.near: top-center
|
||||||
|
InsideTopRight.label.near: top-right
|
||||||
|
|
||||||
|
InsideMiddleLeft.label.near: center-left
|
||||||
|
InsideMiddleCenter.label.near: center-center
|
||||||
|
InsideMiddleRight.label.near: center-right
|
||||||
|
|
||||||
|
InsideBottomLeft.label.near: bottom-left
|
||||||
|
InsideBottomCenter.label.near: bottom-center
|
||||||
|
InsideBottomRight.label.near: bottom-right
|
||||||
|
}
|
||||||
6594
e2etests/testdata/stable/label_positions/dagre/board.exp.json
generated
vendored
Normal file
6594
e2etests/testdata/stable/label_positions/dagre/board.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
237
e2etests/testdata/stable/label_positions/dagre/sketch.exp.svg
vendored
Normal file
237
e2etests/testdata/stable/label_positions/dagre/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 79 KiB |
6567
e2etests/testdata/stable/label_positions/elk/board.exp.json
generated
vendored
Normal file
6567
e2etests/testdata/stable/label_positions/elk/board.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
237
e2etests/testdata/stable/label_positions/elk/sketch.exp.svg
vendored
Normal file
237
e2etests/testdata/stable/label_positions/elk/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 79 KiB |
Loading…
Reference in a new issue