From 85e58faa78bf1f441738ebbac648a3c872196020 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Thu, 10 Oct 2019 17:57:29 +0200 Subject: [PATCH] #945 White background and forks in composite mode --- .../rendering/stateDiagram.spec.js | 22 ++++++++++++ dist/index.html | 4 +++ src/diagrams/state/shapes.js | 36 ++++++++++++++++--- src/diagrams/state/stateRenderer.js | 4 +++ 4 files changed, 61 insertions(+), 5 deletions(-) diff --git a/cypress/integration/rendering/stateDiagram.spec.js b/cypress/integration/rendering/stateDiagram.spec.js index bb93511a9..2c6bdb1e5 100644 --- a/cypress/integration/rendering/stateDiagram.spec.js +++ b/cypress/integration/rendering/stateDiagram.spec.js @@ -173,6 +173,28 @@ describe('State diagram', () => { { logLevel: 0 } ); }); + it('should render forks in composit states', () => { + imgSnapshotTest( + ` + stateDiagram + [*]-->TV + + state TV { + state fork_state <<fork>> + [*] --> fork_state + fork_state --> State2 + fork_state --> State3 + + state join_state <<join>> + State2 --> join_state + State3 --> join_state + join_state --> State4 + State4 --> [*] + } + `, + { logLevel: 0 } + ); + }); it('should render forks and joins', () => { imgSnapshotTest( ` diff --git a/dist/index.html b/dist/index.html index 2da7d74d4..f1ce7fa8e 100644 --- a/dist/index.html +++ b/dist/index.html @@ -418,6 +418,10 @@ class Class10 { size() } +
+ stateDiagram + s1 +