1.6 KB80 lines
Blame
1import { imgSnapshotTest } from '../../helpers/util.ts';
2
3describe('Mindmap Tidy Tree', () => {
4 it('1-tidy-tree: should render a simple mindmap without children', () => {
5 imgSnapshotTest(
6 ` ---
7 config:
8 layout: tidy-tree
9 ---
10 mindmap
11 root((mindmap))
12 A
13 B
14 `
15 );
16 });
17 it('2-tidy-tree: should render a simple mindmap', () => {
18 imgSnapshotTest(
19 ` ---
20 config:
21 layout: tidy-tree
22 ---
23 mindmap
24 root((mindmap is a long thing))
25 A
26 B
27 C
28 D
29 `
30 );
31 });
32 it('3-tidy-tree: should render a mindmap with different shapes', () => {
33 imgSnapshotTest(
34 ` ---
35 config:
36 layout: tidy-tree
37 ---
38 mindmap
39 root((mindmap))
40 Origins
41 Long history
42 ::icon(fa fa-book)
43 Popularisation
44 British popular psychology author Tony Buzan
45 Research
46 On effectiveness<br/>and features
47 On Automatic creation
48 Uses
49 Creative techniques
50 Strategic planning
51 Argument mapping
52 Tools
53 id)I am a cloud(
54 id))I am a bang((
55 Tools
56 `
57 );
58 });
59 it('4-tidy-tree: should render a mindmap with children', () => {
60 imgSnapshotTest(
61 ` ---
62 config:
63 layout: tidy-tree
64 ---
65 mindmap
66 ((This is a mindmap))
67 child1
68 grandchild 1
69 grandchild 2
70 child2
71 grandchild 3
72 grandchild 4
73 child3
74 grandchild 5
75 grandchild 6
76 `
77 );
78 });
79});
80