mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Update tests
This commit is contained in:
parent
6041729ae2
commit
cf2c7f7f8c
@ -990,4 +990,42 @@ class C13["With Città foreign language"]
|
|||||||
{ logLevel: 1, htmlLabels: true, look: 'handDrawn' }
|
{ logLevel: 1, htmlLabels: true, look: 'handDrawn' }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
it('should render a full class diagram using elk', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`
|
||||||
|
---
|
||||||
|
config:
|
||||||
|
layout: elk
|
||||||
|
---
|
||||||
|
classDiagram
|
||||||
|
note "I love this diagram!\nDo you love it?"
|
||||||
|
Class01 <|-- AveryLongClass : Cool
|
||||||
|
<<interface>> Class01
|
||||||
|
Class03 "1" *-- "*" Class04
|
||||||
|
Class05 "1" o-- "many" Class06
|
||||||
|
Class07 "1" .. "*" Class08
|
||||||
|
Class09 "1" --> "*" C2 : Where am i?
|
||||||
|
Class09 "*" --* "*" C3
|
||||||
|
Class09 "1" --|> "1" Class07
|
||||||
|
Class12 <|.. Class08
|
||||||
|
Class11 ..>Class12
|
||||||
|
Class07 : equals()
|
||||||
|
Class07 : Object[] elementData
|
||||||
|
Class01 : size()
|
||||||
|
Class01 : int chimp
|
||||||
|
Class01 : int gorilla
|
||||||
|
Class01 : -int privateChimp
|
||||||
|
Class01 : +int publicGorilla
|
||||||
|
Class01 : #int protectedMarmoset
|
||||||
|
Class08 <--> C2: Cool label
|
||||||
|
class Class10 {
|
||||||
|
<<service>>
|
||||||
|
int id
|
||||||
|
test()
|
||||||
|
}
|
||||||
|
note for Class10 "Cool class\nI said it's very cool class!"
|
||||||
|
`,
|
||||||
|
{ logLevel: 1, htmlLabels: true }
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -172,6 +172,7 @@ This Markdown should be kept.
|
|||||||
"| **Semantic Name** | **Shape Name** | **Short Name** | **Description** | **Alias Supported** |
|
"| **Semantic Name** | **Shape Name** | **Short Name** | **Description** | **Alias Supported** |
|
||||||
| --------------------------------- | ---------------------- | -------------- | ------------------------------ | ---------------------------------------------------------------- |
|
| --------------------------------- | ---------------------- | -------------- | ------------------------------ | ---------------------------------------------------------------- |
|
||||||
| Card | Notched Rectangle | \`notch-rect\` | Represents a card | \`card\`, \`notched-rectangle\` |
|
| Card | Notched Rectangle | \`notch-rect\` | Represents a card | \`card\`, \`notched-rectangle\` |
|
||||||
|
| Class Box | Class Box | \`classBox\` | Class Box | \`class-box\` |
|
||||||
| Collate | Hourglass | \`hourglass\` | Represents a collate operation | \`collate\`, \`hourglass\` |
|
| Collate | Hourglass | \`hourglass\` | Represents a collate operation | \`collate\`, \`hourglass\` |
|
||||||
| Com Link | Lightning Bolt | \`bolt\` | Communication link | \`com-link\`, \`lightning-bolt\` |
|
| Com Link | Lightning Bolt | \`bolt\` | Communication link | \`com-link\`, \`lightning-bolt\` |
|
||||||
| Comment | Curly Brace | \`brace\` | Adds a comment | \`brace-l\`, \`comment\` |
|
| Comment | Curly Brace | \`brace\` | Adds a comment | \`brace-l\`, \`comment\` |
|
||||||
|
@ -494,7 +494,7 @@ class C13["With Città foreign language"]
|
|||||||
],
|
],
|
||||||
methods: [],
|
methods: [],
|
||||||
annotations: [],
|
annotations: [],
|
||||||
cssClasses: [],
|
cssClasses: ['default'],
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(classDb.getClasses().size).toBe(3);
|
expect(classDb.getClasses().size).toBe(3);
|
||||||
@ -504,7 +504,7 @@ class C13["With Città foreign language"]
|
|||||||
"cssClasses": [
|
"cssClasses": [
|
||||||
"default",
|
"default",
|
||||||
],
|
],
|
||||||
"domId": "classId-Student-134",
|
"domId": "classId-Student-141",
|
||||||
"id": "Student",
|
"id": "Student",
|
||||||
"label": "Student",
|
"label": "Student",
|
||||||
"members": [
|
"members": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user