diff --git a/.changeset/proud-seahorses-wash.md b/.changeset/proud-seahorses-wash.md index 0c7e947cd..3384f28e9 100644 --- a/.changeset/proud-seahorses-wash.md +++ b/.changeset/proud-seahorses-wash.md @@ -2,4 +2,4 @@ 'mermaid': patch --- -Free fontawesome icons are now embeded as svg inside diagram. Pro icons will still be using tag. +Registered icons are now embedded as SVGs inside diagram. If an icon is not available in the registered icons it will still use tag diff --git a/cypress/integration/rendering/flowchart-icon.spec.js b/cypress/integration/rendering/flowchart-icon.spec.js new file mode 100644 index 000000000..be7dd7b70 --- /dev/null +++ b/cypress/integration/rendering/flowchart-icon.spec.js @@ -0,0 +1,32 @@ +import { imgSnapshotTest } from '../../helpers/util.ts'; + +const themes = ['default', 'forest', 'dark', 'base', 'neutral']; + +themes.forEach((theme, index) => { + describe('Flowchart Icon', () => { + it(`${index + 1}-icon: verify if icons are working from fontawesome library ${theme} theme`, () => { + imgSnapshotTest( + `flowchart TD + A("fab:fa-twitter Twitter") --> B("fab:fa-facebook Facebook") + B --> C("fa:fa-coffee Coffee") + C --> D("fa:fa-car Car") + D --> E("fab:fa-github GitHub") + `, + { theme } + ); + }); + }); +}); + +themes.forEach((theme, index) => { + describe('Flowchart Icon', () => { + it(`${index + 1}-icon: verify if registered icons are working on ${theme} theme`, () => { + imgSnapshotTest( + `flowchart TD + A("fa:fa-bell Bell") + `, + { theme } + ); + }); + }); +}); diff --git a/cypress/platform/e2e.html b/cypress/platform/e2e.html index d80caf7a4..7418da094 100644 --- a/cypress/platform/e2e.html +++ b/cypress/platform/e2e.html @@ -6,6 +6,10 @@ href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet" /> +