diff --git a/README.md b/README.md index 9e8c2ef0a..ff4ace36a 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,7 @@ pie ## Related projects -- [Command Line Interface](https://github.com/mermaid-js/mermaid-cli) +- [Command Line Interface](https://github.com/mermaid-js/mermaid.cli) - [Live Editor](https://github.com/mermaid-js/mermaid-live-editor) - [HTTP Server](https://github.com/TomWright/mermaid-server) diff --git a/cypress/integration/other/configuration.spec.js b/cypress/integration/other/configuration.spec.js index c970c89b4..c2f1533b2 100644 --- a/cypress/integration/other/configuration.spec.js +++ b/cypress/integration/other/configuration.spec.js @@ -88,7 +88,7 @@ describe('Configuration', () => { C -->|Three| F[fa:fa-car Car] `, { - logLevel:0, arrowMarkerAbsolute: true,fontFamily: '"Noto Sans SC", sans-serif' + arrowMarkerAbsolute: true } ); diff --git a/cypress/integration/rendering/sequencediagram.spec.js b/cypress/integration/rendering/sequencediagram.spec.js index c386a8bbd..c5925fa6a 100644 --- a/cypress/integration/rendering/sequencediagram.spec.js +++ b/cypress/integration/rendering/sequencediagram.spec.js @@ -126,29 +126,6 @@ context('Sequence diagram', () => { participant A as Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be A->>Bob: Hola Bob-->A: Pasten ! - `, - {logLevel: 0} - ); - }); - it('should wrap (inline) long actor descriptions', () => { - imgSnapshotTest( - ` - sequenceDiagram - participant A as wrap:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be - A->>Bob: Hola - Bob-->A: Pasten ! - `, - {logLevel: 0} - ); - }); - it('should wrap (directive) long actor descriptions', () => { - imgSnapshotTest( - ` - %%{init: {'config': {'wrapEnabled': true }}}%% - sequenceDiagram - participant A as Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be - A->>Bob: Hola - Bob-->A: Pasten ! `, {} ); @@ -164,17 +141,6 @@ context('Sequence diagram', () => { {} ); }); - it('should render long notes wrapped (inline) left of actor', () => { - imgSnapshotTest( - ` - sequenceDiagram - Alice->>Bob: Hola - Note left of Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be - Bob->>Alice: I'm short though - `, - {} - ); - }); it('should render long notes right of actor', () => { imgSnapshotTest( ` @@ -186,17 +152,6 @@ context('Sequence diagram', () => { {} ); }); - it('should render long notes wrapped (inline) right of actor', () => { - imgSnapshotTest( - ` - sequenceDiagram - Alice->>Bob: Hola - Note right of Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be - Bob->>Alice: I'm short though - `, - {} - ); - }); it('should render long notes over actor', () => { imgSnapshotTest( ` @@ -208,17 +163,6 @@ context('Sequence diagram', () => { {} ); }); - it('should render long notes wrapped (inline) over actor', () => { - imgSnapshotTest( - ` - sequenceDiagram - Alice->>Bob: Hola - Note over Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be - Bob->>Alice: I'm short though - `, - {} - ); - }); it('should render long messages from an actor to the left to one to the right', () => { imgSnapshotTest( ` @@ -229,16 +173,6 @@ context('Sequence diagram', () => { {} ); }); - it('should render long messages wrapped (inline) from an actor to the left to one to the right', () => { - imgSnapshotTest( - ` - sequenceDiagram - Alice->>Bob:wrap:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be - Bob->>Alice: I'm short though - `, - {} - ); - }); it('should render long messages from an actor to the right to one to the left', () => { imgSnapshotTest( ` @@ -249,16 +183,6 @@ context('Sequence diagram', () => { {} ); }); - it('should render long messages wrapped (inline) from an actor to the right to one to the left', () => { - imgSnapshotTest( - ` - sequenceDiagram - Alice->>Bob: I'm short - Bob->>Alice:wrap: Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be - `, - {} - ); - }); }); context('background rects', () => { it('should render a single and nested rects', () => { @@ -292,69 +216,6 @@ context('Sequence diagram', () => { {} ); }); - it('should render a single and nested opt with long test overflowing', () => { - imgSnapshotTest( - ` - sequenceDiagram - participant A - participant B - participant C - participant D - participant E - participant G - - A ->>+ B: Task 1 - opt this is an opt with a long title that will overflow - B ->>+ C: Task 2 - C -->>- B: Return - end - - A ->> D: Task 3 - opt this is another opt with a long title that will overflow - D ->>+ E: Task 4 - opt this is a nested opt with a long title that will overflow - E ->>+ G: Task 5 - G -->>- E: Return - end - E ->> E: Task 6 - end - D -->> A: Complete - `, - {} - ); - }); - it('should render a single and nested opt with long test wrapping', () => { - imgSnapshotTest( - ` - %%{init: { 'config': { 'wrapEnabled': true } } }%% - sequenceDiagram - participant A - participant B - participant C - participant D - participant E - participant G - - A ->>+ B: Task 1 - opt this is an opt with a long title that will overflow - B ->>+ C: Task 2 - C -->>- B: Return - end - - A ->> D: Task 3 - opt this is another opt with a long title that will overflow - D ->>+ E: Task 4 - opt this is a nested opt with a long title that will overflow - E ->>+ G: Task 5 - G -->>- E: Return - end - E ->> E: Task 6 - end - D -->> A: Complete - `, - {} - ); - }); it('should render rect around and inside loops', () => { imgSnapshotTest( ` @@ -466,69 +327,5 @@ context('Sequence diagram', () => { {} ); }); - it('should render dark theme from init directive and configure font size 24 font', () => { - imgSnapshotTest( - ` - %%{init: {'theme': 'dark', 'config': {'fontSize': 24}}}%% - sequenceDiagram - Alice->>John: Hello John, how are you? - Alice->>John: John, can you hear me? - John-->>Alice: Hi Alice, I can hear you! - John-->>Alice: I feel great! - `, - {} - ); - }); - it('should render with wrapping enabled', () => { - imgSnapshotTest( - ` - %%{init: { 'config': { 'wrapEnabled': true }}}%% - sequenceDiagram - participant A as Alice, the talkative one - A->>John: Hello John, how are you today? I'm feeling quite verbose today. - A->>John: John, can you hear me? If you are not available, we can talk later. - John-->>A: Hi Alice, I can hear you! I was finishing up an important meeting. - John-->>A: I feel great! I was not ignoring you. I am sorry you had to wait for a response. - `, - {} - ); - }); - it('should render with an init directive', () => { - imgSnapshotTest( -`%%{init: { "theme": "dark", 'config': { "fontFamily": "Menlo", "fontSize": 18, "fontWeight": 400, "wrapEnabled": true }}}%% - sequenceDiagram - Alice->>Bob: Hello Bob, how are you? If you are not available right now, I can leave you a message. Please get back to me as soon as you can! - Note left of Alice: Bob thinks - Bob->>Alice: Fine!`, - {} - ) - }); - }); - context('directives', () => { - it('should overide config with directive settings', () => { - imgSnapshotTest( - ` - %%{init: { "sequence": { "mirrorActors": true }}}%% - sequenceDiagram - Alice->>Bob: I'm short - note left of Alice: config set to mirrorActors: false
directive set to mirrorActors: true - Bob->>Alice: Short as well - `, - { logLevel:0, sequence: { mirrorActors: false, noteFontSize: 18, noteFontFamily: 'Arial' } } - ); - }); - it('should overide config with directive settings', () => { - imgSnapshotTest( - ` - %%{init: { "sequence": { "mirrorActors": false }}}%% - sequenceDiagram - %%{config: { "mirrorActors": false} }%% - Alice->>Bob: I'm short - note left of Alice: config set to mirrorActors: true
directive set to mirrorActors: false - Bob->>Alice: Short as well - `, - { logLevel:0, sequence: { mirrorActors: true, noteFontSize: 18, noteFontFamily: 'Arial' } } - ); - }); }); }); diff --git a/cypress/platform/current.html b/cypress/platform/current.html index fa0477414..b95b8c19e 100644 --- a/cypress/platform/current.html +++ b/cypress/platform/current.html @@ -21,14 +21,6 @@

info below

- graph TD - A[Christmas] -->|Get money| B(Go shopping) - B --> C{Let me think} - C -->|One| D[Laptop] - C -->|Two| E[iPhone] - C -->|Three| F[fa:fa-car Car] -
-
flowchart TB subgraph 1 A --> B; @@ -72,14 +64,13 @@ flowchart TB // arrowMarkerAbsolute: true, // themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}', logLevel: 0, - flowchart: { curve: 'linear',htmlLabels: false }, + flowchart: { curve: 'linear', "htmlLabels": false }, // gantt: { axisFormat: '%m/%d/%Y' }, sequence: { actorMargin: 50, showSequenceNumbers: true }, // sequenceDiagram: { actorMargin: 300 } // deprecated fontFamily: '"arial", sans-serif', curve: 'linear', - securityLevel: 'loose', - htmlLabels: false + securityLevel: 'loose' }); function callback(){alert('It worked');} diff --git a/cypress/platform/e2e.html b/cypress/platform/e2e.html index a279c4071..de1706be5 100644 --- a/cypress/platform/e2e.html +++ b/cypress/platform/e2e.html @@ -6,12 +6,12 @@