diff --git a/README.md b/README.md index 83fe09ec76..345c6622e0 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,7 @@ pie - [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) # Contributors [![Help wanted](https://img.shields.io/github/labels/mermaid-js/mermaid/Help%20wanted!)](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Help+wanted%21%22) [![Contributors](https://img.shields.io/github/contributors/mermaid-js/mermaid)](https://github.com/mermaid-js/mermaid/graphs/contributors) [![Commits](https://img.shields.io/github/commit-activity/m/mermaid-js/mermaid)](https://github.com/mermaid-js/mermaid/graphs/contributors) diff --git a/cypress/integration/rendering/flowchart.spec.js b/cypress/integration/rendering/flowchart.spec.js index c88129ddc5..4acccfc376 100644 --- a/cypress/integration/rendering/flowchart.spec.js +++ b/cypress/integration/rendering/flowchart.spec.js @@ -640,4 +640,35 @@ describe('Flowchart', () => { { flowchart: { htmlLabels: false } } ); }); + + it('31: should not slice off edges that are to the left of the left-most vertex', () => { + imgSnapshotTest( + `graph TD + work --> sleep + sleep --> work + eat --> sleep + work --> eat + `, + { flowchart: { htmlLabels: false } } + ); + }); + + it('32: Render Subroutine shape', () => { + imgSnapshotTest( + `graph LR + A[[subroutine shape test]] + A -->|Get money| B[[Go shopping]] + B --> C[[Let me think...
Do I want something for work,
something to spend every free second with,
or something to get around?]] + C -->|One| D[[Laptop]] + C -->|Two| E[[iPhone]] + C -->|Three| F[[Car
wroom wroom]] + click A "index.html#link-clicked" "link test" + click B testClick "click test" + classDef someclass fill:#f96; + class A someclass; + class C someclass; + `, + { flowchart: { htmlLabels: false } } + ); + }); }); diff --git a/cypress/integration/rendering/gantt.spec.js b/cypress/integration/rendering/gantt.spec.js index c3614ec19a..4c90654c81 100644 --- a/cypress/integration/rendering/gantt.spec.js +++ b/cypress/integration/rendering/gantt.spec.js @@ -1,7 +1,7 @@ /* eslint-env jest */ import { imgSnapshotTest } from '../../helpers/util.js'; -describe('Sequencediagram', () => { +describe('Gantt diagram', () => { it('should render a gantt chart', () => { imgSnapshotTest( ` @@ -130,4 +130,34 @@ describe('Sequencediagram', () => { {} ); }); + + it('should hide today marker', () => { + imgSnapshotTest( + ` + gantt + title Hide today marker (vertical line should not be visible) + dateFormat YYYY-MM-DD + axisFormat %d + todayMarker off + section Section1 + Today: 1, -1h + `, + {} + ); + }); + + it('should style today marker', () => { + imgSnapshotTest( + ` + gantt + title Style today marker (vertical line should be 5px wide and half-transparent blue) + dateFormat YYYY-MM-DD + axisFormat %d + todayMarker stroke-width:5px,stroke:#00f,opacity:0.5 + section Section1 + Today: 1, -1h + `, + {} + ); + }); }); diff --git a/cypress/integration/rendering/sequencediagram.spec.js b/cypress/integration/rendering/sequencediagram.spec.js index c084b73c1e..cf65485c75 100644 --- a/cypress/integration/rendering/sequencediagram.spec.js +++ b/cypress/integration/rendering/sequencediagram.spec.js @@ -182,5 +182,18 @@ context('Sequence diagram', () => { {} ); }); + it('should render autonumber with different line breaks', () => { + imgSnapshotTest( + ` + sequenceDiagram + autonumber + 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! + `, + {} + ); + }); }); }); diff --git a/cypress/platform/current.html b/cypress/platform/current.html index cc4b9e862d..01ce04d88b 100644 --- a/cypress/platform/current.html +++ b/cypress/platform/current.html @@ -7,7 +7,7 @@