mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-21 00:09:51 +02:00
add test case for shapes
This commit is contained in:
@@ -30,13 +30,40 @@ describe('newShapes', () => {
|
|||||||
it('4: should render new flippedTriangle shape', () => {
|
it('4: should render new flippedTriangle shape', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`flowchart
|
`flowchart
|
||||||
KS --> AC@{ shape: flippedTriangle, label:"This is Final Label" }@
|
FS --> AD@{ shape: flippedTriangle, label:"This is Final Label" }@
|
||||||
|
FE --> AD
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('5: should render new hourGlass shape', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`flowchart
|
||||||
|
MS --> AE@{ shape: hourglass, label:"This is Final Label" }@
|
||||||
|
ME --> AE
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('6: should render new taggedRect shape', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`flowchart
|
||||||
|
KS --> AC@{ shape: taggedRect, label:"This is Final Label" }@
|
||||||
RE --> AC
|
RE --> AC
|
||||||
`,
|
`,
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it('5: should render new FlowChart for New Shapes', () => {
|
it('7: should render new multiRect shape', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`flowchart
|
||||||
|
DS --> AF@{ shape: multiRect, label:"This is Final Label" }@
|
||||||
|
DE --> AF
|
||||||
|
`,
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
it('8: should render new FlowChart for New Shapes', () => {
|
||||||
renderGraph(
|
renderGraph(
|
||||||
`
|
`
|
||||||
flowchart
|
flowchart
|
||||||
@@ -45,10 +72,13 @@ describe('newShapes', () => {
|
|||||||
C@{ shape: tiltedCylinder, label: "write your Test Case"}@
|
C@{ shape: tiltedCylinder, label: "write your Test Case"}@
|
||||||
D@{ shape: flippedTriangle, label: "new Test Case"}@
|
D@{ shape: flippedTriangle, label: "new Test Case"}@
|
||||||
E@{ shape: waveRectangle, label: "Execute Test Case" }@
|
E@{ shape: waveRectangle, label: "Execute Test Case" }@
|
||||||
F@{ shape: slopedRect, label: "Test Passed?" }@
|
F@{ shape: hourglass , label: "add test case"}@
|
||||||
G@{ shape: bowTieRect, label: "Pass" }@
|
G@{ shape: taggedRect, label: "execute new test case"}@
|
||||||
H@{ shape: dividedRect, label: "Log Defect" }@
|
H@{ shape: slopedRect, label: "Test Passed?" }@
|
||||||
I@{ shape: curvedTrapezoid, label: "End" }@
|
I@{ shape: bowTieRect, label: "Pass" }@
|
||||||
|
J@{ shape: dividedRect, label: "Log Defect" }@
|
||||||
|
K@{ shape: curvedTrapezoid, label: "End" }@
|
||||||
|
L@{ shape: multiRect, label: "coming soon"}@
|
||||||
|
|
||||||
A --> B
|
A --> B
|
||||||
B --> C
|
B --> C
|
||||||
@@ -56,9 +86,11 @@ describe('newShapes', () => {
|
|||||||
D --> E
|
D --> E
|
||||||
E --> F
|
E --> F
|
||||||
F -->|Yes| G
|
F -->|Yes| G
|
||||||
F -->|No| H
|
G -->|No| H
|
||||||
G --> I
|
|
||||||
H --> I
|
H --> I
|
||||||
|
I --> J
|
||||||
|
J --> K
|
||||||
|
K --> L
|
||||||
`,
|
`,
|
||||||
{ flowchart: { useMaxWidth: true } }
|
{ flowchart: { useMaxWidth: true } }
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user