mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-04 12:54:08 +01:00 
			
		
		
		
	Fixing failing test cases
This commit is contained in:
		@@ -56,7 +56,7 @@ pie
 | 
			
		||||
"bat" : 40
 | 
			
		||||
`);
 | 
			
		||||
    const sections = pieDb.getSections();
 | 
			
		||||
    const title = pieDb.getTitle();
 | 
			
		||||
    const title = pieDb.getPieTitle();
 | 
			
		||||
    const section1 = sections['ash'];
 | 
			
		||||
    expect(section1).toBe(60);
 | 
			
		||||
    expect(title).toBe('a 60/40 pie');
 | 
			
		||||
@@ -69,7 +69,7 @@ pie
 | 
			
		||||
`);
 | 
			
		||||
 | 
			
		||||
    const sections = pieDb.getSections();
 | 
			
		||||
    const title = pieDb.getTitle();
 | 
			
		||||
    const title = pieDb.getPieTitle();
 | 
			
		||||
    const description = pieDb.getAccDescription();
 | 
			
		||||
    const section1 = sections['ash'];
 | 
			
		||||
    expect(section1).toBe(60);
 | 
			
		||||
@@ -85,7 +85,7 @@ pie
 | 
			
		||||
`);
 | 
			
		||||
 | 
			
		||||
    const sections = pieDb.getSections();
 | 
			
		||||
    const title = pieDb.getTitle();
 | 
			
		||||
    const title = pieDb.getPieTitle();
 | 
			
		||||
    const description = pieDb.getAccDescription();
 | 
			
		||||
    const section1 = sections['ash'];
 | 
			
		||||
    expect(section1).toBe(60);
 | 
			
		||||
@@ -103,7 +103,7 @@ pie
 | 
			
		||||
`);
 | 
			
		||||
 | 
			
		||||
    const sections = pieDb.getSections();
 | 
			
		||||
    const title = pieDb.getTitle();
 | 
			
		||||
    const title = pieDb.getPieTitle();
 | 
			
		||||
    const description = pieDb.getAccDescription();
 | 
			
		||||
    const section1 = sections['ash'];
 | 
			
		||||
    expect(section1).toBe(60);
 | 
			
		||||
 
 | 
			
		||||
@@ -77,7 +77,7 @@ Bob-->Alice: I am good thanks!`;
 | 
			
		||||
 | 
			
		||||
    expect(parser.yy.getAccDescription()).toBe('');
 | 
			
		||||
    const messages = parser.yy.getMessages();
 | 
			
		||||
    const title = parser.yy.getTitle();
 | 
			
		||||
    const title = parser.yy.getDiagramTitle();
 | 
			
		||||
 | 
			
		||||
    expect(messages.length).toBe(3);
 | 
			
		||||
    expect(messages[0].from).toBe('Alice');
 | 
			
		||||
@@ -100,7 +100,7 @@ Bob-->Alice: I am good thanks!`;
 | 
			
		||||
 | 
			
		||||
    expect(parser.yy.getAccDescription()).toBe('');
 | 
			
		||||
    const messages = parser.yy.getMessages();
 | 
			
		||||
    const title = parser.yy.getTitle();
 | 
			
		||||
    const title = parser.yy.getDiagramTitle();
 | 
			
		||||
 | 
			
		||||
    expect(messages.length).toBe(3);
 | 
			
		||||
    expect(messages[0].from).toBe('Alice');
 | 
			
		||||
@@ -111,12 +111,14 @@ Bob-->Alice: I am good thanks!`;
 | 
			
		||||
  it('it should handle a sequenceDiagram definition with a accessibility title and description (accDescr)', function () {
 | 
			
		||||
    const str = `
 | 
			
		||||
sequenceDiagram
 | 
			
		||||
title: Diagram Title
 | 
			
		||||
accTitle: This is the title
 | 
			
		||||
accDescr: Accessibility Description
 | 
			
		||||
Alice->Bob:Hello Bob, how are you?
 | 
			
		||||
`;
 | 
			
		||||
 | 
			
		||||
    mermaidAPI.parse(str);
 | 
			
		||||
    expect(parser.yy.getDiagramTitle()).toBe('Diagram Title');
 | 
			
		||||
    expect(parser.yy.getTitle()).toBe('This is the title');
 | 
			
		||||
    expect(parser.yy.getAccDescription()).toBe('Accessibility Description');
 | 
			
		||||
    const messages = parser.yy.getMessages();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user