updated test for icon shape

This commit is contained in:
saurabhg772244 2024-09-09 15:07:42 +05:30
parent 4d04d1a8c3
commit edb99c2842
2 changed files with 17 additions and 7 deletions

View File

@ -109,3 +109,13 @@ looks.forEach((look) => {
});
});
});
describe('Test iconShape with different h', () => {
it('with different h', () => {
let flowchartCode = `flowchart TB\n`;
const icon = 'fa:bell';
const iconHeight = 64;
flowchartCode += ` nA --> nAA@{ icon: '${icon}', label: 'icon with different h', h: ${iconHeight} }@\n`;
imgSnapshotTest(flowchartCode);
});
});

View File

@ -62,18 +62,18 @@
<body>
<pre id="diagram4" class="mermaid">
flowchart
A --> B2@{ icon: "fa:image", form: "square", label: "test augfuyfavf ydvaubfuac" }@ --> C
flowchart LR
A --> B2@{ icon: "fa:bell", form: "square", label: "test augfuyfavf ydvaubfuac", pos: "t", h: 400, w: 50 }@ --> C
</pre
>
<pre id="diagram5" class="mermaid">
<pre id="diagram5" class="mermaid2">
flowchart
A --> B2@{ icon: "fa:image", form: "circle", label: "test augfuyfavf ydvaubfuac" }@ --> C
A --> B2@{ icon: "fa:bell", form: "circle", label: "test awbd dauwdug wdgauyd yagyua aygua", pos: "t", w: 50, h: 50 }@ --> C
</pre
>
<pre id="diagram6" class="mermaid">
<pre id="diagram6" class="mermaid2">
flowchart
A --> B2@{ icon: "fa:image", label: "test augfuyfavf ydvaubfuac" }@ --> C
A --> B2@{ icon: "fa:bell", label: "test augfuyfavf ydvaubfuac", pos: "t", w: 200, h: 100 }@ --> C
</pre
>
<script type="module">
@ -112,7 +112,7 @@
// layout: 'elk',
// layout: 'fixed',
// htmlLabels: false,
flowchart: { titleTopMargin: 10, padding: 5, htmlLables: true },
flowchart: { titleTopMargin: 10, padding: 50, htmlLables: false },
// fontFamily: 'Caveat',
fontFamily: 'Kalam',
// fontFamily: 'courier',