diff --git a/cypress/integration/rendering/flowchart-v2.spec.js b/cypress/integration/rendering/flowchart-v2.spec.js index ecba0168c..1b01ce7cd 100644 --- a/cypress/integration/rendering/flowchart-v2.spec.js +++ b/cypress/integration/rendering/flowchart-v2.spec.js @@ -371,6 +371,38 @@ flowchart TD {htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'} ); }); + it('62: should render styled subgraphs', () => { + imgSnapshotTest( + ` + flowchart TB + A + B + subgraph foo[Foo SubGraph] + C + D + end + subgraph bar[Bar SubGraph] + E + F + end + G + A-->B + B-->C + C-->D + B-->D + D-->E + E-->A + E-->F + F-->D + F-->G + B-->G + G-->D + style foo fill:#F99,stroke-width:2px,stroke:#F0F,color:darkred + style bar fill:#999,stroke-width:10px,stroke:#0F0,color:blue + `, + {htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'} + ); + }); }); diff --git a/cypress/integration/rendering/flowchart.spec.js b/cypress/integration/rendering/flowchart.spec.js index 763dde713..30e9dfe34 100644 --- a/cypress/integration/rendering/flowchart.spec.js +++ b/cypress/integration/rendering/flowchart.spec.js @@ -234,8 +234,8 @@ describe('Flowchart', () => { B-->G G-->D - style foo fill:#F99,stroke-width:2px,stroke:#F0F - style bar fill:#999,stroke-width:10px,stroke:#0F0 + style foo fill:#F99,stroke-width:2px,stroke:#F0F,color:darkred + style bar fill:#999,stroke-width:10px,stroke:#0F0,color:blue `, { fontFamily: 'courier' } ); diff --git a/dist/flowchart.html b/dist/flowchart.html index 38578d54e..9e730b501 100644 --- a/dist/flowchart.html +++ b/dist/flowchart.html @@ -501,8 +501,8 @@ B-->G G-->D - style foo fill:#F99,stroke-width:2px,stroke:#F0F - style bar fill:#999,stroke-width:10px,stroke:#0F0 + style foo fill:#F99,stroke-width:2px,stroke:#F0F,color:darkred + style bar fill:#999,stroke-width:10px,stroke:#0F0,color:blue