Skip to content

Commit

Permalink
Fixing failing test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishjain0512 committed May 6, 2022
1 parent 6528a0c commit 3cb9267
Show file tree
Hide file tree
Showing 6 changed files with 34,092 additions and 33,310 deletions.
2,263 changes: 1,186 additions & 1,077 deletions dist/mermaid.core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mermaid.core.js.map

Large diffs are not rendered by default.

65,121 changes: 32,896 additions & 32,225 deletions dist/mermaid.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mermaid.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/diagrams/pie/parser/pie.spec.js
Expand Up @@ -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');
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions src/diagrams/sequence/sequenceDiagram.spec.js
Expand Up @@ -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');
Expand All @@ -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');
Expand All @@ -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();
Expand Down

0 comments on commit 3cb9267

Please sign in to comment.