mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-10-31 19:04:16 +01:00 
			
		
		
		
	Merge pull request #1204 from GDFaber/bug/1196_keep_flowchart_label_text_when_style_is_applied
Keep flowchart node label text (if already defined) when a style is applied
This commit is contained in:
		| @@ -396,6 +396,7 @@ describe('Flowchart', () => { | ||||
|       { flowchart: { htmlLabels: false } } | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('16: Render Stadium shape', () => { | ||||
|     imgSnapshotTest( | ||||
|       ` graph TD | ||||
| @@ -412,6 +413,7 @@ describe('Flowchart', () => { | ||||
|       { flowchart: { htmlLabels: false } } | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('17: Render multiline texts', () => { | ||||
|     imgSnapshotTest( | ||||
|       `graph LR | ||||
| @@ -428,6 +430,7 @@ describe('Flowchart', () => { | ||||
|       { flowchart: { htmlLabels: false } } | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('18: Chaining of nodes', () => { | ||||
|     imgSnapshotTest( | ||||
|       `graph LR | ||||
| @@ -436,6 +439,7 @@ describe('Flowchart', () => { | ||||
|       { flowchart: { htmlLabels: false } } | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('19: Multiple nodes and chaining in one statement', () => { | ||||
|     imgSnapshotTest( | ||||
|       `graph LR | ||||
| @@ -444,6 +448,7 @@ describe('Flowchart', () => { | ||||
|       { flowchart: { htmlLabels: false } } | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('20: Multiple nodes and chaining in one statement', () => { | ||||
|     imgSnapshotTest( | ||||
|       `graph TD | ||||
| @@ -453,6 +458,7 @@ describe('Flowchart', () => { | ||||
|       { flowchart: { htmlLabels: false } } | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('21: Render cylindrical shape', () => { | ||||
|     imgSnapshotTest( | ||||
|       `graph LR | ||||
| @@ -474,6 +480,7 @@ describe('Flowchart', () => { | ||||
|       { flowchart: { htmlLabels: false } } | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('22: Render a simple flowchart with nodeSpacing set to 100', () => { | ||||
|     imgSnapshotTest( | ||||
|       `graph TD | ||||
| @@ -487,6 +494,7 @@ describe('Flowchart', () => { | ||||
|       { flowchart: { nodeSpacing: 50 } } | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('23: Render a simple flowchart with rankSpacing set to 100', () => { | ||||
|     imgSnapshotTest( | ||||
|       `graph TD | ||||
| @@ -500,4 +508,17 @@ describe('Flowchart', () => { | ||||
|       { flowchart: { rankSpacing: '100' } } | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('24: Keep node label text (if already defined) when a style is applied', () => { | ||||
|     imgSnapshotTest( | ||||
|       `graph LR | ||||
|       A(( )) -->|step 1| B(( )) | ||||
|       B(( )) -->|step 2| C(( )) | ||||
|       C(( )) -->|step 3| D(( )) | ||||
|       linkStyle 1 stroke:greenyellow,stroke-width:2px | ||||
|       style C fill:greenyellow,stroke:green,stroke-width:4px | ||||
|       `, | ||||
|       { flowchart: { htmlLabels: false } } | ||||
|     ); | ||||
|   }); | ||||
| }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Knut Sveidqvist
					Knut Sveidqvist