From 4709195a1da7f196dff8e00e744eb438844a862e Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 29 Jan 2020 19:57:59 +0100 Subject: [PATCH] #1223 Adding support for multiple transitions to a node from another node --- .../rendering/stateDiagram.spec.js | 14 ++++++- cypress/platform/current.html | 14 +++---- src/diagrams/state/stateDb.js | 1 + src/diagrams/state/stateRenderer.js | 41 ++++++++++++------- 4 files changed, 45 insertions(+), 25 deletions(-) diff --git a/cypress/integration/rendering/stateDiagram.spec.js b/cypress/integration/rendering/stateDiagram.spec.js index 3e0bf1e1c..56a60d4ae 100644 --- a/cypress/integration/rendering/stateDiagram.spec.js +++ b/cypress/integration/rendering/stateDiagram.spec.js @@ -319,7 +319,7 @@ describe('State diagram', () => { } ); }); - it('Simplest compone state', () => { + it('Simplest composit state', () => { imgSnapshotTest( ` stateDiagram @@ -332,5 +332,17 @@ describe('State diagram', () => { } ); }); + it('should handle multiple arrows from one node to another', () => { + imgSnapshotTest( + ` + stateDiagram + a --> b: Status + a --> b: Stop + `, + { + logLevel: 0, + } + ); + }); }); diff --git a/cypress/platform/current.html b/cypress/platform/current.html index d2e48875c..a40081288 100644 --- a/cypress/platform/current.html +++ b/cypress/platform/current.html @@ -18,20 +18,16 @@

info below

- graph TB - A --> B - A ==> C - A .-> D - A === E - A -.- F - D -- Hello --> a - D-- text including R TD space --xb + stateDiagram + a --> b: Status + a --> b: Stop +