Alter ERD syntax for compatibility with PlantUML

This commit is contained in:
Adrian Hall
2020-03-29 08:42:20 +01:00
parent 6ddd394e33
commit 9199546dca
7 changed files with 236 additions and 238 deletions

View File

@@ -6,8 +6,8 @@ describe('Entity Relationship Diagram', () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER !-?< ORDER : places
ORDER !-!< LINE-ITEM : contains
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
{logLevel : 1}
);
@@ -18,9 +18,9 @@ describe('Entity Relationship Diagram', () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER !-?< CUSTOMER : refers
CUSTOMER !-?< ORDER : places
ORDER !-!< LINE-ITEM : contains
CUSTOMER ||..o{ CUSTOMER : refers
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
{logLevel : 1}
);
@@ -31,8 +31,8 @@ describe('Entity Relationship Diagram', () => {
imgSnapshotTest(
`
erDiagram
CUSTOMER !-!< ADDRESS : "invoiced at"
CUSTOMER !-!< ADDRESS : "receives goods at"
CUSTOMER ||--|{ ADDRESS : "invoiced at"
CUSTOMER ||--|{ ADDRESS : "receives goods at"
`,
{logLevel : 1}
);
@@ -43,28 +43,27 @@ describe('Entity Relationship Diagram', () => {
imgSnapshotTest(
`
erDiagram
A !-!< B : likes
B !-!< C : likes
C !-!< A : likes
A ||--|{ B : likes
B ||--|{ C : likes
C ||--|{ A : likes
`,
{logLevel : 1}
);
cy.get('svg');
});
it('should render a not-so-simple ER diagram', () => {
imgSnapshotTest(
`
erDiagram
DELIVERY-ADDRESS !-?< ORDER : receives
CUSTOMER >!-!< DELIVERY-ADDRESS : has
CUSTOMER !-?< ORDER : places
CUSTOMER !-?< INVOICE : "liable for"
INVOICE !-!< ORDER : covers
ORDER !-!< ORDER-ITEM : includes
PRODUCT-CATEGORY !-!< PRODUCT : contains
PRODUCT !-?< ORDER-ITEM : "ordered in"
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
`,
{logLevel : 1}
);
@@ -76,13 +75,13 @@ describe('Entity Relationship Diagram', () => {
[
`
erDiagram
CUSTOMER !-?< ORDER : places
ORDER !-!< LINE-ITEM : contains
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`,
`
erDiagram
CUSTOMER !-?< ORDER : places
ORDER !-!< LINE-ITEM : contains
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
`
],
{logLevel : 1}