Skip to content

Commit

Permalink
Merge 753bd7e into a85bb0d
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreywolf committed Nov 26, 2019
2 parents a85bb0d + 753bd7e commit 42e8c6f
Show file tree
Hide file tree
Showing 7 changed files with 187 additions and 53 deletions.
8 changes: 0 additions & 8 deletions .vscode/settings.json

This file was deleted.

35 changes: 33 additions & 2 deletions cypress/integration/rendering/classDiagram.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { imgSnapshotTest } from '../../helpers/util';

describe('Class diagram', () => {
it('should render a simple class diagram', () => {
it('1: should render a simple class diagram', () => {
imgSnapshotTest(
`
classDiagram
Expand Down Expand Up @@ -33,7 +33,8 @@ describe('Class diagram', () => {
);
cy.get('svg');
});
it('should render a simple class diagrams with cardinality', () => {

it('2: should render a simple class diagrams with cardinality', () => {
imgSnapshotTest(
`
classDiagram
Expand Down Expand Up @@ -132,4 +133,34 @@ describe('Class diagram', () => {
);
cy.get('svg');
});

it('4: should render a simple class diagram with comments', () => {
imgSnapshotTest(
`
classDiagram
%% this is a comment
Class01 <|-- AveryLongClass : Cool
&lt;&lt;interface&gt;&gt; Class01
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
class Class10 {
&lt;&lt;service&gt;&gt;
int id
test()
}
`,
{}
);
cy.get('svg');
});
});
23 changes: 21 additions & 2 deletions cypress/integration/rendering/flowchart.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ describe('Flowcart', () => {
{ flowchart: { htmlLabels: false } }
);
});

it('2: should render a simple flowchart with htmlLabels', () => {
imgSnapshotTest(
`graph TD
Expand All @@ -26,6 +27,7 @@ describe('Flowcart', () => {
{ flowchart: { htmlLabels: true } }
);
});

it('3: should render a simple flowchart with line breaks', () => {
imgSnapshotTest(
`
Expand Down Expand Up @@ -99,6 +101,7 @@ describe('Flowcart', () => {
{}
);
});

it('6: should render a flowchart full of icons', () => {
imgSnapshotTest(
`
Expand Down Expand Up @@ -178,6 +181,7 @@ describe('Flowcart', () => {
{}
);
});

it('8: should render subgraphs', () => {
imgSnapshotTest(
`
Expand All @@ -190,7 +194,7 @@ describe('Flowcart', () => {
);
});

it('9: should render subgraphs with a title startign with a digit', () => {
it('9: should render subgraphs with a title starting with a digit', () => {
imgSnapshotTest(
`
graph TB
Expand Down Expand Up @@ -237,7 +241,7 @@ describe('Flowcart', () => {
);
});

it('11: should render a flowchart with ling sames and class definitoins', () => {
it('11: should render a flowchart with long names and class definitions', () => {
imgSnapshotTest(
`graph LR
sid-B3655226-6C29-4D00-B685-3D5C734DC7E1["
Expand Down Expand Up @@ -356,6 +360,7 @@ describe('Flowcart', () => {
}
);
});

it('13: should render hexagons', () => {
imgSnapshotTest(
`
Expand All @@ -377,4 +382,18 @@ describe('Flowcart', () => {
}
);
});

it('14: should render a simple flowchart with comments', () => {
imgSnapshotTest(
`graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
%% this is a comment
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[fa:fa-car Car]
`,
{ flowchart: { htmlLabels: false } }
);
});
});
Loading

0 comments on commit 42e8c6f

Please sign in to comment.