diff --git a/README.md b/README.md index ff4ace36a..9e8c2ef0a 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 c2f1533b2..c970c89b4 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] `, { - arrowMarkerAbsolute: true + logLevel:0, arrowMarkerAbsolute: true,fontFamily: '"Noto Sans SC", sans-serif' } ); diff --git a/cypress/integration/rendering/sequencediagram.spec.js b/cypress/integration/rendering/sequencediagram.spec.js index a4541b058..bdd0b170b 100644 --- a/cypress/integration/rendering/sequencediagram.spec.js +++ b/cypress/integration/rendering/sequencediagram.spec.js @@ -422,4 +422,30 @@ context('Sequence diagram', () => { ); }); }); + context('directives', () => { + it('should overide config with directive settings', () => { + imgSnapshotTest( + ` + sequenceDiagram + %%{config: { "mirrorActors": true} }%% + 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( + ` + 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 b95b8c19e..fa0477414 100644 --- a/cypress/platform/current.html +++ b/cypress/platform/current.html @@ -21,6 +21,14 @@

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; @@ -64,13 +72,14 @@ 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' + securityLevel: 'loose', + htmlLabels: false }); function callback(){alert('It worked');} diff --git a/cypress/platform/e2e.html b/cypress/platform/e2e.html index de1706be5..a279c4071 100644 --- a/cypress/platform/e2e.html +++ b/cypress/platform/e2e.html @@ -6,12 +6,12 @@