From e3164d8d447a304cb0843e90b1bcd07c386608e5 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Sun, 9 May 2021 11:12:22 +0200 Subject: [PATCH] #2055 Fix for how ids are set to notes --- .../rendering/stateDiagram-v2.spec.js | 13 ++++++ cypress/platform/knsv.html | 43 ++++--------------- src/diagrams/state/stateRenderer-v2.js | 2 +- 3 files changed, 22 insertions(+), 36 deletions(-) diff --git a/cypress/integration/rendering/stateDiagram-v2.spec.js b/cypress/integration/rendering/stateDiagram-v2.spec.js index 1b230c56f..7574de9bc 100644 --- a/cypress/integration/rendering/stateDiagram-v2.spec.js +++ b/cypress/integration/rendering/stateDiagram-v2.spec.js @@ -385,6 +385,19 @@ stateDiagram-v2 } ); }); + it('v2 should handle multiple notes added to one state', () => { + imgSnapshotTest( + ` +stateDiagram-v2 + MyState + note left of MyState : I am a leftie + note right of MyState : I am a rightie + `, + { + logLevel: 0, fontFamily: 'courier', + } + ); + }); it('v2 handle transition from one state in a composite state to a composite state', () => { imgSnapshotTest( ` diff --git a/cypress/platform/knsv.html b/cypress/platform/knsv.html index 2e9434353..134573957 100644 --- a/cypress/platform/knsv.html +++ b/cypress/platform/knsv.html @@ -10,7 +10,7 @@