#945 Rendering of labels and new label positioning algorithm

This commit is contained in:
Knut Sveidqvist
2019-09-28 13:31:10 +02:00
parent 13baa43081
commit 3cffd1e3ed
6 changed files with 143 additions and 31 deletions

View File

@@ -13,4 +13,33 @@ describe('State diagram', () => {
);
cy.get('svg');
});
it('should render a simple state diagrams', () => {
imgSnapshotTest(
`
stateDiagram
[*] --> State1
State1 --> State2
State1 --> State3
State1 --> [*]
`,
{ logLevel: 0 }
);
cy.get('svg');
});
it('should render a simple state diagrams with labels', () => {
imgSnapshotTest(
`
stateDiagram
[*] --> State1
State1 --> State2 : Transition 1
State1 --> State3 : Transition 2
State1 --> State4 : Transition 3
State1 --> State5 : Transition 4
State2 --> State3 : Transition 5
State1 --> [*]
`,
{ logLevel: 0 }
);
cy.get('svg');
});
});