mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-04 04:44:08 +01:00 
			
		
		
		
	feat: add hideUnusedParticipants and some cleanup
This commit is contained in:
		@@ -610,6 +610,22 @@ context('Sequence diagram', () => {
 | 
			
		||||
        }
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
    it("shouldn't display unused participants", () => {
 | 
			
		||||
      //Be aware that the syntax for "properties" is likely to be changed.
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
        %%{init: { "config": { "hideUnusedParticipants": true }}}%%
 | 
			
		||||
        sequenceDiagram
 | 
			
		||||
        participant a
 | 
			
		||||
      `,
 | 
			
		||||
        {
 | 
			
		||||
          logLevel: 0,
 | 
			
		||||
          sequence: { mirrorActors: false, noteFontSize: 18, noteFontFamily: 'Arial' },
 | 
			
		||||
        },
 | 
			
		||||
        false,
 | 
			
		||||
        (svg) => expect(svg.get('rect')).to.be.empty()
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
  context('svg size', () => {
 | 
			
		||||
    it('should render a sequence diagram when useMaxWidth is true (default)', () => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user