mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-03 20:34:20 +01:00 
			
		
		
		
	chore: added rendering test cases for arrow head type
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
		@@ -1042,4 +1042,167 @@ describe('Sequence diagram', () => {
 | 
			
		||||
      ]);
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
  describe('render new arrow type', () => {
 | 
			
		||||
    it('should render Solid half arrow top', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
    sequenceDiagram
 | 
			
		||||
      Alice -|\\  John: Hello John, how are you? 
 | 
			
		||||
      Alice-|\\  John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice -|\\  John: Test
 | 
			
		||||
      `
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
    it('should render Solid half arrow bottom', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
    sequenceDiagram
 | 
			
		||||
      Alice-|/John: Hello John, how are you?
 | 
			
		||||
      Alice-|/John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice-|/John: Test
 | 
			
		||||
      `
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('should render Stick half arrow top ', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
     sequenceDiagram
 | 
			
		||||
      Alice-\\\\John: Hello John, how are you?
 | 
			
		||||
      Alice-\\\\John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice-\\\\John: Test
 | 
			
		||||
      `
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
    it('should render Stick half arrow bottom ', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
       sequenceDiagram
 | 
			
		||||
      Alice-//John: Hello John, how are you?
 | 
			
		||||
      Alice-//John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice-//John: Test
 | 
			
		||||
      `
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
    it('should render Solid half arrow top reverse ', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
       sequenceDiagram
 | 
			
		||||
      Alice/|-John: Hello Alice, how are you?
 | 
			
		||||
      Alice/|-John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice/|-John: Test
 | 
			
		||||
 | 
			
		||||
      `
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('should render Solid half arrow bottom reverse ', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `sequenceDiagram
 | 
			
		||||
        Alice \\|- John: Hello Alice, how are you?
 | 
			
		||||
        Alice \\|- John: Hi Alice, I can hear you!
 | 
			
		||||
        Alice \\|- John: Test`
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('should render Stick half arrow top reverse ', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
      sequenceDiagram
 | 
			
		||||
      Alice //-John: Hello Alice, how are you?
 | 
			
		||||
      Alice //-John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice //-John: Test`
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('should render Stick half arrow bottom reverse ', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
       sequenceDiagram
 | 
			
		||||
      Alice \\\\-John: Hello Alice, how are you?
 | 
			
		||||
      Alice \\\\-John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice \\\\-John: Test`
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('should render Solid half arrow top dotted', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
     sequenceDiagram
 | 
			
		||||
      Alice --|\\John: Hello John, how are you?
 | 
			
		||||
      Alice --|\\John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice --|\\John: Test`
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('should render Solid half arrow bottom dotted', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
     sequenceDiagram
 | 
			
		||||
      Alice --|/John: Hello John, how are you?
 | 
			
		||||
      Alice --|/John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice --|/John: Test`
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('should render Stick half arrow top dotted', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
     sequenceDiagram
 | 
			
		||||
      Alice--\\\\John: Hello John, how are you?
 | 
			
		||||
      Alice--\\\\John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice--\\\\John: Test`
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('should render Stick half arrow bottom dotted', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
     sequenceDiagram
 | 
			
		||||
      Alice--//John: Hello John, how are you?
 | 
			
		||||
      Alice--//John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice--//John: Test`
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('should render Solid half arrow top reverse dotted', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
  sequenceDiagram
 | 
			
		||||
      Alice/|--John: Hello Alice, how are you?
 | 
			
		||||
      Alice/|--John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice/|--John: Test`
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('should render Solid half arrow bottom reverse dotted', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
  sequenceDiagram
 | 
			
		||||
      Alice\\|--John: Hello Alice, how are you?
 | 
			
		||||
      Alice\\|--John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice\\|--John: Test`
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('should render Stick half arrow top reverse dotted ', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
  sequenceDiagram
 | 
			
		||||
      Alice//--John: Hello Alice, how are you?
 | 
			
		||||
      Alice//--John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice//--John: Test`
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    it('should render Stick half arrow bottom reverse dotted ', () => {
 | 
			
		||||
      imgSnapshotTest(
 | 
			
		||||
        `
 | 
			
		||||
  sequenceDiagram
 | 
			
		||||
      Alice\\\\--John: Hello Alice, how are you?
 | 
			
		||||
      Alice\\\\--John: Hi Alice, I can hear you!
 | 
			
		||||
      Alice\\\\--John: Test`
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user