mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-03 20:34:20 +01:00 
			
		
		
		
	Merge from upstream mermaid OS develop
This commit is contained in:
		@@ -171,6 +171,58 @@ describe.skip('architecture diagram', () => {
 | 
			
		||||
            `
 | 
			
		||||
    );
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  it('should render an architecture diagram with a resonable height', () => {
 | 
			
		||||
    imgSnapshotTest(
 | 
			
		||||
      `architecture-beta
 | 
			
		||||
              group federated(cloud)[Federated Environment]
 | 
			
		||||
                  service server1(server)[System] in federated
 | 
			
		||||
                  service edge(server)[Edge Device] in federated
 | 
			
		||||
                  server1:R -- L:edge
 | 
			
		||||
 | 
			
		||||
              group on_prem(cloud)[Hub]
 | 
			
		||||
                  service firewall(server)[Firewall Device] in on_prem
 | 
			
		||||
                  service server(server)[Server] in on_prem
 | 
			
		||||
                  firewall:R -- L:server
 | 
			
		||||
 | 
			
		||||
                  service db1(database)[db1] in on_prem
 | 
			
		||||
                  service db2(database)[db2] in on_prem
 | 
			
		||||
                  service db3(database)[db3] in on_prem
 | 
			
		||||
                  service db4(database)[db4] in on_prem
 | 
			
		||||
                  service db5(database)[db5] in on_prem
 | 
			
		||||
                  service db6(database)[db6] in on_prem
 | 
			
		||||
 | 
			
		||||
                  junction mid in on_prem
 | 
			
		||||
                  server:B -- T:mid
 | 
			
		||||
 | 
			
		||||
                  junction 1Leftofmid in on_prem
 | 
			
		||||
                  1Leftofmid:R -- L:mid
 | 
			
		||||
                  1Leftofmid:B -- T:db1
 | 
			
		||||
 | 
			
		||||
                  junction 2Leftofmid in on_prem
 | 
			
		||||
                  2Leftofmid:R -- L:1Leftofmid
 | 
			
		||||
                  2Leftofmid:B -- T:db2
 | 
			
		||||
 | 
			
		||||
                  junction 3Leftofmid in on_prem
 | 
			
		||||
                  3Leftofmid:R -- L:2Leftofmid
 | 
			
		||||
                  3Leftofmid:B -- T:db3
 | 
			
		||||
 | 
			
		||||
                  junction 1RightOfMid in on_prem
 | 
			
		||||
                  mid:R -- L:1RightOfMid
 | 
			
		||||
                  1RightOfMid:B -- T:db4
 | 
			
		||||
                  
 | 
			
		||||
                  junction 2RightOfMid in on_prem
 | 
			
		||||
                  1RightOfMid:R -- L:2RightOfMid
 | 
			
		||||
                  2RightOfMid:B -- T:db5        
 | 
			
		||||
                  
 | 
			
		||||
                  junction 3RightOfMid in on_prem
 | 
			
		||||
                  2RightOfMid:R -- L:3RightOfMid
 | 
			
		||||
                  3RightOfMid:B -- T:db6         
 | 
			
		||||
 | 
			
		||||
                  edge:R -- L:firewall
 | 
			
		||||
      `
 | 
			
		||||
    );
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
// Skipped as the layout is not deterministic, and causes issues in E2E tests.
 | 
			
		||||
 
 | 
			
		||||
@@ -1076,4 +1076,32 @@ end
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
  describe('New @ sytax for node metadata edge cases', () => {
 | 
			
		||||
    it('should be possible to use @  syntax to add labels on multi nodes', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `flowchart TB
 | 
			
		||||
       n2["label for n2"] &   n4@{ label: "labe for n4"}   & n5@{ label: "labe for n5"}
 | 
			
		||||
        `,
 | 
			
		||||
        {}
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
    it('should be possible to use @  syntax to add labels with trail spaces and &', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `flowchart TB
 | 
			
		||||
       n2["label for n2"] &   n4@{ label: "labe for n4"}   & n5@{ label: "labe for n5"}   
 | 
			
		||||
        `,
 | 
			
		||||
        {}
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
    it('should be possible to use @  syntax to add labels with trail spaces', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `flowchart TB
 | 
			
		||||
       n2["label for n2"]
 | 
			
		||||
       n4@{ label: "labe for n4"}
 | 
			
		||||
       n5@{ label: "labe for n5"}  
 | 
			
		||||
        `,
 | 
			
		||||
        {}
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user