mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-28 20:56:48 +02:00
80 lines
1.6 KiB
JavaScript
80 lines
1.6 KiB
JavaScript
import { imgSnapshotTest } from '../../helpers/util.ts';
|
|
|
|
describe('Mindmap Tidy Tree', () => {
|
|
it('1-tidy-tree: should render a simple mindmap without children', () => {
|
|
imgSnapshotTest(
|
|
` ---
|
|
config:
|
|
layout: tidy-tree
|
|
---
|
|
mindmap
|
|
root((mindmap))
|
|
A
|
|
B
|
|
`
|
|
);
|
|
});
|
|
it('2-tidy-tree: should render a simple mindmap', () => {
|
|
imgSnapshotTest(
|
|
` ---
|
|
config:
|
|
layout: tidy-tree
|
|
---
|
|
mindmap
|
|
root((mindmap is a long thing))
|
|
A
|
|
B
|
|
C
|
|
D
|
|
`
|
|
);
|
|
});
|
|
it('3-tidy-tree: should render a mindmap with different shapes', () => {
|
|
imgSnapshotTest(
|
|
` ---
|
|
config:
|
|
layout: tidy-tree
|
|
---
|
|
mindmap
|
|
root((mindmap))
|
|
Origins
|
|
Long history
|
|
::icon(fa fa-book)
|
|
Popularisation
|
|
British popular psychology author Tony Buzan
|
|
Research
|
|
On effectiveness<br/>and features
|
|
On Automatic creation
|
|
Uses
|
|
Creative techniques
|
|
Strategic planning
|
|
Argument mapping
|
|
Tools
|
|
id)I am a cloud(
|
|
id))I am a bang((
|
|
Tools
|
|
`
|
|
);
|
|
});
|
|
it('4-tidy-tree: should render a mindmap with children', () => {
|
|
imgSnapshotTest(
|
|
` ---
|
|
config:
|
|
layout: tidy-tree
|
|
---
|
|
mindmap
|
|
((This is a mindmap))
|
|
child1
|
|
grandchild 1
|
|
grandchild 2
|
|
child2
|
|
grandchild 3
|
|
grandchild 4
|
|
child3
|
|
grandchild 5
|
|
grandchild 6
|
|
`
|
|
);
|
|
});
|
|
});
|