From 19ed03c44c4ab436e306ca0954aaef167ca8cd3f Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Sat, 4 Jul 2020 12:35:34 +0200 Subject: [PATCH] #1524 Updated tests --- src/diagrams/sequence/sequenceDiagram.spec.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/diagrams/sequence/sequenceDiagram.spec.js b/src/diagrams/sequence/sequenceDiagram.spec.js index 69dca8b9e..a80c921d3 100644 --- a/src/diagrams/sequence/sequenceDiagram.spec.js +++ b/src/diagrams/sequence/sequenceDiagram.spec.js @@ -1028,7 +1028,7 @@ Alice->Bob: Hello Bob, how are you?`; expect(bounds.startx).toBe(0); expect(bounds.starty).toBe(0); expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin); - expect(bounds.stopy).toBe(models.lastMessage().stopy); + expect(bounds.stopy).toBe(models.lastMessage().stopy + 10); }); it('it should handle two actors with init directive', function() { const str = ` @@ -1045,7 +1045,7 @@ Alice->Bob: Hello Bob, how are you?`; expect(bounds.startx).toBe(0); expect(bounds.starty).toBe(0); expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin); - expect(bounds.stopy).toBe(models.lastMessage().stopy); + expect(bounds.stopy).toBe(models.lastMessage().stopy + 10); }); it('it should handle two actors with init directive with multiline directive', function() { const str = ` @@ -1066,7 +1066,7 @@ Alice->Bob: Hello Bob, how are you?`; expect(bounds.startx).toBe(0); expect(bounds.starty).toBe(0); expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin); - expect(bounds.stopy).toBe(models.lastMessage().stopy); + expect(bounds.stopy).toBe(models.lastMessage().stopy + 10); expect(msgs.every(v => v.wrap)).toBe(true); }); @@ -1100,7 +1100,7 @@ Bob->Alice: Fine!`; expect(bounds.startx).toBe(0); expect(bounds.starty).toBe(0); expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin); - expect(bounds.stopy).toBe(models.lastMessage().stopy); + expect(bounds.stopy).toBe(models.lastMessage().stopy + 10); }); it('it should draw two actors notes to the right', function() { const str = ` @@ -1119,7 +1119,7 @@ Bob->Alice: Fine!`; const expStopX = conf.actorMargin + conf.width + conf.width / 2 + conf.noteMargin + conf.width; expect(bounds.stopx).toBe(expStopX); - expect(bounds.stopy).toBe(models.lastMessage().stopy); + expect(bounds.stopy).toBe(models.lastMessage().stopy + 10); }); it('it should draw two actors notes to the left', function() { const str = ` @@ -1136,7 +1136,7 @@ Bob->Alice: Fine!`; expect(bounds.starty).toBe(0); expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin); - expect(bounds.stopy).toBe(models.lastMessage().stopy); + expect(bounds.stopy).toBe(models.lastMessage().stopy + 10); }); it('it should draw two actors notes to the left with text wrapped (inline)', function() { const str = ` @@ -1155,7 +1155,7 @@ Bob->>Alice: Fine!`; expect(msgs[0].wrap).toBe(true); expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin); - expect(bounds.stopy).toBe(models.lastMessage().stopy); + expect(bounds.stopy).toBe(models.lastMessage().stopy + 10); }); it('it should draw two actors notes to the left with text wrapped (directive)', function() { const str = ` @@ -1178,7 +1178,7 @@ Bob->>Alice: Fine!`; expect(msgs.every(v => v.wrap)).toBe(true); expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin); - expect(bounds.stopy).toBe(models.lastMessage().stopy); + expect(bounds.stopy).toBe(models.lastMessage().stopy + 10); }); it('it should draw two actors notes to the left with text wrapped and the init directive sets the theme to dark', function() { const str = ` @@ -1201,7 +1201,7 @@ Bob->>Alice: Fine!`; expect(msgs.every(v => v.wrap)).toBe(true); expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin); - expect(bounds.stopy).toBe(models.lastMessage().stopy); + expect(bounds.stopy).toBe(models.lastMessage().stopy + 10); }); it('it should draw two actors, notes to the left with text wrapped and the init directive sets the theme to dark and fontFamily to Menlo, fontSize to 18, and fontWeight to 800', function() { const str = ` @@ -1225,7 +1225,7 @@ Bob->>Alice: Fine!`; expect(msgs.every(v => v.wrap)).toBe(true); expect(bounds.stopx).toBe(conf.width * 2 + conf.actorMargin); - expect(bounds.stopy).toBe(models.lastMessage().stopy); + expect(bounds.stopy).toBe(models.lastMessage().stopy + 10); }); it('it should draw two loops', function() { const str = `