diff --git a/src/diagrams/flowchart/parser/flow-arrows.spec.js b/src/diagrams/flowchart/parser/flow-arrows.spec.js index 511dadda6..5f27457e7 100644 --- a/src/diagrams/flowchart/parser/flow-arrows.spec.js +++ b/src/diagrams/flowchart/parser/flow-arrows.spec.js @@ -23,7 +23,7 @@ describe('[Arrows] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -41,7 +41,7 @@ describe('[Arrows] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -59,7 +59,7 @@ describe('[Arrows] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -77,7 +77,7 @@ describe('[Arrows] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -95,7 +95,7 @@ describe('[Arrows] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -110,7 +110,7 @@ describe('[Arrows] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -125,7 +125,7 @@ describe('[Arrows] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -140,7 +140,7 @@ describe('[Arrows] when parsing', () => { expect(edges.length).toBe(2); expect(edges[1].start).toBe('B'); expect(edges[1].end).toBe('C'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); diff --git a/src/diagrams/flowchart/parser/flow-comments.spec.js b/src/diagrams/flowchart/parser/flow-comments.spec.js index e05caadd0..3b3a2da3c 100644 --- a/src/diagrams/flowchart/parser/flow-comments.spec.js +++ b/src/diagrams/flowchart/parser/flow-comments.spec.js @@ -23,7 +23,7 @@ describe('[Comments] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -38,7 +38,7 @@ describe('[Comments] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -53,7 +53,7 @@ describe('[Comments] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -68,7 +68,7 @@ describe('[Comments] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -83,7 +83,7 @@ describe('[Comments] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -98,7 +98,7 @@ describe('[Comments] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -113,7 +113,7 @@ describe('[Comments] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -128,7 +128,7 @@ describe('[Comments] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); @@ -145,7 +145,7 @@ describe('[Comments] when parsing', () => { expect(edges.length).toBe(1); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); }); diff --git a/src/diagrams/flowchart/parser/flow-huge.spec.js b/src/diagrams/flowchart/parser/flow-huge.spec.js index 901a615a2..8cdfd7593 100644 --- a/src/diagrams/flowchart/parser/flow-huge.spec.js +++ b/src/diagrams/flowchart/parser/flow-huge.spec.js @@ -19,7 +19,7 @@ describe('[Text] when parsing', () => { const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges.length).toBe(47917); console.log(vert); expect(Object.keys(vert).length).toBe(2); diff --git a/src/diagrams/flowchart/parser/flow-style.spec.js b/src/diagrams/flowchart/parser/flow-style.spec.js index db92660ae..fc388aa8f 100644 --- a/src/diagrams/flowchart/parser/flow-style.spec.js +++ b/src/diagrams/flowchart/parser/flow-style.spec.js @@ -273,7 +273,7 @@ describe('[Style] when parsing', () => { const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle multi-numbered style definitons with more then 1 digit in a row', function() { @@ -297,7 +297,7 @@ describe('[Style] when parsing', () => { const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle classDefs with style in classes', function() { @@ -306,7 +306,7 @@ describe('[Style] when parsing', () => { const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle classDefs with % in classes', function() { @@ -317,6 +317,6 @@ describe('[Style] when parsing', () => { const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); }); diff --git a/src/diagrams/flowchart/parser/flow-text.spec.js b/src/diagrams/flowchart/parser/flow-text.spec.js index 29979ce54..61703000a 100644 --- a/src/diagrams/flowchart/parser/flow-text.spec.js +++ b/src/diagrams/flowchart/parser/flow-text.spec.js @@ -74,7 +74,7 @@ describe('[Text] when parsing', () => { const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe('text including URL space and send'); }); it('should handle space and send', function() { @@ -83,7 +83,7 @@ describe('[Text] when parsing', () => { const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe('text including URL space and send'); }); @@ -380,7 +380,7 @@ describe('[Text] when parsing', () => { const edges = flow.parser.yy.getEdges(); expect(edges[0].type).toBe('arrow_circle'); - expect(edges[1].type).toBe('arrow'); + expect(edges[1].type).toBe('arrow_point'); expect(vert['A'].id).toBe('A'); expect(vert['B'].id).toBe('B'); expect(vert['C'].id).toBe('C'); diff --git a/src/diagrams/flowchart/parser/flow-vertice-chaining.spec.js b/src/diagrams/flowchart/parser/flow-vertice-chaining.spec.js index 64259ea1d..796075996 100644 --- a/src/diagrams/flowchart/parser/flow-vertice-chaining.spec.js +++ b/src/diagrams/flowchart/parser/flow-vertice-chaining.spec.js @@ -27,11 +27,11 @@ describe('when parsing flowcharts', function() { expect(edges.length).toBe(2); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); expect(edges[1].start).toBe('B'); expect(edges[1].end).toBe('C'); - expect(edges[1].type).toBe('arrow'); + expect(edges[1].type).toBe('arrow_point'); expect(edges[1].text).toBe(''); }); it('should handle chaining of vertices', function() { @@ -49,11 +49,11 @@ describe('when parsing flowcharts', function() { expect(edges.length).toBe(2); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('C'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); expect(edges[1].start).toBe('B'); expect(edges[1].end).toBe('C'); - expect(edges[1].type).toBe('arrow'); + expect(edges[1].type).toBe('arrow_point'); expect(edges[1].text).toBe(''); }); it('should multiple vertices in link statement in the begining', function() { @@ -71,11 +71,11 @@ describe('when parsing flowcharts', function() { expect(edges.length).toBe(2); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); expect(edges[1].start).toBe('A'); expect(edges[1].end).toBe('C'); - expect(edges[1].type).toBe('arrow'); + expect(edges[1].type).toBe('arrow_point'); expect(edges[1].text).toBe(''); }); it('should multiple vertices in link statement at the end', function() { @@ -94,19 +94,19 @@ describe('when parsing flowcharts', function() { expect(edges.length).toBe(4); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('C'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); expect(edges[1].start).toBe('A'); expect(edges[1].end).toBe('D'); - expect(edges[1].type).toBe('arrow'); + expect(edges[1].type).toBe('arrow_point'); expect(edges[1].text).toBe(''); expect(edges[2].start).toBe('B'); expect(edges[2].end).toBe('C'); - expect(edges[2].type).toBe('arrow'); + expect(edges[2].type).toBe('arrow_point'); expect(edges[2].text).toBe(''); expect(edges[3].start).toBe('B'); expect(edges[3].end).toBe('D'); - expect(edges[3].type).toBe('arrow'); + expect(edges[3].type).toBe('arrow_point'); expect(edges[3].text).toBe(''); }); it('should handle chaining of vertices at both ends at once', function() { @@ -125,19 +125,19 @@ describe('when parsing flowcharts', function() { expect(edges.length).toBe(4); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('C'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); expect(edges[1].start).toBe('A'); expect(edges[1].end).toBe('D'); - expect(edges[1].type).toBe('arrow'); + expect(edges[1].type).toBe('arrow_point'); expect(edges[1].text).toBe(''); expect(edges[2].start).toBe('B'); expect(edges[2].end).toBe('C'); - expect(edges[2].type).toBe('arrow'); + expect(edges[2].type).toBe('arrow_point'); expect(edges[2].text).toBe(''); expect(edges[3].start).toBe('B'); expect(edges[3].end).toBe('D'); - expect(edges[3].type).toBe('arrow'); + expect(edges[3].type).toBe('arrow_point'); expect(edges[3].text).toBe(''); }); it('should handle chaining and multiple nodes in in link statement FVC ', function() { @@ -157,27 +157,27 @@ describe('when parsing flowcharts', function() { expect(edges.length).toBe(6); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); expect(edges[1].start).toBe('A'); expect(edges[1].end).toBe('B2'); - expect(edges[1].type).toBe('arrow'); + expect(edges[1].type).toBe('arrow_point'); expect(edges[1].text).toBe(''); expect(edges[2].start).toBe('A'); expect(edges[2].end).toBe('C'); - expect(edges[2].type).toBe('arrow'); + expect(edges[2].type).toBe('arrow_point'); expect(edges[2].text).toBe(''); expect(edges[3].start).toBe('B'); expect(edges[3].end).toBe('D2'); - expect(edges[3].type).toBe('arrow'); + expect(edges[3].type).toBe('arrow_point'); expect(edges[3].text).toBe(''); expect(edges[4].start).toBe('B2'); expect(edges[4].end).toBe('D2'); - expect(edges[4].type).toBe('arrow'); + expect(edges[4].type).toBe('arrow_point'); expect(edges[4].text).toBe(''); expect(edges[5].start).toBe('C'); expect(edges[5].end).toBe('D2'); - expect(edges[5].type).toBe('arrow'); + expect(edges[5].type).toBe('arrow_point'); expect(edges[5].text).toBe(''); }); it('should handle chaining and multiple nodes in in link statement with extra info in statements', function() { @@ -203,19 +203,19 @@ describe('when parsing flowcharts', function() { expect(edges.length).toBe(4); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe('hello'); expect(edges[1].start).toBe('A'); expect(edges[1].end).toBe('C'); - expect(edges[1].type).toBe('arrow'); + expect(edges[1].type).toBe('arrow_point'); expect(edges[1].text).toBe('hello'); expect(edges[2].start).toBe('B'); expect(edges[2].end).toBe('D'); - expect(edges[2].type).toBe('arrow'); + expect(edges[2].type).toBe('arrow_point'); expect(edges[2].text).toBe(''); expect(edges[3].start).toBe('C'); expect(edges[3].end).toBe('D'); - expect(edges[3].type).toBe('arrow'); + expect(edges[3].type).toBe('arrow_point'); expect(edges[3].text).toBe(''); }); }); diff --git a/src/diagrams/flowchart/parser/flow.spec.js b/src/diagrams/flowchart/parser/flow.spec.js index 20899fbce..8c844cfc4 100644 --- a/src/diagrams/flowchart/parser/flow.spec.js +++ b/src/diagrams/flowchart/parser/flow.spec.js @@ -23,7 +23,7 @@ describe('when parsing ', function() { expect(edges.length).toBe(2); expect(edges[0].start).toBe('A'); expect(edges[0].end).toBe('B'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); expect(edges[0].text).toBe(''); }); diff --git a/src/diagrams/flowchart/parser/subgraph.spec.js b/src/diagrams/flowchart/parser/subgraph.spec.js index 3f9a83b67..e2e412b40 100644 --- a/src/diagrams/flowchart/parser/subgraph.spec.js +++ b/src/diagrams/flowchart/parser/subgraph.spec.js @@ -93,7 +93,7 @@ describe('when parsing subgraphs', function() { const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle subgraphs with title in quotes', function() { const res = flow.parser.parse('graph TD;A-->B;subgraph "title in quotes";c-->d;end;'); @@ -107,7 +107,7 @@ describe('when parsing subgraphs', function() { expect(subgraph.title).toBe('title in quotes'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle subgraphs in old style that was broken', function() { const res = flow.parser.parse('graph TD;A-->B;subgraph old style that is broken;c-->d;end;'); @@ -121,7 +121,7 @@ describe('when parsing subgraphs', function() { expect(subgraph.title).toBe('old style that is broken'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle subgraphs with dashes in the title', function() { const res = flow.parser.parse('graph TD;A-->B;subgraph a-b-c;c-->d;end;'); @@ -135,7 +135,7 @@ describe('when parsing subgraphs', function() { expect(subgraph.title).toBe('a-b-c'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle subgraphs with id and title in brackets', function() { const res = flow.parser.parse('graph TD;A-->B;subgraph uid1[text of doom];c-->d;end;'); @@ -150,7 +150,7 @@ describe('when parsing subgraphs', function() { expect(subgraph.title).toBe('text of doom'); expect(subgraph.id).toBe('uid1'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle subgraphs with id and title in brackets and quotes', function() { const res = flow.parser.parse('graph TD;A-->B;subgraph uid2["text of doom"];c-->d;end;'); @@ -165,7 +165,7 @@ describe('when parsing subgraphs', function() { expect(subgraph.title).toBe('text of doom'); expect(subgraph.id).toBe('uid2'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle subgraphs with id and title in brackets without spaces', function() { const res = flow.parser.parse('graph TD;A-->B;subgraph uid2[textofdoom];c-->d;end;'); @@ -180,7 +180,7 @@ describe('when parsing subgraphs', function() { expect(subgraph.title).toBe('textofdoom'); expect(subgraph.id).toBe('uid2'); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle subgraphs2', function() { @@ -189,7 +189,7 @@ describe('when parsing subgraphs', function() { const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle subgraphs3', function() { @@ -198,7 +198,7 @@ describe('when parsing subgraphs', function() { const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle nested subgraphs', function() { @@ -219,7 +219,7 @@ describe('when parsing subgraphs', function() { const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle subgraphs5', function() { @@ -228,7 +228,7 @@ describe('when parsing subgraphs', function() { const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); it('should handle subgraphs with multi node statements in it', function() { const res = flow.parser.parse('graph TD\nA-->B\nsubgraph myTitle\na & b --> c & e\n end;'); @@ -236,6 +236,6 @@ describe('when parsing subgraphs', function() { const vert = flow.parser.yy.getVertices(); const edges = flow.parser.yy.getEdges(); - expect(edges[0].type).toBe('arrow'); + expect(edges[0].type).toBe('arrow_point'); }); });